Skip to content

Replay harness silently skips uncle validation on a pruned store, reporting only a count #386

Open

Description

@SDL-A1

From the external review of #374. Verified here, and I would rate this above
the rest of the Low findings.

crates/execution/tests/mainnet_block_rules.rs:210-232. The harness now skips
uncle validation for any block whose ancestry was pruned:

if !ancestry_held(&store, number, block.header.parent_hash, depth) {
    pruned += 1;
    continue;
}

and reports only a count.

Why this is more than cosmetic

mainnet_block_rules is the evidence CLAUDE.md names for consensus changes —
"argument is not evidence here". A silent skip means the harness can report a
pass while having validated far fewer uncle blocks than the operator assumes.
The required depth is UNCLE_GENERATION_LIMIT + REQUIRED_BLOCKS (449 headers
plus seven generations), so on a pruned store the skip could be the common case,
not the exception.

The skip itself is legitimate — you cannot validate what was pruned. The
problem is that it is indistinguishable from success.

What would settle it

Print the skipped count next to the validated count unconditionally, and fail
the test if the validated fraction falls below a threshold — or require an
explicit opt-in flag to tolerate any skips at all. A run that validated 12 of
9,000 uncle blocks should not look like a run that validated all of them.

This should be fixed before the harness is used as deploy evidence for #374.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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