Author

Topic: dnsseed problems (Read 154 times)

jr. member
Activity: 43
Merit: 16
May 17, 2020, 10:30:15 PM
#2
If you follow along with the commits for the bitcoin-seeder app, you will find that the line in GetBanTime which compares clientVersion to 31900 was added a couple years earlier than the line in IsGood which compares to REQUIRE_VERSION.

Dec 22, 2011: https://github.com/sipa/bitcoin-seeder/commit/8b2c4eca5f25f425f2911896125868fec4ca45d8#diff-fc4dfa6031995a26c16f099dd1e8143bR80
Apr 14, 2013: https://github.com/sipa/bitcoin-seeder/commit/d8e20ba4844201c0f2dd83c91d0fd614bc5c6cc8#diff-fc4dfa6031995a26c16f099dd1e8143bR96

Long story short, it certainly seems like an oversight that the 31900 value was left hardcoded and never updated. In my opinion, both values should be compared against the MIN_PEER_PROTO_VERSION value from version.h.

If you are still confused, feel free to take a look at how I handled this in my generic-seeder clone: https://bitcointalksearch.org/topic/dns-seeder-setup-guide-using-the-generic-seeder-5239304
newbie
Activity: 2
Merit: 0
March 20, 2019, 02:37:02 AM
#1
I'm creating dnsseed based on https://github.com/sipa/bitcoin-seeder. But I got a problem when adapting the seeder software.
The variable "clientVersion" is compared with REQUIRE_VERSION(which is a protocol version) in the function IsGood,
Code:
if (clientVersion && clientVersion < REQUIRE_VERSION) return false;
while it is compared with 31900(which seems to be a client version v0.3.19) in the function GetBanTime.
Code:
if (clientVersion && clientVersion < 31900) { return 604800; }
I'm confused. What on earth should "clientVersion" be compared with? Client version or protocol version?
This is the output of bitcoin-cli.
Code:
$ bitcoin-cli getnetworkinfo
{
  "version": 170100,
  "subversion": "/Satoshi:0.17.1/",
  "protocolversion": 70015,
  ......
}
Looking forward reply. Thanks!
Jump to: