Bitcoin Forum
November 23, 2017, 08:48:21 PM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Are "seedAddrs" in "SeedPeers.java" still online?  (Read 1383 times)
Green Lantern
Jr. Member
*
Offline Offline

Activity: 43


View Profile
September 23, 2013, 03:25:01 PM
 #1

I'm trying to use SeedPeers.java in android app for connection to bitcoin network. But it doesn't look normal. I can see in ddms only "Peer died" or "connection timed out": http://i58.fastpic.ru/big/2013/0922/90/d002e868d692611371894ba100c11490.jpg
What is the problem if the "seedAddrs" is online?
1511470101
Hero Member
*
Offline Offline

Posts: 1511470101

View Profile Personal Message (Offline)

Ignore
1511470101
Reply with quote  #2

1511470101
Report to moderator
1511470101
Hero Member
*
Offline Offline

Posts: 1511470101

View Profile Personal Message (Offline)

Ignore
1511470101
Reply with quote  #2

1511470101
Report to moderator
Join ICO Now A blockchain platform for effective freelancing
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1511470101
Hero Member
*
Offline Offline

Posts: 1511470101

View Profile Personal Message (Offline)

Ignore
1511470101
Reply with quote  #2

1511470101
Report to moderator
1511470101
Hero Member
*
Offline Offline

Posts: 1511470101

View Profile Personal Message (Offline)

Ignore
1511470101
Reply with quote  #2

1511470101
Report to moderator
Mike Hearn
Moderator
Legendary
*
Offline Offline

Activity: 1526


View Profile
September 23, 2013, 03:56:27 PM
 #2

Why are you so keen on using the seed nodes?

I haven't updated them for a long time. Neither has anyone updated the ones in bitcoind. We really should, it's a good reminder to do so .... it hasn't been done though. So by now the IPs are all long since stale.
Green Lantern
Jr. Member
*
Offline Offline

Activity: 43


View Profile
September 23, 2013, 10:15:17 PM
 #3

I haven't updated them for a long time. Neither has anyone updated the ones in bitcoind.
You said that IPs hadn't been updated for a long time in bitcoinj and in bictoin client for windows. Right?
So can you tell why seedAddrs (https://code.google.com/p/bitcoinj/source/browse/core/src/main/java/com/google/bitcoin/discovery/SeedPeers.java line 87) in bitcoinj differ from pnSeed in bitcoin cpp client for windows (https://github.com/bitcoin/bitcoin/blob/0.8.1/src/net.cpp line 1226) though there (https://code.google.com/p/bitcoinj/source/browse/core/src/main/java/com/google/bitcoin/discovery/SeedPeers.java line 28) is such sentence: "The list comes from the Bitcoin C++ source code"? I can not see concurrences.
Why are you so keen on using the seed nodes?
So all of 200 IPs are stale? Neither are working?
Hm... It will break my suppositions about not correct work of "SeedPeers" class.  Sad
Why am I keep using seed nodes? Because I am trying to modify bitcoinj and I need work throw "SeedPeers" class not throw "DnsDiscovery". Smiley I'll explain more in PM if you are interested.
Mike Hearn
Moderator
Legendary
*
Offline Offline

Activity: 1526


View Profile
September 24, 2013, 12:53:35 PM
 #4

Well, the comment was correct when I first wrote that code. Obviously the C++ code was refreshed at some point (many months ago) but I didn't copy the IPs into bitcoinj.

We should improve the process for refreshing the seed peers. I guess the DNS seeds have sufficient data to calculate which peers are the most stable.
Green Lantern
Jr. Member
*
Offline Offline

Activity: 43


View Profile
September 24, 2013, 04:53:48 PM
 #5

Well, the comment was correct when I first wrote that code. Obviously the C++ code was refreshed at some point (many months ago) but I didn't copy the IPs into bitcoinj.

We should improve the process for refreshing the seed peers. I guess the DNS seeds have sufficient data to calculate which peers are the most stable.
I want to translate part of pnSeed form C++ code to seedAddrs in java bitcoinj.
So what about little-endian and big-endian notation? Are seedAddrs (https://code.google.com/p/bitcoinj/source/browse/core/src/main/java/com/google/bitcoin/discovery/SeedPeers.java lin 87) using little-endian and pnSeed (https://github.com/bitcoin/bitcoin/blob/0.8.1/src/net.cpp line 1226) using big-endian notation whether it is other way round?
It is mean that I should write first element "0xe473042e" from pnSeed like "0x2e0473e4" in seedAddrs, doesn't it?
Mike Hearn
Moderator
Legendary
*
Offline Offline

Activity: 1526


View Profile
September 25, 2013, 08:18:03 AM
 #6

I filed this bug:

https://code.google.com/p/bitcoinj/issues/detail?id=457

The right way to do it is load the text file from that URL dynamically (I mean load it from a JAR resource, and we'll copy it into the source tree from time to time).
Mike Hearn
Moderator
Legendary
*
Offline Offline

Activity: 1526


View Profile
September 25, 2013, 03:51:24 PM
 #7

Yes, you have to reverse the integers.
Green Lantern
Jr. Member
*
Offline Offline

Activity: 43


View Profile
September 25, 2013, 03:59:56 PM
 #8

Yes, you have to reverse the integers.
So, my example is correct?
Quote
It is mean that I should write first element "0xe473042e" from pnSeed like "0x2e0473e4" in seedAddrs, doesn't it?
Thanks so much!
Mike Hearn
Moderator
Legendary
*
Offline Offline

Activity: 1526


View Profile
September 25, 2013, 08:41:53 PM
 #9

Well, if it doesn't work you got them the wrong way around Wink
Green Lantern
Jr. Member
*
Offline Offline

Activity: 43


View Profile
September 26, 2013, 12:14:02 AM
 #10

Well, if it doesn't work you got them the wrong way around Wink
I have reversed all integers in pnSeed array from https://github.com/bitcoin/bitcoin/blob/0.8.1/src/net.cpp (line 1226). It doesn't work!
Then I simply pasted part of pnSeed to seedAddrs. It works.
So, reverse isn't needed.
Mike Hearn
Moderator
Legendary
*
Offline Offline

Activity: 1526


View Profile
September 26, 2013, 06:35:16 AM
 #11

OK, funny, I seem to remember having to reverse them, but it was years ago so I obviously misremembered.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!