<p>Bitcoin Core does not discard stale blocks. All blocks which are on a most-work headers chain (except those known to be invalid) are downloaded, and once downloaded, no block is discarded (unless pruning is enabled, in which case all blocks older than a certain age are discarded, stale or not).</p>
<p>It is very much possible to flip-flop between two valid chains, if they are alternatingly extended. This doesn't even require an attack, though it becomes less and less likely to continue this pattern as the length of the chains since the fork point grows.</p>

CC BY-SA 4.0
2022-09-20T13:56:14.090Z
Can an attacker indefinitely flip-flop if he always control 51% hash rate?
offchan
CC BY-SA 4.0
2022-09-20T13:30:12.857Z
2022-09-20T13:30:12.857Z
Pieter Wuille
<p>I believe you are right. Bitcoin nodes must mark stale blocks as stale but not discard them completely. As you note, the node knows they are not part of the current chain. It is possible that a node may later find that a formerly stale block is now part of the &quot;longest&quot; chain. It must then be included in that node's active chain.</p>

CC BY-SA 4.0
2022-09-20T11:58:59.947Z
2022-09-20T11:58:59.947Z
RedGrittyBrick
<p>I know that stale blocks usually happen by accidents and the chain that has more blocks will be chosen as canonical chain by default and the stale chain is discarded.</p>
<p>My question is about what it means to be <em>discarded</em>?</p>
<p>Is it permanently discarded?</p>
<p>Or does it mean that if those stale blocks become longer (from 51% hash rate mining), they will stop being stale and be preferred by nodes?</p>
<p>I simply want to know whether it's possible to alternate mining between 2 chains making them roughly equal in length when you have 51% hash rate so that the network becomes useless. I think that it doesn't make sense that stale blocks are completely discarded. Because that means the longest-chain rule is not obeyed.
If you obey longest-chain rule, stale blocks must always have a chance to become part of the canonical chain no matter what.</p>

<stale-block>
Are stale blocks permanently discarded?
offchan
# Are stale blocks permanently discarded?

(Asked by: username_0 on 2022-09-20)

I know that stale blocks usually happen by accidents and the chain that has more blocks will be chosen as canonical chain by default and the stale chain is discarded.

My question is about what it means to be *discarded*?

Is it permanently discarded?

Or does it mean that if those stale blocks become longer (from 51% hash rate mining), they will stop being stale and be preferred by nodes?

I simply want to know whether it's possible to alternate mining between 2 chains making them roughly equal in length when you have 51% hash rate so that the network becomes useless. I think that it doesn't make sense that stale blocks are completely discarded. Because that means the longest-chain rule is not obeyed.
If you obey longest-chain rule, stale blocks must always have a chance to become part of the canonical chain no matter what.

**Tags:** stale-block


---

## 2 answers

### Answer by username_1 on 2022-09-20. Score: 2 | Accepted answer

Bitcoin Core does not discard stale blocks. All blocks which are on a most-work headers chain (except those known to be invalid) are downloaded, and once downloaded, no block is discarded (unless pruning is enabled, in which case all blocks older than a certain age are discarded, stale or not).

It is very much possible to flip-flop between two valid chains, if they are alternatingly extended. This doesn't even require an attack, though it becomes less and less likely to continue this pattern as the length of the chains since the fork point grows.

> **Comments:**
> **username_0**: Can an attacker indefinitely flip-flop if he always control 51% hash rate?  

---

### Answer by username_2 on 2022-09-20. Score: 1

I believe you are right. Bitcoin nodes must mark stale blocks as stale but not discard them completely. As you note, the node knows they are not part of the current chain. It is possible that a node may later find that a formerly stale block is now part of the "longest" chain. It must then be included in that node's active chain.


---

