<blockquote>
  <p>Don't we actually mean stale blocks when talking in context of selfish mining?</p>
</blockquote>

<p>You <em>always</em> mean stale blocks, never orphan ones. </p>

<p>An orphan block is one that you can not connect to your local chain because you are missing a parent, in the current version of the software you can never get into the situation where this happens. When most people are talking about an "orphan block" they mean "stale block", the syncing behavior is not something users ever come into contact with. </p>

<p>This misnomer comes from when users mined with <code>bitcoin-qt</code>, when a block became stale the transaction paying the coinbase output into their wallet would gain the tag "orphaned". People associated the term "orphan transaction" with "orphan block" incorrectly, not helped by the fact that many popular websites also use this term to describe stale blocks as well. </p>

<p><img src="https://i.sstatic.net/FcJzK.png" alt="An incorrect website showing the term orphan block."></p>

<blockquote>
  <p>Furthermore I'd love to know if and which of stale or orphaned blocks are pruned from history? </p>
</blockquote>

<p>They are retained on disk in case they are used again in the future. There is no process for removing stale blocks from disk specifically. </p>

CC BY-SA 3.0
2015-07-15T08:39:44.723Z
Thanks! So could you please say in what cases Blocks are pruned, because I think I missed out something there as I have always been imagining the blockchain rather as a "block-tree" whose subbranches are never pruned!?
Aliakbar Ahmadi
CC BY-SA 3.0
2015-07-15T08:45:50.210Z
I removed the comment about autoprune, in hindsight it's not relevant to this question. There's no reason to keep stale branches of the block chain around once it is obvious they will not be extended, removing them does nothing to damage the integrity of the chain.
Claris
CC BY-SA 3.0
2015-07-15T08:50:00.927Z
ok i see, but pruning stale Blocks became a relevant point for me as I was trying to understand the credibility of claims that say you cannot fully rely on staled blocks' number as an indicator for selfish mining since staled blocks are pruned!?
Aliakbar Ahmadi
CC BY-SA 3.0
2015-07-15T08:52:50.790Z
They aren't pruned, they are retained on disk *unless* a user is running with `prune` set in the configuration, in which case most old blocks are discarded. Nodes don't have any real use for blocks once they have been processed except for when they need to reorganize onto a different branch of the chain, or when a peer needs to sync from the network and asks them to send over a block. There's no statistics about how many stale blocks exist, I'm not sure the bitcoin core interface even gives you a list of the ones it knows about.
Claris
CC BY-SA 3.0
2015-07-15T07:46:37.090Z
2015-07-15T08:42:11.563Z
2015-07-15T08:42:11.563Z
Claris
<p>In terms of a selfish attack many sources speak of orphaned blocks, i.e. blocks that are not on the main chain and thus not paying any coinbase transaction to its miner. Still I'm not sure and confused by terminology. </p>

<p><strong>Don't we actually mean stale blocks when talking in context of selfish mining?</strong></p>

<p>Despite an answer by Pieter Wuille to a <a href="https://bitcoin.stackexchange.com/questions/5859/what-are-orphaned-and-stale-blocks">similar question</a> I'm not sure which type would apply to a block outside the best chain in a selfish mining scenario.</p>

<p>Here's an extract to Pieter's answer:</p>

<blockquote>
  <p>However, there also exist real orphan blocks, with orphan in its original meaning of "having no parent". These are blocks received by a node that does not have its entire ancestry (yet) and thus cannot be validated. Nodes keep such blocks in memory, while asking their peers to fill in the gap of their history. The client does not show these, so when people talk about orphan blocks, they are most likely referring to extinct blocks. Note that since Bitcoin Core v0.10, there are no such orphan blocks anymore, due to a significant change in the download mechanism.</p>
</blockquote>

<p>Furthermore I'd love to know if and which of <strong>stale or orphaned blocks are pruned</strong> from history? And in what time intervals, if so?</p>

<blockchain><validation><orphaned-blocks><stale-block><selfish-mining>
Selfish Mining: stale or orphan?
Aliakbar Ahmadi
# Selfish Mining: stale or orphan?

(Asked by: username_0 on 2015-07-15)

In terms of a selfish attack many sources speak of orphaned blocks, i.e. blocks that are not on the main chain and thus not paying any coinbase transaction to its miner. Still I'm not sure and confused by terminology.

**Don't we actually mean stale blocks when talking in context of selfish mining?**

Despite an answer by Pieter Wuille to a [similar question](https://bitcoin.stackexchange.com/questions/5859/what-are-orphaned-and-stale-blocks) I'm not sure which type would apply to a block outside the best chain in a selfish mining scenario.

Here's an extract to Pieter's answer:

> However, there also exist real orphan blocks, with orphan in its original meaning of "having no parent". These are blocks received by a node that does not have its entire ancestry (yet) and thus cannot be validated. Nodes keep such blocks in memory, while asking their peers to fill in the gap of their history. The client does not show these, so when people talk about orphan blocks, they are most likely referring to extinct blocks. Note that since Bitcoin Core v0.10, there are no such orphan blocks anymore, due to a significant change in the download mechanism.

Furthermore I'd love to know if and which of **stale or orphaned blocks are pruned** from history? And in what time intervals, if so?

**Tags:** blockchain, validation, orphaned-blocks, stale-block, selfish-mining


---

## 1 answers

### Answer by username_1 on 2015-07-15. Score: 2 | Accepted answer

> Don't we actually mean stale blocks when talking in context of selfish mining?

You *always* mean stale blocks, never orphan ones.

An orphan block is one that you can not connect to your local chain because you are missing a parent, in the current version of the software you can never get into the situation where this happens. When most people are talking about an "orphan block" they mean "stale block", the syncing behavior is not something users ever come into contact with.

This misnomer comes from when users mined with `bitcoin-qt`, when a block became stale the transaction paying the coinbase output into their wallet would gain the tag "orphaned". People associated the term "orphan transaction" with "orphan block" incorrectly, not helped by the fact that many popular websites also use this term to describe stale blocks as well.

![An incorrect website showing the term orphan block.](https://i.sstatic.net/FcJzK.png)

> Furthermore I'd love to know if and which of stale or orphaned blocks are pruned from history?

They are retained on disk in case they are used again in the future. There is no process for removing stale blocks from disk specifically.

> **Comments:**
> **username_0**: Thanks! So could you please say in what cases Blocks are pruned, because I think I missed out something there as I have always been imagining the blockchain rather as a "block-tree" whose subbranches are never pruned!?  
> **username_1**: I removed the comment about autoprune, in hindsight it's not relevant to this question. There's no reason to keep stale branches of the block chain around once it is obvious they will not be extended, removing them does nothing to damage the integrity of the chain.  
> **username_0**: ok i see, but pruning stale Blocks became a relevant point for me as I was trying to understand the credibility of claims that say you cannot fully rely on staled blocks' number as an indicator for selfish mining since staled blocks are pruned!?  
> **username_1**: They aren't pruned, they are retained on disk *unless* a user is running with `prune` set in the configuration, in which case most old blocks are discarded. Nodes don't have any real use for blocks once they have been processed except for when they need to reorganize onto a different branch of the chain, or when a peer needs to sync from the network and asks them to send over a block. There's no statistics about how many stale blocks exist, I'm not sure the bitcoin core interface even gives you a list of the ones it knows about.  

---

