In advance of Jan 3, I've finally bit the bullet and begun the process of trying to understand aspects of btc infra in depth. One of the things I've done is to install and configure all the stuff on my node manually (vs using a packaged solution); and one of those things is to run the node exclusively over Tor. (Eventually I'd like to run it over VPN with normal networking, but I couldn't figure out how to get the port forwarding to work, so I left that for later.)
My question is: how long does it take to get to a decent peer count over Tor? When I started, I kept getting all kinds of error messages like this:
2024-12-31T15:56:31Z Socks5() connect to mhnicvypkxs3rlz7aen3zycww6yp675csdmxmjbsot7dhjtfxlpyhkad.onion:8333 failed: host unreachable
and spent literally days fucking around with Tor settings, bitcoin.conf settings, etc., and yet this constant flow of "host unreachable" errors.
After a while I decided I needed to step away and take a break, and I just left the node running, and after a couple of days I now have 23 peers, so apparently it is working? Just glacially slowly vs normal networking?
Is this just the expected state of affairs running a node over Tor? Or can something be done to accelerate peer discovery / connection?
bitcoin-cli stop
) and then restart it, the peers don't re-load! Not sure wtf is going on there, peers.dat is supposed to save these, I thought. But maybe not for Tor? Or maybe it's using some behind-the-scenes algorithm and only saves them when they've been around long enough, and my testing scenario doesn't trigger it. I could figure this out I'm sure, but don't care enough atm.iptables
, you might want to start from the first guide. It dives into the details of the networking involved because I struggled for a long time to fully understand how it works under the hood. This guide was essentially my attempt to explain it to myself once and for all, lol. It also includes pictures like this:addr
message, see protocol documentation. This means they'll tell others nodes which nodes they are aware of.-externalip=<ip>:<port>
. It changes the advertised IP address and port. But it might be that nodes prefer connecting to port 8333, at least that I read about that a long time ago. Not sure if still the case.curl -4 ip.me
and to the port Proton assigned to you.-externalip=<ip>:<port>
,-listen=1
and your port forwarding works, you should get incoming connections at some point.-discover=1
together with-externalip
looks wrong to me now 🤔-natpmp
. I have no experience with NAT-PMP but sounds like it could be useful for your case.