bitcoin/bitcoin — pull request #2910 by ashleyholman (2013-08-19 13:17:59+00:00)
Title: Don't store or send blocks forked before last checkpoint.

This is a proposed solution for the "Fingerprint via weak-chain block submission" issue (#2757).

Before storing a block, a check is done to see if it is at a height lower than last checkpoint. If so, it is not stored. (By definition, last checkpoint implies we have the whole chain up until last checkpoint, so we do not need to store any new blocks at those heights).

A similar check is done before serving a request for a block at a pre-checkpoint height. If it's not in the main chain, it could be a fingerprint block. There is no point serving this block to anyone as it is a fork from the checkpointed chain, so the request is dropped.

Although fingerprinting would be possible by generating a block higher than last checkpoint, it would be economically prohibitive to do so.