Do SPV nodes sync “headers-first”?
Headers-first sync is defined somewhat by BIP 130 and expanded upon with compact block relay in BIP 152. I believe this is the commit in which it was added to Bitcoin Core.
The result is that Bitcoin Core nodes never send
getblocks messages anymore, they get headers first with
getheaders, then after some verification, they request full blocks with
My question is, do SPV nodes need to follow this scheme as well? They certainly could, they’d just open the peer connection with a
filterload so when they
getdata they get
merkleblock messages back instead of full
This is an implementation-specific question, but I am actually hoping for examples. For one, Breadwallet seems to have a custom network protocol in which both
getblocks are used.
Are there any other examples of SPV applications using
getblocks in this way?
Do most SPV clients just use
getblocks or do they try to sync headers-first, even though they’ll never request full blocks?
Article source: “https://bitcoin.stackexchange.com/questions/86147/do-spv-nodes-sync-headers-first”