-
Notifications
You must be signed in to change notification settings - Fork 654
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
Enable state tests for Constantinople #1181
Enable state tests for Constantinople #1181
Conversation
2ae43ea
to
0bd5815
Compare
The (A page of reasoning shredded as irrelevant...) The failure tested for by Will submit micro-fix PR... |
Caught by `exp8.json` test (not yet tracked in tests fixture). Ref: https://github.com/ethereum/tests/blob/10ab37c095bb87d2e781bcf112b6104912fccb44/VMTests/vmArithmeticTest/exp8.json Accidentally caught in PR ethereum#1181.
Regarding the I've tried running
There were:
(JIC, gist of EDITed, a lot: I mean, it seemed to me at first that the failures are due to enabling |
* eth/vm/logic/arithmetic: handle exp(X,0) == 1. Caught by `exp8.json` test (not yet tracked in tests fixture). Ref: https://github.com/ethereum/tests/blob/10ab37c095bb87d2e781bcf112b6104912fccb44/VMTests/vmArithmeticTest/exp8.json Accidentally caught in PR #1181. * tests/opcodes: exponentiation: 0^0==1, 0^1==0.
#1217 has been merged so this can be rebased. |
PR #1224 bumped fixtures, so this PR should be rebased against |
e0a1f64
to
2f2103e
Compare
@veox I didn't look into this yet but I rebased this and it doesn't show the 74 failures that you mentioned we should expect. Just wanted to ping you in case you wanted to look into that (otherwise, I'll do that soon). Also, I assume the linked tests aren't yet up to date in regard to EIP1234 and EIP1283 because otherwise they should definitely fail as we don't have these yet (with EIP1234 basically being ready in #1303) |
@cburgdorf I meant they'd show if you rebased against master (to incorporate the few fixes) and bumped It would then show 74 failures, instead of the 77 it was showing previously. That is, if there weren't new tests added upstream (I think there were) that would fail on |
@veox Ah gotcha! Thanks for clarifying! |
4848a77
to
d6f3ba1
Compare
d6f3ba1
to
1f91e55
Compare
I suspect we can remove the blocked tag from this? |
b065396
to
f3f2355
Compare
Yes, I think so. I'll try to move this forward today. Btw, is it correct to assume that we can not activate the constantinople rpc test before the Constantinople VM actually landed in the mainnet config with a block number. Because, these tests are based on the
|
f3f2355
to
30b7c08
Compare
4f5a8ed
to
49934bf
Compare
@cburgdorf or @lithp (whomever ends up running with this) Looking at the current failures after the |
@pipermerriam I'm not convinced the CI run has been rebased on current EDIT: Yup! Checked with a clean repo:
Commit from PR #1560 is not there. |
49934bf
to
04ac2a5
Compare
@veox I just rebased on current master and pushed. |
Just pushed 010b840 which in theory fixes a few of the remaining failures but causes some other tests to fail that were not failing previously... |
( Seems like the "Delta" above has incorrect sign (should be Trace shows that post-
|
# to its original state root. | ||
snapshot = computation.state.snapshot() | ||
|
||
computation.state.account_db.delete_storage(child_msg.storage_address) |
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.
Should a check for collisions be made first?..
EDIT: E.g., same as on line 010b840#diff-8b72e7215cd1bf65062b0a7071e3ded0R175
EDIT2: Seems like no; at least a naiive copy-paste didn't help here.
@veox We skipped two This is not a problem for Constantinople because it cannot happen on mainnet, but for the long-term future, we probably still want to find some resolutions. |
I'm good with skipping the tests mentioned by @sorpaas (but lets be sure to add a beefy comment explaining why and linking at minimum to this thread). |
@pipermerriam (Note that the latter is currently "masked" anyway, However, in the comment above, I am not talking about It seems that, indeed, just like the regular For ref, the comment explaining what's odd here can be found at #1224 (comment). |
I can not corroborate this, at least not when running The diff between before commit 010b840 and after is:
(That is, three nodeIDs of a single test That said, my summary line (for the "post" run) is
..., whereas the CircleCI run shows
Running |
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.
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.
Enable tests that are _still_ disabled
Instead of emitting expected - actual, emit actual - expected. Rationale (by @veox): > For example, as things stand, if a fixture-expected value is 1000, and > the actual produced by py-evm is 500, the printed message will show a > delta of 500 - that is, a net positive, whereas what truly happened is > py-evm having produced a value that's too low. This is confusing: say, a > miner's account balance showing "Delta: 500" makes one think that the > miner received 500 wei more than expected (which is not true). Reference: - ethereum#1181 (comment) - ethereum#1573 (comment)
@veox It may be still be that issue. Parity skipped two, one is If you want to confirm, check the gas cost for |
@sorpaas You are right - I didn't look at the link you posted, and so talked past you. Sorry. In same comment, second section I confirm what you're saying. |
I've fixed the conflicts and continued in PR #1579. |
What was wrong?
We need to run the global state tests from
ethereum/test
for the upcoming constantinople forkHow was it fixed?
fixtures
against ethereum/tests@10ab37c which is a WIP branch containing some of the new constantinople tests. We'll most likely have to update this to a different version prior to mergetest_state.py
to handle Constantinople testsWe need to keep this PR open and continue to rebase it until we get all tests passing. Also notice that there are some tests failing for other forks as well which either means, we have some evm bugs or just need to adjust the test setup somehow.
Cute Animal Picture