BITCOIN MAINNETLive explorer status
THE SHARED RECORD

The longest chain (most work) rule

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.

When chains compete, nodes follow the one with the most accumulated work100101102 (A)102 (B)103104B becomes stale: its transactions return to the mempoolnodes follow the chain with the most work
When chains compete, nodes follow the one with the most accumulated work

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

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.

Share this guide
Share on X ↗

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.