Skip to content

EIP-8037: test_code_deposit_halt_discards_initcode_state_gas missing ef_prefix (EIP-3541) deposit-failure mode #2963

@chfast

Description

@chfast

test_code_deposit_halt_discards_initcode_state_gas parametrizes deposit_fail_mode over oversized_code and oog_deposit, but not the EIP-3541 0xEF-prefix rejection.

That is a distinct deployment-halt path. With a stateful initcode (call_new_account / inner_create) it must discard the initcode state gas — and net any state→regular spill — exactly like the other two modes. The only existing 0xEF coverage (test_create_child_halt_refunds_state_gas) uses non-stateful initcode, so it never reaches the spill/discard distinction.

Suggestion

Add a third deposit_fail_mode parameter pytest.param("ef_prefix", id="ef_prefix") with deposit_fail = Op.MSTORE8(0, 0xEF) + Op.RETURN(0, 1) (returns 0xEF-prefixed code, rejected by EIP-3541 after the size check).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions