Sometimes two miners find a valid block at nearly the same moment, at the same height. Part of the network sees one first, part sees the other. For a short while, two versions of the tip exist.
The tie breaks itself
Each miner keeps building on the block it saw first. Soon one side finds the next block and becomes heavier. Nodes on the other side switch to it: this switch is a reorganisation, a reorg. The abandoned block is called stale, often orphan.
Transactions from the stale block are not lost. Most were also in the winning block; the rest return to the mempool and are mined again. The miner of the stale block loses the reward, which is why miners want their blocks to travel fast.
- One block reorgs happen from time to time and are harmless.
- Two block reorgs are very rare.
- Deeper ones, without an attack, are essentially never seen.