-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
refactor: move ef tests to own testing crate #2847
Conversation
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## main #2847 +/- ##
==========================================
- Coverage 71.44% 71.44% -0.01%
==========================================
Files 506 510 +4
Lines 66256 66213 -43
==========================================
- Hits 47339 47304 -35
+ Misses 18917 18909 -8
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Love it
Some(RootOrState::Root(root)) => { | ||
// TODO: We should really check the state root here... | ||
println!("Post-state root: #{root:?}") | ||
} |
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.
@rkrasiuk :D let's add a state root check?
Really great cleanup 💯 |
Motivation
I wanted to move the EF tests out of the main CLI since it does not make sense that it is user facing, support additional EF tests down the line, and create a new crate namespace specifically for more complex tests
Solution
I moved it to its own crate with abstractions based off of Lighthouse's testing crate. The main idea here is that there are different types of tests in https://github.com/ethereum/tests and we are currently only running a subset. Some of them might be of interest later on, e.g. the trie test, RLP tests and so on
The tests are feature gated to ensure no one accidentally runs them without the required files. The tests can be run with
make ef-tests
or manually by cloning the tests repo intotesting/ef-tests/ethereum-tests
and runningcargo test -p ef-tests --features ef-tests
The reason for the
testing
subdirectory is to logically group other larger integration tests later on and possibly build common testing components in there for reuse (e.g. testnets)I also cleaned up the test runner that was moved over from the CLI a bit so it is easier to reason about
Follow ups
Here are some possible follow ups (I will create issues for each if this is merged):
ValidBlocks
andInvalidBlocks
suites. Currently we don't run these, presumably because they are formatted a bit different, but it might be worth runing them regardless. A newSuite
type can be implemented for this if neededTransitionTests
suite for testing fork transitions (we can't do this rn either)