Repository navigation
Conversation
Rebroadcasting transactions that only pay the wallet is a privacy leak, since anyone can send low-fee transactions to a wallet, unlikely to be mined in 24h, and observe who rebroadcasts them. Also don't re-add them to the mempool in case of a restart if they were previously dropped, to prevent active probing. This means that rebroadcasting is now the sole responsibility of the sender.
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. External sites
ReviewsSee the guideline and AI policy for information on the review process.
If your review is incorrectly listed, please copy-paste ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
1b1ad8f to
f63a38f
Compare
|
Concept NACK-ish Rebroadcasting transactions that are not ours is useful as rebroadcasting does have an effect on getting such transactions confirmed. Furthermore, if we want to CPFP a transaction, it needs to be in our mempool first, otherwise the wallet will be unable to broadcast the child. Instead of trying to delete rebroadcasting in the name of privacy, we should consider other ways to enable rebroadcasting in a privacy preserving manner, such as a rebroadcast pool in the node. |
|
I've opened #36403 where we can have more high level discussion about transaction rebroadcast in general. |
|
Concept ACK, but make this configurable somehow. Like somebody said "there is no one size fits all" and from above - rebroadcasting by the recipient has some positive sides. In such cases I think it is best if we let the users decide what is best for them - give them the tools to configure it according to their environment and priorities. If you decide to make this configurable, one possibility would be to extend |
|
After a restart without mempool.dat, or after mempool expiry, a CPFP child that the wallet itself created for an incoming payment stays out of the mempool on this branch, and no resend timer brings it back. The child spends our output of the incoming parent, so achow101 noted above that CPFP needs the parent in our mempool; this is the same dependency once the child already exists. One way to keep it would be to also resubmit an unconfirmed incoming parent whose output a resubmitted transaction of ours spends: announcing that child already shows that the parent pays us. Otherwise the release note could name this case. I can share the probe script. |
The problem that in my opinion is most important to fix is the attack scenario, and I think it would be justified to have users who actually got paid and need rebroadcasting do manual steps if that protects passive users from getting deanonymized: The attack is cheap and simple, and also highly repeatable/scalable: Someone with an interest in a specific address makes a dust payment to it while connected to all reachable nodes, and a day later checks who rebroadcasts it, deanonymizing the owner. The hardest part is the infra needed to be connected to everyone. Unfortunately, this issue is not fixed by #36482: that approach would just require a few extra steps from the attacker due to the replacement strategy (#36482 (comment)) so I still think that this PR may be needed - not on its own, but in combination with #36481, which lets users who actually got paid rebroadcast manually.
I could change the logic to also resubmit unconfirmed in-wallet parents of transactions we created. By creating a CPFP child, the user has shown they expect this payment, so it can't be an unsolicited probe. |

As explained in #3828, rebroadcast of transactions paying the wallet (but not spending any wallet inputs) is a privacy leak, since anyone can generate these, choose a low fee, and observe who rebroadcasts them.
While it is somewhat intuitive that submitting transactions has privacy implications - at least until confirmation - this is manageable by various strategies (switching to privacy networks for a while, using private broadcast, making sure it confirms before rebroadcast). However, I find it rather unexpected that just passively running a node with a wallet loaded can lead to a loss of privacy as well.
This PR stops rebroadcasting transactions that don't spend any wallet inputs. For the same reason, they are also no longer re-added to the mempool on startup or after an import: otherwise our node might be the only one still having a transaction the rest of the network has dropped, which can be detected with active probing (e.g. by submitting a child).
This does have the trade-off that receivers (who have an incentive to get paid) will now need to manually resubmit transactions if the transaction doesn't confirm and the sender doesn't rebroadcast, but I think it is worth the privacy benefit.
An alternative approach is #36380, although these could also be combined (make rebroadcast optional, but never rebroadcast non-originating transactions)
Fixes #3828