Skip to content

fix(tests): accept tx-level exception for over-budget block (EIP-7778)#2949

Open
chfast wants to merge 1 commit into
ethereum:forks/amsterdamfrom
chfast:eip7778-overbudget-dual-exception
Open

fix(tests): accept tx-level exception for over-budget block (EIP-7778)#2949
chfast wants to merge 1 commit into
ethereum:forks/amsterdamfrom
chfast:eip7778-overbudget-dual-exception

Conversation

@chfast
Copy link
Copy Markdown
Member

@chfast chfast commented Jun 2, 2026

🗒️ Description

In test_multi_transaction_gas_accounting, a block whose included transaction exceeds the remaining block gas was expected to fail only with the block-level BlockException.GAS_USED_OVERFLOW. A client may legitimately report the same condition at the transaction level as TransactionException.GAS_ALLOWANCE_EXCEEDED (the best I found).

🔗 Related Issues or PRs

N/A.

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

… (EIP-7778)

In test_multi_transaction_gas_accounting, a block whose included transaction
exceeds the remaining block gas was expected to fail only with the block-level
BlockException.GAS_USED_OVERFLOW. A client may legitimately report the same
condition at the transaction level: EELS raises GasUsedExceedsLimitError (an
InvalidTransaction subclass) when `tx.gas > gas_available`, and evmone reports
it as a rejected transaction (GAS_LIMIT_REACHED).

List both BlockException.GAS_USED_OVERFLOW and
TransactionException.GAS_ALLOWANCE_EXCEEDED as acceptable so either
categorization passes.
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.50%. Comparing base (cb77cc5) to head (e7660ee).

Additional details and impacted files
@@               Coverage Diff                @@
##           forks/amsterdam    #2949   +/-   ##
================================================
  Coverage            90.50%   90.50%           
================================================
  Files                  535      535           
  Lines                32407    32407           
  Branches              3011     3011           
================================================
  Hits                 29331    29331           
  Misses                2559     2559           
  Partials               517      517           
Flag Coverage Δ
unittests 90.50% <ø> (ø)

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.

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