Commit Graph

40 Commits

Author SHA1 Message Date
adria0.eth 1460f6cc27
EIP-2315: Simple Subroutines for the EVM (#11629) 2020-09-10 05:53:41 +03:00
adria0 c5aed5bab1
Fix warnings: unnecessary mut 2020-08-07 20:47:13 +03:00
adria0 1700873f48
Fix warnings: dyn 2020-08-07 20:47:12 +03:00
Artem Vorotnikov 610d9baba4
Reformat the source code 2020-08-07 20:46:52 +03:00
s3krit 7c7b181ca0
v2.5.8-stable (rev2) (#11051)
* EIP 1884 Re-pricing of trie-size dependent operations  (#10992)
* Implement EIP-1283 reenable transition, EIP-1706 and EIP-2200  (#10191)
2019-09-13 15:46:03 +02:00
s3krit 45f27cec34
v2.5.8-stable (#11041)
* add more tx tests (#11038)
* Fix parallel transactions race-condition (#10995)
* Add blake2_f precompile (#11017)
* [trace] introduce trace failed to Ext (#11019)
* Edit publish-onchain.sh to use https (#11016)
* Fix deadlock in network-devp2p (#11013)
* EIP 1108: Reduce alt_bn128 precompile gas costs (#11008)
* xDai chain support and nodes list update (#10989)
* EIP 2028: transaction gas lowered from 68 to 16 (#10987)
* EIP-1344 Add CHAINID op-code (#10983)
* manual publish jobs for releases, no changes for nightlies (#10977)
* [blooms-db] Fix benchmarks (#10974)
* Verify transaction against its block during import (#10954)
* Better error message for rpc gas price errors (#10931)
* tx-pool: accept local tx with higher gas price when pool full (#10901)
* Fix fork choice (#10837)
* Cleanup unused vm dependencies (#10787)
* Fix compilation on recent nightlies (#10991)
2019-09-12 18:43:53 +02:00
Talha Cross e0141f8324
beta 2.5.1 (#10643)
* version: bump beta to 2.5.1

* fix(whisper expiry): current time + work + ttl (#10587)

* update bootnodes (#10595)

* config: update goerli bootnodes

* config: update kotti bootnodes

* adds rpc error message for --no-ancient-blocks (#10608)

* adds error message for --no-ancient-blocks, closes #10261

* Apply suggestions from code review

Co-Authored-By: seunlanlege <seunlanlege@gmail.com>

* Constantinople HF on POA Core (#10606)

* Constantinople HF on POA Core

Plan Constantinople/St.Petersfork HF on POA Core network at block 8582254.
Original PR in POA repository: https://github.com/poanetwork/poa-chain-spec/pull/110

* Remove extra empty line

* evm: add some mulmod benches (#10600)

* evm: add blockhash_mulmod bench

* evm: use num-bigint for mod ops

* Clique: zero-fill extradata when the supplied value is less than 32 bytes in length (#10605)

* Update kovan.json to switch validator set to POA Consensus Contracts (#10628)

* Fix publish docs (#10635)

* Fix publish docs

* this never should be forced, either way compiling previous versions will produce outdated docs

* fix array, var was moved to the group project global variables list

* Fix rinkeby petersburg fork (#10632)
2019-05-10 13:48:52 +02:00
cheme d89b8d904f Additional error for invalid gas (#10327)
* Tag sensible place (ECHECH)

* Additional overflows checks.
2019-02-11 22:20:51 +00:00
Afri Schoedon 7c335e8764
misc: bump license header to 2019 (#10135)
* misc: bump license header to 2019

* misc: remove_duplicate_empty_lines.sh

* misc: run license header script

* commit cargo lock
2019-01-07 11:33:07 +01:00
Wei Tang 5319d33bc6
Use signed 256-bit integer for sstore gas refund substate (#9746)
* Add signed refund

* Use signed 256-bit integer for sstore gas refund substate

* Fix tests

* Remove signed mod and use i128 directly

* Fix evm test case casting

* Fix jsontests ext signature
2018-10-15 17:09:55 +08:00
Tomasz Drwięga 4186467129 Don't hash the init_code of CREATE. (#9688) 2018-10-04 12:32:04 +01:00
Wei Tang 1e9aebbc86
Resumable EVM and heap-allocated callstack (#9360)
* Add new Vm trappable interface

* Exec/Resume interface

* Basic implementation of CallCreateExecutive

* Implement resume_call and resume_create for executive

* Move convertion to call/create result to separate function

* Implement consume that converts resumable to non-resumable

* Use consume for Executive::call/create

* Resumable EVM

* Implement tracing mode without needing subtracers

* Implement vmtracer so it doesn't require extra structs for subtracing

* Use the new tracing mode in executive

* Fix most of the linting errors for cargo build

* Add the concept of stack_depth

* Add back crossbeam

* Fix some test compile

* Fix prefix address test

* Fix evm crate tests

* Fix wasm crate test compile

* Fix wasm runner compile

* Fix jsontests compile

* Fix evmbin compile

* Fix an issue with create nonce and better vm tracing interface

* Fix linting

* Fix evmbin compile

* Fix unconfirmed_substate and static_flag

* Fix an issue in create address logic

* Fix top-level tracing

* Handle builtin tracing

* Fix suicide and reward tracing index stack

* Fix an issue where trap conflicts with tracing

* Fix an issue in parent step vm tracing

* Fix revert tracing

* Fix evmbin tests

* Remove params clone

* Fix TODO proofs

* Fix jsontests compile

* Fix evmbin merge issue

* Fix wasm merge issue

* Fix wasm test

* Fix ethcore merge warnings

* Fix evmbin compile

* Better expect messages and add some trace::skip_one asserts
2018-10-02 22:33:19 +08:00
Wei Tang d04e5e49d0 Fix informant compile (#9571) 2018-09-17 16:16:49 +02:00
Wei Tang 915c366056
EIP 1283: Net gas metering for SSTORE without dirty maps (#9319)
* Implement last_checkpoint_storage_at

* Add reverted_storage_at for externalities

* sstore_clears_count -> sstore_clears_refund

* Implement eip1283 for evm

* Add eip1283Transition params

* evm: fix tests

* jsontests: fix test

* Return checkpoint index when creating

* Comply with spec Version II

* Fix docs

* Fix jsontests feature compile

* Address grumbles

* Fix no-checkpoint-entry case

* Remove unnecessary expect

* Add test for State::checkpoint_storage_at

* Add executive level test for eip1283

* Hard-code transaction_checkpoint_index to 0

* Fix jsontests

* Add tests for checkpoint discard/revert

* Require checkpoint to be empty for kill_account and commit

* Get code coverage

* Use saturating_add/saturating_sub

* Fix issues in insert_cache

* Clear the state again

* Fix original_storage_at

* Early return for empty RLP trie storage

* Update comments

* Fix borrow_mut issue

* Simplify checkpoint_storage_at if branches

* Better commenting for gas handling code

* Address naming grumbles

* More tests

* Fix an issue in overwrite_with

* Add another test

* Fix comment

* Remove unnecessary bracket

* Move orig to inner if

* Remove test coverage for this PR

* Add tests for executive original value

* Add warn! for an unreachable cause
2018-09-07 18:51:08 +08:00
David 72fd1fa58d
Fetch `parity-common` crates from crates.io (#9410)
* Fetch `parity-common` crates from crates.io

* Add doc tests from `patricia-trie` to `patricia-trie-ethereum`
Fix/update a few deps

* [ethkey] upgrade ethereum-types

* [whisper] update deps

* [network] deps

* [network-devp2p] deps

* [journaldb] deps

* [fastmap] deps

* [miner] deps and test fixes

* [machine] deps

* [json] deps

* [hw] deps

* [ethash] deps

* [registrar] deps

* Update a few more dependencies with new ethabi-*

* [updater] Update deps

* deps

* [ethcore] Update deps

* Use new parity-snappy and parity-rocksdb crates

* Updated submodules

* Use parity-snappy 0.1

* Use kvdb-rocksdb 0.1.2

* Don't use latest ethereum/tests

* Fix merge conflicts errors

* Remove superseeded comment

* Address grumbles: add newlines, add/remove spaces
2018-09-04 20:13:51 +02:00
Wei Tang caca3a8048
Add EIP-1014 transition config flag (#9268)
* Add EIP-1014 transition config flag

* Remove EIP-86 configs

* Change CREATE2 opcode index to 0xf5

* Move salt to the last item in the stack

* Change sendersaltandaddress scheme to comply with current EIP-1014

* Fix json configs

* Fix create2 test

* Fix deprecated comments
2018-08-31 23:43:51 +08:00
Wei Tang ff716e7799
Remove pass-by-reference return data value from executive (#9211)
* Remove pass-by-reference return data value from executive

* Fix tests

* Fix a missing test output

* typo: wasm_activation_test

* Tracing change in output

* json_tests: fix compile

* typo: 0..32 -> ..32 to keep it consistent with other occurance

* Fix tests
2018-08-14 05:27:13 +08:00
Wei Tang 9c595aff95
Allow single opcode stepping for EVM (#9051)
* Feed in ActionParams on VM creation

* Fix ethcore after Vm interface change

* Move informant inside Interpreter struct

* Move do_trace to Interpreter struct

* Move all remaining exec variables to Interpreter struct

* Refactor VM to allow single opcode step

* Fix all EVM tests

* Fix all wasm tests

* Fix wasm runner tests

* Fix a check case where code length is zero

* Fix jsontests compile

* Fix cargo lock

* Use match instead of expect

* Use cheaper check reader.len() == 0 for the initial special case

* Get rid of try_and_done! macro by using Result<(), ReturnType>

* Use Never instead of ()

* Fix parity-bytes path

* Bypass gasometer lifetime problem by borrow only for a instance

* typo: missing {

* Fix ethcore test compile

* Fix evm tests
2018-08-14 04:06:15 +08:00
Wei Tang 637883f52b Comply EIP-86 with the new definition (#9140)
* Comply EIP-86 with the new CREATE2 opcode

* Fix rpc compile

* Fix interpreter CREATE/CREATE2 stack pop difference

* Add unreachable! to fix compile

* Fix instruction_info

* Fix gas check due to new stack item

* Add new tests in executive

* Fix have_create2 comment

* Remove all unused references of eip86_transition and block_number
2018-08-01 13:17:04 +02:00
Wei Tang 29baccd857
Implement EIP-1052 (EXTCODEHASH) and fix several issues in state account cache (#9234)
* Implement EIP-1052 and fix several issues related to account cache

* Fix jsontests

* Merge two matches together

* Avoid making unnecessary Arc<Vec>

* Address grumbles
2018-07-31 13:27:57 +08: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
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
Wei Tang a4c7843a07 EIP 145: Bitwise shifting instructions in EVM (#8451)
* Add SHL, SHR, SAR opcodes

* Add have_bitwise_shifting schedule flag

* Add all EIP tests for SHL

* Add SHR implementation and tests

* Implement SAR and add tests

* Add eip145transition config param

* Change map_or to map_or_else when possible
2018-05-05 10:23:50 +02:00
Nikolay Volf 684322cd6f Kovan WASM fork code (#7849)
* kovan fork code

* introduce ethcore level vm_factory and let it fail

* fix json tests

* wasmcosts as option

* review changes

* wasm costs in parser

* fix evm tests

* review fixes

* fix test

* remove redundant json field
2018-02-19 12:27:42 +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
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 00883e477a
Get rid of clippy remainings. 2017-12-21 11:27:26 +01:00
Tomasz Drwięga 8dfdebc2a2 Refactor static context check in CREATE. (#6886)
* Refactor static context check in CREATE.

* Fix wasm.
2017-10-25 11:27:18 +02:00
arkpar 301190a16f
Fixed RETURNDATA out of bounds check 2017-10-12 12:57:27 +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
Fredrik 308f36a532 Don't reexport bigint from util 2017-09-04 16:36:49 +02:00
debris f0e8abb07b Hashable::sha3 -> fn keccak for ethcore 2017-08-30 19:18:28 +02:00
Tomasz Drwięga 4f69ee0437
Add test to cover that. 2017-08-28 12:32:19 +02:00
Tomasz Drwięga dd3b6d49ee
Fix memory tracing. 2017-08-26 21:53:41 +02:00
debris a2c05123fd Merge branch 'master' into split 2017-08-01 14:24:47 +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
debris c4989ddc44 removed util::common 2017-07-29 22:49:10 +02:00
debris eecd823d32 util reexports less std 2017-07-29 21:10:14 +02:00
arkpar 9ad0ff960e Place RETURNDATA behind block number gate 2017-07-19 14:34:59 +02: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