Can someone help me with role of interface block_locator.mli in tezos-base?
1 Answer
The block locator is used to synchronize two nodes : each node sends a block locator to the other one at connection initialization, so that they can evaluate how far they are on the blockchain. If they are already up-to-date with the last block, the block locator will be very similar. If one of them is not up-to-date, the block locator will tell them how much it will have to work (download blocks and validate them) to get up-to-date with the other one.