End Goal: Make the headers sync phase quicker and less prone to fail, while improving implementation and test code.
The Bitcoin Optech Podcast episode for Newsletter 322 (https://bitcoinops.org/en/podcast/2024/10/01/) among other things prompted the (re)discovery of the possible improvement of caching headers so they only needed to be downloaded once. To avoid adding unnecessary resource demands on nodes, the number of HeaderSyncState
instances created over time should ideally be made more predictable first (see old comments at #25720 (review) & #25720 (comment)).
Issues
Not required, but getting these in first helps make later changes clearer:
Critical path (not yet ready for general review):
- Heavily WIP: More predictable
HeaderSyncState
creation - https://github.com/hodlinator/bitcoin/tree/2025/08/headerssync_predictability - WIP: https://github.com/l0rinc/bitcoin/pull/3
Adjacent: