dash/contrib/seeds
PastaPastaPasta 015e30fa0b
feat: add onion_seeds to seed creation; do seed creation (#5866)
## Issue being fixed or feature implemented
We did not previously ship any onion seeds. This results in people
needing to use `addnode` in order to actually get connected

## What was done?
Modified seed creation process to handle a list of onion seeds.

## How Has This Been Tested?
Running with and without onlynet=onion and with dnsseed=0 and deleting
peers.dat

## Breaking Changes
None

## Checklist:
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e
tests
- [ ] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
2024-02-14 22:31:24 -06:00
..
generate-seeds.py merge bitcoin#22050: remove tor v2 support 2023-09-24 09:50:50 -05:00
makeseeds.py feat: add onion_seeds to seed creation; do seed creation (#5866) 2024-02-14 22:31:24 -06:00
nodes_main.txt feat: add onion_seeds to seed creation; do seed creation (#5866) 2024-02-14 22:31:24 -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