Skip to content

EIP-7708: Missing test for multi-account finalization burn log ordering #2691

@chfast

Description

@chfast

Summary

EIP-7708 specifies that finalization burn logs for multiple accounts marked for deletion must be emitted in lexicographical order of account address. The current EEST test suite has no test case that exercises this ordering with more than one destructed account.

Spec quote

When multiple accounts are marked for deletion, burn logs are emitted in lexicographical order of account address.

What's missing

All finalization_burn_logs test variants exercise only one destructed account per transaction. A test with 2+ accounts that are:

  1. Created in the same transaction (so SELFDESTRUCT actually destroys them post-EIP-6780)
  2. Selfdestructed to different beneficiaries
  3. Receive additional ETH after selfdestruct (via CALL or as SELFDESTRUCT beneficiary)
  4. End up with nonzero remaining balance at finalization

...would validate that implementations sort finalization burn logs by address rather than using arbitrary (e.g., execution) order.

Verification

We instrumented evmone with assert(burn_count <= 1) in the finalization burn loop and ran the full EEST suite (10,351 state tests + blockchain tests) — the assertion never fired. This confirms no existing test produces >1 finalization burn entry.

Impact

An implementation that emits finalization burn logs in execution order (instead of lexicographical) would pass all current tests but violate the spec.

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

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions