ethereum-optimism / ethereum-optimism/optimism

interop filter "not yet ingested" verdict is returned as -321100, which op-reth classifies as definitive-invalid instead of a soft non-response

Open
#21,944 0 comments 0 reactions 0 assignees View on GitHub
A-op-reth C-bug
Dominant language
Go
Stars
6.5k
Forks
4k
Avg merge
2d 15h
Merged PRs (30d)
145

Description

_Found via [Slack thread](https://oplabs-pbc.slack.com/archives/C03N11M0BBN/p1784651517475319) CI-flake investigation._

### Problem

When the referenced timestamp isn't ingested yet, or isn't yet cross-validated, `ValidateAccessEntry` returns `interop.ErrOutOfScope` (`op-interop-filter/filter/lockstep_cross_validator.go:214-232`), which is serialized as JSON-RPC code **-321100** (`op-core/interop/interop.go:64`).

op-reth's soft / non-response code set is only **-321401** (`FUTURE_DATA_CODE`) and **-320400** (`UNINITIALIZED_CODE`) (`rust/op-reth/crates/txpool/src/interop_filter/errors.rs:19-20`, classification at `:139-141`). -321100 falls through to the `SuperchainDAError` mapping (`errors.rs:144-146`, via the `OutOfScope` variant at `rust/op-alloy/crates/rpc-types/src/error.rs:84`) → `InvalidEntry`, which `is_definitive_invalid()` treats as a definitive rejection verdict.

### Consequence

A healthy but slightly-lagging filter that *answers promptly* causes interop txs to be hard-rejected at admission, rather than treated as a retriable "data not yet available". The documented intent in `errors.rs` (comments at `:13-15`, `:50-53`) is exactly that data-not-yet-available is soft and must not count as a verdict.

This is latent today: it was found while investigating #21940, where the filter didn't answer at all (see also #21943 — verdicts blocking behind the ingester write lock). But it will bite whenever the filter *does* answer during ingestion/cross-validation lag — which is also the desired behavior once #21943 is fixed, making this the next failure in line.

### Proposed fix

Either side works (both are fine too):

- op-interop-filter: return `ErrFuture` (**-321401**) instead of `ErrOutOfScope` for the not-yet-ingested / not-yet-cross-validated cases in `ValidateAccessEntry` — these are temporal "not yet", not scope violations; or
- op-reth: add **-321100** to the soft/non-response code set in `errors.rs`.

Cross-ref: #21940, #21943.

Contributor guide

Open the contributing guide

Research direction

Read ValidateAccessEntry in op-interop-filter/filter/lockstep_cross_validator.go and the error mappings in op-core/interop/interop.go and rust/op-reth/crates/txpool/src/interop_filter/errors.rs. Trace how the -321100 OutOfScope result reaches InvalidEntry and compare it with the documented soft-response codes. Done means the not-yet-ingested or not-yet-cross-validated case is treated as retriable rather than definitive-invalid, with relevant Rust tests passing.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
blockchain, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.