I read in Peercoin whitepaper that to prevent large blockchain reorganization, bitcoin also implements checkpoint mechanism which finalizes the blockchain history. Can you explain how exactly bitcoin implements this?


Checkpoints are a relatively misunderstood part bitcoin - Bitcoin does have a few checkpoints, but they are only used in one very specific case. That case is just to ignore forks from the chain early on, before the most recently seen checkpoint. When a node has seen a block it recognises as a checkpoint, any further blocks received below that height will be ignored.

You can see this here: https://github.com/bitcoin/bitcoin/blob/0dfc25f82a01d9fec26380d95915df31e1fe2c02/src/validation.cpp#L3107

It is a long term goal of removing the checkpoints entirely, because they are a source of confusion over the security model and power the developers have. But currently the role they serve is to prevent low difficulty header flooding attacks, and there has been no alternative solution proposed yet (that I know of)

  • So, at initial sync the client knows it is on the right chain, prevents forks from being created form early blocks? – Willtech Feb 13 '18 at 12:22
  • @Willtech yes, but only if it has seen the right path. If it has never seen the true chain then the checkpoints do nothing. – MeshCollider Feb 13 '18 at 20:17

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.