8

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?

0

1 Answer 1

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.

3
  • 6
    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. Commented Jul 26 at 15:24
  • Thanks for the insight @Pieter Wuille! One last thing though... In this post (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
    Commented Jul 26 at 15:56
  • 2
    @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. Commented Jul 26 at 16:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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