Skip to content

EIP-8037: missing CREATE state-charge commits then immediate regular OOG test #2747

@chfast

Description

@chfast

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions