4

One ledger-headers file, named by ledger number as ledger/ww/xx/yy/ledger-wwxxyyzz.xdr.gz. The file contains a sequence of XDR structures of type LedgerHeaderHistoryEntry, one per ledger in the checkpoint (so there should be 64 such structures in all checkpoints except the first, which has 63 headers).

From stellar-core/docs/history.md

What is the reason that the first ledger file in the history archive contains only 63 ledgers and not 64 like all the rest?

1

Answer from official doc:

Checkpoints are made once every 64 ledgers, at ledger sequence numbers that are one-less-than a multiple of 64.

Checkpoints are where a new ledger-headers file is born, at ledger seq # 63, 127, 191, ...

As the chain started from ledger #1, the first checkpoint wraps up only ledger #1 - #63.


Personal comment:

The checkpoints recur every 64 data pieces, therefore likely 6 bits are being used here. The 6-bit binary numbers 000000 - 111111 correspond to the decimal numbers 0 - 63.

They could start the chain from ledger #0, but it might seem weird to non-tech people.

Cheers~

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.