refactor(tests): separate the gas window and receipt tests - #3512
Merged
spencer-tb merged 1 commit intoSep 3, 2026
Merged
Conversation
Four tests each asserted a gas window measuring where a merged refund sits and a receipt measuring what the sender pays. The window changes under the merge-time repayment of ethereum/EIPs#12265, the receipt must not. Asserted together, the receipt could only be read from a test that change makes fail. Split each in two. The tests keeping the receipt drop the `GAS` stamps and the result slot, so one fewer slot survives and their sums stop carrying the probe overhead. With the `src/` change of ethereum#3478 applied, the failing tests are exactly the ones measuring a window, so the module docstring's claim that the two are independent is now checked. Extract what the halves share as `clearing_child_code`, `clearing_child_storage` and `delegation_to`, and name the budget leaving a storing child more than the call stipend `budget_above_sstore_stipend`. It was open-coded ten times. The two `SSTORE` metadata forms spelled out eleven times become `FRESH_SET` and `WARM_CLEAR`, and `window_cost_excess` loses its metadata parameter now that no receipt sum reads a measured frame. Fixtures for every pre-existing test are unchanged.
Member
Author
|
Mostly AI generated, so if you think to big / not worth review then fine. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## forks/amsterdam #3512 +/- ##
================================================
Coverage 94.01% 94.01%
================================================
Files 624 624
Lines 36905 36905
Branches 3326 3326
================================================
Hits 34695 34695
Misses 1533 1533
Partials 677 677
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
spencer-tb
approved these changes
Sep 3, 2026
spencer-tb
left a comment
Contributor
There was a problem hiding this comment.
LGTM! Thanks Pawel+AI co :)
20 tasks
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.
Description
Four tests each asserted a gas window measuring where a merged refund sits and a receipt measuring what the sender pays. The window changes under the merge-time repayment of ethereum/EIPs#12265, the receipt must not. Asserted together, the receipt could only be read from a test that change makes fail.
Split each in two. The tests keeping the receipt drop the
GASstamps and the result slot, so one fewer slot survives and their sums stop carrying the probe overhead. With thesrc/change of #3478 applied, the failing tests are exactly the ones measuring a window, so the module docstring's claim that the two are independent is now checked.Extract what the halves share as
clearing_child_code,clearing_child_storageanddelegation_to, and name the budget leaving a storing child more than the call stipendbudget_above_sstore_stipend. It was open-coded ten times. The twoSSTOREmetadata forms spelled out eleven times becomeFRESH_SETandWARM_CLEAR, andwindow_cost_excessloses its metadata parameter now that no receipt sum reads a measured frame. Fixtures for every pre-existing test are unchanged.Related Issues or PRs
N/A.
Checklist
just static<type>(<area>): <title>, where<type>and<area>come from an appropriateC-<type>, respectivelyA-<area>, label. The title should match the target squash commit message.