Commit Graph

55 Commits

Author SHA1 Message Date
Tomasz Drwięga 6e5a1c00dc Update state tests execution model (#9440)
* Update & fix JSON state tests.

* Update tests to be able to run ethtest at
021fe3d410773024cd5f0387e62db6e6ec800f32.

- Touch user in state
- Adjust transaction tests to new json format

* Switch to same commit for submodule ethereum/test as geth (next includes constantinople changes).
Added test `json_tests::trie::generic::TrieTests_trieanyorder` and a few
difficulty tests.

* Remove trietestnextprev as it would require to parse differently and
implement it.

* Support new (shitty) format of transaction tests.

* Ignore junk in ethereum/tests repo.

* Ignore incorrect test.

* Update to a later commit

* Move block number to a constant.

* Fix ZK2 test - touched account should also be cleared.

* Fix conflict resolution
2018-09-10 22:38:30 +02:00
Wei Tang da5ba4ccc8
Fix a bug in evmbin initial_gas display (#9457) 2018-09-04 16:33:14 +08:00
Andronik Ordian 1f2426226b evmbin: escape newlines in json errors (#9458) 2018-09-04 14:28:49 +08:00
Afri Schoedon c658b46fe1
Random small cleanups (#9423)
* clean up toml files

* update the parity ethereum toolchain docs

* update contribution guide and issue templates

* update desktop and service files

* build clib examples with 8 threads

* update header templates

* replace parity technologies with parity ethereum logo
2018-08-30 19:57:27 +02:00
Wei Tang 8a5c9a8c70 evmbin: Fix gas_used issue in state root mismatch and handle output better (#9418)
* Fix gas used in staterootmismatch, and print full state root hash

* Write trace info for stdjson to stderr

* Fix tests

* Remove struct trait bound
2018-08-29 20:13:45 +03:00
Tomasz Drwięga 108590d924 Allow calling contracts in genesis state. (#9375) 2018-08-20 13:05:01 +01:00
David c7f608ec74
Delete crates from parity-ethereum and fetch them from parity-common instead (#9083)
Use crates from parity-common: hashdb, keccak-hash, kvdb, kvdb-memorydb, kvdb-rocksdb, memorydb, parity-bytes, parity-crypto, path, patricia_trie, plain_hasher, rlp, target, test-support, trie-standardmap, triehash
2018-07-10 14:59:19 +02:00
Wei Tang a1a002f4da Attempt to graceful shutdown in case of panics (#8999)
* Handle graceful shutdown with unwinding

* Fix a race condition

* Avoid double exit deadlock

* typo: fix docs

* Fix ethkey cli compilation

* Fix all other cases panic_hook::set -> panic_hook::set_abort

* struct fields do not need to be public

* Add comments on why exiting AtomicBool is needed
2018-07-02 11:53:50 +02:00
Wei Tang 0bed5976e3 Refactor evm Instruction to be a c-like enum (#8914)
* Add a basic instruction c-like enum

* Fix all compiling errors

* Fix tests

* Access instruction info as a Instruction impl

* Use macro to avoid duplication in from_u8

* Use single space instead of multiple tabs to avoid formatting issue

* Fix evmbin compile

* typo: indentation

* Use if let to remove an expect

* Address grumbles
2018-06-27 13:33:32 +02:00
Wei Tang e9f1b38984 EVM benchmark utilities (#8944)
* Make it possible to expose jsontests using feature flag

* Add start_stop_hook for jsontests

* Fix evmbin compile

* Implement vm jsontests times to tsv result

* Use /usr/bin/env to avoid errors on non-Debian systems

* Move evmbin/bench.sh to scripts and add vm_jsontests script for convenience

* Add tempdir as required deps for test-helpers

* Address grumbles on comments

* Detect file/folder automatically and add command docs

* Fix bench script

* times -> timings

* typo: wrong if condition
2018-06-25 11:21:45 +02:00
Niklas Adolfsson 98b7c07171 Update `license header` and `scripts` (#8666)
* Update `add_license` script

* run script

* add `remove duplicate lines script` and run it

* Revert changes `English spaces`

* strip whitespaces

* Revert `GPL` in files with `apache/mit license`

* don't append `gpl license` in files with other lic

* Don't append `gpl header` in files with other lic.

* re-ran script

* include c and cpp files too

* remove duplicate header

* rebase nit
2018-06-04 10:19:50 +02:00
Niklas Adolfsson 23fc5517b5 Replace std::env::temp_dir with tempdir in tests (#8103)
* std::env::temp_dir -> tempdir in test context

* fix lifetime issue so tempdir removes tmpfiles
2018-03-14 12:26:20 +01:00
Tomasz Drwięga 102bc7809f Additional data in EVMTestClient (#7964)
* Small changes to allow better re-use of EvmTestClient

* Expose logs.

* add outcome to TransactResult

* Fix submodule.

* Fix json tests.

* Fix evmbin.
2018-03-13 12:54:17 +01:00
Marek Kotewicz c060d9584d
ethabi version 5 (#7723)
* Refactor updater to use ethabi-derive

* Grumble: do_call type alias

* Empty commit to trigger test re-run

* migration to ethabi-5.0

* migration to ethabi-5.0 in progress

* use ethabi_deriven to generate TransactAcl contract

* use ethabi_deriven to generate Registry contract

* hash-fetch uses ethabi_derive, removed retain cycle from updater, fixed #7720

* node-filter crate uses ethabi_derive to generate peer_set contract interface

* use LruCache in node-filter instead of HashMap

* validator_set engine uses ethabi_derive

* ethcore does not depend on native_contracts

* miner does no depend on native_contracts

* secret_store does not use native_contracts (in progress)

* removed native-contracts

* ethcore and updater does not depend on futures

* updated ethereum-types

* fixed all warnings caused by using new version of ethereum-types

* updated ethabi_derive && ethabi_contract to get rid of warnings

* removed another retain cycle in updater, fixed following minor version on update

* moved contracts out of native_contracts res

* updated ethabi_contract

* fixed failing test

* fixed failing test

* there is no need to create two contracts of the same kind any more

* simplify updater::ReleaseTrack conversion into u8 and add several tests for it

* applied review suggestions

* applied review suggestions
2018-02-09 09:32:06 +01:00
Tomasz Drwięga 709fbff067 Std-json format for VM traces (#7262)
* Std-json logging.

* fixed merge with master
2018-01-18 10:32:22 +01:00
Tomasz Drwięga f044b61f42 Extract some parts of miner from ethcore. (#7353)
* Move miner away from ethcore.

* Fix ethcore to use miner/transaction.

* Fix tests and warnings.

* fixed incorrect merge of the test in the documentation
2018-01-11 17:49:10 +01:00
Marek Kotewicz e95b093483 dissolve util (#7460)
* ethereum-types refactor in progress

* ethereum-types refactor in progress

* ethereum-types refactor in progress

* ethereum-types refactor in progress

* ethereum-types refactor finished

* removed obsolete util/src/lib.rs

* removed commented out code
2018-01-10 15:35:18 +03:00
Tomasz Drwięga 2d222a5920
Capture traces and write some tests. 2017-10-20 16:06:36 +02:00
Tomasz Drwięga 2d10cd0ecc
Fixing JSON WiP. Refactor & Write tests. 2017-10-17 14:54:56 +02:00
Jef 5c08698fa0 Use memmap for dag cache (#6193)
* Rebase and fix compilation errors (tests not yet fixed)

* Use `debug_assert` over `assert`

* Fix tests

* Assert safety, clean up

* Fix up stale cache removal, move one assert to debug_assert

* Remove printlns

* Add licenses

* Fix benches

* Inline some no-ops in a hot loop that weren't being inlined

* Add spooky comment to make sure no-one removes the inlining annotations

* Minor cleanup

* Add option to switch between mmap and ram

* Flag ethash to use less memory when running light client

* Fix tests

* Remove todo comment (it's done)

* Replace assertion with error return

* Fix indentation

* Use union instead of `transmute`

* Fix benches

* Extract to constants

* Clean up and fix soundness holes

* Fix formatting

* Ignore missing-file errors

* Make incorrect cache size an error condition instead of a panic, remove dead code

* Fix compilation errors from rebase

* Fix compilation errors in tests

* Fix compilation errors in tests
2017-09-25 19:45:33 +02:00
Arkadiy Paronyan 25b35ebddd Byzantium updates (#5855)
* EIP-211 updates

* benchmarks

* blockhash instruction gas cost updated

* More benches

* EIP-684

* EIP-649

* EIP-658

* Updated some tests

* Modexp fixes

* STATICCALL fixes

* Pairing fixes

* More STATICALL fixes

* Use paritytech/bn

* Fixed REVERTing of contract creation

* Fixed more tests

* Fixed more tests

* Blockchain tests

* Enable previously broken tests

* Transition test

* Updated tests

* Fixed modexp reading huge numbers

* Enabled max_code_size test

* Review fixes

* Updated pairing pricing

* missing commas (style)

* Update test.rs

* Small improvements

* eip161abc
2017-09-15 21:07:54 +02:00
Hawstein ade37be25b separate trie from util and make its dependencies into libs:
* bytes
* hashdb
* memorydb
* nibbleslice
* nibblevec
2017-09-15 11:03:53 +08:00
Fredrik 308f36a532 Don't reexport bigint from util 2017-09-04 16:36:49 +02:00
Tomasz Drwięga f9a08e285c Running state test using parity-evm (#6355)
* Initial version of state tests.

* Refactor state to support tracing.

* Unify TransactResult.

* Add test.
2017-08-28 14:25:16 +02:00
cdetrio 4ccc82be92 fix panic in parity-evm json tracer (#6338) 2017-08-20 12:03:47 +08:00
Tomasz Drwięga 5ed14c1064 Fix --chain parsing in evmbin. (#6314) 2017-08-18 17:44:40 +02:00
Tomasz Drwięga 146feea4a6 Add --to and --gas-price (#6277) 2017-08-10 18:47:23 +02:00
debris 7f85c0ce2a Fixed evmbin 2017-08-01 16:41:33 +02:00
Nikolay Volf b7006034b1 Decouple virtual machines (#6184)
* work in progress for splitting vms

* evm working

* Evm -> Vm

* wasm converted

* ethcore working

* test fixes
2017-08-01 13:37:57 +03:00
Brian Anderson 6345b54034 Add custom panic hook
The panic hook prints a backtrace, the panic message, file, and line
number, and a plea to report bugs.
2017-07-19 17:50:48 +00:00
Robert Habermeier d365281cce Ethcore crate split part 1 (#6041)
* split out types into separate crate

* split out evm into its own crate
2017-07-12 13:09:17 +02:00
arkpar c05924a713 Fixed build 2017-07-11 10:21:23 +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
debris 61d8f90530 updated serde to version 1.0 2017-07-06 11:36:15 +02:00
Vurich 3d8dc11442 Upgrade `elastic-array` to 0.9.0
This is a huge change, which includes some changes to replace code that
originally cloned to reuse allocations instead. The updated
`elastic-array` crate renames its consuming `Vec`-conversion method to
`into_vec`, which means that I can do a simple
`sed -i 's/to_vec/into_vec/'` and then fix the compilation errors.

This commit is probably a minor performance win and definitely a
significant readability win.
2017-06-29 13:05:33 +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
Tomasz Drwięga 480741894b JSON format printing pre-state. (#5712) 2017-05-30 19:30:15 +02:00
Tomasz Drwięga 543965411e Revamping parity-evmbin (#5696)
* Revamping evmbin to support spec files, json format and subcalls.

* Fix formatting of usage.
2017-05-26 11:06:48 +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
Arkadiy Paronyan b50fb71dd1 EIP-86 (#4697)
* EIP-86

* Disable EIP-86 auto activation for now
2017-04-19 14:30:00 +02: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
Tomasz Drwięga efb95a59be Fixing evmbin compilation and added standard build. (#4561) 2017-02-15 16:58:42 +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
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 17cc2be4b5
Rename ethcore -> parity in license. 2016-12-11 19:30:54 +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
Tomasz Drwięga dedc4d5cfc Get rid of duplicated code (#2915) 2016-10-27 19:29:23 +02:00
Tomasz Drwięga 70c3001d2d Fixing --no-default-features again and evmbin (#2670)
* Fixing --no-default-features again and evmbin

* Fixing evmbin Result
2016-10-18 12:13:49 +02:00