test: Check why a state test transaction was rejected - #1621
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1621 +/- ##
==========================================
- Coverage 97.75% 97.73% -0.02%
==========================================
Files 170 171 +1
Lines 15557 15565 +8
Branches 3596 3604 +8
==========================================
+ Hits 15207 15213 +6
Misses 263 263
- Partials 87 89 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
chfast
force-pushed
the
test/statetest-reject-reason
branch
from
August 9, 2026 23:17
9ba5dc6 to
19d0bc2
Compare
chfast
force-pushed
the
test/statetest-reject-reason
branch
from
August 9, 2026 23:47
19d0bc2 to
3d555c5
Compare
chfast
force-pushed
the
test/statetest-reject-reason
branch
from
August 10, 2026 06:17
3d555c5 to
3ddecd8
Compare
chfast
force-pushed
the
state/eest-error-names
branch
from
August 10, 2026 06:30
17551b0 to
feadd8a
Compare
chfast
force-pushed
the
test/statetest-reject-reason
branch
2 times, most recently
from
August 10, 2026 06:47
13146b5 to
528d969
Compare
chfast
force-pushed
the
test/statetest-reject-reason
branch
4 times, most recently
from
August 10, 2026 12:45
75ef6f3 to
3271aac
Compare
There was a problem hiding this comment.
Pull request overview
Validates transaction rejection reasons and centralizes legacy exception-name mapping across state and blockchain tests.
Changes:
- Records and checks expected state-test exceptions.
- Adds shared exception mapping and alias matching.
- Reuses mapping in the blockchain-test loader.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
test/utils/statetest.hpp |
Stores expected exception names. |
test/utils/statetest_loader.cpp |
Loads normalized exceptions. |
test/utils/exceptions.hpp |
Declares exception utilities. |
test/utils/exceptions.cpp |
Implements mapping and matching. |
test/utils/CMakeLists.txt |
Builds the new utilities. |
test/utils/blockchaintest_loader.cpp |
Shares legacy mapping. |
test/statetest/statetest_runner.cpp |
Checks rejection reasons. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
chfast
force-pushed
the
test/statetest-reject-reason
branch
from
August 10, 2026 13:16
3271aac to
29faa6c
Compare
A state test with an `expectException` only checked that the transaction was rejected, not that it was rejected for the stated reason, so an implementation failing a rule for the wrong cause passed. Compare the rejection against the fixture's exception. Where the specs draw a distinction evmone does not, or draw it elsewhere, the alternative names are listed in one table in test/utils/error_matching.cpp. The retesteth vocabulary of the ethereum/tests fixtures is mapped to the spec names there too, moved out of the blockchain-test loader and extended with the transaction-level spellings, so both runners compare one vocabulary.
chfast
force-pushed
the
test/statetest-reject-reason
branch
from
August 10, 2026 13:54
29faa6c to
04fdfcb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A state test with an
expectExceptiononly checked that the transaction was rejected, not that it was rejected for the stated reason, so an implementation failing a rule for the wrong cause passed.Compare the rejection against the fixture's exception. Where the specs draw a distinction evmone does not, or draw it elsewhere, the alternative names are listed in one table in
test/utils/error_matching.cpp.The legacy retesteth exception names are mapped to the spec ones there too, so both runners compare one vocabulary.