Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

[stable] Backport constantinople changes #9723

Merged
merged 19 commits into from
Oct 10, 2018

Conversation

andresilva
Copy link
Contributor

@andresilva andresilva commented Oct 9, 2018

EIPs & KIPs

Chain specs & tests

Extra backports

@andresilva andresilva added A0-pleasereview 🤓 Pull request needs code review. A8-backport 🕸 Pull request is already reviewed well in another branch. M4-core ⛓ Core client code / Rust. labels Oct 9, 2018
@andresilva
Copy link
Contributor Author

@sorpaas @tomusdrw Would appreciate you having a look to make sure all the relevant PRs have been backported (mainly for CREATE2).

For EIP-1234 I decided to port #9187 instead of #9480 since it is a breaking change to the chain spec format (let me know if I should just port #9480 instead). #9187 wasn't merged so let's please make sure it is correct if we're going to use it here.

@sorpaas
Copy link
Collaborator

sorpaas commented Oct 9, 2018

@andresilva Please backport #9514 as well!

@5chdn
Copy link
Contributor

5chdn commented Oct 9, 2018

You need to cherry-pick #9681 to make CI work or rebase your PR on #9648 (you could merge it into a5-stable-207 if you like)

@5chdn 5chdn added this to the Patch milestone Oct 9, 2018
@5chdn 5chdn added the P2-asap 🌊 No need to stop dead in your tracks, however issue should be addressed as soon as possible. label Oct 9, 2018
@andresilva
Copy link
Contributor Author

@5chdn Thanks, backported #9681. I think it's easier to review this if all constantinople changes are bundled in a single PR. We can rebase this over #9648 afterwards before merging.

@andresilva andresilva force-pushed the andre/backport-constantinople-stable branch 5 times, most recently from 9e7e819 to af2edbd Compare October 9, 2018 23:59
@5chdn
Copy link
Contributor

5chdn commented Oct 10, 2018

what happened here?

@andresilva
Copy link
Contributor Author

Sorry I had to redo some stuff and had to rebase everything. Should be fine now!

Copy link
Collaborator

@ordian ordian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't forget to rebase over #9648 before merging.

@5chdn
Copy link
Contributor

5chdn commented Oct 10, 2018

Can you sneak in #9730 #9729 if you rebase anyways?

@ddorgan
Copy link
Collaborator

ddorgan commented Oct 10, 2018

@5chdn should I force the gitlab-test-linux check into passing here? I guess it won't run gitlab-test-linux ... the .gitlab-ci.yml in that branch is 21 days old...

@5chdn
Copy link
Contributor

5chdn commented Oct 10, 2018

No, thanks @ddorgan, Andre will rebase in a second.

sorpaas and others added 9 commits October 10, 2018 16:57
…unt 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
* 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
* 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
* 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 openethereum/wasm-tests#52

* change .. to _

* fix comment for the have_gasleft param

* update tests (openethereum/wasm-tests@0edbf86)
* 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
* 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
* 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
cheme and others added 7 commits October 10, 2018 16:57
…on (#9505)

* Enable all Constantinople hard fork changes in constantinople_test.json

* Address grumbles

* Remove EIP-210 activation

* 8m -> 5m

* Temporarily add back eip210 transition so we can get test passed

* Add eip210_test and remove eip210 transition from const_test
* Add constantinople conf to EvmTestClient.

* Skip some test to update submodule etheureum/tests submodule to latest.

* Put skipping 'under issue' test behind a feature.

* Change blockReward for const-test to pass ethereum/tests

* Update tests to new constantinple definition (change of reward at block
5).
Switch 'reference' to string, that way we can include issues from others
repo (more flexible)Update tests to new constantinple definition (change
of reward at block 5).
Switch 'reference' to string, that way we can include issues from others
repo (more flexible).

* Fix modexp and bn128_mul gas prices in chain config

* Changes `run_test_path` method to append its directory results (without
that it stop testing at the first file failure).
Add some missing tests.
Add skip for those (block create2 is one hundred percent false but on
hive we can see that geth and aleth got similar issue for this item).

* retab current.json

* Update reference to parity issue for failing tests.
* ethcore: propose hardfork block number 4230000 for ropsten

* ethcore: propose hardfork block number 9000000 for kovan

* ethcore: enable kip-4 and kip-6 on kovan

* etcore: bump kovan hardfork to block 9.2M

* ethcore: fix ropsten constantinople block number to 4.2M

* ethcore: disable difficulty_test_ropsten until ethereum/tests are updated upstream
* Implement CREATE2 gas changes and fix some potential overflowing

* Ignore create2 state tests

* Split CREATE and CREATE2 in gasometer

* Generalize rounding (x + 31) / 32 to to_word_size
@andresilva andresilva force-pushed the andre/backport-constantinople-stable branch from af2edbd to c079497 Compare October 10, 2018 15:58
Tbaut and others added 3 commits October 10, 2018 17:00
* add foundation hardcoded header #6486017

* add ropsten hardcoded headers #4202497

* add kovan hardcoded headers #9023489
@5chdn 5chdn merged commit db3a989 into stable Oct 10, 2018
@5chdn 5chdn deleted the andre/backport-constantinople-stable branch October 10, 2018 16:55
@5chdn 5chdn removed the A0-pleasereview 🤓 Pull request needs code review. label Oct 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-backport 🕸 Pull request is already reviewed well in another branch. M4-core ⛓ Core client code / Rust. P2-asap 🌊 No need to stop dead in your tracks, however issue should be addressed as soon as possible.
Projects
None yet
Development

Successfully merging this pull request may close these issues.