The EIP-8037 coverage in the Amsterdam test suite has many OOG boundaries for
CREATE, but misses the one where the 112 * CPSB state charge succeeds (via
spill into regular gas) and the regular init_code_cost check OOGs on the
very next step, inside the same opcode.
The bal_create_and_oog[oog_before_target_access] fixture under
eip7928_block_level_access_lists/ accidentally catches this because it tunes
gasLimit to exactly one gas short. In that fixture the block-header gasUsed
(via max(sum_regular, sum_state)) is the expected 161510 — clients that
commit state_gas_used before the regular OOG land on 131488 (the state
charge amount) instead. This BAL-suite test exposes the bug indirectly; the
direct EIP-8037 suite does not.
Minimal shape
- Non-creation tx (
to set), CREATE opcode with value=0, 12-byte init code.
gasLimit = intrinsic + pre_CREATE_regular + 9000 + 112*CPSB + 1
(one gas below + init_code_word_cost).
Assertion of interest
block.header.gasUsed == gasLimit (full burn), not
gasLimit - regular_leftover - state_leftover where state_leftover was
incorrectly credited.
Suggestion
Add a create_oog_after_state_charge variant under state_gas_create/ with
the above boundary plus an explicit check that state_gas_used == 0 for the
failing tx (or equivalently that block gasUsed == gasLimit).
Surfaced while implementing EIP-7928 in evmone.
(originally filed at ethereum/execution-spec-tests#2321 — moving here.)
The EIP-8037 coverage in the Amsterdam test suite has many OOG boundaries for
CREATE, but misses the one where the
112 * CPSBstate charge succeeds (viaspill into regular gas) and the regular
init_code_costcheck OOGs on thevery next step, inside the same opcode.
The
bal_create_and_oog[oog_before_target_access]fixture undereip7928_block_level_access_lists/accidentally catches this because it tunesgasLimitto exactly one gas short. In that fixture the block-headergasUsed(via
max(sum_regular, sum_state)) is the expected161510— clients thatcommit
state_gas_usedbefore the regular OOG land on131488(the statecharge amount) instead. This BAL-suite test exposes the bug indirectly; the
direct EIP-8037 suite does not.
Minimal shape
toset), CREATE opcode withvalue=0, 12-byte init code.gasLimit = intrinsic + pre_CREATE_regular + 9000 + 112*CPSB + 1(one gas below
+ init_code_word_cost).Assertion of interest
block.header.gasUsed == gasLimit(full burn), notgasLimit - regular_leftover - state_leftoverwherestate_leftoverwasincorrectly credited.
Suggestion
Add a
create_oog_after_state_chargevariant understate_gas_create/withthe above boundary plus an explicit check that
state_gas_used == 0for thefailing tx (or equivalently that block
gasUsed == gasLimit).Surfaced while implementing EIP-7928 in evmone.
(originally filed at ethereum/execution-spec-tests#2321 — moving here.)