This repository was archived by the owner on Sep 8, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 694
Update upstream fixtures to v7.0.0 beta.1 + fix consensus failures #1858
Closed
veox
wants to merge
21
commits into
ethereum:master
from
veox:update-fixtures-to-v7.0.0-beta.1-rebased
Closed
Update upstream fixtures to v7.0.0 beta.1 + fix consensus failures #1858
veox
wants to merge
21
commits into
ethereum:master
from
veox:update-fixtures-to-v7.0.0-beta.1-rebased
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7923369
to
3cd92a1
Compare
Github is displaying the commits in the wrong order after a rebase/force-push.
|
3cd92a1
to
84b5bb7
Compare
@veox Great work! 👍 |
7 tasks
voith
reviewed
Oct 15, 2019
voith
reviewed
Oct 15, 2019
voith
reviewed
Oct 31, 2019
6e7aae7
to
332e4c5
Compare
voith
reviewed
Nov 3, 2019
c729949
to
eb8051f
Compare
fix copy/paste
…ost_stae` to handle this case. renamed existing method `normalize_post_state` to `normalize_post_state_hash`
Since geth is now filling the tests, we have to do it like geth: Walk the entire computation tree, including branches that errored out (got REVERTed, OOGed, etc.), looking for wabbit RIPEMD160, _always_ collecting it. Skip everything else on errored branches. SQUASHED: tests: fix import when DEBUG2 logging. Logging utilities have moved to separate package, eth_utils.
In the general non-RIPEMD160 case, if the computation errored, it would still be collected, because of the computation.is_origin_computation condition.
Now that `computation.is_origin_computation` no longer needs to be considered, it's fine to move the RIPEMD160 special-casing back into the `if` clause, because the condition is the same.
…utation when considering SELFDESTRUCT beneficiaries + refactor. `computation.is_origin_computation` has been present since the file was first introduced by @pipermerriam: ethereum@69a8385#diff-28f7a9ef4182d19a95f4cccb1c073ef3 However, whether it's present or not has no effect on the tests passing. (Possibly, this is due to the case not being covered in the tests...) I can't find a place which explicitly states that beneficiary collection should only be skipped if the error happened in the origin computation. From the fact that having a `computation.is_origin_computation` in the next if-clause (`if computation.msg.to != constants.CREATE_CONTRACT_ADDRESS`) caused an error in a RevertPrecompiledTouchExactOOG test, it would seem that upstream (geth v1.9.6) does not consider this a necessary condition. Therefore, removing the condition here, too; and re-working the if-else clauses to look like they did previously (moving the RIPEMD160 special-casing as a sub-clause of the main clause).
Used these napkin-quality scripts: https://gist.github.com/veox/02336c518f049cb749608657622d127f SQUASHED: tests: add Istanbul variants to existing SLOWEST_TESTS + CALLBlake2f_MaxRounds. GeneralStateTests/stTimeConsuming/CALLBlake2f_MaxRounds.json takes an awful long time - I was never able to run it fully. Beyond that, file names for some previous slow tests have changed, losing a `_dXgYvZ` qualifier. Not all have been reviewed! Just enough for the BlockchainTests to run Istanbul within half an hour on my workstation. tests: mark `randomStatetest94` as slow for Istanbul, too. Test passes, takes 22 seconds to run in py-evm (checked for Istanbul only), and indeed causes a +3 GiB memory use peak on my workstation - similar to `geth`, as reported here: https://gitter.im/ethereum/tests?at=5d8c6d25b38cc849bf1402fe (Not as time-consuming as some other tests, though.)
eb8051f
to
2a641b7
Compare
See Istanbul's hardfork meta: https://eips.ethereum.org/EIPS/eip-1679#activation
2a641b7
to
3abcda8
Compare
`towncrier --draft` shows that newsfragments in the `misc` category don't get their contents displayed, they just get listed with a link in the "Miscellaneous internal" section. This is unacceptable! Move to `bugfix` section instead.
3abcda8
to
f1651af
Compare
2 tasks
2 tasks
Thanks to both of you! I squashed a couple commits to have the history a bit cleaner (doing my best to retain commit history). The squashed version is here: #1871 I'll close this for now, to be merged by that squashed PR. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Squashed/rebased version moved to PR #1871.
What was wrong?
Upstream tests have released a new tagged version, v7.0.0-beta.1, which
py-evm
needs to support.How was it fixed?
A lot of plumbing was fixed in PR #1852 by @voith: see his commits (first nine) and discussion in that PR.
I based this branch on that PR, fixing the remaining 2 cases of consensus failures. They're described in commit messages; in short,
py-evm
now walks the entire computation tree.geth
now fills the tests, sopy-evm
has to relax the rules when walking the computation tree as per EIP-161 ("State trie clearing"): collect theRIPEMD160
precompile even if it was touched in a nested erroring computation (while the parent computation succeeds). See Tracking: some upstream test fixtures fail when updating to v7.0.0-beta.1 #1857 (comment) for a similar summary, and comments in issue Tracking: some upstream test fixtures fail when updating to v7.0.0-beta.1 #1857 leading up to that comment for context and debug noise.py-evm
was erroneously collecting non-RIPEMD160
precompiles when a nested computation errored.SLOWEST_TESTS
was re-generated. It's almost entirely Istanbul now.Closes #1852 as superseded.
Closes #1857 as fixed.
Extra: Istanbul block numbers are set for mainnet and Goerli. Ropsten already had it set.
To-Do
Cute Animal Picture
Source: Valdemaras.N