Chain Reorganization (Reorg)
A chain reorganization is a process in which a blockchain node switches from its current canonical chain to a longer or more difficult valid branch.
Causes: 1. Network [latency](/en/terms/network-latency) (Natural forks). 2. 51% Attacks (Malicious reorgs). 3. Buggy clients. Effects: Transaction reversals, increased confirmation times, potential for double-spending. Key metrics: Reorg depth, Orphan block rate.
graph LR
Center["Chain Reorganization (Reorg)"]:::main
Rel_distributed_computing["distributed-computing"]:::related -.-> Center
click Rel_distributed_computing "/terms/distributed-computing"
Rel_double_spending["double-spending"]:::related -.-> Center
click Rel_double_spending "/terms/double-spending"
classDef main fill:#7c3aed,stroke:#8b5cf6,stroke-width:2px,color:white,font-weight:bold,rx:5,ry:5;
classDef pre fill:#0f172a,stroke:#3b82f6,color:#94a3b8,rx:5,ry:5;
classDef child fill:#0f172a,stroke:#10b981,color:#94a3b8,rx:5,ry:5;
classDef related fill:#0f172a,stroke:#8b5cf6,stroke-dasharray: 5 5,color:#94a3b8,rx:5,ry:5;
linkStyle default stroke:#4b5563,stroke-width:2px;
🧒 Explain Like I'm 5
Imagine two groups of people are building two different brick walls (branches) at the same time. You are standing by one wall, thinking it's the main one. Suddenly, you look over and see that the other group has built a much taller and stronger wall. According to the rules, everyone must follow the tallest wall. So, you have to stop what you're doing, clear away your recent bricks, and go help build the taller wall instead. That's a chain reorg.
🤓 Expert Deep Dive
The probability of a reorg decreases exponentially with block depth. In Bitcoin, 6 confirmations (~1 hour) is considered statistically safe against deep reorgs. Technically, when a reorg occurs, the node identifies the 'Common Ancestor' of the two branches, rolls back the state to that point, and then reapplies the transactions from the new winning branch. Transactions from the discarded blocks are returned to the 'Mempool' and usually included in subsequent blocks. Modern Proof-of-Stake (PoS) systems like Ethereum 2.0 introduce 'Finality' (Casper FFG), where after a certain point (~12.8 minutes), a reorg becomes mathematically impossible without destroying a significant portion of the total staked capital (Slashing).