Please describe the feature you’d like to see added.
new RPC sendrawtransactiontopeer
, which sends the raw transaction to a specified peer
Is your feature related to a problem, if so please describe it.
Using sendrawtransactiontopeer
can be useful for the user when it has a peer it trusts (privacy wise) and wants to (re)broadcast a transaction (to that specific peer).
Specifically for rebroadcasting, as sendrawtransaction
doc contains a fair warning: using sendrawtransaction for manual rebroadcast may degrade privacy by leaking the transaction’s origin. So using a specific trusted peer to rebroadcast seems reasonable.
Additionally, user might have a Transport v2 connection and it’s biggest worry is his ISP spying on him. In this case the user might want to use (one of) his v2 connected peers for (re)broadcasting the tx.
Describe the solution you’d like
new RPC sendrawtransactiontopeer
, where the raw tx and peer are specified
(somewhat similar to sendmsgtopeer
)
Describe any alternatives you’ve considered
- have an argument in
sendrawtransaction
to specify a peer - use -connect= to connect only to the specified node(s). (for this, the user would need to restart and disconnect all other peers every time he wants to do it)
Please leave any additional context
#21876, similar request but suggesting to add an argument in sendrawtransaction
to mention the peer
#27509, useful but sendrawtransactiontopeer
would still be a good addition imo
Could this be used by malicious parties (who want to get a better view of the network etc)? Maybe, but they might already be doing that with a modified client.
In contrary, sendrawtransactiontopeer
might make transaction broadcast/relay analysis harder.