HomePhabricator

Added a script to test seeds

Description

Added a script to test seeds

Summary:
We need an automateable way to test seeds. This script takes in nodes_<main|test>.txt and outputs peers that
it successfully connected to.

This script is useful for verifying that newly added seeds are viable.

This script may also be used to determine general "health" of the seeds list by calculating the fraction of nodes
that can be successfully connected to at any point in time:

TOTAL=$(cat nodes_main.txt | wc -l)
NUM=$(./test-seeds.sh < nodes_main.txt | wc -l)
echo "scale=3; $NUM / $TOTAL" | bc

With additional automation, the seeds could be updated automatically whenever the above fraction drops below
a certain threshold. More testing will be necessary to pick a sane number.

Test Plan:
Assuming build is available at <project>/build:

cd contrib/seeds
./test-seeds.sh -h
./test-seeds.sh < nodes_main.txt
./test-seeds.sh --testnet < nodes_test.txt

Reviewers: #bitcoin_abc, deadalnix, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D3809

Details

Provenance
jasonbcoxAuthored on Aug 6 2019, 00:35
jasonbcoxPushed on Sep 10 2019, 21:03
Reviewer
Restricted Project
Differential Revision
D3809: Added a script to test seeds
Parents
rSTAGING7e072905b98c: Added some release notes
Branches
Unknown
Tags
Unknown