Almost every tutorial for setting up a witness node mention that it is important to ping all seed-nodes and add the fastest nodes to the config.ini file. For improving this process, I wrote a small python script, which:
config.ini fileYou can find the script here https://github.com/holgern/steem-witness-tools. Steps for running the script on your witness server:
pip3 install ping3 --usergit clone https://github.com/holgern/steem-witness-tools.gitcd sort_seed_nodes)sudo python3 ping_seed_nodes.py as rootconfig.iniIt is possible to modify the maximum allowed ping time in milliseconds. Default is 100 ms, which means that all seed nodes are included with a ping time better than 100 ms. In the following example, the maximum time is set 50 milliseconds:
sudo python3 ping_seed_nodes.py --maxdelay 50
It also possible to use a different seed-node.txt file as source. It must follow the same structure as the seed-node.txt file.
seed-east.steemit.com:2001 # steemit
seed-url:port # owner
The inputparameter allows to use different files as source:
sudo python3 ping_seed_nodes.py --input my-seed-nodes.txt
The results are also stored in sorted_seednodes_6_6_2018.txt, the name is adapted to the date.
If you like what I'm doing, please consider @holger80 as one of your witnesses. You can use steemconnect.com for approve your vote or go to https://steemit.com/~witnesses and enter my name into the vote field: