feat(test): add intermediate revert sstore test for 8037#7
Merged
spencer-tb merged 1 commit intoMay 8, 2026
Conversation
4 tasks
spencer-tb
reviewed
May 8, 2026
|
|
||
|
|
||
| @pytest.mark.with_all_call_opcodes( | ||
| selector=lambda call_opcode: call_opcode != Op.STATICCALL |
Owner
There was a problem hiding this comment.
It would be nice to be able to do this within the parameterizer in the future
spencer-tb
approved these changes
May 8, 2026
1cd18b8
into
spencer-tb:feat/eip-8037-create-tx-failure-intrinsic-refund
15 of 24 checks passed
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.
*CALL*opcodesClaude summary of new test:
The key dimension only the new test covers: the credit is fully deferred in inner (state_gas_used == 0 there, so applied = 0, pending = sstore_state_gas), then bubbles up via incorporate_child_on_success, and lands on a DIFFERENT charge in middle (middle's own slot-1 SSTORE-set, which has nothing to do with
caller's slot-0 set that the refund is keyed to). Middle then REVERTs.
This is the exact code path the PR's state_gas_refund removal rewrites:
set is the one persisting. The user double-paid.
The other revert tests can't catch this regression: they all have the credit landing in the same frame as its matching charge, so OLD and NEW produce the same answer there. The new test creates the only configuration where the dropped subtraction would have stolen sstore_state_gas from the user's reservoir.