Skip to content

Update EIP-8037: Clarify SSTORE restoration refund rollback semantics#11548

Merged
eth-bot merged 1 commit into
ethereum:masterfrom
spencer-tb:eip-8037-sstore-refund-rollback
Apr 20, 2026
Merged

Update EIP-8037: Clarify SSTORE restoration refund rollback semantics#11548
eth-bot merged 1 commit into
ethereum:masterfrom
spencer-tb:eip-8037-sstore-refund-rollback

Conversation

@spencer-tb

@spencer-tb spencer-tb commented Apr 19, 2026

Copy link
Copy Markdown
Contributor

Adds one paragraph to the SSTORE refund for slot restoration section clarifying that the state gas refund is scoped to the executing frame and does not propagate to the parent on revert or exceptional halt.

Motivation

The current text describes where and when the refund is applied (immediately at the X to 0 SSTORE, directly to state_gas_reservoir) but is silent on what happens if the frame that performed the X to 0 SSTORE subsequently fails. Two interpretations are consistent with the existing wording:

  1. The credit to state_gas_reservoir is irrevocable once applied.
  2. The credit is scoped to the frame and is undone on failure.

Only (2) is consistent with the EIP's own principle that state gas is only refunded when no state was actually grown, and with the rest of the document's treatment of reverted frames.

Under (1), a sub-call that performs 0 to X to 0 and then reverts leaves state_gas_reservoir inflated relative to its pre-call value, effectively converting parent gas_left into reservoir state gas via a reverted frame. This contradicts the net-state-growth-is-zero justification and is a consensus-split risk between clients that read the existing text differently.

EELS Spec & Tests

ethereum/execution-specs#2698

@spencer-tb spencer-tb requested a review from eth-bot as a code owner April 19, 2026 08:09
@github-actions github-actions Bot added c-update Modifies an existing proposal s-draft This EIP is a Draft t-core labels Apr 19, 2026
@eth-bot

eth-bot commented Apr 19, 2026

Copy link
Copy Markdown
Collaborator

✅ All reviewers have approved.

@eth-bot eth-bot added the a-review Waiting on author to review label Apr 19, 2026

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

Good catch! Approved

@eth-bot eth-bot enabled auto-merge (squash) April 20, 2026 07:33

@eth-bot eth-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All Reviewers Have Approved; Performing Automatic Merge...

@eth-bot eth-bot merged commit 9493cd5 into ethereum:master Apr 20, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a-review Waiting on author to review c-update Modifies an existing proposal s-draft This EIP is a Draft t-core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants