feat(consume direct, tests): add erigon support, also add test to showcase erigon statetest bug#2951
Merged
marioevz merged 2 commits intoJun 3, 2026
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## forks/amsterdam #2951 +/- ##
================================================
Coverage 90.49% 90.50%
================================================
Files 535 535
Lines 32430 32407 -23
Branches 3012 3011 -1
================================================
- Hits 29349 29331 -18
+ Misses 2563 2559 -4
+ Partials 518 517 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
pull Bot
pushed a commit
to Dustin4444/erigon
that referenced
this pull request
Jun 4, 2026
…ed pre-london (erigontech#21607) annoying when doing differential fuzzing across client t8n's, but not relevant for mainnet. more context and reproducible test in [execution-specs pr](ethereum/execution-specs#2951) Co-authored-by: milen <94537774+taratorio@users.noreply.github.com>
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.
🗒️ Description
firstly, this title allows us to run
consume directagainst erigon (a bit tricky, cuz just from the version output alone you can't differentiate it reliably from geth's evm). but i check for certain strings in the binary so now it is robust.secondly, differential fuzzing found a bug in erigon's evm (not relevant for mainnet, but annoying during fuzzing):
problem
erigon, when it has to reconstruct and sign a state-test transaction itself (no
txbytesin fixture, pre-London fork), skips the pre-execution validity check (only happens pre-London) and executes the transaction instead of rejecting it for insufficient funds. all other clients reject the tx.note: because txbytes it missing, the clients reconstruct that field from the human-readable tx object. so the bug only happens in this specific code path which is not relevant for mainnet. but it is important to get this fixed to reduce noise during differential fuzzing.
how to reproduce
step 0: get latest erigon main and build the t8n via
make allstep 1: fill fixtures using:
uv run fill tests/frontier/validation/test_transaction.py::test_sender_balance_insufficient_state_test --clean -v -sstep 2: artifically remove 'txbytes' keys from fixtures (not possible in execution-specs, but requirement to trigger this bug in erigon's statetest t8n):
find fixtures/state_tests -path '*sender_balance_insufficient*' -name '*.json' -exec sh -c 'jq "del(.. | .txbytes?)" "$1" > "$1.tmp" && mv "$1.tmp" "$1"' _ {} \;this step is necessary because our framework would never delete those keys, so this standalone command is simpler than adding it as a feature in execution-specs
step 3: run consume direct:
uv run consume direct --bin /home/$USER/Documents/go-ethereum/build/bin/evm --input ./fixtures --sim.limit ".*sender_balance_insufficient_state_test.*"-> erigon will fail 6/12 tests with:
AssertionError: State test failed: expected error "TransactionException.INSUFFICIENT_ACCOUNT_FUNDS", got no error(will fail for all 6 pre-London forks)-> geth and other clients with pass all 12/12
Cute Animal Picture