"Compressed" headers stream



Summary:

Suhas Daftuar suggested the introduction of a new 'cmpctheaders'/'getcmpcthdrs' message pair for syncing, while keeping the existing 'headers'/'getheaders' messages unchanged. The proposed solution involves never using 'getheaders' messages when communicating with upgraded peers and only using 'headers' messages for potentially announcing new blocks. However, the question arises as to how peers should fetch headers. In an ideal world, peers would decide which headers to fetch based on a compact proof of the total work in their chains, but such proofs cannot be constructed in Bitcoin today. Instead, a weak heuristic is proposed where peers fetch first from those with the tip at the highest difficulty and then work backwards. This idea is inspired by the current headers first sync, but without the reverse part because the protocol did not permit it. Suhas Daftuar also mentioned the possibility of changing the interface.


Updated on: 2023-05-20T03:30:18.295189+00:00