Skip to content

feat(spec-specs, tests): EIP-8037 halt refunds spilled state gas#2815

Merged
spencer-tb merged 4 commits into
ethereum:devnets/bal/7from
spencer-tb:feat/eip-8037-halt-spill-refund
May 7, 2026
Merged

feat(spec-specs, tests): EIP-8037 halt refunds spilled state gas#2815
spencer-tb merged 4 commits into
ethereum:devnets/bal/7from
spencer-tb:feat/eip-8037-halt-spill-refund

Conversation

@spencer-tb

@spencer-tb spencer-tb commented May 6, 2026

Copy link
Copy Markdown
Contributor

🗒️ Description

Updates the EIP-8037 exceptional halt path with the updated EIP text. Top level halt now refunds the full state gas charge, including any portion that spilled into gas_left, back to the reservoir, the same way revert does.

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

Cute Animal Picture

Screenshot 2026-05-06 at 13 13 56

@spencer-tb spencer-tb changed the title feat(spec, tests): EIP-8037 halt refunds spilled state-gas feat(spec-specs, tests): EIP-8037 halt refunds spilled state gas May 6, 2026
@spencer-tb spencer-tb force-pushed the feat/eip-8037-halt-spill-refund branch from 2575201 to 3056f26 Compare May 6, 2026 21:13
@codecov

codecov Bot commented May 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (devnets/bal/7@e87390b). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff                @@
##             devnets/bal/7    #2815   +/-   ##
================================================
  Coverage                 ?   85.58%           
================================================
  Files                    ?      630           
  Lines                    ?    39595           
  Branches                 ?     3935           
================================================
  Hits                     ?    33886           
  Misses                   ?     5084           
  Partials                 ?      625           
Flag Coverage Δ
unittests 85.58% <ø> (?)

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.

@spencer-tb spencer-tb marked this pull request as ready for review May 7, 2026 10:17
@spencer-tb spencer-tb merged commit 40ce50b into ethereum:devnets/bal/7 May 7, 2026
21 checks passed
spencer-tb added a commit to spencer-tb/execution-specs that referenced this pull request May 11, 2026
Add three blockchain tests that exercise top-level halt rollback in
a contract-creation tx, complementing the existing successful-path
coverage in test_inner_create_*. Each test constructs a different
inner-frame outcome before the top-level INVALID and verifies that
the created contract address is NONEXISTENT after the halt:

- test_create_tx_halt_with_inner_create_revert_post_state: top runs
  INVALID after an inner CREATE frame REVERTs (the child performed
  a nested CREATE inside).
- test_create_tx_halt_with_inner_create_success_post_state: top runs
  INVALID after a successful inner CREATE.
- test_create_tx_halt_with_nested_create_fail_inside_create2_post_state:
  top runs INVALID after a successful CREATE2 whose initcode ran a
  failed nested CREATE.

These pin the post-ethereum#2815 spec behaviour: a top-level exceptional
halt drains state_gas_used, refunds the intrinsic NEW_ACCOUNT * cpsb,
and rolls back every state change regardless of inner-frame
outcomes. The scenario shapes are derived from benaadams' missing-
test list in ethereum#2804.
spencer-tb added a commit to spencer-tb/execution-specs that referenced this pull request May 11, 2026
Add three blockchain tests that exercise top-level halt rollback in
a contract-creation tx, complementing the existing successful-path
coverage in test_inner_create_*. Each test constructs a different
inner-frame outcome before the top-level INVALID and verifies that
the created contract address is NONEXISTENT after the halt:

- test_create_tx_halt_with_inner_create_revert_post_state: top runs
  INVALID after an inner CREATE frame REVERTs (the child performed
  a nested CREATE inside).
- test_create_tx_halt_with_inner_create_success_post_state: top runs
  INVALID after a successful inner CREATE.
- test_create_tx_halt_with_nested_create_fail_inside_create2_post_state:
  top runs INVALID after a successful CREATE2 whose initcode ran a
  failed nested CREATE.

These pin the post-ethereum#2815 spec behaviour: a top-level exceptional
halt drains state_gas_used, refunds the intrinsic NEW_ACCOUNT * cpsb,
and rolls back every state change regardless of inner-frame
outcomes. The scenario shapes are derived from benaadams' missing-
test list in ethereum#2804.
spencer-tb added a commit to spencer-tb/execution-specs that referenced this pull request May 22, 2026
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