Skip to content

refactor(tests): enhance EIP-8037 test coverage part 4 - #3511

Open
LouisTsai-Csie wants to merge 1 commit into
ethereum:forks/amsterdamfrom
LouisTsai-Csie:enhance-8037-pt4
Open

refactor(tests): enhance EIP-8037 test coverage part 4#3511
LouisTsai-Csie wants to merge 1 commit into
ethereum:forks/amsterdamfrom
LouisTsai-Csie:enhance-8037-pt4

Conversation

@LouisTsai-Csie

@LouisTsai-Csie LouisTsai-Csie commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Description

Enhancing EIP-8037 testing coverage:

For each test file: (1) define suite scope, (2) analyze existing cases, (3) identify gaps, (4) filter impossible scenarios, (5) add missing tests, in order to expand EIP-8037 test coverage for state-gas pricing, reservoir accounting, refund behavior, transaction validity, and two-dimensional block gas accounting.

Changes

  • Expand two-dimensional block accounting coverage:
    • state- and execution-dominant blocks
    • under, exact, and over block-boundary cases
    • supported transaction types and log-bearing transactions
    • base-fee increases and decreases
  • Extend fork-transition coverage for:
    • SSTORE state gas
    • CREATE, CREATE2, CALL new-account, and SELFDESTRUCT charges
    • the modified transaction gas-limit constraint
  • Add state-gas boundary and failure coverage for:
    • CALL-family operations
    • CREATE/CREATE2 and code deposit
    • SELFDESTRUCT
    • EIP-7702 authorization processing
    • delegation-designation execution
  • Expand state-reservoir coverage across:
    • reservoir, spill, and mixed funding
    • nested calls
    • cross-frame refunds
    • reverted and exceptional frames
  • Add refund and calldata-floor interactions.
  • Verify sender and coinbase charging across execution and state dimensions.
  • Add EIP checklist markers and clarify non-applicable checklist sections.

The changes primarily extend existing test matrices and parameterize related execution paths so that shared setup is reused and equivalent scenarios are not duplicated.

Expected values verify:

  • receipt gas uses the combined execution and state charges after refunds;
  • block header gas_used uses max(block_execution, block_state);
  • state charges are returned or discarded according to frame success;
  • state-reservoir funding does not change the block state dimension;
  • fork-transition behavior changes only at EIP-8037 activation.

Related Issues or PRs

N/A.

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-->

@LouisTsai-Csie LouisTsai-Csie self-assigned this Sep 3, 2026
@LouisTsai-Csie LouisTsai-Csie added A-tests Area: Consensus tests. C-refactor Category: refactor labels Sep 3, 2026
@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.01%. Comparing base (3d3d43b) to head (dcc46aa).
⚠️ Report is 9 commits behind head on forks/amsterdam.

Additional details and impacted files
@@                 Coverage Diff                 @@
##           forks/amsterdam    #3511      +/-   ##
===================================================
+ Coverage            93.90%   94.01%   +0.10%     
===================================================
  Files                  624      624              
  Lines                36905    36905              
  Branches              3326     3326              
===================================================
+ Hits                 34655    34695      +40     
+ Misses                1569     1533      -36     
+ Partials               681      677       -4     
Flag Coverage Δ
unittests 94.01% <ø> (+0.10%) ⬆️

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.

@LouisTsai-Csie
LouisTsai-Csie marked this pull request as ready for review September 3, 2026 12:39

@spencer-tb spencer-tb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Amazing addition coverage @LouisTsai-Csie! Thanks so much, a couple of comments ;)

)

sender = pre.fund_eoa()
created = compute_create_address(address=sender, nonce=0)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

compute_create_address is undefined here. Please add it to the execution_testing imports. This currently causes all 30 fixture-generation variants of this test to fail with NameError :)

dominant_dimension: str,
) -> None:
"""
Assert the miner is paid on `max(execution, state)`, whichever leads.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should say the miner is paid on execution + state, matching expected_coinbase below. max(execution, state) applies to block-header/base-fee accounting, not the transaction charge. Could we also rename the test to reflect that it includes both dimensions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-tests Area: Consensus tests. C-refactor Category: refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants