This implements the suggestion from #23763 to introduce an option to establish block-relay-connections manually with the -addnode RPC.
Adding these can make sense for a node operator that wants to be connected to a anonymity networks like Tor or I2P, but also wants to have additional protection against eclipse attacks: Following the best chain can be more of an issue on anonymity networks because these are smaller and it can be easier to create a lot of sybil nodes there.
In that situation, manual block-relay-only connections to peers on clearnet networks can help us staying connected to the best chain, but in contrast to normal manual connections, transactions and addresses aren't transmitted on these links - in particular not our own address or transaction from our wallet. This increases privacy and will also make it harder to perform fingerprinting attacks (connecting our identities over different networks).
Manual Block-Relay connections:
- can be specified with
-addnodeRPC, both with theaddandonetrycommand - can be specified with the
-addnodebitcoind arg (or in bitcoin.conf) with<IP>=manual-block-relay - don't participate in transaction and address relay
- don't get discouraged / punished for misbehavior (but will still get disconnected for sending TX/tx-INV as automatic block-relay-only peers do)
- are not subject to outbound eviction logic (unlike automatic block-relay-only-peers)