BitcoinTalk

Tor connections not working reliably, many seednodes offline

BitcoinTalk
#1
From:
theymos
Subject:
Tor connections not working reliably, many seednodes offline
Date:
While I was trying out Bitcoin with Tor a while ago, I found that it was impossible to get connected in a reasonable amount of time. See the debug.log excerpt below.

Code:
Starting 2 BitcoinMiner threads
BitcoinMiner started
BitcoinMiner started
trying connection  lastseen=-2.0hrs lasttry=-357170.7hrs
proxy connecting
proxy connecting
proxy connected
IRC :giraffe.heliacal.net NOTICE AUTH :*** Looking up your hostname...
IRC :giraffe.heliacal.net NOTICE AUTH :*** Your forward and reverse DNS do not match, ignoring hostname.
IRC ERROR :Closing Link: 208.53.142.42 (Registration timed out)
IRC socket closed
IRC waiting 71 seconds to reconnect
proxy connecting
proxy connected
IRC :giraffe.heliacal.net NOTICE AUTH :*** Looking up your hostname...
IRC :giraffe.heliacal.net NOTICE AUTH :*** Your forward and reverse DNS do not match, ignoring hostname.
trying connection  lastseen=-2.0hrs lasttry=-357170.7hrs
proxy connecting
IRC ERROR :Closing Link: 208.53.142.42 (Registration timed out)
IRC socket closed
IRC waiting 138 seconds to reconnect
trying connection  lastseen=-2.1hrs lasttry=-357170.7hrs
proxy connecting
proxy connecting
proxy connected
IRC :giraffe.heliacal.net NOTICE AUTH :*** Looking up your hostname...
IRC :giraffe.heliacal.net NOTICE AUTH :*** Your forward and reverse DNS do not match, ignoring hostname.
DelayedRepaint
trying connection  lastseen=-2.1hrs lasttry=-357170.8hrs
proxy connecting
IRC ERROR :Closing Link: 208.53.142.42 (Registration timed out)
IRC socket closed
IRC waiting 211 seconds to reconnect
DelayedRepaint
trying connection  lastseen=-2.1hrs lasttry=-357170.8hrs
proxy connecting
proxy connecting
trying connection  lastseen=-2.2hrs lasttry=-357170.8hrs
proxy connecting
proxy connected
IRC :giraffe.heliacal.net NOTICE AUTH :*** Looking up your hostname...
IRC :giraffe.heliacal.net NOTICE AUTH :*** Your forward and reverse DNS do not match, ignoring hostname.
IRC ERROR :Closing Link: 208.53.142.42 (Registration timed out)
IRC socket closed
IRC waiting 292 seconds to reconnect
trying connection  lastseen=-2.2hrs lasttry=-357170.9hrs
proxy connecting
DelayedRepaint
DBFlush(false)
addr.dat refcount=0
addr.dat flush
ler exiting
ThreadMessageHandler exiting
blkindex.dat refcount=0
blkindex.dat flush
ThreadIRCSeed exiting
ThreadBitcoinMiner exiting, 1 threads remaining
ThreadBitcoinMiner exiting, 0 threads remaining
wallet.dat refcount=0
wallet.dat flush
StopNode()
DBFlush(true)
Bitcoin exiting

I know that the guy who operates irc.lfnet.org is around here. Maybe he can remove that hostname limitation, since it's blocking some users.

Also, most of the seednodes are gone. Only 37 out of 230 are accepting connections on port 8333. This makes connecting without IRC very slow. The offline ones should be removed. A list of online seednodes is attached.
BitcoinTalk
#2
From:
jgarzik
Subject:
Re: Tor connections not working reliably, many seednodes offline
Date:
IMO, there needs to be a method besides IRC and compiled-in seed nodes.  A middle ground.

Maybe a few volunteers could independently host a DNS zone that returns a fresh list of nodes as 'A' records.  A simple cron job could fetch fresh addresses from the bitcoin client, to update the DNS zone every so often.  A DNS lookup would be far faster than an IRC connection, and if we have enough volunteers, the loss of a DNS server or two would not impact the service.
BitcoinTalk
#3
From:
The Madhatter
Subject:
Re: Tor connections not working reliably, many seednodes offline
Date:
Seeding from Tor is a snap. There are 7 .onion nodes that can provide IPs. I'd also just switch the IRC stuff off with '-noirc' to speed it up.

See https://www.bitcoin.org/smf/index.php?topic=59.msg14635#msg14635
BitcoinTalk
#4
From:
satoshi
Subject:
Re: Tor connections not working reliably, many seednodes offline
Date:
Maybe you were just unlucky to have an exit node without reverse lookup.

The IRC server's response doesn't look like it was disconnecting you for that.  It's supposed to go IRC SENDING: NICK after that, and it doesn't so it gets timed out.

I see the problem.  The IRC code is looking for various phrases to see when the server is ready to receive your NICK, but it's not looking for that particular phrase.  I'll fix it.

I don't know if it's really required to wait for the server to finish looking up hostname before sending nick.

How long did it take to get connected with TOR the first time, having to use the seed nodes?