Some people say that proof of work is better than proof of stake, because it's not possible to rewrite the whole blockchain on-spot. One would need to "re-mine" everything.

But I think this is not true! A hypothetical attacker can rewrite the whole bitcoin blockchain and make the timestamps make the block-time exactly 10 minutes, and this way the difficulty of mining will remain at minimum, and no real mining is required. The mining effort is minimal.

The way I understand it, is that such a problem is practically solved by check-pointing the blockchain in the source code. The devs hard-code block-hashes in the source code so that no one could do that. Is my description of the situation correct?

In other words: Without check-pointing, the bitcoin blockchain is inherently corruptible and can be destroyed. What am I missing here?

PS: This is not about PoW vs PoS. This is basically about the claim that PoW is non-corruptible. If my conclusions are true, we can just do the same with PoS blockchains and use check-pointing to prevent corruptibility.

  • 1
    Several incorrect assumptions here: by "longest chain" we refer to the chain with most work (not just most blocks), and checkpoints were a historical way to optimize synchronization speed which is being abolisbed (one of the reasons for abolishing it is actually due to it being prone to cause misunderstandings in Bitcoin's security model, like your question). If a checkpoint ever prevents an actual chain reorganization, PoW is completely broken. – Pieter Wuille May 21 '18 at 16:36
  • @PieterWuille The bitcoin whitepaper says longest chain and doesn't say most work. Can you please provide references (or code) that confirm that longest chain = most work? – The Quantum Physicist May 21 '18 at 17:39
  • 1
    The whitepaper only describes the rough idea behind Bitcoin's design, and the practical implementation differs and extends it in many ways (for example, the whitepaper doesn't say the coin supply is finite!). As for proof: github.com/bitcoin/bitcoin/blob/v0.16.0/src/… is where the code decides which branch to attempt to validate, and calls a function that finds the most work chain. But really, this is a very fundamental design property, and you'll see it described in many places (including in dozens of answers on this site). – Pieter Wuille May 21 '18 at 18:06
  • @PieterWuille Thanks. The code is enough evidence. Cheers! – The Quantum Physicist May 21 '18 at 19:04

Your attack wouldn't work because nodes take the most-work chain as leading, the number of blocks is irrelevant. Any attacking chain needs to spend at least as much work as was done for the original. This actually used to be a bug in the whitepaper and the initial bitcoin software implementation: it checked for the longest chain instead of most-work. It was fixed very early on.

Checkpoints are centralizing as they give devs power. They're no longer done in Bitcoin.

  • Could you provide proof/evidence that "most work" wins in bitcoin, and not the longest chain? I never seen this anywhere. – The Quantum Physicist May 21 '18 at 15:20

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