Repository navigation
op-reth: test the eth_getLogs errors for a range past the head or over pruned receipts - #23448
Draft
einar-oplabs wants to merge 1 commit into
Draft
einar-oplabs wants to merge 1 commit into
einar-oplabs wants to merge 1 commit into
Conversation
einar-oplabs
force-pushed
the
einar/23400-txpool-min-priority-fee
branch
from
October 15, 2026 16:01
dd0ae8e to
84f267f
Compare
…r pruned receipts reth 2.6 answers -32602 for a fromBlock past the head (reth#26891) and 4444 for a range whose receipts are pruned (reth#27002), where reth 2.5.2 answers an empty or silently partial array. Pin both codes and a served range over http and ws in node-integration tests. The pruned fixture drives reth's own receipts pruner through PruningArgs, with v1 storage so receipts are trimmed block by block and a zero-length RPC cache so the cache does not mask the pruning. The two error tests are ignored until the reth 2.6 bump, naming #23401. The engine driver of the persistence test moves into a shared module that can put extra sequencer transactions into a block. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
einar-oplabs
force-pushed
the
einar/23401-getlogs-errors
branch
from
October 15, 2026 16:01
39b9c31 to
e7565f8
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
reth 2.6 turns two
eth_getLogsanswers that were arrays into errors: afromBlockpast the head gets-32602 invalid block range params(reth#26891) and a range whose receipts the node pruned gets4444 pruned history unavailable(reth#27002), where reth 2.5.2 answers[]and a silently partial array. Nothing in the tree pinned either code; an indexer that pollslastSeen + 1or reads a pruned range sees the change with the bump (#23046).What the tests cover
Node-integration tests in
rust/op-reth/crates/node/tests/it/get_logs_errors.rs(a file of its own rather thanrpc.rs: the fixture builds a chain through the engine API and prunes it, which the one-call tests inrpc.rsdo not need). The fixture launches an op-reth node with--prune.receipts.before=4,--prune.block-interval=1and--prune.minimum-distance=1, v1 storage (receipts live in the database, which the pruner trims block by block; under v2 a short chain's receipts share one static file that the pruner only drops whole), zero-length RPC caches (the cache would otherwise keep serving the receipts the pruner removed, as it does for the newest blocks of a real chain), builds six blocks and waits for the receipts of block 3 to be gone. Block 6 carries a contract creation whose init code emits oneLOG0, so a served range has a log to answer with.from_block_past_the_head_is_rejectedfromBlock = 7on a 6-block chain-32602 invalid block range params[]range_over_pruned_receipts_is_rejectedfromBlock = 1, toBlock = 6, receipts of 1-3 pruned4444 pruned history unavailablerange_within_kept_receipts_is_servedfromBlock = 4, toBlock = 6Matrix: transport {http, ws}, as rstest cases on each test. Six cells in all.
engine_driver.rsis theEngineDriverofpayload_during_persistence.rs(#23436) moved into a module both tests use, with one addition:build_block_withtakes sequencer transactions to put in the block after its L1 info transaction, andspare_signerhands out the funded account the driver never signs with.Skipped cells
The four cells of
from_block_past_the_head_is_rejectedandrange_over_pruned_receipts_is_rejectedare#[ignore]d naming #23401: they assert the reth 2.6 codes and fail on develop with develop's answers. The ignore reasons say what develop answers and that the ignore comes off with the reth 2.6 bump. The tworange_within_kept_receipts_is_servedcells run in CI (op-reth-integration-tests).Local verification
Shared cargo target,
CARGO_INCREMENTAL=0(the first run hit a rustc ICE in incremental hash verification).develop's reth (this branch), all six cells forced to run:
with the develop failures being, verbatim:
develop's reth, the default run (what CI runs):
test result: ok. 2 passed; 0 failed; 4 ignored.reth 2.6: the two new files, the
main.rsmodule lines and therstestdev-dependency copied onto a detached checkout of #23046's head (93d9ec9), same command:cargo clippy -p reth-optimism-node --all-targets: no warnings.cargo +nightly-2026-08-22 fmt -p reth-optimism-noderun.Who calls L2
eth_getLogsFilterLogscalls are the abigen bindings underop-node/bindings/; L1 receipts are fetched by block hash throughop-service/sources. kona-node: noeth_getLogs/get_logscall inrust/kona.k8s,infrastructure-servicesanddevnets: the only L2 caller is op-benchmark's interop sweep (op-benchmark/internal/interop/{producer,confirm}.go), which pollseth_getLogsfrom its last seen block to the head on the messenger and inbox, and would hit-32602only if it asked past the head.deposit-eth-monitorqueries logs by block hash on L1, op-monitorism's deployed monitors (global_events,liveness_expiration) read L1, andop-dispute-mon/dispute-explorerread the L1 dispute game factory. The public L2 RPCs exposeeth_getLogsthrough proxyd (kustomize/proxyd/*/proxyd-l2-*), so external indexers reach op-reth there; none of ours polls L2 logs.Corrections to the issue text
init-state --without-ovmas a second source of4444. That path exists on develop already: it comes fromearliest_block_number()(EIP-4444 history expiry, the lowest static-file block), which reth 2.5.2 checks too. What the bump adds is the4444for receipts missing inside the served range (ReceiptsUnavailable), which is what the test drives through--prune.receipts.toBlock, reth 2.6 answersfromBlock > headwithinvalid block range params(the range resolves tofromBlock > toBlock = head), not with theblock range extends beyond current head blockmessage; that message needs an explicittoBlockpast the head, which both versions already reject.Stacked on #23444, #23443, #23440, #23438, #23436, #23431, #23427, #23421 and #23418.
Closes #23401
🤖 Generated with Claude Code