Add a blocks-only option to addnode

Allow blocks-only network links to be specified when adding a peer from the CLI.
Not Available
Check Out Task
Task Bounty Details


Bitcoin Issue


Estimated Effort

Not Available

Current Status


Paid in USD or equivalent BTC upon acceptance

Bitcoin Issue

Blocks-only links are peer-to-peer links that only transmit blocks as opposed to normal links which also gossip peers and transactions. `addnode` is an RPC command and CLI flag that allows the operator to explicitly direct bitcoind to connect to a certain node.

Fixing this issue would provide privacy and connectivity benefits to node operators who rely on Tor links to anonymize their connection to the Bitcoin network.

From the original issue:

If a node is configured to only use Tor (onlynet=onion), it can be helpful to connect to one or more additional trusted IPv4/IPv6 nodes to ensure connectivity and provide hardening against eclipse attacks. However, if you do this today with addnode, all transactions created and relayed by your onion node will also be relayed to the trusted node over a plaintext connection, which of course is a potential privacy leak.

As far as I can tell, there is currently no way to make Bitcoin Core treat a specific node added with addnode as "blocksonly". Adding this as an option would seemingly be a simple way to fix this problem.

While it would be possible to resolve this in other ways, say by adding a proxy node configured as blocksonly between the onion node and the trusted node which would relay blocks but no transactions, this both adds complexity and reduces the reliability of the setup by adding another point of failure. You could of course configure your trusted node to use Tor as well and use its onion address for addnode, but this would still cause the setup to fail if there are connectivity issues with Tor itself, say due to government censorship.

Prerequisite Skills

C++, Bitcoin Networking

Code Guidelines

Repository Code Guidelines Page

Definition of Done

Get a PR merged that closes the issue

Check Out Task