Skip to content

fix(test-fill): fix filling pre-Byzantium forks with geth#2576

Merged
felix314159 merged 1 commit intoethereum:forks/amsterdamfrom
felix314159:geth-fix-pre-byz
Mar 30, 2026
Merged

fix(test-fill): fix filling pre-Byzantium forks with geth#2576
felix314159 merged 1 commit intoethereum:forks/amsterdamfrom
felix314159:geth-fix-pre-byz

Conversation

@felix314159
Copy link
Copy Markdown
Contributor

@felix314159 felix314159 commented Mar 27, 2026

🗒️ Description

Fixes compatibility with geth evm t8n for pre-Byzantium state tests. geth emits receipt JSON with a non-empty root field, and we were rebuilding those receipts as if status should take precedence, which caused receipt-root mismatches during fill. the parser now treats a non-empty geth JSON root as pre-Byzantium post_state and ignores status in that case, while preserving Byzantium-and-later behavior when root is empty.

Also added a few tests covering both pre-Byzantium (root) and Byzantium+ (status) receipt parsing behavior.

How to run

Before applying this PR u can run uv run fill --fork Frontier --evm-bin=/home/user/Documents/go-ethereum/build/bin/evm --clean tests/frontier/touch/test_touch.py::test_zero_gas_price_and_touching using latest geth master and one of the two tests will fail with a receipt-root mismatch. After applying the PR both tests pass (like they always would when filling with eels).

🔗 Related Issues or PRs

This fix was originally part of #2548 but was split into its own PR for cleaner commit history.

✅ Checklist

  • All: Ran fast tox checks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:
    uvx tox -e static
  • All: PR title adheres to the repo standard - it will be used as the squash commit message and should start type(scope):.
  • All: Considered updating the online docs in the ./docs/ directory.
  • All: Set appropriate labels for the changes (only maintainers can apply labels).
  • Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.
  • Tests: For PRs implementing a missed test case, update the post-mortem document to add an entry the list.
  • Ported Tests: All converted JSON/YML tests from ethereum/tests or tests/static have been assigned @ported_from marker.

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

… as pre-Byzantium post_state and takes precedence over status
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.35%. Comparing base (65a3009) to head (d28fcd1).
⚠️ Report is 1 commits behind head on forks/amsterdam.

Additional details and impacted files
@@               Coverage Diff                @@
##           forks/amsterdam    #2576   +/-   ##
================================================
  Coverage            86.35%   86.35%           
================================================
  Files                  599      599           
  Lines                36904    36904           
  Branches              3771     3771           
================================================
  Hits                 31868    31868           
  Misses                4485     4485           
  Partials               551      551           
Flag Coverage Δ
unittests 86.35% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@spencer-tb spencer-tb left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks :)

@felix314159 felix314159 merged commit 42ed8cd into ethereum:forks/amsterdam Mar 30, 2026
21 checks passed
@danceratopz danceratopz added C-bug Category: this is a bug, deviation, or other problem A-test-fill Area: execution_testing.cli.pytest_commands.plugins.filler labels Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-test-fill Area: execution_testing.cli.pytest_commands.plugins.filler C-bug Category: this is a bug, deviation, or other problem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants