mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-12 04:42:36 -03:00
b54180303d
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>
18 lines
944 B
Markdown
18 lines
944 B
Markdown
# Seeds
|
|
|
|
Utility to generate the seeds.txt list that is compiled into the client
|
|
(see [src/chainparamsseeds.h](/src/chainparamsseeds.h) and other utilities in [contrib/seeds](/contrib/seeds)).
|
|
|
|
Be sure to update `PATTERN_AGENT` in `makeseeds.py` to include the current version,
|
|
and remove old versions as necessary (at a minimum when GetDesirableServiceFlags
|
|
changes its default return value, as those are the services which seeds are added
|
|
to addrman with).
|
|
|
|
The seeds compiled into the release are created from sipa's DNS seed and AS map
|
|
data. Run the following commands from the `/contrib/seeds` directory:
|
|
|
|
curl https://bitcoin.sipa.be/seeds.txt.gz | gzip -dc > seeds_main.txt
|
|
curl https://bitcoin.sipa.be/asmap-filled.dat > asmap-filled.dat
|
|
python3 makeseeds.py -a asmap-filled.dat < seeds_main.txt > nodes_main.txt
|
|
cat nodes_main_manual.txt >> nodes_main.txt
|
|
python3 generate-seeds.py . > ../../src/chainparamsseeds.h
|