Skip to content

feat(tests): EIP-8037 reject tx exceeding remaining block state gas - #3081

Merged
spencer-tb merged 2 commits into
ethereum:forks/amsterdamfrom
chfast:eips/amsterdam/eip-8037-cumulative-2d-block-gas
Jul 2, 2026
Merged

spencer-tb merged 2 commits into
ethereum:forks/amsterdamfrom
chfast:eips/amsterdam/eip-8037-cumulative-2d-block-gas

Conversation

@chfast

@chfast chfast commented Jul 1, 2026 •

Copy link
Copy Markdown
Member

🗒️ Description

Two txs each fit the block alone, but tx1's SSTORE-sets consume the block's state budget down to a small remainder. tx2's gas_limit exceeds that remainder while the regular budget still has room, so it is rejected on the state dimension and the block is invalid.

The regular-dimension cumulative gate is already covered by test_multi_transaction_gas_accounting (EIP-7778); this pins the independent state-dimension gate (check_transaction, fork.py:573).

🔗 Related Issues or PRs

N/A.

✅ Checklist

  • All: Ran fast static checks to avoid unnecessary CI fails, see also Code Standards and Verifying Changes:
    just static
  • All: PR title have the form <type>(<area>):, where <type> and <area> come from an approrpriate C-<type>, respectively A-<area>, label. The title should match the a target squash commit message.
  • All: Considered updating the online docs in the ./docs/ directory.
  • All: Set appropriate labels for the changes (only maintainers can apply labels).
  • Tests: For PRs implementing a missed test case, update the post-mortem document to add an entry the list.
  • Ported Tests: Add the following docstring to manually enhanced tests from ./tests/ported_static/:
    @manually-enhanced: Do not overwrite. Post-state expectations corrected
    manually (see PR #2784).
    

@codecov

codecov Bot commented Jul 1, 2026 •

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@               Coverage Diff                @@
##           forks/amsterdam    #3081   +/-   ##
================================================
  Coverage            93.23%   93.23%           
================================================
  Files                  624      624           
  Lines                36924    36924           
  Branches              3373     3373           
================================================
  Hits                 34427    34427           
  Misses                1704     1704           
  Partials               793      793           
Flag Coverage Δ
unittests 93.23% <ø> (ø)

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.

chfast and others added 2 commits July 2, 2026 13:03
…udget

Two txs each fit the block alone, but tx1's SSTORE-sets consume the
block's state budget down to a small remainder. tx2's gas_limit exceeds
that remainder while the regular budget still has room, so it is
rejected on the state dimension and the block is invalid.

The regular-dimension cumulative gate is already covered by
test_multi_transaction_gas_accounting (EIP-7778); this pins the
independent state-dimension gate (check_transaction, fork.py:573).
@spencer-tb
spencer-tb force-pushed the eips/amsterdam/eip-8037-cumulative-2d-block-gas branch from 1ccfa90 to f6b0314 Compare July 2, 2026 12:10

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

LGTM! Added an extra parameterization :)

@spencer-tb
spencer-tb merged commit b2f7bd9 into ethereum:forks/amsterdam Jul 2, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants