HomePhabricator

Reduce bandwidth during initial headers sync when a block is found

Description

Reduce bandwidth during initial headers sync when a block is found

Summary:
If our headers chain is behind on startup, then if a block is found we'll try
to catch up from all peers announcing the block, in addition to our initial
headers-sync peer. This commit changes behavior so that in this situation,
we'll choose at most one peer announcing a block to additionally sync headers
from.

This is a backport of core#25720

Depends on D14913

Test Plan:
ninja all check-all

I also successfully ran the new functional test 50 times to reduce the risks of introducing a flaky test.

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
Suhas Daftuar <sdaftuar@gmail.com>Authored on Jul 25 2022, 17:53
PiRKCommitted on Dec 6 2023, 09:46
PiRKPushed on Dec 6 2023, 09:47
Reviewer
Restricted Project
Differential Revision
D14914: Reduce bandwidth during initial headers sync when a block is found
Parents
rABC71e67ffdd382: Don't send getheaders message when another request is outstanding
Branches
Unknown
Tags
Unknown