Skip to content

feat(test-fill): align fill-stateful with gas-benchmarks implementation#2923

Open
LouisTsai-Csie wants to merge 5 commits into
ethereum:forks/amsterdamfrom
LouisTsai-Csie:refactor-stateful-filling
Open

feat(test-fill): align fill-stateful with gas-benchmarks implementation#2923
LouisTsai-Csie wants to merge 5 commits into
ethereum:forks/amsterdamfrom
LouisTsai-Csie:refactor-stateful-filling

Conversation

@LouisTsai-Csie
Copy link
Copy Markdown
Collaborator

@LouisTsai-Csie LouisTsai-Csie commented May 27, 2026

🗒️ Description

Add a few features & refactors to the stateful filling implementation.

Commit d198221: Replace debug_setHead with FCU approach.

debug_setHead only supports in Geth, Besu and Erigon. Nethermind implements debug_resetHead that takes block hash as input. Reth has the method registered but not implemented (Link), Nimbus comments out the method (Link), no implementation either.

Consider some features (e.g., built-in opcode tracing) is now only supported in Nethermind master branch, this PR changes the debug_setHead to FCU version, in order to set the canonical chain.

Commit 0252bec: Add a new CLI flag --gas-bump-blocks.

For perf-devnet-3 snapshot, we need to bump the block gas limit to ~1T block gas limit. This is done by sending empty blocks in gas-benchmarks. User could use --gas-bump-blocks to assign number of empty block to increase the block gas limit.

In gas-benchmarks, we send 5000 empty blocks to bump the block gas limit for perf-devnet-3. For Jochmnet, we do not need to bump the gas limit, as the block gas limit is already high enough (~1 gigagas).

Commit 05f3c16: Add deterministic sender pooling.

For test_ether_transfers_onchain_receivers benchmark, to prevent the sender account being cached, we pre-fund the account via CL withdrawal. We inject 15K withdrawal into funding phase, starting with this pk range:

SENDER_BASE_KEY = int.from_bytes(
    keccak256(b"gas-repricings-private-key"), "big"
)

Commit 54f43ad: Batch tx receipt request

Batch tx receipt RPC request, to avoid large amount of RPC request at the same time. This was a bottleneck in the past when using gas-benchmarks.

Commit 8477bfe: refactor fill_stateful.py

Split the hive setup version from the original fill_stateful.py file, to keep the file small and focus on the filler feature.

These senders are then consumed by test_ether_transfers_onchain_receivers, this aligns changes in gas-benchmarks PR NethermindEth/gas-benchmarks#146

Verification

Verify the test via Hive mode, works successfully.

🔗 Related Issues or PRs

Issue #2910

✅ Checklist

  • All: Ran fast static checks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:
    just 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-->

@LouisTsai-Csie LouisTsai-Csie self-assigned this May 27, 2026
@LouisTsai-Csie LouisTsai-Csie added A-test-fill Area: execution_testing.cli.pytest_commands.plugins.filler C-feat Category: an improvement or new feature labels May 27, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.43%. Comparing base (1596cf6) to head (8477bfe).
⚠️ Report is 4 commits behind head on forks/amsterdam.

Additional details and impacted files
@@                 Coverage Diff                 @@
##           forks/amsterdam    #2923      +/-   ##
===================================================
- Coverage            90.44%   90.43%   -0.01%     
===================================================
  Files                  535      535              
  Lines                32439    32430       -9     
  Branches              3012     3012              
===================================================
- Hits                 29338    29329       -9     
  Misses                2573     2573              
  Partials               528      528              
Flag Coverage Δ
unittests 90.43% <ø> (-0.01%) ⬇️

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.

@LouisTsai-Csie LouisTsai-Csie requested a review from marioevz May 27, 2026 13:30
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-feat Category: an improvement or new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant