bitcoin/contrib/seeds
MacroFake 19585eeb77
Merge bitcoin/bitcoin#25853: net: update testnet torv3 hardcoded seeds for 24.x
2ef33e936e contrib: update testnet torv3 hardcoded seeds (Jon Atack)

Pull request description:

  As a follow-up to https://github.com/bitcoin/bitcoin/issues/13550 and #22060, replace the mostly unreachable testnet torv3 hardcoded seeds from v0.22 with new ones that are consistently reachable recently and that have service bit 1 set.

  This needs to be done before v24.0 to make sure onion-only testnet nodes can still connect to the network.

  Ways to test:

  - Re-generate `src/chainparamsseeds.h` with `cd contrib/seeds && python3 generate-seeds.py . > ../../src/chainparamsseeds.h`, check if git tree stays the same
  - Re-compile and create a new testnet node with `bitcoind -testnet -dnsseed=0 -onlynet=onion -proxy=127.0.0.1:9050` (or delete `~/.bitcoin/testnet3/peers.dat` and launch bitcoind with `-testnet -dnsseed=0`). Make sure there are no `addnode=` in your `bitcoin.conf`. The debug log should print "Adding fixed seeds".  Check if the node is able to connect to the network and get blocks with for ex. `watch -t ./src/bitcoin-cli -testnet -rpcwait -netinfo 4`
  - Check the addrman contains the seeds by running for ex. `bitcoin-cli -rpcwait -testnet getnodeaddresses 0 onion | jq -r '.[] | (.address + ":" + (.port|tostring) + " " + (.services|tostring))' | sort`

  - Check if the addresses are connectable, for ex. with this python script by laanwj:

  ```python3
  #!/usr/bin/env python3
  import pprint
  import subprocess
  with open('contrib/seeds/nodes_test.txt') as f:
      for line in (line for line in (line.rstrip().split('#', 1)[0] for line in f) if line):
          pprint.pprint(line)
          subprocess.call(["nc", "-v", "-x", "127.0.0.1:9050", "-z"] + line.split(':'))
  ```

  Thanks to satsie (Stacie Waleyko) for help with the list.

ACKs for top commit:
  satsie:
    ACK 2ef33e936e
  laanwj:
    ACK 2ef33e936e

Tree-SHA512: 72d27ecba243089bd49c11e921855fba626a1e09ae9b17508254a3bbec4bec341ed6c3d5a4eabc2d37f20bafb8a47ecc7d125e0dda956512a9525ad83273ffd6
2022-09-09 10:07:39 +02:00
..
.gitignore contrib: Use asmap for ASN lookup in makeseeds 2022-05-31 11:57:49 +02:00
asmap.py doc: typo fix 2022-06-18 18:34:50 +02:00
generate-seeds.py contrib: recognize CJDNS seeds as such 2021-11-03 14:58:55 +01:00
makeseeds.py contrib: make-seeds updates for 24.x 2022-08-24 00:00:53 +02:00
nodes_main_manual.txt net: update manual hardcoded mainnet seeds for 24.x 2022-08-24 00:00:52 +02:00
nodes_main.txt net: update hardcoded mainnet seeds for 24.x 2022-08-24 00:04:00 +02:00
nodes_test.txt contrib: update testnet torv3 hardcoded seeds 2022-08-28 14:34:49 +02:00
README.md contrib: Use asmap for ASN lookup in makeseeds 2022-05-31 11:57:49 +02: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).

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