<p>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.</p>

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

CC BY-SA 4.0
2018-05-21T15:20:21.240Z
Could you provide proof/evidence that "most work" wins in bitcoin, and not the longest chain? I never seen this anywhere.
The Quantum Physicist
CC BY-SA 4.0
2018-05-21T14:56:55.393Z
2018-05-21T14:56:55.393Z
Jannes
<p>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.</p>

<p>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.</p>

<p>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. <strong>Is my description of the situation correct</strong>?</p>

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

<p>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.</p>

CC BY-SA 4.0
2018-05-21T16:36:29.480Z
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
CC BY-SA 4.0
2018-05-21T17:39:15.560Z
@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
CC BY-SA 4.0
2018-05-21T18:06:49.800Z
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: https://github.com/bitcoin/bitcoin/blob/v0.16.0/src/validation.cpp#L2586 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
CC BY-SA 4.0
2018-05-21T19:04:10.670Z
@PieterWuille Thanks. The code is enough evidence. Cheers!
The Quantum Physicist
<blockchain><mining-theory><hash><proof-of-work><attack>
Is the bitcoin blockchain really non-corruptible?
The Quantum Physicist
# Is the bitcoin blockchain really non-corruptible?

(Asked by: username_0 on 2018-05-21)

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.

**Tags:** blockchain, mining-theory, hash, proof-of-work, attack

> **Comments:**
> **username_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.  
> **username_0**: @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?  
> **username_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: https://github.com/bitcoin/bitcoin/blob/v0.16.0/src/validation.cpp#L2586 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).  
> **username_0**: @PieterWuille Thanks. The code is enough evidence. Cheers!  

---

## 1 answers

### Answer by username_2 on 2018-05-21. Score: 2 | Accepted answer

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.

> **Comments:**
> **username_0**: Could you provide proof/evidence that "most work" wins in bitcoin, and not the longest chain? I never seen this anywhere.  

---

