Skip to content

Commit 7f2c983

Browse files
committed
Merge bitcoin/bitcoin#24864: contrib: Use asmap for ASN lookup in makeseeds
667e316 contrib: Update makeseeds to asmap-nextgen (laanwj) ae00b9e contrib: add seeds progress indicator and remove asmap one in makeseeds script (Jon Atack) b541803 contrib: Use asmap for ASN lookup in makeseeds (laanwj) Pull request description: Add an argument `-a` to provide a asmap file to do the IP to ASN lookups. This speeds up the script greatly, and makes the output deterministic. Also removes the dependency on `dns.lookup`. I've annotated the output with ASxxxx comments to provide a way to verify the functionality. For now I've added instructions in README.md to download and use the `demo.map` from the asmap repository. When we have some other mechanism for distributing asmap files we could switch to that. This continues #24824. I've removed the fallbacks and extra complexity, as everyone will be using the same instructions anyway. Co-authored-by: Pieter Wuille <[email protected]> Co-authored-by: russeree <[email protected]> ACKs for top commit: sipa: ACK 667e316 dunxen: re-ACK 667e316 Tree-SHA512: c4cedfbd1dee6be7547aa92dd9e262c46f0ff8099e647559b2a40eab0cc9874e9a813706630dd5c880390d23f432e789fb3e7e8a09f376f567071e68f5904c65
2 parents b0c8306 + 667e316 commit 7f2c983

File tree

4 files changed

+850
-53
lines changed

4 files changed

+850
-53
lines changed

contrib/seeds/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
seeds_main.txt
2+
asmap-filled.dat

contrib/seeds/README.md

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,11 @@ and remove old versions as necessary (at a minimum when GetDesirableServiceFlags
88
changes its default return value, as those are the services which seeds are added
99
to addrman with).
1010

11-
The seeds compiled into the release are created from sipa's DNS seed data, like this:
11+
The seeds compiled into the release are created from sipa's DNS seed and AS map
12+
data. Run the following commands from the `/contrib/seeds` directory:
1213

1314
curl https://bitcoin.sipa.be/seeds.txt.gz | gzip -dc > seeds_main.txt
14-
python3 makeseeds.py < seeds_main.txt > nodes_main.txt
15+
curl https://bitcoin.sipa.be/asmap-filled.dat > asmap-filled.dat
16+
python3 makeseeds.py -a asmap-filled.dat < seeds_main.txt > nodes_main.txt
1517
cat nodes_main_manual.txt >> nodes_main.txt
1618
python3 generate-seeds.py . > ../../src/chainparamsseeds.h
17-
18-
## Dependencies
19-
20-
Ubuntu, Debian:
21-
22-
sudo apt-get install python3-dnspython
23-
24-
and/or for other operating systems:
25-
26-
pip install dnspython
27-
28-
See https://dnspython.readthedocs.io/en/latest/installation.html for more information.

0 commit comments

Comments
 (0)