Possibly we can fiddle with these parameters, e.g. pick "if peers < 4 after 30 seconds, query seed"
Avoid querying DNS seeds, if we have open connections. #4559
pull jgarzik wants to merge 1 commits into bitcoin:master from jgarzik:maybe-dns-seed changing 2 files +14 −1-
jgarzik commented at 10:44 PM on July 18, 2014: contributor
-
jgarzik commented at 5:21 PM on July 19, 2014: contributor
Tweaked,
- Want "more than one" peer, to skip DNS seed query (partition)
- 30 seconds is a long time to pause, and seems likely to trigger human impatience timeouts. Reduced to 10 seconds, then changed to 11 as a post-vacation present for Gavin
-
in src/net.cpp:None in 9297a48432 outdated
1226 | @@ -1227,6 +1227,18 @@ void MapPort(bool) 1227 | 1228 | void ThreadDNSAddressSeed() 1229 | { 1230 | + // goal: only query DNS seeds if address need is acute 1231 | + if ((addrman.size() > 0) && 1232 | + (!GetBoolArg("-alwaysdnsseed", false))) {
laanwj commented at 5:33 AM on July 20, 2014:Maybe call this option '-forcednsseed'?
laanwj commented at 5:34 AM on July 20, 2014: memberACK on concept, haven't tested yet.
laanwj commented at 9:47 AM on July 24, 2014: memberACK, works great for me, every time
2014-07-24 09:39:07 P2P peers available. Skipped DNS seeding.sipa commented at 10:00 AM on July 24, 2014: memberUntested ACK; I prefer -forcednsseed as well.
sipa commented at 10:01 AM on July 24, 2014: memberOr what about -dnsseeddelay, which is 11 by default? Setting it to 0 is equal to forcing dns seeding?
laanwj commented at 9:53 AM on July 25, 2014: memberI'm not sure it is an parameter that makes much sense to customize. Usually you'll either want full control over bootstrapping (-dnsseed=0), use DNS seeds when needed after a 'sane' delay (the default), or force DNS seed usage immediately (
-forcednsseed, main use case faster debugging/troubleshooting of DNS seeds code).sipa commented at 2:46 PM on July 27, 2014: memberFair enough.
2e7009d67bAvoid querying DNS seeds, if we have open connections.
The goal is to increase independence and privacy.
jgarzik commented at 3:06 PM on July 29, 2014: contributorUpdated to use -forcednsseed, and also updates the --help text.
BitcoinPullTester commented at 3:21 PM on July 29, 2014: noneAutomatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/p4559_2e7009d67b862cf822a1c70e181de6af659a3096/ for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.
laanwj merged this on Jul 29, 2014laanwj closed this on Jul 29, 2014laanwj referenced this in commit 4ad23d2110 on Jul 29, 2014in src/init.cpp:None in 2e7009d67b
239 | @@ -240,7 +240,8 @@ std::string HelpMessage(HelpMessageMode mode) 240 | strUsage += " -connect=<ip> " + _("Connect only to the specified node(s)") + "\n"; 241 | strUsage += " -discover " + _("Discover own IP address (default: 1 when listening and no -externalip)") + "\n"; 242 | strUsage += " -dns " + _("Allow DNS lookups for -addnode, -seednode and -connect") + " " + _("(default: 1)") + "\n"; 243 | - strUsage += " -dnsseed " + _("Find peers using DNS lookup (default: 1 unless -connect)") + "\n"; 244 | + strUsage += " -dnsseed " + _("Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)") + "\n"; 245 | + strUsage += " -forcednsseed " + _("Always query for peer addresses via DNS lookup (default: 0)") + "\n";
Diapolo commented at 7:51 AM on July 30, 2014:Nit: This is now missplaced, when considering an alphabetical ordering.
jgarzik deleted the branch on Aug 24, 2014MarcoFalke locked this on Sep 8, 2021Contributors
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 12:15 UTC
More mirrored repositories can be found on mirror.b10c.me