Skip to content

fix(tests,test-fill): fix Engine X fills on BAL forks - #3219

Open
spencer-tb wants to merge 5 commits into
ethereum:forks/amsterdamfrom
spencer-tb:fix-engine-x-bal-drift
Open

fix(tests,test-fill): fix Engine X fills on BAL forks#3219
spencer-tb wants to merge 5 commits into
ethereum:forks/amsterdamfrom
spencer-tb:fix-engine-x-bal-drift

Conversation

@spencer-tb

@spencer-tb spencer-tb commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Description

The tests-glamsterdam-devnet@v7.2.1 release fill failed with EngineXExecutionDriftError on 18049 of 24683 Engine X fixtures.

On BAL forks the EIP-2935 system call writes the parent hash (the group genesis hash at payload 0) into every payloads blockAccessList, so the check flagged an expected state root derived difference. Decode the BAL and mask the (leading zero-trimmed) parent hash instead of comparing it verbatim, keeping the rest of the BAL in the comparison so leaked accounts are still caught.

The ported static Amsterdam skip list never matched Engine X variants (format token stripping mangled blockchain_test_engine_x ids into _x_from_state_test), and test_gas_cost_return blind calls undeclared 0x1000/0x2000, which pre alloc packing can populate (isolated as in #3176).

Validated with a full tests/ported_static fill at Amsterdam with --generate-all-formats: 25144 passed, 0 failed, 6286 Engine X fixtures execute identically against their packed group's genesis.

Related Issues or PRs

Fixes the fill (amsterdam) failure in the glamsterdam-devnet@v7.2.1 release dispatch, same failure class as the Benchmarking CI red since #3187.

Checklist

  • Ran fast static checks to avoid CI fails, see Code Standards & Verifying Changes: just static
  • PR title has the form <type>(<area>): <title>, where <type> and <area> come from an appropriate C-<type>, respectively A-<area>, label. The title should match the target squash commit message.

Cute Animal Picture

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

@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.41%. Comparing base (135af0f) to head (882909a).
⚠️ Report is 7 commits behind head on forks/amsterdam.

Additional details and impacted files
@@                 Coverage Diff                 @@
##           forks/amsterdam    #3219      +/-   ##
===================================================
+ Coverage            93.39%   93.41%   +0.01%     
===================================================
  Files                  624      624              
  Lines                37014    37014              
  Branches              3386     3386              
===================================================
+ Hits                 34570    34576       +6     
+ Misses                1671     1668       -3     
+ Partials               773      770       -3     
Flag Coverage Δ
unittests 93.41% <ø> (+0.01%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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.

@spencer-tb spencer-tb added C-bug Category: this is a bug, deviation, or other problem A-test-fill Area: execution_testing.cli.pytest_commands.plugins.filler A-tests Area: Consensus tests. labels Jul 23, 2026
@spencer-tb
spencer-tb marked this pull request as ready for review July 23, 2026 11:51
@spencer-tb

Copy link
Copy Markdown
Contributor Author

Forced pushed these commits to devnets/glamsterdam/7 so I can re-tag v7.2.1.

@spencer-tb

Copy link
Copy Markdown
Contributor Author

@marioevz
marioevz self-requested a review July 27, 2026 18:01
@marioevz marioevz self-assigned this Jul 27, 2026

@marioevz marioevz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

My main takeaway from this review is that #3122 broke the soundness of the pre-allocation grouping, and it tried to side-step this issue with packages/testing/src/execution_testing/fixtures/engine_x_checks.py. This is the second time in two weeks that this file breaks (#3176), and it's going to keep on breaking in the future.

I don't think this PR is incorrect, is just that we are patching a patch that is going to grow in complexity and bring us more issues in the future.

params = entry.get("params")
if params and isinstance(params[0], dict):
payload = params[0]
bal = payload.get("blockAccessList")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The problem with this is that we are passing fixture as a black-boxed python dictionary. We have the definitions of all the fixture types so we can parse them (yes it's another round of json parsing, but that's a problem with the approach this file takes to try to make its verifications).

return [_masked(child, parent_hash) for child in node]


def _scrubbed_bal(bal_hex: str, parent_hash_hex: str) -> Any:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's not great that we need this in the first place, this highlights how brittle this file is.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This file is just a nightmare to maintain: it introduced a post-fact verification and provides zero indication about the cause when there's a failure.

@spencer-tb

Copy link
Copy Markdown
Contributor Author

Let me create an issue or PR to try to make the file less brittle

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 A-tests Area: Consensus tests. C-bug Category: this is a bug, deviation, or other problem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants