dash/contrib/seeds/README.md
Wladimir J. van der Laan 9eec4cc2e1
Merge #20288: script, doc: contrib/seeds updates
961f148cb1b4caab86b4354357999e03433b04b1 doc: update contrib/seeds/README dnspython installation info (Jon Atack)
dd7b5f46d85401254630abf6976f59b5b8eed181 script: fix deprecation warning in makeseeds.py (Jon Atack)

Pull request description:

  Seen while reviewing #20237.

  1. Fix a deprecation warning in `contrib/seeds/makeseeds.py`
  ```
      makeseeds.py:139: DeprecationWarning: please use dns.resolver.resolve() instead
        asn = int([x.to_text() for x in dns.resolver.query('.'.join(
  ```
    - Per https://dnspython.readthedocs.io/en/latest/whatsnew.html, `dns.resolver.query()` was deprecated in `dnspython` version 2.0.0.

    - See https://dnspython.readthedocs.io/en/latest/resolver-class.html for more info on the resolver class.

  2. Update the `dnspython` dependency installation instructions in `contrib/seeds/README`

    - The markdown rendering can be seen here: https://github.com/jonatack/bitcoin/tree/contrib-seeds-fixups/contrib/seeds

ACKs for top commit:
  laanwj:
    code review ACK 961f148cb1b4caab86b4354357999e03433b04b1

Tree-SHA512: f9c4f318a1a0d35b8de147d24b72c534a1f58eece31e7cfa00b4149a63b6a618d8ca0312f52fd8056f3c645cf2ee68574ca02319fddffdad919a70cd33395d33
2024-04-03 14:11:34 +07:00

38 lines
1.1 KiB
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)).
The seeds compiled into the release are created from the current protx list, like this:
```bash
dash-cli protx list valid 1 2018966 > protx_list.json
# Make sure the onion seeds still work!
while IFS= read -r line
do
address=$(echo $line | cut -d':' -f1)
port=$(echo $line | cut -d':' -f2)
nc -v -x 127.0.0.1:9050 -z $address $port
done < "onion_seeds.txt"
python3 makeseeds.py protx_list.json onion_seeds.txt > nodes_main.txt
python3 generate-seeds.py . > ../../src/chainparamsseeds.h
```
Make sure to use a recent block height in the "protx list" call. After updating, create a PR and
specify which block height you used so that reviewers can re-run the same commands and verify
that the list is as expected.
## Dependencies
Ubuntu, Debian:
sudo apt-get install python3-dnspython
and/or for other operating systems:
pip3 install dnspython3
See https://dnspython.readthedocs.io/en/latest/installation.html for more information.