4

In the source code of the standard client, checkpoints.cpp has this comment:

//
// What makes a good checkpoint block?
// + Is surrounded by blocks with reasonable timestamps
//   (no blocks before with a timestamp after, none after with
//    timestamp before)
// + Contains no strange transactions
//

Why should it matter? Presumably the client would have accepted it anyway if they were downloading it normally, and if you were to specify a later block, that would still force the client to download the strange block. I don't understand the point of this restriction.

Nick ODell
  • 29,184
  • 11
  • 69
  • 129

1 Answers1

1

There are two things :

  • Why are checkpoints needed in the first place,
  • Why do the checkpointed blocks need to adhere to the standards you are quoting (which is your question)

I don't think checkpoints are required at all or useful in any way, there has been some debate around this, the fact remains that checkpoints are still present in the Satoshi implementation.

I believe there is no specific reason why the checkpointed blocks must have "reasonable timestamps" or not contain "strange transactions". The only reason I can think of is to not confuse someone reviewing the checkpointed blocks. As you said, such a block would still be downloaded and properly validated. So I think it has more to do with cosmetics and clarity than with an actual technical constraint.

(Also note that "strange transactions" doesn't really mean much, it does not seem to be defined as a transaction that passes the IsStandard check)

David
  • 800
  • 3
  • 8
  • "I don't think checkpoints are required at all or useful in any way," I actually disagree on this point, as my client grabs the blockchain quite a lot faster when getting blocks before a checkpoint. – Nick ODell Feb 02 '13 at 20:25
  • AFAIK checkpoints are not used to improve performance of the initial chain download, and even if it did your client would still have to scan each single block and look at each single transaction in it in order to find transactions that are relevant to its wallet. – David Feb 02 '13 at 21:18
  • True, but it doesn't need to verify the signatures. I don't know how significant that is performance-wise. – Nick ODell Feb 02 '13 at 21:29
  • Verifying the signature takes a negligible amount of time, it's looking the inputs up that does. The initial download performance is I/O bound, not CPU bound. – David Feb 02 '13 at 23:00
  • That makes sense. You mention that the `IsStandard` check fails on transactions in some checkpoints. Do you have any examples? – Nick ODell Feb 02 '13 at 23:10
  • I never said that :) – David Feb 03 '13 at 09:19
  • let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/7366/discussion-between-nick-odell-and-david) – Nick ODell Feb 03 '13 at 16:23