<p>After the headers download algorithm was improved in Bitcoin Core version 24.0.1 (PR <a href="https://github.com/bitcoin/bitcoin/pull/25717" rel="noreferrer">https://github.com/bitcoin/bitcoin/pull/25717</a>), there aren't any known attack vectors that would require the checkpoints to be kept around.</p>
<p>There is the possibility of removing the existing ones, but so far that hasn't happened yet. I'd say the main question is how confident everyone is that there aren't any <em>unknown</em> attack vectors no one has thought of that the existing checkpoints might be protecting us from.</p>
<p>Nobody can see the future, but given all that, I think that it is very unlikely that new checkpoints will be added.</p>

CC BY-SA 4.0
2024-07-26T15:24:07.450Z
It may be worth pointing out that preventing deep reorgs isn't the end goal of checkpoint, it's merely a means towards an end. The goal is preventing a number of vaguely-related attacks that come with being fed and incorrect chain (it was necessary for making skipping of signatures through assumevalid safe, and later for preventing block and block header spam). Over time all of those (known) attacks have been addressed through other means.
Pieter Wuille
CC BY-SA 4.0
2024-07-26T15:56:52.443Z
Thanks for the insight @Pieter Wuille! One last thing though...
In this post (https://bitcoin.stackexchange.com/questions/1797/what-are-checkpoints), you mentioned that the malicious headers-spam disruptions are prevented by other methods (for example, headers-presync). So does this mean that checkpoints do not have much practical role nowadays?
paranoid
CC BY-SA 4.0
2024-07-26T16:48:14.767Z
@paranoid Yes, exactly as Lightlike's answer says. As far as we know, there is nothing that checkpoints protect against anymore, but there may be unknown things.
Pieter Wuille
CC BY-SA 4.0
2024-07-26T15:11:28.637Z
2024-07-26T15:11:28.637Z
Lightlike
<p>I have a few questions on <code>checkpointData</code> in <code>src/kernel/chainparams.cpp</code> file.</p>
<p>This variable seems stopped being updated from approximately 10 years ago, judging by the timestamp of the height of the most recent checkpoint block. Also, I noticed that this variable is only used in the <code>ContextualCheckBlockHeader</code> function in <code>src/validation.cpp</code> file. The role of checkpoints seems pretty obvious.</p>
<pre><code>// Don't accept any forks from the main chain prior to last checkpoint.
// GetLastCheckpoint finds the last checkpoint in MapCheckpoints that's in our
// BlockIndex().
</code></pre>
<p>By navigating through multiple posts, I realized that the role of <code>checkpointData</code> has been significantly reduced. Some Bitcoin Core developers even mention that it is likely to be removed at some time.</p>
<p>So my question is... isn't it already safe to completely remove the code related to <code>checkpointData</code>? The possibility of bitcoin being reversed to its 2014-state is almost close to zero. Or, is there a chance that some new checkpoint blocks will be added in the future?</p>

<bitcoin-core-development><blockchain-fork><checkpoints>
Why are the checkpoints still in the codebase in 2024?
paranoid
# Why are the checkpoints still in the codebase in 2024?

(Asked by: username_0 on 2024-07-26)

I have a few questions on `checkpointData` in `src/kernel/chainparams.cpp` file.

This variable seems stopped being updated from approximately 10 years ago, judging by the timestamp of the height of the most recent checkpoint block. Also, I noticed that this variable is only used in the `ContextualCheckBlockHeader` function in `src/validation.cpp` file. The role of checkpoints seems pretty obvious.

```
// Don't accept any forks from the main chain prior to last checkpoint.
// GetLastCheckpoint finds the last checkpoint in MapCheckpoints that's in our
// BlockIndex().

```

By navigating through multiple posts, I realized that the role of `checkpointData` has been significantly reduced. Some Bitcoin Core developers even mention that it is likely to be removed at some time.

So my question is... isn't it already safe to completely remove the code related to `checkpointData`? The possibility of bitcoin being reversed to its 2014-state is almost close to zero. Or, is there a chance that some new checkpoint blocks will be added in the future?

**Tags:** bitcoin-core-development, blockchain-fork, checkpoints


---

## 1 answers

### Answer by username_1 on 2024-07-26. Score: 6

After the headers download algorithm was improved in Bitcoin Core version 24.0.1 (PR <https://github.com/bitcoin/bitcoin/pull/25717>), there aren't any known attack vectors that would require the checkpoints to be kept around.

There is the possibility of removing the existing ones, but so far that hasn't happened yet. I'd say the main question is how confident everyone is that there aren't any *unknown* attack vectors no one has thought of that the existing checkpoints might be protecting us from.

Nobody can see the future, but given all that, I think that it is very unlikely that new checkpoints will be added.

> **Comments:**
> **username_2**: It may be worth pointing out that preventing deep reorgs isn't the end goal of checkpoint, it's merely a means towards an end. The goal is preventing a number of vaguely-related attacks that come with being fed and incorrect chain (it was necessary for making skipping of signatures through assumevalid safe, and later for preventing block and block header spam). Over time all of those (known) attacks have been addressed through other means.  
> **username_0**: Thanks for the insight @username_2! One last thing though... In this post (https://bitcoin.stackexchange.com/questions/1797/what-are-checkpoints), you mentioned that the malicious headers-spam disruptions are prevented by other methods (for example, headers-presync). So does this mean that checkpoints do not have much practical role nowadays?  
> **username_2**: @username_0 Yes, exactly as username_1's answer says. As far as we know, there is nothing that checkpoints protect against anymore, but there may be unknown things.  

---

