You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Motivation**
- Make running and modifying EF Tests a better experience
**Description**
<!-- A clear and concise general description of the changes this PR
introduces -->
- Remove spinner and just use prints
- We now can filter the tests we want to run by fork name(we do the
filtering in the parsing). Default is all forks.
- Upgrade tests to more recent version
- Run some Legacy Tests that we weren't running before. This adds a lot
of tests more, it is the folder Cancun under LegacyTests. There will be
repeated tests with the folder GeneralStateTests, we may want to find a
solution for that so that it takes less time to execute.
- Create docs in `README.md`
- Implement some nits in the runner, making code easier to understand.
- Ignore a few tests that take too long to run so that we can check for
breaking changes fast.
- Fix comparison report against LEVM, they weren't working correctly
mostly because we were mishandling our Cache
- Tidy the report, now it is much more clear and easier for debugging.
Also the code is easier to follow and more concise too!
- Fix some tests with REVM, basically now using constructor of
`BlobExcessGasAndPrice` and setting chain id to 1 (as we do in LEVM).
- Changed `get_state_transitions`
[here](#2518) so that REVM and
LEVM account updates are mostly the same and the comparison is more
accurate for the person who is debugging any test.
<!-- Link to issues: Resolves#111, Resolves#222 -->
Closes #issue_number
The state tests are individual transactions not related one to each other that test particular behavior of the EVM. Tests are usually run for multiple forks and the result of execution may vary between forks.
4
+
Some [docs](https://ethereum.github.io/execution-spec-tests/main/consuming_tests/state_test/).
5
+
4
6
5
7
## Running the tests
6
8
7
9
```bash
8
-
make run-evm-ef-tests
10
+
make run-evm-ef-tests flags=<flags>
11
+
```
12
+
or
13
+
```bash
14
+
cargo test --package ef_tests-state --test all --release -- <flags>
9
15
```
16
+
17
+
**Flags**
18
+
- forks: Forks for which we want to run the tests for.
19
+
- tests: Tests (.json files) we want to run
20
+
- specific_tests: For running tests with a specific name. (Sometimes a .json file has multiple tests)
21
+
- summary: For not doing a re-run with REVM of failed tests after LEVM's run.
22
+
- skip: For skipping tests
23
+
- verbose: For more info while running, like tests names being run.
24
+
- revm: For running EFTests ONLY with REVM.
25
+
26
+
27
+
Example usage:
28
+
```bash
29
+
cargo test --package ef_tests-state --test all --release -- --forks Prague,Cancun --summary --tests push0.json,invalidAddr.json
30
+
```
31
+
This runs 2 specific tests with LEVM just for Prague and Cancun. If they fail they are not re-run with REVM.
32
+
33
+
Most of the tests that we run are from [this repository](https://github.com/ethereum/tests). We run the `GeneralStateTests` from that repo and also from `LegacyTests`, which is another repository that has snapshots of tests from previous forks.
34
+
35
+
36
+
Beware: Sometimes there is a test overlap between the tests folders we have downloaded and we may run the same test for a recent fork (Cancun ATTOW) twice. The impact of this in performance is minimal because we are doing runs for other forks anyway so one more run won't harm, but we should be aware that may lead to an inaccurate test count. We chose not to handle this because it wasn't a huge problem, but be conscious about this.
0 commit comments