The private broadcast feature removes the link between a transaction and its originating node IP or onion address. However, a passive observer with a large number of sybil nodes can still fingerprint transactions that are broadcast via private broadcast. Any recipient of a transaction via a private broadcast connection can be certain that it was deliberately sent via private broadcast.
This PR introduces private broadcast decoy connections. Randomly on average once every 3 hours, any node with Tor or I2P reachable opens an extra private broadcast connection. Instead of one of the node's own pending transactions, the connection announces the most recent transaction in the mempool. Because of normal transaction relay latency, the recipient may not have seen that transaction yet, and from its point of view the connection is indistinguishable from a user-submitted private broadcast. If the recipient already has the transaction, the private broadcast will timeout after 3 minutes. In this case there is still plausible deniability since this mimics user-submitted transactions. We open 3 connections for each submitted transaction. After the first successful connection the other connections may connect to nodes that have already received the transaction from the first recipient.
-blocksonly nodes are excluded. If the mempool is empty, no decoy is sent that round.
Every user-submitted private broadcast now has plausible deniability of being a decoy.
This makes it more difficult for a network-level observer to distinguish the traffic pattern of a user-submitted broadcast from a decoy.
Log lines such as
New private-broadcast peer connected: transport: v2, version: 70016, peer=xxx
still appear, but they no longer distinguish user-submitted transactions from decoys.