test: Use EEST error names - #1624
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1624 +/- ##
==========================================
+ Coverage 97.51% 97.74% +0.23%
==========================================
Files 170 170
Lines 15428 15382 -46
Branches 3604 3583 -21
==========================================
- Hits 15044 15035 -9
+ Misses 281 262 -19
+ Partials 103 85 -18
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Transaction errors carried prose messages ("nonce too high") while block errors
already carried the execution-spec-tests exception names, and the state test
exporter translated the prose into a third vocabulary, the retesteth TR_* names.
Comparing a rejection against a fixture therefore worked one way for blocks and
another for transactions.
Every message is now the exception name the specs use for that rule, so the
comparison is the same on both sides and get_invalid_tx_message() is gone. The
error codes whose names diverged from the specs for no reason are renamed with
them; the ones that describe the rule better than the spec name does (nonce
too high/low, the type-3 and type-4 rules, the chain id) keep their name, as do
the two rules the specs do not name at all.
INVALID_BLOCK_PARENT is renamed to UNKNOWN_PARENT, the name the specs actually
use: no fixture could ever have matched the old one.
chfast
force-pushed
the
state/eest-error-names
branch
from
August 10, 2026 06:30
17551b0 to
feadd8a
Compare
There was a problem hiding this comment.
Pull request overview
Replaces translated validation errors with EEST exception names emitted directly from ErrorCode.
Changes:
- Renames transaction and block error codes to EEST terminology.
- Removes
get_invalid_tx_message(). - Updates unit and integration expectations.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
test/utils/statetest.hpp |
Removes translation helper declaration. |
test/utils/statetest_export.cpp |
Exports error messages directly. |
test/unittests/state_tx_test.cpp |
Updates transaction error expectations. |
test/unittests/state_transition_tx_test.cpp |
Updates insufficient-funds error name. |
test/state/state.cpp |
Returns renamed validation errors. |
test/state/errors.hpp |
Defines EEST-aligned names and messages. |
test/integration/t8n/CMakeLists.txt |
Updates expected t8n output. |
test/integration/statetest/CMakeLists.txt |
Updates expected diagnostics. |
test/blockchaintest/blockchaintest_runner.cpp |
Uses the EEST unknown-parent error. |
Suppressed comments (1)
test/state/state.cpp:468
- This path is specifically a type-4 transaction before Prague, whose EEST exception is
TransactionException.TYPE_4_TX_PRE_FORK. Returning the genericTYPE_NOT_SUPPORTEDcausesto_state_test()to export the wrongexpectExceptionfor this rule. Please add a dedicated pre-fork type-4 error/message and use it here.
return make_error_code(TYPE_NOT_SUPPORTED);
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Replace prose error message in transactions with execution-specs error names (e.g.
TransactionException.INTRINSIC_GAS_TOO_LOW). Also tune other error messages to match EEST closer. This eliminates the need of translation inget_invalid_tx_message().