The audit of #1037 reported that a discovery peer can avoid every consequence
the pull request introduces.
A dropped `DiscoveryFeedback` completes as neutral, which records nothing. The
syncer cancels a discovery request after six seconds, long before the connection
classifies a silent peer as a receive timeout, so a peer that accepts
`getblocks` and then stays quiet — or answers with an unrelated message the
handler never completes — kept its slot in the rotation and could repeat that
forever. `PendingDiscovery` now holds the evidence across the request and
expires it on cancellation, which rotates the peer out for the reprobe delay
without charging a misconduct strike.
Aborting a sync round replaced the whole `Discovery` record, dropping its
retained evidence to neutral, so peers that filled the round with hashes that
never committed were eligible again immediately. `Discovery::abandon` resolves
the retained responses instead.
Reconciliation treated a side-chain commit as verified progress. A side chain
does not advance the best chain, so it no longer postpones the progress
deadline; it still credits the peer that supplied the block.
Motivation
Nonempty inventory does not prove chain progress. A peer can return arbitrary hashes without supplying useful work. Repeated retry activity can also defeat a timeout that restarts on every loop iteration.
Solution
Testing
The audit passes 100 combined sync tests and nine tracker tests. New regressions cover continuous registry failures without verified progress and idle-owner wakeups at both deadlines.
An earlier audit passed 115 peer-set tests and 141 discovery-filtered network tests, including three-node v2 rotation.
Strict clippy passed for the state, consensus, network, and node libraries and tests. Formatting and changelog checks passed.
Changelog
Adds a changelog fragment and parameter-ledger entries.
Release gates
Keep this PR in draft. Validate single-peer checkpoint completion, external commits, native handoff, sustained adversarial traffic, and expiry under local backpressure. V2 discovery rotates peers but does not use TCP's verified-progress strike tracker. The zcashd exemption and header watchdog heuristic remain.
Provenance
Ported unchanged from the private security review. It no longer needs to stay private. This PR is independent of #1036.