Skip to content

core, miner, consensus/bor, eth, triedb/pathdb: pipelined state root computation for block import - #2180

Open
pratikspatil024 wants to merge 72 commits into
developfrom
pipelined-src
Open

core, miner, consensus/bor, eth, triedb/pathdb: pipelined state root computation for block import#2180
pratikspatil024 wants to merge 72 commits into
developfrom
pipelined-src

miner, tests: guard GetTd underflow, tighten RPC test setup

ccedec8
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jul 27, 2026 in 16m 52s

Code review found 2 potential issues

Found 3 candidates, confirmed 2. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 2
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit core/blockchain_reader.go:210-225 GetWitness DoS mitigation incomplete for witness-off pipelined nodes
🟡 Nit core/state/warm_snapshot.go:55-66 Duplicated warmKey doc comment

Annotations

Check warning on line 225 in core/blockchain_reader.go

See this annotation in the file changed.

@claude claude / Claude Code Review

GetWitness DoS mitigation incomplete for witness-off pipelined nodes

The recency+header-existence gating added in 34ae33c0d narrows but doesn't close the GetWitness DoS hole flagged earlier: waitForPendingSRCWitness only fast-paths the single block currently being computed by SRC (bc.pendingImportSRC), so on a node that serves the WIT protocol but runs with producewitnesses=false, every other recent block hash still falls through to the full 2s pollWitnessCache since a witness will never be produced for it. A peer can send one GetWitnessPacket with up to 16 disti

Check warning on line 66 in core/state/warm_snapshot.go

See this annotation in the file changed.

@claude claude / Claude Code Review

Duplicated warmKey doc comment

The `warmKey` type in `core/state/warm_snapshot.go` (lines 55-66) has two back-to-back doc comment blocks that both explain what `warmKey` identifies — an apparent copy-paste leftover flagged by Copilot on 2026-07-23 but never actually fixed despite a reply claiming all findings in that batch were addressed.