-
Notifications
You must be signed in to change notification settings - Fork 685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update ethereum/tests fixtures to v6.0.0-beta.2 + fix revealed consensus failures #1579
Update ethereum/tests fixtures to v6.0.0-beta.2 + fix revealed consensus failures #1579
Conversation
de1a884
to
ff11358
Compare
I wonder if a different workflow might make developing easier and give us slightly better PRs. The current process seems to be: pick one of the failing tests here and try to fix the problem, once you fix it open a PR against master. Once it's merged rebase this branch and repeat. What if instead we: add an equivalent of This has some benefits:
I don't feel very strongly about this so I'm happy to be shot down, but I can add a commit with KNOWN_FAILURES (I think there are 83ish of them?) to this PR if that sounds reasonable. |
@lithp I'm OK with that approach, too, especially since I'm already sitting on lists of failing tests (didn't share previously because effort). EDIT: With a difference of marking Please don't push anything to a branch marked The change can be done more easily when PR #1577 is merged, so that |
Sounds great, tomorrow morning I'll open a new PR based on #1577. Good call on using xfail instead! |
@lithp I like your proposed approach. 👍 The biggest risk with that that I see is that we forget a bout the known failures. But I one possible way to deal with that would be to just keep one PR open that removes everything from At least to me an open PR is the strongest reminder of things that should not be forgotten. |
Regarding failures: it seems that most upstream tests generated from This results in a gas use difference in all four cases generated from that filler. Only one of the four has a Since there's also a lot of failing tests for |
Note that, according to the list, there are only
|
The It seems that the |
From tracing it seems that E.g., running
results in:
It should have errored out on trying to As mentioned before, This is due to the py-evm/eth/vm/forks/byzantium/opcodes.py Lines 115 to 119 in b35c524
py-evm/eth/vm/forks/constantinople/opcodes.py Lines 58 to 62 in b35c524
|
... and addressing that magically fixed every "state" failure revealed by CI (well, apart from The remaining failures that I'm experiencing locally are actually not tested for on Currently waiting on PR #1577 to get merged, so this PR can get re-worked without bothering with the "state" set of tests. |
@lithp I'd be fine with your |
@pipermerriam @lithp
All "blockchain" tests pass locally for me (that's including "passing because I'm not working at getting CI green here, because this work would be overridden by PR #1577 anyway. |
❤️ @veox |
d0f584a
to
c14d7f7
Compare
This made the EVM no longer care that SSTORE within a STATICCALL is forbidden. ethereum#1579 (comment)
@@ -11,7 +11,8 @@ | |||
opcode_values, | |||
) | |||
from eth.vm.forks.byzantium.opcodes import ( | |||
BYZANTIUM_OPCODES | |||
BYZANTIUM_OPCODES, | |||
ensure_no_static |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could possibly be moved "out" of any fork-specific file.
2 COMMITS SQUASHED: fixtures: include missing Constantinople in helpers. Debugging CREATE2 using the full "Blockchain" tests in `fixtures` (they are disabled in `py-evm`, because they're slow and a duplication of "State" tests). A few definitions are missing - so add them. tests/conftest: fix VM-tracing log-to-file helper. Also move `import`s out of the helper, so they're not encountered by the interpreter on every invocation of the helper.
This made the EVM no longer care that SSTORE within a STATICCALL is forbidden. ethereum#1579 (comment)
c14d7f7
to
a7b3497
Compare
This used to be a commit by @cburgdorf, but it got eaten in the rebase (as it had most of the conflicts).
This made the EVM no longer care that SSTORE within a STATICCALL is forbidden. ethereum#1579 (comment)
One is existing `RevertInCreateInInit`, but now for Constantinople, not just Byzantium. The other is `RevertInCreateInInitCreate2`, which contains the same "synthhetic" state which can't be arrived at by regular means in the EVM. It's likely a copy-paste atavism. The rest are variants testing specifically for what happens on collisions with a state like above. It has already been estabilished that there are two schools of thought: one with `geth` and `aleth` (and `testeth` that generates the tests); the other with `py-evm` and `parity`.
a7b3497
to
2b01068
Compare
Rebased branch on latest (The cherry-picking and reordering didn't go well for Github's ability to display the current state.) |
Python3.6 + Constantinople tests fail because they gobble up memory; here's a gist of durations running
(This saw a peak usage of 8 GiB of RAM for me.) A lot of these have "50000" in their names; wonder if the tests run their operations 50 thousand times each... Will update |
bd11197
to
c60ba44
Compare
8ff9816
to
3017dce
Compare
SQUASHED: tests/fixtures/blockchain: sort SLOWEST_TESTS alphabetically. ... to reduce line count diff/churn: some are just being moved around needlessly. tests/fixtures/blockchain: add bcForkStressTest to class-disabled.
3017dce
to
fd537be
Compare
('GeneralStateTests/stChangedEIP150/Call1024BalanceTooLow_d0g0v0.json', 'Call1024BalanceTooLow_d0g0v0_EIP150'), # noqa: E501 | ||
('bcForkStressTest/ForkStressTest.json', 'ForkStressTest_EIP150'), # noqa: E501 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now disabled as a class, see blockchain_fixture_mark_fn()
below.
EDIT: Brought up testing it separately in #1588 (comment).
@@ -32,6 +32,8 @@ commands= | |||
beacon: pytest {posargs:tests/beacon/} | |||
# The following test seems to consume a lot of memory. Restricting to 3 processes reduces crashes | |||
rpc-state-byzantium: pytest -n3 {posargs:tests/trinity/json-fixtures-over-rpc/test_rpc_fixtures.py -k 'GeneralStateTests and not stQuadraticComplexityTest and Byzantium'} | |||
# Uncomment the next line + modify test_rpc_fixtures.py when Constantinople is included in the mainnet config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Old comment can be deleted?
# Uncomment the next line + modify test_rpc_fixtures.py when Constantinople is included in the mainnet config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can do it in a follow-up. I don't want to do it myself in case I misread the comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was an oversight. It shouldn't have been there - oops.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kinda figured, but also didn't want to hold up the release over it.
What was wrong?
py-evm
doesn't yet pass the full Constantinople test suite.This started as a copy of PR #1181, so that Christoph doesn't have to act as a gatekeeper for every tiny fix I propose.
Closes #1181 as superseded/conflicting.
How was it fixed?
The PR updates the upstream
ethereum/tests
(git sub-module in dirfixtures
), enables tests for Constantinople, and fixes the breaks introduced by that.NOTE: some test are very slow or consume a lot of memory, making it impossible to pass CI on CircleCI's "open source contributor" tier (the process gets OOM-killed). All of these are in
SLOW_TESTS
. All tests pass locally for me.Cute Animal Picture
Source: Valdas Augustinas @ efoto.lt