THAMER
Sovereign Bitcoin Wallet

WALLET AI BITCOIN

Your Bitcoin Wallet. Your Keys. Your Engine.

Self-hosted Bitcoin software built for developers, applications, and AI agents.

CREATE WALLET

Does Bitcoin Always Follow the Longest Blockchain?

permalink THAMER
#bitcoin-longest-chain#most-work#valid-chain-faq

No. The phrase "longest chain" is a common shorthand, but Bitcoin's relevant selection rule is the valid chain with the greatest accumulated proof of work, not simply the greatest number of blocks.

Why is block count insufficient?

Different difficulty targets imply different amounts of expected work per block. A chain's cumulative work therefore cannot be determined from its height alone.

Can an invalid chain win by adding more work?

No. A fully validating node rejects blocks that violate consensus rules. A higher-work chain containing invalid blocks is not an acceptable active chain for that node.

What happens during a reorganization?

If a competing valid branch has more accumulated work, a node can switch its active chain to that branch. Transactions in disconnected blocks may lose confirmations, so applications should account for reorganization risk.

Primary references

Bitcoin Developer Guide — Block Chain: https://developer.bitcoin.org/devguide/block_chain.html
Bitcoin whitepaper: https://bitcoin.org/bitcoin.pdf

Questions & Answers

Explore all questions →

Latest from the Lab

THAMER illustrated developer portrait and signature

ABOUT THE DEVELOPER

Independent Software Developer specializing in Bitcoin Script, Golang, and AI Agents.

Software engineering · Independent research · Open-source projects