Skip to content
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

Run all available ValidBlock tests #597

Merged
merged 8 commits into from
Oct 17, 2022

Conversation

gurukamath
Copy link
Collaborator

(closes #594 )

What was wrong?

Only a small sub-set of the ValidBlock test is currently being run

Related to Issue #594

How was it fixed?

Some of the ValidBlock have Invalid blocks in them. For each hard fork, the following steps were done

  1. Independently identify which tests have Invalid Blocks in them. This was done by using geth. A test for which geth was unable to generate a valid evm trace is assumed to have an invalid block

  2. Run separate category of tests - test_valid_block_incorrect for tests with invalid blocks and test_valid_block_correct for ones with only valid blocks.

  3. Identify and mark tests that are slow or use large memory.

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

@codecov-commenter
Copy link

codecov-commenter commented Sep 3, 2022

Codecov Report

Base: 80.67% // Head: 80.84% // Increases project coverage by +0.17% 🎉

Coverage data is based on head (2e7f79e) compared to base (eebe786).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #597      +/-   ##
==========================================
+ Coverage   80.67%   80.84%   +0.17%     
==========================================
  Files         370      370              
  Lines       21648    20095    -1553     
==========================================
- Hits        17464    16246    -1218     
+ Misses       4184     3849     -335     
Flag Coverage Δ
unittests 80.84% <ø> (+0.17%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/ethereum/utils/safe_arithmetic.py 0.00% <0.00%> (-89.48%) ⬇️
src/ethereum/frontier/vm/gas.py 97.29% <0.00%> (-2.71%) ⬇️
src/ethereum/homestead/vm/gas.py 97.29% <0.00%> (-2.71%) ⬇️
src/ethereum/spurious_dragon/vm/gas.py 96.29% <0.00%> (-2.47%) ⬇️
src/ethereum/tangerine_whistle/vm/gas.py 96.29% <0.00%> (-2.47%) ⬇️
src/ethereum/byzantium/vm/gas.py 96.34% <0.00%> (-2.44%) ⬇️
src/ethereum/berlin/vm/gas.py 96.38% <0.00%> (-2.41%) ⬇️
src/ethereum/constantinople/vm/gas.py 96.38% <0.00%> (-2.41%) ⬇️
src/ethereum/istanbul/vm/gas.py 96.47% <0.00%> (-2.36%) ⬇️
src/ethereum/byzantium/vm/instructions/system.py 99.40% <0.00%> (-0.60%) ⬇️
... and 221 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@petertdavies
Copy link
Collaborator

Is there a way of distinguishing between valid and invalid blocks, other that running them with Geth and seeing if they fail?

If not, we should consider opening a bug upstream, since the tests should provide an expected result.

@gurukamath
Copy link
Collaborator Author

If not, we should consider opening a bug upstream, since the tests should provide an expected result.

Tracking upstream issue

@gurukamath
Copy link
Collaborator Author

@SamWilsn @petertdavies Based on the response on the issue that I created on the ethereum tests repo, looks like these aren't necessarily tests with Invalid Blocks. Rather these include multi chain tests/re-orgs. Please see details. Do you think we should simply ignore these tests for specs since they might not be relevant?

@petertdavies
Copy link
Collaborator

Tests involving reorgs are out of scope for us.

Based on the names, I doubt the tests in bcMultiChainTest and bcTotalDifficultyTest are applicable to us.

@gurukamath
Copy link
Collaborator Author

Tests involving reorgs are out of scope for us.

Based on the names, I doubt the tests in bcMultiChainTest and bcTotalDifficultyTest are applicable to us.

Updated the valid block tests to ignore unrelated tests including bcMultiChainTest and bcTotalDifficultyTest

@SamWilsn SamWilsn merged commit a04d7ea into ethereum:master Oct 17, 2022
@SamWilsn
Copy link
Collaborator

tests passed locally.

@gurukamath gurukamath deleted the valid_block_tests branch October 27, 2022 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support all ValidBlock tests
4 participants