When was getheaders added?

3

Bitcoin 0.10 uses getheaders to synchronize. How long has this message been supported by other clients? How many existing nodes support it?

Nick ODell

Posted 2015-02-19T16:35:30.307

Reputation: 26 536

Answers

4

How long has this message been supported by other clients?

It was added by Satoshi in Bitcoin v0.3.18 (released on december 8th, 2010)

How many existing nodes support it?

All of them. It has been used by SPV clients for a long time to do fast synchronization without downloading all historical blocks.

Pieter Wuille

Posted 2015-02-19T16:35:30.307

Reputation: 54 032

Was the headers message also there along with the getheaders, or did the getheaders use to respond with blocks?scravy 2018-09-24T15:57:04.980

The headers message was also there.Pieter Wuille 2018-09-24T17:53:20.617

The headers message includes a transaction count which is always zero, bitcoin-core even skips it with a comment "assume it is 0". It looks like this was supposed to ease writing software that could just apply its block parsing logic on that message. But technically that number of transactions is superfluous, right? So I believe it is just a historical artefact that does not serve any future purpose?scravy 2018-09-25T09:25:56.380

1That's right. At the time, there was no separate CBlockHeader and CBlock; a header was just a CBlock with no transactions.Pieter Wuille 2018-09-25T11:01:54.177