Skip to content

feat(tests): EIP-8037 auth refund funds state gas only, not regular - #3083

Merged
spencer-tb merged 2 commits into
ethereum:forks/amsterdamfrom
chfast:eips/amsterdam/eip-8037-auth-refund-regular-oog
Jul 2, 2026
Merged

spencer-tb merged 2 commits into
ethereum:forks/amsterdamfrom
chfast:eips/amsterdam/eip-8037-auth-refund-regular-oog

Conversation

@chfast

@chfast chfast commented Jul 2, 2026 •

Copy link
Copy Markdown
Member

🗒️ Description

A set_code tx on a pre-existing authority refunds NEW_ACCOUNT to the state reservoir. The target's SSTORE-set pays its state charge from that refund but its regular charge from gas_left, so one gas short of the SSTORE regular cost it runs out of gas despite the funded reservoir.

Verified at Amsterdam via t8n: exact_fit writes the slot (gas_used 166_616), one_short reverts with the refund returned unspent (68_695).

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

A set_code tx on a pre-existing authority refunds NEW_ACCOUNT to the
state reservoir. The target's SSTORE-set pays its state charge from that
refund but its regular charge from gas_left, so one gas short of the
SSTORE regular cost it runs out of gas despite the funded reservoir.

Verified at Amsterdam via t8n: exact_fit writes the slot (gas_used
166_616), one_short reverts with the refund returned unspent (68_695).
@codecov

codecov Bot commented Jul 2, 2026 •

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@               Coverage Diff                @@
##           forks/amsterdam    #3083   +/-   ##
================================================
  Coverage            93.23%   93.23%           
================================================
  Files                  624      624           
  Lines                36924    36936   +12     
  Branches              3373     3375    +2     
================================================
+ Hits                 34427    34439   +12     
  Misses                1704     1704           
  Partials               793      793           
Flag Coverage Δ
unittests 93.23% <ø> (+<0.01%) ⬆️

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.

@spencer-tb spencer-tb added C-feat Category: an improvement or new feature A-tests Area: Consensus tests. labels Jul 2, 2026

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

@spencer-tb
spencer-tb merged commit c074f38 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

A-tests Area: Consensus tests. C-feat Category: an improvement or new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants