Commit Graph

118 Commits

Author SHA1 Message Date
Nikolay Volf 62210fb932 WASM contracts MVP (#5679)
* lifetime issues

* refactor to new 'native env'

* descriptors and such

* wasm mvp continued

* finalized env/ext bindings

* descriptor -> call_args

* inject gas counter

* result processing and engine activation

* tabify some source files

* needs return new

* wasm tests initial

* erradicate warnings

* origin in the descriptor

* update test repo

* payload verification tests

* identity return payload test

* some test description

* dispersion test

* check length here

* suicidal contract

* engine params

* fix typo

* review fixes

* submodule update

* update - purge reserved space

* doc effort

* more review fixes

* fix error message

* fix dependency url

* reorg error handling

* update submodule

* update utils

* update to latest parity-wasm

* tabify

* fix wasm magic header

* update dependencies

* external create and tests

* update to latest tests

* extra trace info

* Update parity-wasm

* update wasm-utils also

* few traces and result handle change

* alter trace content

* fix issues with optimizer, update to latest parity with validator, etc

* static initialization

* license preamble

* update wasm crates and gas costs

* fix grumbles

* bring back lifetime

* fix compilation
2017-07-10 17:42:10 +02:00
Tomasz Drwięga f4453f77b8 Fix output of parity-evm in case of bad instruction (#5955)
* Fix output of evmbin.

* Use foundation chain settings by default.
2017-07-10 13:23:40 +02:00
Robert Habermeier 125aa0aeb4 Merge pull request #5959 from paritytech/dont-compute-hash
Defer code hash calculation.
2017-07-06 19:00:19 +02:00
Marek Kotewicz 46183b1cdd bigint upgraded to version 3.0 (#5986)
* bigint upgraded to version 3.0

* fixed missing FromHex import in ethcore tests

* fixed missing FromHex import in rpc tests
2017-07-06 11:26:14 +02:00
Tomasz Drwięga 5d9f5e3509
Defer code hash calculation. 2017-06-30 11:30:32 +02:00
Arkadiy Paronyan 57626b60e7 EIP-168, 169: Dust protection (#4757)
* Dust protection

* Track touched accounts in the substate

* Minor alterations
2017-06-28 09:10:57 +02:00
Marek Kotewicz 575c51f5a0 eip214, #4833 (#4851) 2017-06-19 11:41:46 +02:00
Tomasz Drwięga 75ac263961 Fix stack display in evmbin. (#5733)
* Fix stack display.

* Additional compatiblity fixes.
2017-06-09 12:31:03 +02:00
Arkadiy Paronyan 99bfef2801 EIP-211 RETURNDATACOPY and RETURNDATASIZE (#5678)
* EIP-211

* Optimized memory usage

* Optimized truncation
2017-06-06 18:47:12 +03:00
Arkadiy Paronyan e6a31e7543 EIP-210 BLOCKHASH changes (#5505)
* EIP-210

* comment
2017-05-30 11:52:33 +02:00
Nikolay Volf e1fef5c732 Update dependencies and bigint api (#5685)
* update to latest bigint

* bump elastic array and deps

* fix rlp tests

* also update all smallvec deps

* fix doc test

* reduce parking in attempt to fix CI bug

* fix from/into electum bug

* remove duplicate imports
2017-05-24 12:31:33 +02:00
Arkadiy Paronyan dd004aba9f EIP-140 (#5477) 2017-05-23 16:49:17 +03:00
Robert Habermeier 4c5e4ac8da PoA warp implementation (#5488)
* separate modules for consensus snapshot chunks

* bulk of authority warp logic

* finish authority warp implementation

* squash warnings and enable authority snapshot mode

* test harness for PoA

* fiddle with harness

* epoch generation proof fixes

* update constructor code

* store epoch transition proof after block commit

* basic snap and restore test

* use keyvaluedb in state restoration

* decompress chunks

* fix encoding issues

* fixed-to-contract-to-contract test

* implement ancient block import

* restore genesis transition in PoW snapshot

* add format version method to snapshot components

* supported version numbers in snapshot_components

* allow returning of ancient epoch transitions

* genesis hash mismatch check

* remove commented code
2017-05-17 12:41:33 +02:00
Arkadiy Paronyan ed7c366b90 EIP-86 fixes (#5506) 2017-05-05 15:00:40 +01:00
arkpar 04e581db61 Correct contract address for EIP-86 2017-04-19 14:50:56 +02:00
Arkadiy Paronyan b50fb71dd1 EIP-86 (#4697)
* EIP-86

* Disable EIP-86 auto activation for now
2017-04-19 14:30:00 +02:00
arkpar 314af4cdae Use in-memory database in tests 2017-04-13 12:17:53 +02:00
NikVolf c313857485 fix error handling 2017-03-27 18:17:49 +03:00
NikVolf 5e34235a36 initial, fallable built-ins 2017-03-22 04:01:46 +03:00
Robert Habermeier 797a3e1cd9 EIP198 and built-in activation (#4926)
* EIP198 and built-in activation

* address review
2017-03-21 19:36:38 +03:00
Marek Kotewicz a555686bcd rlp serialization refactor (#4873)
* fixed naming of rlp modules

* RlpStream cleanup

* appending short rlp lists (0...55 bytes) is 25% faster

* RlpStream does not use bytes module, nor trait Stream

* removed unused code from rlp module

* compiling ethcore-util with new rlp serialization

* compiling parity with new rlp serialization

* fixed compiling ethcore-light with new rlp serialization

* fixed compiling ethsync with new rlp serialization

* removed redundant comment, print

* removed redundant double-space

* replace usage of WriteBytesExt with ByteOrder
2017-03-20 19:14:29 +01:00
Marek Kotewicz 3fe3353696 removed redundant FixedHash trait, fixes #4029 (#4866) 2017-03-11 22:58:15 +04:00
Robert Habermeier 1bf2b27708 Propagate trie errors upwards from State (#4655)
* state backend trait mirroring state_db API

* minimal state backend trait

make state module public

* fix json tests

* return errors on database corruption

* fix tests, json tests

* fix remainder of build

* add Backend bound on state
2017-02-26 13:10:50 +01:00
Robert Habermeier 1fba73c15e minimal state backend trait
make state module public
2017-02-21 12:35:21 +01:00
Gav Wood 8404edb656 Fix whitespace (#4299)
* Fix whitespace.

* Update copyright years/owner.

* Push release only for tags.
2017-01-25 18:51:41 +01:00
Tomasz Drwięga e11353f94c UnverifiedTransaction type (#4134)
* Introducing ValidSignedTransaction

* Verifiying transactions in engines

* Widening use of VerifiedSignedTransaction

* Renaming Transactions

* Uncommenting banning queue & Fixing tests

* Fixing json tests

* Fixing pre-homestead test

* Fixing imports

* Addressing grumbles

* Fixing test
2017-01-13 08:51:36 +00:00
Gav Wood 311730ea95 Improvements and optimisations to estimate_gas (#4142)
* Return 0 instead of error with out of gas on estimate_gas

* Fix stuff up.

* Another estimate gas fix.

* Alter balance to maximum possible rather than GP=0.

* Only increase to amount strictly necessary.

* Improvements and optimisations to estimate_gas.

- Introduce proper error type
- Avoid building costly traces

* Fix tests.

* Actually fix testsActually fix tests
2017-01-12 11:06:12 +01:00
Gav Wood 23feb7998f Use binary chop to estimate gas accurately (#4100)
* Initial sketch.

* Building.

* Fix a few things.

* Fix issue, add tracing.

* Address grumbles

* Raise upper limit if needed

* Fix test.
2017-01-10 18:56:41 +01:00
Robert Habermeier 8125b5690c Port `try` macro to new `?` operator. (#3962)
* initial untry sweep

* restore try in ipc codegen, fix inference

* change a few missed try instances
2016-12-27 12:53:56 +01:00
Gav Wood 58b72c521d
Rename ethcore -> parity in licenses. 2016-12-11 19:31:31 +01:00
Tomasz Drwięga 762d8b89d6 Removing unused imports 2016-11-29 14:03:21 +01:00
Tomasz Drwięga 64b1b898f1 Fixing compilation on stable 2016-11-28 17:43:38 +01:00
Tomasz Drwięga 2b3d100de2 Fixing some clippy warnings 2016-11-28 15:54:22 +01:00
Gav Wood d3de475205 EIPs 155, 160, 161 (#2976)
* The front-end for each hard-fork, also EIP-160.

* Address EIP161 a/c

* Include EIP-161b

* EIP-161 part d.

* Fix test build.

* Fix one test, add another.

* Fix use of bloom & renaming.

* Initial groundwork for EIP-155

* Fix minor bug.

* Fix all tests finally.

* Rest of EIP-155.

* Add tests for EIP-155 algorithm.

Update transaction tests validation.

* Minor reformat.

* Address grumbles.

* Remove unused code.

* Fix SUICIDE gas mechanism and add consensus tests.

* Remove commented code.

* Set Frontier hardfork block number

* Fix warning.

* Transaction tests,
2016-11-03 22:22:25 +01:00
Robert Habermeier 0fedc27332 Remove ethcore::common re-export module (#2792)
* no longer export action_params

* remove transaction, header, receipt re-rexports from common

* remove env_info and builtins re-exports from common

* remove everything but util export from common

* replace common usages with util, remove module

* add a prelude module for ethcore-bigint
2016-10-24 18:35:25 +02:00
Robert Habermeier 8e5c9ff162 rename State::snapshot to checkpoint to avoid confusion (#2796) 2016-10-22 14:22:16 +01:00
Robert Habermeier 96f4c10453 sweep most unwraps from ethcore crate, dapps crate (#2762)
* sweep most unwraps from ethcore crate

* purge unwrap from dapps server

* whitespace

[ci:none]
2016-10-20 23:41:15 +02:00
Gav Wood 85eeb3ea6e EIP150.1c (#2591)
* EIP150.1b first part.

* Add documentation.

[ci:skip]

* Tweak comment

* Fix some tests.

* Fix create

* Add the new EIP150 test. (#2563)

* Fix create some more.

* Another fix for create.

* Final fixes.

* Enable EIP150 test.

* Revert the costly suicides to respect EIP150.1b.

* Fixups for EIP150.1c

* Update tests.

* Updating tests

* Adding state tests

* Updating tests

* Updating HF block

* Removing flushln [ci:skip]

* Commenting out suicide test

* New tests.

* Switch to EIP tests.

* Rename some stuff, combine transition tests.

* Fix U256 overflows.

* Name cleanups and an effort to fix tests.

* Rename back for clarity.

* Fix non-EIP-150 OOG CALLs

* New transition block number & additional EIP150 tests

* Morden transition block set; Tests updated

* Added missing test
2016-10-15 14:39:15 +02:00
Robert Habermeier 8a0e98d4cc configurable jump table cache size 2016-10-07 12:18:42 +02:00
Nikolay Volf ac0ae2442f Adjustable stack size for EVM (#2483)
* stack size for io workers & evm threshold

* rust way to remember stack size

* right value

* 24kb size

* some stack reduction
2016-10-06 18:42:54 +02:00
Arkadiy Paronyan 6c1b2fbed5 Preserve cache on reverting the snapshot (#2488)
* Preserve cache on reverting the snapshot

* Renamed merge_with into replace_with

* Renamed and documented snapshotting methods
2016-10-06 14:54:05 +01:00
Arkadiy Paronyan 0dcdaa7a2a Jumptable cache (#2427)
* Jumptable cache

* Updated registrar address
2016-10-02 18:45:36 +02:00
Tomasz Drwięga 1c61d7c813 Fixing Delegate Call in JIT (#2378)
* Detecting DELEGATE_CALL in JIT

* Fixing evmjit tests
2016-09-28 23:33:12 +02:00
Tomasz Drwięga 15488b3e40 Fixing output of eth_call and Bytes deserialization (#2230)
* Fixing eth_call to builtins

* Fixing bytes deserialization

* Removing comment
2016-09-22 14:50:00 +02:00
Marek Kotewicz da2c2e5fc6 facelift for traces, added errors (#2042)
* evm errors facelift

* facelift for traces, added errors with description

* additional tests for traces json serialization
2016-09-05 11:56:44 +02:00
Robert Habermeier 5dd56aa070 port ethcore 2016-09-01 14:29:59 +02:00
Marek Kotewicz b0d462c6c9 Signature cleanup (#1921)
* Address renamed to H160 at bigint library level

* moved uint specific test from util to bigint library

* naming

* unifing hashes in progress

* unifing hashes

* cleanup redundant unwraps in tests

* Removing util/crypto in progress.

* fixed compiling

* signature cleanup in progress

* new module - ethcrypto used by ethstore and ethcore-network

* fixed compiling

* fixed compiling

* fixed merge
2016-08-24 18:35:21 +02:00
Robert Habermeier eed7d006f1 Fix up tests, remove dead state-diff code 2016-08-18 18:13:32 +02:00
Gav Wood 9bb9a84d40 Fix test. 2016-08-03 23:23:45 +02:00
Gav Wood 52355855fc Fix up the VM trace. 2016-08-03 20:07:30 +02:00