Skip to content

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

Open
chfast wants to merge 1 commit into
ethereum:forks/amsterdamfrom
chfast:eips/amsterdam/eip-8037-cumulative-2d-block-gas
Open

feat(tests): EIP-8037 reject tx exceeding remaining block state gas#3081
chfast wants to merge 1 commit 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).
    

…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).
@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.22%. Comparing base (9920b6e) to head (1ccfa90).

Additional details and impacted files
@@               Coverage Diff                @@
##           forks/amsterdam    #3081   +/-   ##
================================================
  Coverage            93.22%   93.22%           
================================================
  Files                  624      624           
  Lines                36936    36936           
  Branches              3377     3377           
================================================
  Hits                 34433    34433           
  Misses                1709     1709           
  Partials               794      794           
Flag Coverage Δ
unittests 93.22% <ø> (ø)

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.

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.

1 participant