raspiblitz: [Discussion] Initial Block Download over clearnet, I2P and Tor by default

Aware of this is a sensitive topic, but discussing is necessary.

The problem

The environment keeps changing with Tor currently practically broken: https://status.torproject.org/

Having report of IBD on RPi4+SSD taking 2 weeks and misidentifying the bottleneck being the RPi, when it is actually Tor.

See for comparison the 3 years old tweet about the full sync over Tor-only in 80 hours: https://twitter.com/openoms/status/1147393450171674624

Also the bitcoin network has some segregation risk if may nodes are only connecting to other Tor-only nodes.

Possible improvements:

Hybrid mode for Bitcoin Core

Simply need to delete the line:

onlynet=onion

from your bitcoin.conf (menu - SYSTEM - bitcoinCONF) to sync connect to peers over clearnet also. Just be aware that your ISP will see that you are using bitcoin - it is obvious anyway even over from the traffic and download spikes on the new blocks and is ok in most countries.

I2P as an alternative network

can achieve significant speed improvements, but more peers are needed. See how to set up easily in the command line: https://github.com/rootzoll/raspiblitz/issues/2413#issuecomment-1013855483

what can we do?

  • start nodes in hybrid mode (for bitcoin core, not lightning) by default with a warning
  • implement I2P to be used by default as well as Tor
  • wonder if adding a warning and an option to the web-gui to avoid exposing the clearnet traffic is reasonably easy @cstenglein?
  • if there is a synced full node on your LAN or on the VPN the node is connected to can make the download happen over the fast, private network by adding the address of the synced node with:
    bitcoin-cli addnode “IP_ADDRESS:8333” “onetry”
    

Comments and suggestions are most welcome.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 4
  • Comments: 15 (1 by maintainers)

Most upvoted comments

Adding I2P by default seems to be a no-brainer and probably the advanced option to activate clearnet for Bitcoin Core is the best choice for a start.

Adding I2P by default seems to be a no-brainer and probably the advanced option to activate clearnet for Bitcoin Core is the best choice for a start.

Adding I2P would be a quick fix for v1.8.1 and we could then see if the the practical results are already satisfying. With the WebUI we have now the possibility to present options to the user to speed up syncing … adding/activating clearnet could be one of them that we could start offering with a v1.8.3

As you said, the only downside is that your ISP would see more clearly you run a Bitcoin Core node. It is very important for your LN node to get all new blocks and don’t get stuck. I think running more than one network (Clearnet + Tor) is the safer option anyway. Clearly this should be an option, or even the default option.

Instead of removing onlynet=onion, we could add onlynet=i2p so that Tor and i2p are used for outbound connections.

In case this doesn’t help, IPv4 and IPv6 peers are required, a free VPN like riseup could be used.

I would suggest you to start with adding I2P by default for Bitcoin Core. As I already mentioned in #2413, I2P is now optional for RaspiBolt, you can likely just copy necessary steps from there. https://raspibolt.org/guide/bonus/bitcoin/i2p.html

Also, CJDNS is another option for Bitcoin Core before clearnet, but haven’t yet tried that one myself.

@Darth-Coin addnode on LAN is a good option, but should remain a manual option in CLI due to implementation complexity. The good news is my I2P nodes remain connected on the LAN even with the internet down. I think I2P adds the required speed-up for the random IBD as well. Great summary here: https://jonatack.github.io/articles/using-alternative-p2p-networks-with-bitcoin-core

TODO:

  • test & merge I2PD PR #3330
  • make new issue for adding option for clearnet mining to webui and SSH blockchain sync options (with 1.10.0)

It seems removing onlynet=onion alone is insufficient, blocks were not syncing at full speed. After commenting out the whole Tor section, things started syncing at full speed.