<blockquote>
  <p>For example if I owned 51%+ of the network, mined 1000 blocks privately and the rest of the network was at block 990 and then I broadcast the data would everyone switch to my chain and would the last 990 blocks be orphaned?</p>
</blockquote>

<p>This can certainly happen. There is no limit on how many blocks can be reorganized. However, while nodes will still perform the action to rollback those 900 blocks and replace them with the 1000 privately mined ones, there will be lots of warnings if this does happen as Bitcoin Core (the most commonly used node software) has checks for large work blockchain reorganizations. These checks will trigger warnings if there are reorgs of more than a few blocks so that the node operator can take action if necessary.</p>

CC BY-SA 4.0
2019-06-14T19:52:14.283Z
Can you explain more about what actions a node operator can take in such situations? (For example if it appears there is a 51% attack)
Jonathan Cross
CC BY-SA 4.0
2019-06-14T20:23:34.413Z
A node operator can explicitly mark a block as invalid using the `invalidateblock` command. This will mark that and all blocks that build on top of it to be invalid which then forces your node to use a different valid branch. In the situation posed in the question, node operators could use `invalidateblock` to mark the attacker's first block as invalid and thus they will continue to use the chain that they were on originally.
Ava Chow
CC BY-SA 4.0
2018-07-30T15:59:42.590Z
2018-07-30T15:59:42.590Z
Ava Chow
<p>I was wondering if we where to ever face a 51% attack is there some sort of limit as to when the longest chain doesn't matter? For example if I owned 51%+ of the network, mined 1000 blocks privately and the rest of the network was at block 990 and then I broadcast the data would everyone switch to my chain and would the last 990 blocks be orphaned?</p>

<security><difficulty><attack><majority-attack>
Is there a limit to how many blocks can be rolled back from a 51% attack?
Toodarday
# Is there a limit to how many blocks can be rolled back from a 51% attack?

(Asked by: username_0 on 2018-07-29)

I was wondering if we where to ever face a 51% attack is there some sort of limit as to when the longest chain doesn't matter? For example if I owned 51%+ of the network, mined 1000 blocks privately and the rest of the network was at block 990 and then I broadcast the data would everyone switch to my chain and would the last 990 blocks be orphaned?

**Tags:** security, difficulty, attack, majority-attack


---

## 1 answers

### Answer by username_1 on 2018-07-30. Score: 2 | Accepted answer

> For example if I owned 51%+ of the network, mined 1000 blocks privately and the rest of the network was at block 990 and then I broadcast the data would everyone switch to my chain and would the last 990 blocks be orphaned?

This can certainly happen. There is no limit on how many blocks can be reorganized. However, while nodes will still perform the action to rollback those 900 blocks and replace them with the 1000 privately mined ones, there will be lots of warnings if this does happen as Bitcoin Core (the most commonly used node software) has checks for large work blockchain reorganizations. These checks will trigger warnings if there are reorgs of more than a few blocks so that the node operator can take action if necessary.

> **Comments:**
> **username_2**: Can you explain more about what actions a node operator can take in such situations? (For example if it appears there is a 51% attack)  
> **username_1**: A node operator can explicitly mark a block as invalid using the `invalidateblock` command. This will mark that and all blocks that build on top of it to be invalid which then forces your node to use a different valid branch. In the situation posed in the question, node operators could use `invalidateblock` to mark the attacker's first block as invalid and thus they will continue to use the chain that they were on originally.  

---

