[30.x] Backport #35878 and prep for v30.5

bitcoin/bitcoin: PR #36893

Backport verdict: Incomplete

The code backports are faithful to upstream. #35878 matches 1278a5970d apart from one necessary adaptation: peer is a PeerRef on 30.x, so AddKnownTx(peer, …) becomes AddKnownTx(*peer, …). #33693's functional commit is backported. Its other commit (a comment-only cleanup) is left out on purpose, which is harmless. All four #36672 commits are already in the base. The version bump and man pages are consistent. The one gap is in the release notes. One of the commits that arrived through #36672 (17fe6566, 'ci: use Warp cache for Docker layers') comes from upstream PR #35447. Neither the v30.4 nor the new v30.5 notes list #35447, but they do list #35571, which fixes a breakage in the same provider wiring. Nothing was built or tested in this review.

Evidence:

Required fixes:

Limitations:

Coverage details

Background

Ralph's summary of historical context for the behaviour affected by this change. The historical record reviewed here is incomplete.

Documented decisions

There is a concrete interoperability reason to preserve some of that otherwise nonstandard tolerance. The follow-up discussion reports Neutrino announcing transactions using InvTypeWitnessTx; a subsequent author comment says the change was revised to allow witness-tx announcements from non-wtxid-relay peers.

This supplies historical evidence for retaining the txid interpretation of MSG_WITNESS_TX rather than assuming no deployed client uses it. The reported compatibility accommodation specifically concerns non-wtxid-relay peers; it does not establish the same requirement for wtxid-relay peers.

Source 1 · Source 2