contrib: Use asmap for ASN lookup in makeseeds

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 all the fallbacks and extra
complexity, as everyone will be using the same instructions anyway.

Co-authored-by: Pieter Wuille <pieter.wuille@gmail.com>
Co-authored-by: James O'Beirne <james.obeirne@pm.me>
Co-authored-by: russeree <reese.russell@ymail.com>
This commit is contained in:
committed 2022-05-31 11:57:49 +02:00
1 parent bd6c5e4108
commit b54180303d
4 files changed
+120 -48

No files matched your search

+1
View File
@@ -1 +1,2 @@
seeds_main.txt
asmap-filled.dat