1

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 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?

2

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.

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.

  • 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 Jul 15 '15 at 8:39
  • 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. – Anonymous Jul 15 '15 at 8:45
  • 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 Jul 15 '15 at 8:50
  • 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. – Anonymous Jul 15 '15 at 8:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.