Forks, Consensus, and the Longest Chain
The Concept
Mining is probabilistic, and occasionally two miners solve a valid block at nearly the same moment. When that happens, different parts of the network hear about different blocks first, and for a short time the network has two competing versions of the latest block — a fork. Bitcoin resolves this without a vote or an arbiter, using a simple, mechanical rule: every node follows the chain with the greatest total accumulated proof-of-work (informally called the "longest chain" rule, though the precise measure is cumulative difficulty, not simply block count). Whichever branch ends up with less accumulated work gets abandoned by the network, and any transactions that were only confirmed on the losing branch return to the mempool, unconfirmed, to be picked up again by a future block — they are not destroyed, just no longer considered confirmed.
This rule is what lets a fully decentralized network, with no central arbiter, always converge back to a single agreed history: every node can independently calculate which of several competing chains has more accumulated work just by comparing the chains it has received, and all honest nodes following the same rule reach the same conclusion. This is sometimes called an "accidental" or "natural" fork, distinguished from the deliberate, rule-changing soft forks and hard forks covered in Module 7 — an accidental fork resolves itself automatically within one or two blocks and requires no human decision at all, whereas a soft or hard fork is a planned protocol change that the community debates and adopts (or doesn't) over time.
It is worth distinguishing "cumulative difficulty" from "block count" precisely, since the two usually agree but are not technically the same measure. If one competing branch has fewer blocks but those blocks happened to be mined during a period of higher difficulty than a longer-looking competing branch, the shorter branch can in principle represent more total accumulated proof-of-work and would be the one every node adopts — the rule nodes actually apply is "most work," with "most blocks" serving as a close, practical shorthand in the overwhelming majority of real cases because difficulty rarely swings enough within a one- or two-block window to matter.
Worked Example
Two miners, one in Iceland and one in Singapore, each independently find a valid block 100 within the same few seconds — call them block 100a and block 100b, each containing a slightly different, but individually valid, set of transactions. Roughly half the network's nodes hear about 100a first and start building on it; the other half hear about 100b first and build on that instead. For a brief window, the network is split into two camps, each believing a different block 100 is the tip of the chain.
The tie breaks as soon as the next block is found. Suppose a miner building on top of 100a finds block 101 first and broadcasts it. Any node that had been following the 100a branch now has a chain of 101 blocks' worth of accumulated work; any node still on the 100b branch has only 100 blocks' worth once it sees block 101 announced. Every node, applying the identical rule, switches to the 100a/101 chain, because it now has strictly more accumulated proof-of-work. Block 100b is orphaned — abandoned by the network — and any transaction that appeared only in 100b (not also included somewhere in the winning chain) goes back into the mempool to be re-mined into a future block.
Now consider the miner who found block 100b. Having mined a now-orphaned block, they lose the block subsidy and fees they would otherwise have collected — this is the real economic risk miners accept every time they mine, since any block they find could still be orphaned if a competing block wins the race to be extended first. This risk is part of why mining pools (from "mining-and-proof-of-work") exist: smoothing a single participant's income over many blocks reduces the practical impact of any one block being orphaned.
Extend the example one step further to see why merchants and exchanges wait for multiple confirmations before treating a payment as final. Suppose a payment is confirmed in block 100a, and the network then builds five more blocks on top of it (105a through to the current tip) without any further forks. Reversing that payment now would require an attacker to somehow produce an alternative chain, starting from before block 100a, that accumulates more total proof-of-work than the entire honest network has produced across six-plus blocks since — a cost that grows directly with every additional confirmation, which is exactly why "one confirmation" and "six confirmations" carry very different practical risk for a large payment.
Exercise
Explain why a transaction that only appeared in the orphaned block (100b) is not lost permanently — reference what happens to it once its block is abandoned. Then explain why waiting for multiple confirmations (several blocks mined on top of the one containing your transaction) makes this kind of reversal increasingly unlikely the older a transaction gets — tie your answer to the proof-of-work cost from "the-blockchain": each additional confirmation means an attacker trying to reverse that transaction would have to out-mine the honest network by a larger and larger margin. Finally, explain in one or two sentences why the rule nodes actually apply is "most accumulated proof-of-work" rather than simply "longest chain by block count," and why the two measures almost always agree in practice anyway.
Recap
- A fork happens when two valid blocks are found at nearly the same time; nodes temporarily see different versions of the latest block, and this resolves automatically without any human decision.
- The network converges using the rule "follow the chain with the most accumulated proof-of-work" — not simply the most blocks — no vote, no arbiter, just a calculation every node can verify independently.
- Transactions in an orphaned block return to the mempool rather than being lost, more confirmations make a transaction progressively harder to reverse because an attacker must out-produce more and more accumulated honest work, and the miner of an orphaned block forfeits the subsidy and fees they would otherwise have earned.
Resources
- Satoshi Nakamoto, "Bitcoin: A Peer-to-Peer Electronic Cash System" (bitcoin.org/bitcoin.pdf), Section 11, "Calculations."
- Bitcoin Wiki, "Orphan Block" (en.bitcoin.it/wiki/Orphan_Block).
- mempool.space — view recent chain tips and reorg history.