Files
bitcoin/src/test/fuzz
merge-script 006f8f7d49 Merge bitcoin/bitcoin#35090: fuzz: add p2p_private_broadcast harness
d24d3cbad0 fuzz: add p2p_private_broadcast harness (frankomosh)

Pull request description:

  Add a fuzz harness for `ConnectionType::PRIVATE_BROADCAST`, a privacy-preserving transaction relay mechanism whose p2p code paths had no meaningful fuzz coverage.

  Current `process_message` touches it but is insufficient in exercising it. It creates `PRIVATE_BROADCAST` nodes via `ConsumeNode()`,  but some structural problems prevent it from covering the relevant logic:

  1. `m_tx_for_private_broadcast` is never seeded, `PushPrivateBroadcastTx` always takes the immediate disconnect path (7 accidental hits, all on lines 3559–3562). Lines 3564–3570 (the actual INV send) had 0 hits.
  2. `ALL_NET_MESSAGE_TYPES` is used as the message pool. `CConnman::PushMessage` silently drops anything outside the four-type allowlist for private broadcast connections, wasting most iterations.
  3. Connection types are picked randomly, hence private broadcast coverage is accidental.

  To solve the issues above;
  - this harness explicitly constructs nodes with `ConnectionType::PRIVATE_BROADCAST`
  - seeds `m_tx_for_private_broadcast` via `InitiateTxBroadcastPrivate` before the peer connects, so `PushPrivateBroadcastTx` reaches the transaction send path
  - constrains the message pool to the four types permitted by handshake or private-broadcast filter in PeerManagerImpl::ProcessMessage
  - passes `{NODE_NONE}` to `InitializeNode`, matching what `PushNodeVersion` advertises for private broadcast peers.

ACKs for top commit:
  instagibbs:
    ACK d24d3cbad0
  brunoerg:
    code review ACK d24d3cbad0
  andrewtoth:
    ACK d24d3cbad0

Tree-SHA512: 0d2ff9a79aa87a6eb7d7efdbe03ebba545abad1d1e995dfe617e5bd8fd7a5098fd44d92fa6eac1695aa81f38e762b30ed7a7fd0db6c85aaa32bd1d068c946e38
2026-07-20 13:57:04 +02:00
..
2026-07-14 13:48:33 +02:00
2026-07-14 13:48:33 +02:00
2026-07-14 13:48:33 +02:00
2026-07-14 13:48:33 +02:00
2026-07-14 13:48:33 +02:00
2026-07-14 13:48:33 +02:00
2026-07-14 13:48:33 +02:00
2026-07-14 13:48:33 +02:00
2026-07-14 13:48:33 +02:00
2026-07-14 13:48:33 +02:00
2026-05-12 21:24:19 +02:00
2026-07-14 13:48:33 +02:00
2026-07-14 13:48:33 +02:00
2026-07-14 13:48:33 +02:00
2026-07-14 13:48:33 +02:00
2026-07-14 13:48:33 +02:00
2026-07-14 13:48:33 +02:00
2026-07-14 13:48:33 +02:00
2026-07-14 13:48:33 +02:00
2026-07-14 13:48:33 +02:00
2026-07-14 13:48:33 +02:00
2026-07-03 18:26:26 +01:00
2026-07-14 13:48:33 +02:00