-
Notifications
You must be signed in to change notification settings - Fork 685
Failing blockchain tests now emit a state diff #1573
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
Conversation
These test failures happened because EDIT: performing a rebuild-via-squash |
e0434a4
to
75a2496
Compare
@lithp I believe that may be indicative of an out-of-memory crash since pytest likely has to keep around a lot of data during the test run. It may mean the tests need to be split into smaller chunks. |
Even if it's not the cause of the crash, it would be best to split the tests. Note how we had split the state tests into 5 parts, in order to get some balance on the length of the test jobs. With this PR, all 5 of those, and the blockchain tests, are combined into a single job. See how they were split before here: Lines 38 to 45 in f616298
(which may or may not help) |
Yeah, that helps! I added a commit which skipped the state tests. The blockchain tests took 30 minutes to run and still had a few crashes, it looks like some of the I think the next step here is to copy over some of the tools state tests have:
Don't know what your development process looks like, I think what I'll do is turn the Comments on #1562 would be appreciated! I think it would make the test a lot easier to debug if state tests were dropped in favor of their BlockchainTest equivalents. |
fe12cfe
to
9021c02
Compare
9021c02
to
3a905d0
Compare
eth/tools/fixtures/helpers.py
Outdated
@@ -40,6 +40,7 @@ | |||
BaseVM, | |||
) | |||
from eth.vm.forks import ( | |||
ConstantinopleVM, |
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.
Some of these changes - extracted from this gist, via issue #1562 - are already pending inclusion as part of cburgdorf#2.
Since you're not including the portion that enables more Constantinople
tests, this change (and the other one from same file) would be unrelated to the rest of this PR.
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.
You're right, removed the Constantinople parts.
Yeah, or maybe too memory-intensive? Haven't had a chance to dig in.
Yeah, that sounds right. The more focused the better. Probably just rebase away the state test changes here, and move those to another PR.
Yup, all three LGTM.
Which open questions on 1562 are you looking for feedback on? On my quick scan, I didn't see any glaring unsolved problems. |
aa47fe5
to
feff421
Compare
- Instead of failing with "these block hashes do not match", blockchain tests now fail with "this part of the state tree does not match". - The tests were inefficient, they first checked that the state hash matched and then checked that the states matched. It's unlikely the states will ever not match! - Some validations needed to be deferred until after state-tree comparison, or else they would fail the test early with an unhelpful message.
feff421
to
65e6f4d
Compare
Anecdotal: a local test run (still on-going) is currently consuming 3 GiB. |
Accidental close 😢
The one I'm concerned about is whether it's a good idea to drop the state tests and instead use the one embedded within the blockchain tests |
The tests are all passing but:
|
While you're at it, could you also reverse the calculation on this line?.. (I've mentioned this in passing elsewhere.) https://github.com/ethereum/py-evm/pull/1573/files#diff-38aa0bc8e408266959b43002a08f0cd4R81 For example, as things stand, if a fixture- If not, I can open a separate PR. |
Yeah, that issue is a recent-ish, known, and annoying. |
Blame Microsoft. |
I was juuust about to merge this, and it would be nice to rebase #1577 on this. Maybe @lithp can sneak the change into #1577 |
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)
Intended to address #1562
What was wrong?
Failures used to look like this:
And now they look like this:
How was it fixed?
I'm running with all the hard work @veox did, this is an attempt to put it into a more-committable form.
Cute Animal Picture