File tree Expand file tree Collapse file tree
tests/amsterdam/eip8037_state_creation_gas_cost_increase Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929 StateTestFiller ,
3030 Storage ,
3131 Transaction ,
32+ TransactionReceipt ,
3233 compute_create2_address ,
3334 compute_create_address ,
3435)
@@ -1542,10 +1543,22 @@ def test_child_failure_refunds_state_gas_to_reservoir_not_gas_left(
15421543 ),
15431544 )
15441545
1546+ # Empirical per-tx cumulative. Pinning this catches a mutation
1547+ # that correctly restores the reservoir but also double-refunds
1548+ # to regular gas (or otherwise leaks extra gas to the sender),
1549+ # which the storage probe alone cannot discriminate.
1550+ expected_cumulative = {
1551+ Op .CALL : 73_831 ,
1552+ Op .DELEGATECALL : 73_825 ,
1553+ }[call_opcode ]
1554+
15451555 tx = Transaction (
15461556 to = parent ,
15471557 gas_limit = gas_limit_cap + sstore_state_gas ,
15481558 sender = pre .fund_eoa (),
1559+ expected_receipt = TransactionReceipt (
1560+ cumulative_gas_used = expected_cumulative ,
1561+ ),
15491562 )
15501563
15511564 # DELEGATECALL executes the callee in the caller's storage
You can’t perform that action at this time.
0 commit comments