novitski / bitcoinj

Automatically exported from code.google.com/p/bitcoinj
Apache License 2.0
0 stars 0 forks source link

Seed picking not random #473

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Although there are two DNS seeds for testnet, bitcoinj (master) always picks 
the first one. (Which is bad, because it does not resolve any more.)

Original issue reported on code.google.com by andreas....@gmail.com on 28 Oct 2013 at 10:05

GoogleCodeExporter commented 9 years ago
If your taking about my seed, it's coming back, give me a few hours to move the 
server.

Original comment by BlueMatt...@gmail.com on 28 Oct 2013 at 10:12

GoogleCodeExporter commented 9 years ago
Here is a piece of logcat. As you can see, it is hammering on 
testnet-seed.bitcoin.petertodd.org like mad.

Original comment by andreas....@gmail.com on 28 Oct 2013 at 10:16

Attachments:

GoogleCodeExporter commented 9 years ago
@BlueMatt actually its petertodd's seed that cannot be reached (from my 
network).

Original comment by andreas....@gmail.com on 28 Oct 2013 at 10:17

GoogleCodeExporter commented 9 years ago
What it does is resolve all of them simultaneously, actually. However if it 
doesn't get enough replies then it'll try again until it does. Peter's DNS seed 
has some degenerate behaviour for unknown reasons where it sometimes starts 
returning a single consistent answer rather than lots of random answers. That's 
not supposed to happen and it messes the code up. DNS discovery for testnet is 
basically just broken, I've asked for it to be investigated but nobody has done 
so. 

I think the right fix for this is just to use hard-coded seeds on the testnet.

Original comment by hearn@google.com on 29 Oct 2013 at 9:27

GoogleCodeExporter commented 9 years ago
But then why does the log doesn't contain any hints about bluematt's seed? To 
me, it looks like that one is never considered.

Original comment by andreas....@gmail.com on 29 Oct 2013 at 4:27

GoogleCodeExporter commented 9 years ago
Are you sure you had network access at the time?

[152.2.31.233]:18333 - connection timed out

That IP is the one (single) IP served by BlueMatts seed. It's not a real seed, 
unfortunately. So the IP from Matt's seed didn't work and Peter's seed didn't 
even resolve. Hence, no network connectivity.

Original comment by hearn@google.com on 29 Oct 2013 at 4:46

GoogleCodeExporter commented 9 years ago
Peer discovery needs work, but this particular bug report isn't valid.

Original comment by hearn@google.com on 14 Dec 2013 at 11:05