HomePhabricator

validation: add randomness to periodic write interval

Description

validation: add randomness to periodic write interval

Summary:
From the PR discussion:

One related idea: maybe we should randomize the sync event times a bit (say, uniformly random intervals between 50 and 70 minutes) to prevent a situation where the network over time settles into a few cohorts of synchronized syncers (think like communicating metronomes: they start randomly, but have synchronized events (blocks arriving) that slightly delay sync events if they were to coincide).

Co-Authored-By: Pieter Wuille <pieter@wuille.net>
Co-Authored-By: l0rinc <pap.lorinc@gmail.com>

This concludes backport of core#30611
https://github.com/bitcoin/bitcoin/pull/30611/commits/e976bd3045010ee217aa0f2dca4c962aabb789d5
Depends on D18642

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
Andrew Toth <andrewstoth@gmail.com>Authored on Sep 8 2024, 15:51
PiRKCommitted on Sep 17 2025, 18:26
PiRKPushed on Sep 17 2025, 18:26
Reviewer
Restricted Project
Differential Revision
D18643: validation: add randomness to periodic write interval
Parents
rABCa609ba3b96f8: refactor: replace m_last_write with m_next_write
Branches
Unknown
Tags
Unknown