If I understand it right, a stale block is a block for which an earlier confirmation has been found and was accepted by majority of people. This block is considered invalid and is later never used.

But what is a orphaned block. How is it created? How is it verified that it is orphaned and what is done to the orphaned block?

up vote 18 down vote accepted

Stale blocks:

At any second, a block may be "solved." This means that everyone else in the world working on that block must stop, and restart their work. Continuing to work after that point is known as working on a "stale block" because it is old data, and old transactions.

My understanding is the term stale is much more commonly applied to shares when mining in a pool, so you're more likely to hear about stale shares than stale blocks. In this case, the pool probably wouldn't even bother checking whether the share actually solved a block or not.

Orphaned blocks:

Detached or Orphaned blocks are valid blocks which are not part of the main chain. They can occur naturally when two miners produce blocks at similar times or they can be caused by an attacker (with enough hashing power) attempting to reverse transactions.

My own understanding is that orphaned blocks are initially accepted by the majority of the network, but are later rejected when proof of a longer blockchain is received that doesn't include that particular block.

This means that a user could see a transaction as having one confirmation and then, if a longer blockchain was received that didn't include the transaction, it could change back to 0 confirmations.

There are several definitions with overlapping meanings.

The first is perhaps best called extinct blocks. These are blocks that were produced by building on an block that is no longer the active tip of the chain. Some nodes may have considered it to be the best block at some point, but they switched to another chain which does not contain the relevant block anymore. They are valid, verified, and their ancestry up to the genesis block is fully known - they're just not currently 'active'. They are sometimes called stale blocks (typically in the context of mining software realizing it built on old data) or orphan blocks. The latter name originates from the fact that payouts from extinct blocks are denoted as "orphaned" in the reference client (referring to the fact that their coinbase transactions are now orphaned).

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.

Terminology is confusing here :)

  • Nice explanation Pieter, could you please elaborate on details of current download mechanism that Bitcoin Core uses? I wonder how it solves orphan block problem. – eugenekr Mar 19 at 16:46
  • 1
    @eugenkr The headers are downloaded and validated first, before the client even requests block data. As a result, it will never receive blocks whose parents it doesn't know about. – Pieter Wuille Mar 19 at 17:11

Orphans are not in the chain (as seen by the processing node) because their parents are missing, stales are not in the chain because they have no children in the chain.

Source: the glossary at bitcoin.org:

stale blocks are: "Blocks which were successfully mined but which aren’t included on the current best block chain, likely because some other block at the same height had its chain extended first."

and orphan blocks are: "Blocks whose parent block has not been processed by the local node, so they can’t be fully validated yet."

  • 1
    "Orphans are not in the chain because they have no parents in the chain" this statement is wrong. orphaned blocks have "parent"-blocks which are part of the blockchain – anion Apr 2 at 17:13

Both answers are quite good and explain well about the concept of orphaned block (or more precise name according to Pieter Wuilie: extinct blocks). I just want to give a specific view for the future readers who could also want to take a look at the real orphan blocks in Bitcoin chain, just like me:)

In blockchain.info website, there are some detailed record for those orphaned blocks, if you click the block height, even the block header info of those orphaned blocks are there for you, for example an orphaned block 503949 mined by SlushPool.

It also has a statistics view of orphaned blocks, I download its csv history and can calculate Bitcoin orphaned block rate is about 0.31% (from 2014/3/18 to 2017/6/14). The statistic excel file is here.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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