1 minor finding · 3 suggestions
Earlier concerns neither republished nor resolved: 1 minor finding · 1 suggestion. See the Run archive for their assessments.
Findings
[minor] · Assumeutxo background sync can keep a filter-requesting peer paused
With assumeutxo, -peerblockfilters, and a previously synced filter index, a request above the background tip can pause subsequent message processing long enough to disconnect an honest client.
Location: src/net_processing.cpp:3599 (head).
Details and suggested fix
The index follows ValidatedChainstate() and ignores unvalidated snapshot callbacks, but m_synced can already be latched true and IBD can end based on the current snapshot chain. A compact-filter request above the background tip then passes this predicate even when draining all queued callbacks would not produce its filter. For active blocks above the snapshot base, progress requires background validation to finish and restart the indexes. While parked, the peer's pongs and later requests are not polled. If background sync does not finish first, a client not serving blocks can reach the 20-minute ping timeout; reconnecting and repeating the request can repeat the pause. Base instead returned on the missing filter without pausing the connection. A disconnect-only invalidateblock exposes the same classification error: the index has no BlockDisconnected handler, so exact tip inequality can park a request for an already indexed, still-valid recent stale block until another block connects or the connection closes. Use the ancestor-based caught-up check against the index's own chainstate, as in BlockUntilSyncedToCurrentChain(), and restrict parking to targets within a small height distance of its best block.
Optional improvements
[suggestion] · Filter requests are parked before the existing validity checks run
During a qualifying index lag, requests that should immediately disconnect the peer instead enter pending state before service, block-access, and range validation.
Location: src/net_processing.cpp:3673 (head).
Details and suggested fix
On a non-IBD node with a synced BASIC index whose best block differs from the active tip, a known stop block outside the index's ancestry can be parked before PrepareBlockFilterRequest() runs. This includes requests with a disallowed stop block or bad range, and requests to an index-enabled node without -peerblockfilters. Rejection normally waits for callback catch-up and can take longer during background snapshot validation. Unknown hashes still reach validation immediately, creating a conditional timing signal about header knowledge; planting a unique near-tip header requires proof of work. Run PrepareBlockFilterRequest(), or its validation portion, before parking and pass the validated stop index to the predicate. Revalidate on resume as needed.
[suggestion] · PR description still describes queue draining rather than per-peer parking
The description's mechanism, safety bound, locking changes, and tests do not match this head, and this comment references tests that are absent.
Location: src/test/cfilter_race_tests.cpp:79 (head).
Details and suggested fix
The description presents WaitForRacingWrite() with a two-block bound, validation-queue draining inside index lookups, narrower header-cache locking, and lookup-worker and same-height-reorg tests. This head instead parks requests per peer, polls readiness without a height bound or deadline, and leaves LookupFilterHeader() holding its cache lock across the DB read and using emplace. The suite contains three network-path tests, not the described lookup tests, so the reference here to “racing-check tests above” is stale. The description also incorrectly treats m_synced as necessarily false during IBD. Update the description's mechanism, cost and safety argument, reorg handling, and test inventory, and remove the stale test reference.
[suggestion] · Fatal assertions can leave the race tests blocked during teardown
A fatal assertion before Release() leaves the scheduler blocked during fixture teardown, while failures after hook installation can also leave CaptureMessage referencing destroyed locals.
Location: src/test/cfilter_race_tests.cpp:110 (head).
Details and suggested fix
Each case runs fatal BOOST_REQUIRE assertions after WaitForEntry() but before blocker->Release(). The validation registry retains the blocker, so unwinding the local shared pointer does not end its unbounded promise wait. ChainTestingSetup then stops and joins the scheduler, which cannot finish its current callback. The global CaptureMessage hook also has only success-path restoration; for example, the fatal response-count assertion in the second case can leave it capturing the destroyed sent_types. Add scope guards that release and unregister the blocker on every exit and restore the capture hook before its captured locals are destroyed. Keep the explicit release at the current success-path synchronization point.
Earlier concerns
Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.
- [minor]: Exceptions during deferred filter responses escape the message handler (earlier report)
- [suggestion]: The deferred cfheaders test does not verify the response contents (earlier report)