HomePhabricator

[net] Ignore getheaders requests for very old side blocks

Description

[net] Ignore getheaders requests for very old side blocks

Summary:
Sending a getheaders message with an empty locator and a stop hash
is a request for a single header by hash. The node will respond with
headers for blocks not in the main chain as well as those in the main
chain. To avoid fingerprinting, the node should, however, ignore
requests for headers on side branches that are too old.

Backport of core PR11113

Test Plan:

./test/functional/test_runner.py p2p-fingerprint

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: teamcity, schancel

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

Details

Provenance
jimpoAuthored on Jan 6 2019, 10:10
FabienCommitted on Jan 6 2019, 10:10
FabienPushed on Jan 6 2019, 12:04
Reviewer
Restricted Project
Differential Revision
D2226: [net] Ignore getheaders requests for very old side blocks
Parents
rSTAGINGba12b8e01f69: [avalanche] Add some safety to AvalancheBlockUpdate using static asserts
Branches
Unknown
Tags
Unknown