HomePhabricator

Make the seeder dump interval settable by commandline argument

Description

Make the seeder dump interval settable by commandline argument

Summary:
The current scheme for delays between seeder dumps is not useful for some situations, namely:

  • First dump takes too long (100 seconds) for automated or manual testing
  • Interval backoff is not useful under any circumstance that I can think of
  • Final interval is not intuitive (53.333 minutes) so making a cron job that picks up the latest dump is not obvious

This patch fixes these issues by introducing the -dumpinterval commandline argument.
Default dumpinterval is changed to 1 hour.

Test Plan:

ninja bitcoin-seeder check-seeder

Start seeder with default dumpinterval:

date
./src/seeder/bitcoin-seeder -host=seeder.status.cash -ns=localhost -mbox=thonkle@protonmail.com -port=5555

1 hour later, verify dnsseed.dump is 1 hour after the above timestamp:

ls -al dnsseed.dump

Verify quick dumpinterval works (dnsseed.dump timestamps should update every 1 second):

./src/seeder/bitcoin-seeder -host=seeder.status.cash -ns=localhost -mbox=thonkle@protonmail.com -port=5555 -dumpinterval=1
ls -al --full-time dnsseed.dump && sleep 1
ls -al --full-time dnsseed.dump && sleep 1
ls -al --full-time dnsseed.dump && sleep 1

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
thonkleAuthored on Dec 9 2021, 22:21
thonklePushed on Apr 19 2022, 21:48
Reviewer
Restricted Owners Package
Differential Revision
D10666: Make the seeder dump interval settable by commandline argument
Parents
rABCc314aec7e585: [avalanche] Account for our own proof in the connected stake computation
Branches
Unknown
Tags
Unknown