It would be nice if there was a way to tell core to only broadcast transactions over Tor, but use clearnet for everything else.
As far as I can tell the only way to guarantee transaction broadcast over Tor is to use onlynet=onion, which means that all network traffic goes over Tor. The problem is that this introduces latency for blocks/confirmations and transactions. Some users might only want to use Tor to try to protect “first broadcast” transaction origin analysis which can be a problem with sybil attacking clearnet nodes. This can still be a problem on Tor as well, but can be more difficult to pull off.
Some bitcoin software such as wasabi and joinmarket already implement this by establishing a new Tor circuit, broadcasting the transaction, and then disconnecting. Perhaps bitcoin could do this as well?
Some things that were brought up when I mentioned this on IRC by @naumenkogs, @luke-jr and others:
For the resistance to first-broadcast analysis to be effective, the node should treat the transaction as if it wasn’t theirs to begin with. I’m not familiar with the network code, so I’m not sure if anything would have to change relay policy-wise.
Would be happy to hear other thoughts on what would be required to implement this, or if there’s something I’m missing, as it’s something I would be interested in implementing if there are enough concept acks.
TL;DR rationale:
-
A nodes wants to recieve blocks/confirmations/transactions as soon as possible with the lowest latency
-
A node wants increased broadcast privacy without paying the full cost of onlynet=tor latency