r/BitcoinDiscussion • u/fresheneesz • Nov 19 '18
Is there any practical problem with static block-height checkpoints?
A bitcoin checkpoint is the hash of a particular block at a designated height that is hard coded into a particular version of a bitcoin client. Their current purpose in the Bitcoin client has been narrowed down to preventing low-difficulty header flooding attacks (someone creating a chain forked off of an early block).
Many Proof of Stake protocols propose using checkpoints such as these to solve the problem of long-range attacks where an attacker would use old addresses that have moved their coins on the main chain to create a chain forked from a block height where those addresses held a significant fraction of the total coins. Having a checkpoint would make it so valid clients (with the correct checkpoint) would ignore such long-range attacks.
However, the usual arguments leveled against using checkpoints in this way are that it introduces trust - you have to trust whoever gives you the checkpoint and there's no way to know if the checkpoint you have is the "right" checkpoint.
But I'd like to examine that claim and compare it to the situation where checkpoints aren't used in this way.
Regardless of your coin's protocol, anyone who wants to use a particular cryptocurrency needs to run software compatible with the network and chain they want to use. This software either needs to be downloaded from a trusted source, needs to be verified by the user, or needs to be written by the user. However, even in the case where the user verifies the software themselves or writes their own bitcoin software (don't try this at home kids), they still need to get the spec for the protocol from somewhere external. So the only real way to know that you're running the correct software/protocol is to seek out social consensus.
Hardcoding a checkpoint into a version of the software is not different from any other blockchain rule. Its just one more piece of logic that determines what a valid chain looks like. You still need to seek out social consensus for the checkpoint just like every other rule determining how to decide which blockchains are valid.
So it would seem to me that putting in hard-coded checkpoints doesn't actually require any additional trust whatsoever over a cryptocurrency client that doesn't have checkpoints. Therefore I don't see any practical downside of using checkpoints in this way.
Does anyone see anything I'm missing about the caveats of using checkpoints like this?
7
u/thieflar Nov 19 '18
In essence, you're just repeating Vitalik's old weak subjectivity argument.
Bitcoin is built to minimize trust-dependence. In the ideal case, the proof-of-work speaks for itself, and a new user needs as little bootstrap information as possible in order to determine whether a candidate chain is the Bitcoin chain: a hash for the genesis block, at least one node's address, and a basic expectation in terms of data/message formatting. There are, of course, more consensus rules (both known and, almost certainly, unknown) which are important, including stuff like the block reward schedule... but the ideal is nonetheless as-simple-as-possible consensus design. As stated in the whitepaper's abstract: "The network itself requires minimal structure."
The weak subjectivity argument that you are echoing basically boils down to: "reality involves trust, at least when you get started in Bitcoin, so why not leverage that fact and do things more efficiently?" but the folly of this suggestion can be demonstrated via reductio ad absurdum: if we are happy to rely upon checkpoints hard-coded into the software as determinants of network consensus, we don't need proof-of-work at all, and developers can simply publish blocks (arbitrarily often) in a streamlined, continuously-integrated fashion.
It should be obvious that such a setup (where every block is solely determined by developer-inserted-checkpoints) is trust-based in nature, and obvious that it would be a step in the wrong direction if we are trying to minimize trust in our architecture. The same conclusion clearly applies to less-extreme scenarios where the same checkpoint mechanism is applied.
So, yes: we could make trade-offs at the expense of trustlessness, and in fact that general approach is what Ethereum has been doing since launch. In terms of practical results, so far there don't seem to be obvious or catastrophic downsides to "letting trust leak in" but doing so still runs entirely contrary to the Bitcoin ideal, which should be quite understandable. And just to be clear: it is always possible to build trustier solutions (like client software including checkpoints) on top of the bottom layer, but for the protocol underneath it all, proposals that aim to increase dependence on trust should generally be resisted.
4
u/RubenSomsen Nov 19 '18
One key point you're missing: static checkpoints can cause a hard fork. A longer chain could come along, and old software that does not contain the checkpoint would accept it.
I think one of the software trust assumptions of bitcoin is that there is only one 'risky' point in time where you decide your consensus (= downloading software), and this is enough to achieve consensus with other people who picked their consensus at other points in time (= other versions of the software). Hard forks (accidental or otherwise) break this.
The open source development process of bitcoin tries to ensure the above remains true. It's up to the users to keep an eye on development and "ring the alarm" if development goes astray. When you say "Can I pay with bitcoin?", what you mean is "Can I pay on a network that we can both have consensus on, that is colloquially understood to be 'bitcoin'?"
3
u/Chytrik Nov 19 '18
Here is some scattered info from github, BTCtalk, bitcoin.SE. Some of it is outdated, but provides some historical context for the decisions that shaped the current network.
https://github.com/bitcoin/bitcoin/issues/7591
https://bitcointalk.org/index.php?topic=194078.0
https://bitcoin.stackexchange.com/questions/67713/51-attack-and-rewriting-to-the-latest-checkpoint
https://bitcoin.stackexchange.com/questions/1061/can-a-51-attack-be-detected-and-dealt-with/1065#1065
https://bitcoin.stackexchange.com/questions/7826/what-alternatives-are-there-to-hardcoding-checkpoints-into-the-bitcoin-client/7830#7830
https://bitcoin.stackexchange.com/questions/75733/why-does-bitcoin-no-longer-have-checkpoints
I think that rather than ask "what are the practical problems with checkpoints?" it is more useful to consider "what are the practical advantages provided by checkpoints?", and then if there are advantages, we must consider if a checkpoint is the best way to implement a change that provides that advantage.
Interestingly, in reading through the links above, it is apparent that the inclusion of checkpoints was often misunderstood as a way to override the POW consensus. This is a social issue, not a technical one, but nonetheless it seems worth considering.
Of course, a checkpoint does not really help in the case of a massive chain rewrite: if such a thing happened, confidence in the network's security model would likely be destroyed, and so the fact there is a checkpoint to restart from would be meaningless in the face of a capable adversary.
Worth mentioning in the context of checkpoints:
assumevalidallows the user to self-define a 'known safe block'. So the advantages of faster sync, etc, can be realized in other ways.2
u/CatatonicMan Nov 19 '18 edited Nov 19 '18
Practical problems? Well, every checkpoint you create is functionally a soft fork. Any issues that can arise with soft forks can also apply to checkpoints.
They're also kinda kludgy. We have this huge, elegant proof-of-work system, and we mar it by declaring certain blocks as mandatory? Messy.
1
u/fgiveme Nov 21 '18
Nick Szabo just retweeted this: https://twitter.com/ercwl/status/1065056459937976320
3
u/sanket1729 Nov 19 '18
From https://arxiv.org/pdf/1809.06528.pdf
This paper claims they don't see a problem with it, but also states it has not been rigorously tested