ethereum-optimism / ethereum-optimism/optimism

op-e2e: FPP proofs tests should assert derivation produces no new blocks when batches are dropped

Open
#20,050 0 comments 0 reactions 0 assignees View on GitHub
A-derivation A-op-e2e
Dominant language
Go
Stars
6.5k
Forks
4k
Avg merge
2d 15h
Merged PRs (30d)
145

Description

## Problem

Several Holocene proof action tests verify that the derivation pipeline correctly drops invalid batches or disordered frames, leaving the safe head at genesis (block 0). In these cases, the fault proof program (FPP) is skipped entirely because running it on genesis is trivial.

However, the FPP *should* be exercised in these scenarios — specifically to assert that derivation over the invalid data range produces no new blocks. This would verify that the FPP's derivation pipeline correctly rejects the same invalid data that the node's pipeline rejects.

## Affected tests

- `holocene_batches_test.go` — disordered-b, duplicates-b cases (pre-Holocene)
- `holocene_frame_test.go` — disordered-a, disordered-b cases (pre-Holocene and Holocene)
- `holocene_invalid_batch_test.go` — invalid-payload-span, seq-drift-span, future-l1-origin-span cases (pre-Holocene)

## Proposed solution

Run the FPP over the genesis block range and assert that derivation completes without advancing the safe head. This would require either:
1. A new `CheckResult` variant that asserts "no safe head progression" rather than checking a claim
2. Or a wrapper that runs the FPP and inspects the resulting state

This ensures the FPP faithfully reproduces the batch-drop behavior without needing to rebatch (which would gloss over the problematic range).

**Seb:** This probably doesn't work so well. An alternative may be to reorg the unsafe L2 chain and build an alternative, then batch it. If the channel/frame weren't dropped before, the alternative chain wouldn't be derived.
Another alternative is to improve the derivation pipeline to return as result not only the payload attributes but also any derivation errors that it encountered. Then we could explicitly assert on the expected derivation errors.

## Context

See #20023 for the PR that fixed the non-trivial cases and added skip-with-log for these remaining ones.

🤖 *Generated by Claude Code*

Contributor guide

Open the contributing guide

Research direction

Start with the affected cases in holocene_batches_test.go, holocene_frame_test.go, and holocene_invalid_batch_test.go, then review #20023 and the existing CheckResult and FPP invocation paths. Determine whether the tests should assert no safe-head progression or expected derivation errors. Done means the listed invalid and disordered cases exercise the FPP without producing new blocks.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.