How does a block go stale?
Two miners find a valid block at almost the same moment. Both blocks spread across the network, and for a few seconds some nodes see one first while others see the other. Each node keeps the first it saw and builds on it.
The tie breaks with the next block. Whichever side it lands on becomes the chain with the most work, every node switches to it, and the other block drops out.
What happens to the reward and the transactions?
The stale block’s coinbase transaction isn’t in the main chain, so its reward never becomes spendable. Most of its payments were probably in the winning block as well. Any that weren’t go back to the mempool and get picked up by a later block.
This is the reason coinbase coins wait 100 blocks before they can be spent, and part of why exchanges wait for a few confirmations before crediting a deposit.
Orphan or stale: which is right?
In Bitcoin Core’s code the two are different. An orphan is a block whose parent a node hasn’t seen yet; a stale block is one that lost a race. Everyday speech uses “orphan” for both. Stale blocks are uncommon today, because new blocks cross the network in seconds.
Sources
- Orphan block · Bitcoin Wiki
- Block chain guide · Bitcoin developer documentation
- Bitcoin: A Peer-to-Peer Electronic Cash System · Satoshi Nakamoto, 2008
Live figures on this page come from the CloudMineCrypto API and public chain data, refreshed regularly, and are labelled where they appear. Educational only, not financial advice.