<p>I think this would be considered a <a href="https://bitcoin.stackexchange.com/questions/48503/how-does-a-time-warp-attack-work">time warp attack</a>.</p>

<p>What prevents this strategy from working is actually quite simple, as explained in <a href="https://bitcoin.stackexchange.com/a/37960/26673">https://bitcoin.stackexchange.com/a/37960/26673</a>:</p>

<blockquote>
  <p>Bitcoin nodes do not compare chains by their height. (Although they used to do this.) They calculate the total work in each chain (nChainWork), and compare by that. This is calculated by looking at the number of attempts it would take, on average, to find each block, and summing it.</p>
</blockquote>

<p>My question assumed that blockchains were compared by <strong>height</strong> — but they are actually compared by the <strong>amount of work</strong> encapsulated. So a chain mined with competitive difficulty would clearly represent more work than a forged one "solo mined" with a much lower difficulty reached per block.</p>

CC BY-SA 3.0
2017-12-21T20:41:40.833Z
I assume the other nodes would reject the malicious chain because it's blocks would have a nonce that does not actually create a hash lower than the difficulty. Is this assumption true?
Cedric Martens
CC BY-SA 3.0
2017-12-21T20:15:16.670Z
2017-12-21T20:15:16.670Z
natevw
<p>It looks like the <a href="https://bitcoin.stackexchange.com/questions/49036/where-is-difficulty-target-inserted">difficulty is deterministic</a>, but only if the timestamps are trusted.</p>

<p>What's to prevent a large miner from starting back much earlier in the chain (when difficultly was miniscule) and quickly making their own chain with forged timestamps? Wouldn't it be possible to quickly "catch up" and surpass the block height of the real chain, and thus convince clients to switch to a chain built with a non-competitive difficulty?</p>

<blockchain-fork><attack><forging><best-chain>
What prevents rewriting the history of a chain with a different difficulty?
natevw
# What prevents rewriting the history of a chain with a different difficulty?

(Asked by: username_0 on 2017-12-21)

It looks like the [difficulty is deterministic](https://bitcoin.stackexchange.com/questions/49036/where-is-difficulty-target-inserted), but only if the timestamps are trusted.

What's to prevent a large miner from starting back much earlier in the chain (when difficultly was miniscule) and quickly making their own chain with forged timestamps? Wouldn't it be possible to quickly "catch up" and surpass the block height of the real chain, and thus convince clients to switch to a chain built with a non-competitive difficulty?

**Tags:** blockchain-fork, attack, forging, best-chain


---

## 1 answers

### Answer by username_0 on 2017-12-21. Score: 5 | Accepted answer

I think this would be considered a [time warp attack](https://bitcoin.stackexchange.com/questions/48503/how-does-a-time-warp-attack-work).

What prevents this strategy from working is actually quite simple, as explained in <https://bitcoin.stackexchange.com/a/37960/26673>:

> Bitcoin nodes do not compare chains by their height. (Although they used to do this.) They calculate the total work in each chain (nChainWork), and compare by that. This is calculated by looking at the number of attempts it would take, on average, to find each block, and summing it.

My question assumed that blockchains were compared by **height** — but they are actually compared by the **amount of work** encapsulated. So a chain mined with competitive difficulty would clearly represent more work than a forged one "solo mined" with a much lower difficulty reached per block.

> **Comments:**
> **username_1**: I assume the other nodes would reject the malicious chain because it's blocks would have a nonce that does not actually create a hash lower than the difficulty. Is this assumption true?  

---

