AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 39 Bitcoin

Merge bitcoin/bitcoin#36277: net: always complete all initial private broadcast connections

Public commit record

What the developer wrote

Authored by merge-script

98/100 · Strong
Merge bitcoin/bitcoin#36277: net: always complete all initial private broadcast connections

00c1b52ee56b9a2f067befc56c171eef27efda41 net: remove PrivateBroadcast::DidNodeConfirmReception (Andrew Toth)
dc95a705d402d44b7092150878e33c75383a4d47 net: always complete all initial private broadcast connections (Andrew Toth)

Pull request description:

Make sure we send out all three connections when initiating a private broadcast.

Use `MarkResolved` instead of `Remove` to mark a tx as having been received back or mempool-conflicted. Prevent additional stale retry connections by tracking disconnects and explicitly granting new connections with `TryGrantRetry`.

Intended as an alternative to #34707, addressing the theoretical timing attack described in https://github.com/bitcoin/bitcoin/pull/34707#issuecomment-5603256702. Also fixes theoretical timing attacks described in https://github.com/bitcoin/bitcoin/pull/29415#discussion_r2035693786. This is based on the idea described in https://github.com/bitcoin/bitcoin/pull/29415#discussion_r2037527330:

> always send 3 times regardless if the tx is received in our mempool or is otherwise invalid

ACKs for top commit:
vasild:
ACK 00c1b52ee56b9a2f067befc56c171eef27efda41
mzumsande:
Code Review ACK 00c1b52ee56b9a2f067befc56c171eef27efda41
sedited:
utACK 00c1b52ee56b9a2f067befc56c171eef27efda41

Tree-SHA512: 82c03898e9377f9702ee4e01a3a68cd2071fe6e137c531812761da145acb16780ca866b33c7ffbd2db5db100e203b27095ae9e9745c012e317434cd2f5368847
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
The short version

What changed, and why it matters

This Bitcoin Core patch fixes a privacy weakness in how new transactions are first announced to the network. Previously, if the node saw its own transaction come back from another peer quickly, it would cancel the remaining private broadcast connections. An attacker who can race the transaction back to the node could reduce how many independent peers receive it, making it easier to guess which peer originally created the transaction. The patch now always completes all three initial private broadcast sends, even after the transaction is seen again, and only stops further retries. It also tracks disconnects more carefully so failed sends are replaced rather than silently dropped.

Recommended action

Reviewers and operators should treat this as a privacy-hardening fix for the private transaction broadcast feature. Nodes using -privatebroadcast should upgrade to ensure the intended 3-peer initial broadcast is enforced. No immediate emergency response is warranted because the attack is theoretical and requires winning a network race, but the fix should be included in the next maintenance release.

Security signals we found

01

Fixes a theoretical timing attack against transaction-origin privacy in private transaction broadcast

02

Ensures all 3 initial private broadcast connections complete before stopping, preventing premature cancellation

03

Replaces Remove() with MarkResolved() for mempool-conflict / received-back cases to avoid aborting in-flight sends

04

Adds explicit disconnect tracking and TryGrantRetry() to prevent stale retry loops and compensate for failed sends

05

Adds new functional test p2p_private_broadcast_completion.py demonstrating the fixed behavior

Risk score

Why this scored 39/100

Our methodology →
Potential impact 8/30
Exploitability 6/25
Stealth signal 9/15
Affected reach 5/15
Confidence 7/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.