Does the
vHavecomprises an inventory of contiguous block hashes earlier toAandAitself?
Just about.
CBlockLocators are only a record of block hashes, with most up-to-date blocks first. After all, it will be costly to ship the entire block hashes that precede A, so the record comprises hashes farther and farther aside because the blocks become older.
It begins with A and the 9 blocks that got here earlier than it. The overwhelming majority of reorgs will probably be inside these 10 blocks, so it simply lists all 10 and there is a fairly excessive chance that the forking level will probably be in there. However after that, hashes begin being spaced out exponentially. It begins with 2 blocks earlier than the final within the record, then 4, then 8, and so forth, till the genesis block is reached.
The record finally ends up having ceil(log2(n)) + 11 hashes. At present that is 31 block hashes.
