Skip to content

test: Use EEST error names - #1624

Merged
chfast merged 1 commit into
masterfrom
state/eest-error-names
Aug 10, 2026
Merged

test: Use EEST error names#1624
chfast merged 1 commit into
masterfrom
state/eest-error-names

Conversation

@chfast

@chfast chfast commented Aug 10, 2026

Copy link
Copy Markdown
Member

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 in get_invalid_tx_message().

@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.85714% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.74%. Comparing base (327d1a1) to head (17551b0).

Files with missing lines Patch % Lines
test/state/errors.hpp 90.90% 2 Missing and 1 partial ⚠️
test/blockchaintest/blockchaintest_runner.cpp 0.00% 1 Missing ⚠️
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     
Flag Coverage Δ
eest-develop 88.71% <89.13%> (ø)
eest-develop-gmp 26.59% <21.42%> (+0.07%) ⬆️
eest-legacy 17.31% <28.57%> (+0.05%) ⬆️
eest-libsecp256k1 28.67% <21.42%> (+0.08%) ⬆️
eest-stable 88.71% <89.13%> (ø)
evmone-unittests 93.30% <44.64%> (+0.24%) ⬆️

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

Components Coverage Δ
core 96.08% <93.33%> (ø)
tooling 92.26% <50.00%> (+1.87%) ⬆️
tests 99.80% <100.00%> (ø)
Files with missing lines Coverage Δ
test/state/state.cpp 99.69% <100.00%> (ø)
test/unittests/state_transition_tx_test.cpp 100.00% <100.00%> (ø)
test/unittests/state_tx_test.cpp 98.84% <100.00%> (ø)
test/utils/statetest.hpp 80.00% <ø> (ø)
test/utils/statetest_export.cpp 98.80% <100.00%> (+28.04%) ⬆️
test/blockchaintest/blockchaintest_runner.cpp 85.24% <0.00%> (ø)
test/state/errors.hpp 86.41% <90.90%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@chfast chfast changed the title state: Report rejections with the spec exception names test: Use EEST error names Aug 10, 2026
@chfast
chfast requested a balanced review from Copilot August 10, 2026 06:26
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
chfast force-pushed the state/eest-error-names branch from 17551b0 to feadd8a Compare August 10, 2026 06:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 generic TYPE_NOT_SUPPORTED causes to_state_test() to export the wrong expectException for 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.

Comment thread test/state/state.cpp
@chfast
chfast merged commit e73628d into master Aug 10, 2026
21 checks passed
@chfast
chfast deleted the state/eest-error-names branch August 10, 2026 07:01
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.

2 participants