Bitcoin reaches consensus without any central authority through a specific set of rules — this is the post that ties Parts 2 and 3 together into an actual working system. You now know how keys and signatures prove ownership. But proving you signed a transaction doesn’t answer a much harder question: in a network of thousands of computers that don’t trust each other, with no central authority, how does everyone agree on the single, correct order of transactions?
How Bitcoin Reaches Consensus: The Problem to Solve
This is a formal, well-studied problem in computer science called the Byzantine Generals Problem: a system where components can fail or act maliciously, and there’s no way to be certain whether any given component is being honest. In a centralized system, this is trivial to solve — the central database is the truth, full stop, timestamps and all. In a decentralized one, it’s genuinely hard: who decides which transaction is valid when different nodes receive conflicting information at different times, with real network delays between them?
Proof-of-Work: Bitcoin’s Solution
Bitcoin’s answer is Proof-of-Work. Miners compete to solve a cryptographic puzzle: given a target value, find an input (a “nonce”) that, when combined with the block’s data and hashed, produces an output below that target. There’s no clever shortcut — the only strategy is brute force, trying random numbers as fast as your hardware allows. Thanks to the avalanche effect from Part 2, there’s no way to predict which nonce will work; you just have to keep guessing.
Whoever finds a valid nonce first gets the right to add the next block to the chain, and is rewarded with newly created Bitcoin — the only mechanism by which new BTC comes into existence. Everyone else on the network can verify the winning solution almost instantly (checking a hash is fast, even though finding one is slow), so the block gets accepted quickly once found.
Mining is a brute-force search: try random numbers until one happens to hash into the target range.
Solving Double-Spending
Here’s the double-spend problem in plain terms: since a digital transaction is just data, what stops someone from broadcasting the same coins to two different recipients at once? The answer lies in how information propagates and how conflicts get resolved:
Transactions spread across the network gradually (a process nicknamed “flooding” or “gossip”), taking a few seconds. Blocks propagate similarly.
Because of these small delays, different nodes can briefly hold different views of the “current” state of the ledger.
When two valid blocks appear near-simultaneously, the network doesn’t stop to argue — it follows a simple rule: always build on the longest valid chain. Whichever block most of the network happened to receive and start mining on first tends to win out, and the other becomes an orphaned block, discarded.
To successfully “double spend,” an attacker would need to consistently out-mine the rest of the entire network for several blocks in a row — an endeavor whose cost scales directly with the total hashing power securing the network. This is why merchants and exchanges wait for multiple confirmations (commonly six blocks) before treating a large transaction as final: the cost of faking six blocks in a row against the honest majority becomes prohibitively, often absurdly, expensive relative to almost any transaction size.
When the network briefly forks, it doesn’t stop to vote — it just keeps mining, and the longer branch becomes the accepted history.
What’s Actually Inside a Block
A Bitcoin block header is a compact 80 bytes containing: a hash of the previous block’s header (that’s the “chain” part), a nonce, a timestamp, and something called a Merkle root.
Everything inside an 80-byte Bitcoin block header — a remarkably small amount of data to secure an entire block.
The Merkle root deserves its own explanation because it’s a genuinely clever piece of engineering. Rather than hashing every transaction in a block together into one giant blob, transactions are paired up and hashed, those hash-pairs are paired up and hashed again, and so on up a tree structure until you’re left with a single hash at the top — the Merkle root.
A Merkle tree: every box above the data layer is just the hash of the two boxes below it.
The payoff: you can cryptographically prove a specific transaction is included in a block using only a small handful of hashes (a “Merkle proof”), without downloading every transaction in that block. This is exactly how lightweight “SPV” wallets — like the Bitcoin app on your phone — verify transactions without storing the entire multi-hundred-gigabyte blockchain. Full nodes, by contrast, download and verify everything, acting as the network’s enforcement layer for the consensus rules.
What’s Actually Changed Since 2020
The mechanics above haven’t changed at all — this is still exactly how Bitcoin works in 2026. What has changed is the scale and the economics around it. Bitcoin has been through another halving (April 2024, cutting the block reward again), pushing miners further toward relying on transaction fees over time. Mining pool concentration — a real concern even in the original course material, where a handful of pools controlled the majority of hashrate — remains a live topic that on-chain analysts still track closely (more on the tools for that in Part 11). And the energy-consumption critique that dominated headlines a few years ago has shifted meaningfully, with a growing share of mining now documented as using stranded, flared, or otherwise underutilized energy sources rather than displacing grid capacity — a genuinely more nuanced picture than the “Bitcoin is a top-40 country’s worth of energy use” framing from a few years back.
This is Part 4 of a 15-part series. Part 5 moves from Bitcoin to Ethereum: smart contracts, gas, and the “world computer.”Part 1 is here
What is blockchain, really? I studied this material properly, in an MBA-level ‘Cryptoeconomics & Blockchain Technologies’ course a few years back, and I’ve been sitting on the notes ever since. The goal of this series isn’t to rewrite a blockchain textbook. It’s to take what I learned then, separate the concepts that aged well from…
The Cryptography That Actually Powers Bitcoin Bitcoin cryptography is usually explained with hand-wavy metaphors, so let’s not do that here. Most explainers wave their hands at “cryptography secures the blockchain” and move on. I’d rather not do that — partly because the actual math is genuinely elegant, and partly because understanding it changes how you…
This is the post in this series where my old course notes are most out of date — and honestly, that’s exactly why it’s worth writing. Going back through the original slides, they describe Ethereum (the version for ETH 2.0) as a future, three-phase upgrade, with sharding as part of “phase two,” and a supply…