Skip to content

Verify ethrex-replay against externally produced execution witnesses #69

Description

@avilagaston9

Context

ethrex/PR #4280 added a workaround in GuestProgramState::get_account_code / get_code_metadata that silently returned empty code on a witness miss. The justification at the time was cross-client compatibility: ethrex-replay needed to consume witnesses produced externally that omit code ethrex's LEVM happens to access.

ethrex/PR #6541 removed that fallback to align with EIP-8025 completeness rules so the zkevm validation_codes_* tests pass. get_account_code / get_code_metadata now error on miss.

What we don't know

Whether any current real-world witness produced outside ethrex now triggers a false "missing bytecode" rejection in ethrex-replay. We removed the workaround based on the spec, not on empirical cross-source testing.

Proposed approach

Run ethrex-replay against witnesses fetched from external debug_executionWitness sources and check for discrepancies:

  1. Pick a recent mainnet block range (e.g. 100 blocks).
  2. Fetch witnesses from one or more external sources.
  3. Execute each witness with ethrex-replay.
  4. For any failure, capture the missing code hash, inspect the pre-state at that address, and trace the LEVM call site that requested it.
  5. If a real divergence is found, file a follow-up with the specific over-fetch (or under-include) site.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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