Skip to content

onlynet=tor still using exits for seeds is confusing #6808

@zw

Description

@zw

I run some wallet-less listening nodes behind Tor, for fuzzies and occasional somewhat-private TX submission. In this setup, minimising load on exits seems more important than having clearnet peers, so I use onlynet=tor. To minimise room for leaks their network configuration also makes Tor their only window to the world. They do get inbound connections through their onion services. For reasons probably not relevant, they may be atypically peer-starved at times.

I see outbound connections to the seeds via exits:

2015-10-XX XX:XX:XX Bitcoin version v0.11.0.0-(the 0.11.0 tag from Github)
    (omit OpenSSL, directories)
2015-10-XX XX:XX:XX Using at most 125 connections (1024 file descriptors available)
2015-10-XX XX:XX:XX Using 0 threads for script verification
2015-10-XX XX:XX:XX scheduler thread start
    (omit RPC)
2015-10-XX XX:XX:XX Bound to X.X.X.X:8333
2015-10-XX XX:XX:XX AddLocal(XXXXXXXXXXXXXXXX.onion:8333,4)
    (omit cache config, LevelDB lines)
2015-10-XX XX:XX:XX No wallet support compiled in!
    (omit best chain)
2015-10-XX XX:XX:XX init message: Loading addresses...
2015-10-XX XX:XX:XX Loaded (several hundred) addresses from peers.dat  9ms
2015-10-XX XX:XX:XX init message: Done loading
2015-10-XX XX:XX:XX msghand thread start
2015-10-XX XX:XX:XX opencon thread start
2015-10-XX XX:XX:XX addcon thread start
2015-10-XX XX:XX:XX net thread start
2015-10-XX XX:XX:XX dnsseed thread start
2015-10-XX XX:XX:XX SOCKS5 connecting XXXXXXXXXXXXXXXX.onion
2015-10-XX XX:XX:XX Loading addresses from DNS seeds (could take a while)
2015-10-XX XX:XX:XX 0 addresses found from DNS seeds
2015-10-XX XX:XX:XX dnsseed thread exit
    (omit interspersed "receive version message", both with
     us=XXXXXXXXXXXXXXXX.onion:8333 and us=dotted quad)
2015-10-XX XX:XX:XX SOCKS5 connecting seed.bitcoin.sipa.be
2015-10-XX XX:XX:XX SOCKS5 connecting XXXXXXXXXXXXXXXX.onion
2015-10-XX XX:XX:XX SOCKS5 connecting dnsseed.bluematt.me
2015-10-XX XX:XX:XX SOCKS5 connecting XXXXXXXXXXXXXXXX.onion
2015-10-XX XX:XX:XX SOCKS5 connecting dnsseed.bitcoin.dashjr.org
2015-10-XX XX:XX:XX SOCKS5 connecting XXXXXXXXXXXXXXXX.onion
2015-10-XX XX:XX:XX SOCKS5 connecting seed.bitcoinstats.com
2015-10-XX XX:XX:XX SOCKS5 connected seed.bitcoinstats.com
2015-10-XX XX:XX:XX SOCKS5 connecting XXXXXXXXXXXXXXXX.onion
2015-10-XX XX:XX:XX SOCKS5 connected XXXXXXXXXXXXXXXX.onion
2015-10-XX XX:XX:XX SOCKS5 connecting bitseed.xf2.org
2015-10-XX XX:XX:XX SOCKS5 connecting XXXXXXXXXXXXXXXX.onion
2015-10-XX XX:XX:XX SOCKS5 connected XXXXXXXXXXXXXXXX.onion
2015-10-XX XX:XX:XX SOCKS5 connecting seed.bitcoin.jonasschnelli.ch
2015-10-XX XX:XX:XX SOCKS5 connecting XXXXXXXXXXXXXXXX.onion
2015-10-XX XX:XX:XX SOCKS5 connected XXXXXXXXXXXXXXXX.onion
2015-10-XX XX:XX:XX SOCKS5 connecting seed.bitcoin.sipa.be
2015-10-XX XX:XX:XX SOCKS5 connected seed.bitcoin.sipa.be
2015-10-XX XX:XX:XX SOCKS5 connecting XXXXXXXXXXXXXXXX.onion
2015-10-XX XX:XX:XX SOCKS5 connected XXXXXXXXXXXXXXXX.onion
2015-10-XX XX:XX:XX SOCKS5 connecting dnsseed.bluematt.me
2015-10-XX XX:XX:XX SOCKS5 connecting XXXXXXXXXXXXXXXX.onion
2015-10-XX XX:XX:XX SOCKS5 connecting dnsseed.bitcoin.dashjr.org
2015-10-XX XX:XX:XX SOCKS5 connected dnsseed.bitcoin.dashjr.org
2015-10-XX XX:XX:XX SOCKS5 connecting XXXXXXXXXXXXXXXX.onion
2015-10-XX XX:XX:XX SOCKS5 connected XXXXXXXXXXXXXXXX.onion
2015-10-XX XX:XX:XX SOCKS5 connecting bitseed.xf2.org
2015-10-XX XX:XX:XX SOCKS5 connecting XXXXXXXXXXXXXXXX.onion
2015-10-XX XX:XX:XX SOCKS5 connecting seed.bitcoin.jonasschnelli.ch
2015-10-XX XX:XX:XX SOCKS5 connected seed.bitcoin.jonasschnelli.ch
2015-10-XX XX:XX:XX SOCKS5 connecting XXXXXXXXXXXXXXXX.onion
2015-10-XX XX:XX:XX SOCKS5 connected XXXXXXXXXXXXXXXX.onion
2015-10-XX XX:XX:XX SOCKS5 connecting dnsseed.bluematt.me
2015-10-XX XX:XX:XX SOCKS5 connected dnsseed.bluematt.me
2015-10-XX XX:XX:XX SOCKS5 connecting bitseed.xf2.org
2015-10-XX XX:XX:XX SOCKS5 connecting XXXXXXXXXXXXXXXX.onion
2015-10-XX XX:XX:XX SOCKS5 connected XXXXXXXXXXXXXXXX.onion
    (usually stops attempting seeds ~30m after startup)

@laanwj says "if you have a proxy it [still] does AddOneShot(seed.host)" and I dimly recall something about an exception being required for bootstrap before Core had an onion seed list, otherwise bootstrap would go nowhere. Even if the user is aware of that, the persistent attempted connections to the seeds for a while after apparent dnsseed thread exit cause confusion (although maybe that peer starvation I mentioned is a prerequisite for getting confused).

Having healthy peer lists on these nodes already, I'm sure I can just use dnsseed=0, but I think it's worth making my existing configuration less surprising. onlynet=tor really should mean "just onion peers", or be renamed, or have clearly documented exceptions, because smells like the the sort of thing that bites you down the road when new code or an unexpected use case comes along.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions