HomePhabricator

[backport#15558] Do not query all DNS seed at once

Description

[backport#15558] Do not query all DNS seed at once

Summary:

Before this PR, when we don't have enough connections after 11 seconds, we proceed to query all DNS seeds in a fixed order, loading responses from all of them.

Change this to to only query three randomly-selected DNS seed. If 11 seconds later we still don't have enough connections, try again with another one, and so on.

This reduces the amount of information DNS seeds can observe about the requesters by spreading the load over all of them.

This is a backport of Core PR15558

Test Plan: ninja all check-all

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, jasonbcox

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, jasonbcox

Subscribers: jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D8057

Details

Provenance
Pieter Wuille <pieter.wuille@gmail.com>Authored on Oct 23 2020, 10:20
PiRKCommitted on Oct 23 2020, 10:21
abc-botPushed on Oct 23 2020, 10:26
Reviewer
Restricted Owners Package
Differential Revision
D8057: [backport#15558] Do not query all DNS seed at once
Parents
rABCecc9c997c95d: Merge #17522: test: Wait until mempool is loaded in wallet_abandonconflict
Branches
Unknown
Tags
Unknown