dash/contrib/seeds
Konstantin Akimov 151b56eacd
fix: uninitialized variable onions in makeseeds script
```
$ ./makeseeds.py protx.txt > nodes_main.txt
Traceback (most recent call last):
  File "DASH/contrib/seeds/./makeseeds.py", line 183, in <module>
    main()
  File "DASH/contrib/seeds/./makeseeds.py", line 167, in main
    for onion in onions:
                 ^^^^^^
UnboundLocalError: cannot access local variable 'onions' where it is not associated with a value
```
2024-03-03 23:34:34 -06:00
..
generate-seeds.py merge bitcoin#22050: remove tor v2 support 2023-09-24 09:50:50 -05:00
makeseeds.py fix: uninitialized variable onions in makeseeds script 2024-03-03 23:34:34 -06:00
nodes_main.txt chore: update seeds for v20.1 2024-03-03 23:34:34 -06:00
nodes_test.txt Update hard coded seeds for v18.0.0-rc12 (#4953) 2022-08-11 01:57:13 +03:00
onion_seeds.txt feat: add onion_seeds to seed creation; do seed creation (#5866) 2024-02-14 22:31:24 -06:00
README.md feat: add onion_seeds to seed creation; do seed creation (#5866) 2024-02-14 22:31:24 -06:00
suspicious_hosts.txt Merge #17823: scripts: Read suspicious hosts from a file instead of hardcoding 2022-10-17 15:41:14 -05:00

Seeds

Utility to generate the seeds.txt list that is compiled into the client (see src/chainparamsseeds.h and other utilities in contrib/seeds).

The seeds compiled into the release are created from the current protx list, like this:

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:

sudo apt-get install python3-pip
pip3 install dnspython