Update EIP-8037: Clarify SSTORE restoration refund rollback semantics#11548
Merged
eth-bot merged 1 commit intoApr 20, 2026
Merged
Conversation
Collaborator
|
✅ All reviewers have approved. |
eb03fad to
61eda71
Compare
4 tasks
eth-bot
approved these changes
Apr 20, 2026
eth-bot
left a comment
Collaborator
There was a problem hiding this comment.
All Reviewers Have Approved; Performing Automatic Merge...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds one paragraph to the
SSTORErefund 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:state_gas_reservoiris irrevocable once applied.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_reservoirinflated relative to its pre-call value, effectively converting parentgas_leftinto 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