Commit Graph

56 Commits

Author SHA1 Message Date
adria0.eth 1460f6cc27
EIP-2315: Simple Subroutines for the EVM (#11629) 2020-09-10 05:53:41 +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
Wei Tang fb07ffa676 Add EIP-1283 disable transition (#10214) 2019-01-21 12:22:29 +01: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 14c9cbd40e
Deny unknown fields for chainspec (#9972)
* Add deny_unknown_fields to chainspec

* Add tests and fix existing one

* Remove serde_ignored dependency for chainspec

* Fix rpc test eth chain spec

* Fix starting_nonce_test spec
2018-11-28 06:21:31 +08:00
Wei Tang 05be4b5b0e
Clean up serde rename and use rename_all = camelCase when possible (#9823)
* Clean up serde rename and use rename_all = camelCase when possible

* snake_case for pricing

* Use camelcase for engine

* Use camel case for seal

* Use camel case for validator set

* Use camel case for confirmation payload

* Use camel case for consensus status

* Use camel case for nodekind

* Use kebab case for provenance

* Use camel case for pubsub

* Use lowercase and camelcase for trace

* Use camel case for whisper

* rename Ethash as irregular name
2018-10-29 23:49:04 +08:00
Andronik Ordian 6643b6a306 Revert "prevent zero networkID (#9763)" (#9815)
This reverts commit 73f08b376f.
2018-10-27 02:53:19 +08:00
Seun LanLege 73f08b376f prevent zero networkID (#9763)
* prevent zero networkID, closes #8345

Signed-off-by: Seun LanLege <seunlanlege@gmail.com>

* updated networkID of olymic chain spec

Signed-off-by: Seun LanLege <seunlanlege@gmail.com>
2018-10-17 07:47:11 +08: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
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
Alexey 5ed2527663 `gasleft` extern implemented for WASM runtime (kip-6) (#9357)
* Wasm gasleft extern added

* wasm_gasleft_activation_transition -> kip4_transition

* use kip-6 switch

* gasleft_panic -> gasleft_fail rename

* call_msg_gasleft test added and gas_left agustments because this https://github.com/paritytech/wasm-tests/pull/52

* change .. to _

* fix comment for the have_gasleft param

* update tests (0edbf860ff)
2018-08-24 18:03:46 +02:00
André Silva 712101b63d ethcore: add transition flag for transaction permission contract (#9275)
* ethcore: add transition flag for transaction permission contract

* ethcore: fix transaction permission contract tests
2018-08-07 15:18:19 +01:00
Wei Tang e8b13cb77e
Implement KIP4: create2 for wasm (#9277)
* Basic implementation for kip4

* Add KIP-4 config flags

* typo: docs fix

* Fix args offset

* Add tests for create2

* tests: evm

* Update wasm-tests and fix all gas costs

* Update wasm-tests

* Update wasm-tests and fix gas costs
2018-08-06 23:15:52 +08: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
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 3fde07b2e1 Refactor EIP150, EIP160 and EIP161 forks to be specified in CommonParams (#8614)
* Allow post-homestead forks to be specified in CommonParams

* Fix all json configs

* Fix test in json crate

* Fix test in ethcore

* Fix all chain configs to use tabs

Given we use tabs in .editorconfig and the majority of chain configs.
This change is done in Emacs using `mark-whole-buffer` and `indent-region`.
2018-05-22 12:24:09 +08: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
Anton Gavrilov 01d399ad66 Return error if RLP size of transaction exceeds the limit (#8473)
* Return error if RLP size of transaction exceeds the limit

* Review comments fixed

* RLP check moved to verifier, corresponding pool test added
2018-04-27 15:02:45 +02:00
Tomasz Drwięga d716bae3d5 Max code size on Kovan (#8067)
* Enable code size limit on kovan

* Fix formatting.
2018-03-07 15:11:09 +01: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
Lorenzo Manacorda e630f647d1 spec: Validate required divisor fields are not 0 (#7933)
* Add validate_non_zero function

It's used to validate that a Spec's uint field used as a divisor is not zero.

* Add deserialize_with to gas_limit_bound_divisor

Prevents panics due to divide-by-zero on the gas_limit_bound_divisor
field.

* Add deserialize_with to difficulty_bound_divisor

Prevents panics due to divide-by-zero on the difficulty_bound_divisor
field.

* Add validate_optional_non_zero function

Used to validate Option<Uint> divisor fields.

* Use deserialize_with on optional divisor fields.

* Add #[serde(default)] attribute to divisor fields

When using `#[serde(deserialize_with)]`, `#[serde(default)]` must be specified so that missing
fields can be deserialized with the deserializer for `None`.
2018-02-19 10:36:34 +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
Arkadiy Paronyan b0c15497e1 Fixed kovan chain validation (#6758)
* Fixed kovan chain validation

* Fork detection

* Fixed typo
2017-10-14 21:59:26 +02:00
Robert Habermeier bc167a211b Generalize engine trait (#6591)
* move common forks and parameters to common params

* port specs over to new format

* fix RPC tests

* parity-machine skeleton

* remove block type

* extract out ethereum-specific methods into EthereumMachine

* beginning to integrate Machine into engines. dealing with stale transitions in Ethash

* initial porting to machine

* move block reward back into engine

* abstract block reward logic

* move last hash and DAO HF logic into machine

* begin making engine function parameters generic

* abstract epoch verifier and ethash block reward logic

* instantiate special ethereummachine for ethash in spec

* optional full verification in verify_block_family

* re-instate tx_filter in a way that works for all engines

* fix warnings

* fix most tests, further generalize engine trait

* uncomment nullengine, get ethcore tests compiling

* fix warnings

* update a bunch of specs

* re-enable engine signer, validator set, and transition handler

* migrate basic_authority engine

* move last hashes into executedblock

* port tendermint

* make all ethcore tests pass

* json-tests compilation

* fix RPC tests: change in gas limit for new block changed PoW hash

* fix minor grumbles

* validate chainspecs

* fix broken import

* fix transaction verification for pre-homestead
2017-09-26 14:19:08 +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
Arkadiy Paronyan eed0e8b03a Transaction permissioning (#6441) 2017-09-05 10:39:50 +01:00
Gav Wood 50495c6898 Merge branch 'master' into Fix-4858 2017-08-29 15:11:05 +02:00
Arkadiy Paronyan d520aa2633 Connection filter (#6359) 2017-08-29 14:38:01 +02:00
Anton Gavrilov 5086dc3024 Working test with block reward added 2017-07-31 13:42:34 +02:00
Robert Habermeier 003eef982b Move more params to the common section. (#6134)
* move common forks and parameters to common params

* port specs over to new format

* fix RPC tests
2017-07-31 12:34:29 +02:00
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
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
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
Robert Habermeier 18c3e90dbf Merge pull request #5671 from paritytech/guanqun-add-unit-tests
Guanqun add unit tests
2017-05-23 15:18:11 -04:00
Arkadiy Paronyan dd004aba9f EIP-140 (#5477) 2017-05-23 16:49:17 +03:00
Guanqun Lu 5c7c30cc4b add asserts in spec param.rs 2017-05-19 22:48:23 +08:00
Arkadiy Paronyan b50fb71dd1 EIP-86 (#4697)
* EIP-86

* Disable EIP-86 auto activation for now
2017-04-19 14:30:00 +02:00
keorn a61b1567d0 Strict validation transitions (#4988)
* ability to make validation stricter

* fix consensus

* remove logger
2017-03-28 10:46:52 +02:00
Arkadiy Paronyan 43871e393c Additional kovan params (#4892) 2017-03-14 11:41:56 +01:00
Arkadiy Paronyan c012dfc3ef EIP-98: Optional transaction state root (#4296)
* EIP98: Optional receipt state root

* Use if-else

* Fixing tests
2017-01-25 20:22:48 +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
keorn e5b3c092c8 Merge branch 'master' into optional-spec 2017-01-03 15:42:56 +01:00
Igor Artamonov be75cbfaaa set CHAIN_ID for Classic (#3934)
* configurable CHAIN_ID

* set CHAIN_ID for Ethereum Classic
2016-12-22 13:10:58 +01:00
keorn 552a772cc1 make fields defaulting to 0 optional 2016-12-22 07:06:40 +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