Skip to content

ci: witness-producing nodes self-gate pipelined SRC off - #53

Open
lucca30 wants to merge 1 commit into
mainfrom
lmartins/pipeline-witness-self-gate
Open

lucca30 wants to merge 1 commit into
mainfrom
lmartins/pipeline-witness-self-gate

Conversation

@lucca30

@lucca30 lucca30 commented Sep 15, 2026

Copy link
Copy Markdown

Problem

The pipeline leg asserts that on a witness producer every witness comes from the pipelined SRC completion path:

Witness provenance: on a non-mining full-sync witness producer, every witness must come from the pipelined SRC completion path — the counters track each other 1:1.

bor#2405 removes that combination, so this assertion is what makes that PR's pipeline-e2e-tests leg red.

Why bor is removing it

The SRC witness is derived from a FlatDiff, and CommitSnapshot ends by draining the shared readerWithCache into it. That record carries no attribution, so the speculative block prefetcher's reads land in it alongside the block's own — and ProcessBlock builds the prefetcher's throwaway StateDB from the same reader triple as the processor, so how far the prefetcher got before the block finished is wall-clock dependent.

Two nodes importing the same block therefore derive witnesses of different sizes. WIT/2's cross-peer page-count check reads that as a misbehaving peer and drops and jails it.

core.TestPipelinedSRCDiffCarriesBlockPrefetcherReads in that PR pins the leak; eth.witnessSafeAccelerators turns pipelined import SRC off on any witness-recording node because of it.

Change

Witness producers join stateless-sync nodes as a class that self-gates the pipeline off. Root mismatch and witness production stay strictly asserted on those nodes; only the src > 0 activity expectation goes.

Merge order — why the checks are commented, not inverted

bor's kurtosis-pipeline-e2e.yml pins this repo at ref: main. Asserting src == 0 here before the bor guard reaches develop would fail every open bor PR, not just #2405.

So the two witness-node src checks ship commented with a TIGHTEN AFTER bor #2405 marker. Merge this first, then bor#2405, then a one-line follow-up here to turn them back on.

Cost worth flagging

After this, participant 6 — the plain pipelined rpc node — is the only node exercising pipelined SRC end to end. That is thinner coverage than before. Restoring it means adding a second non-witness pipelined rpc node, which changes the topology the stateless suite asserts on, so it is left for a follow-up rather than bundled here.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YBppHd4UqVqBBkEf7uDT7h

The leg asserted that on a witness producer every witness comes from the
pipelined SRC completion path. bor is removing that combination: the SRC
witness is derived from a FlatDiff, and CommitSnapshot ends by draining
the shared readerWithCache into it. That record carries no attribution,
so the speculative block prefetcher's reads land in it alongside the
block's own -- and how far the prefetcher got before the block finished
is wall-clock dependent.

Two nodes importing the same block therefore derive witnesses of
different sizes, which WIT/2's cross-peer page-count check reads as a
misbehaving peer. bor core.TestPipelinedSRCDiffCarriesBlockPrefetcherReads
pins the leak; bor eth.witnessSafeAccelerators turns pipelined import SRC
off on any witness-recording node because of it.

So witness producers join stateless-sync nodes as a class that self-gates
the pipeline off, and participant 6 -- the plain pipelined rpc node --
becomes the one node exercising pipelined SRC end to end. That is thinner
coverage than before; adding a second non-witness pipelined rpc node
would restore it, but changes the topology the stateless suite asserts
on, so it is left for a follow-up.

The two src checks on witness nodes are left commented rather than
inverted. bor's workflow pins this repo at main, so asserting src == 0
before the bor guard reaches develop would fail every open bor PR. Root
mismatch and witness production stay strict throughout; tighten the two
marked lines once bor #2405 has merged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YBppHd4UqVqBBkEf7uDT7h

@pratikspatil024 pratikspatil024 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is not needed anymore? @lucca30

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants