Bitcoin nodes follow the valid chain with the most accumulated proof of work, not simply the most blocks. Learn why and how this creates agreement.
Most work, not most blocks
People say "the longest chain wins", but the real rule is: nodes follow the valid chain with the most total proof of work (called "chainwork"). Normally that's the same thing, but a chain of many easy blocks can't beat a shorter chain of much harder blocks.
Only valid chains count
Work alone isn't enough. A chain containing even one invalid block, such as one that creates too much bitcoin, is ignored no matter how much work it has. Every node checks every block itself. See Consensus rules.
Why this creates agreement
- Honest miners build on the best chain they know.
- Any split resolves as soon as one side gets ahead. See Stale blocks and chain reorganizations.
- An attacker wanting to rewrite history must out-work everyone else combined. See The 51% attack.
A thought experiment
Imagine an attacker builds 1,000 easy blocks at a low difficulty while the real chain adds 10 hard ones. The attacker's chain has more blocks but far less total work, so every node ignores it. Comparing work, not length, closes that loophole.
Where is chainwork shown?
Bitcoin Core reports chainwork for every block header: a running total of expected hashes. It only ever increases along the best chain.
Key takeaways
- Nodes follow the valid chain with the most cumulative proof of work.
- Invalid blocks are rejected regardless of work.
- This rule lets thousands of nodes agree without a coordinator.
Common questions
What is chainwork?
The total expected number of hashes needed to produce every block in the chain.
Could a longer chain with less work win?
No. Nodes compare total work, not block count.
Why is it called the longest chain rule?
In normal conditions the chain with the most work is also the longest, so the shorthand stuck.
Can a chain with more work but invalid blocks win?
No. Nodes reject invalid blocks, whatever work they carry.