Proof of Work in Depth
Satoshi’s synthesis gave us the slogan: make influence cost real energy, and define truth as the chain with the most work behind it. This page makes the first half concrete. What is “work,” mechanically? Why can’t you fake it, cheat it, or shortcut it? The answer is one of the most elegant uses of a hash function ever devised — and once you see it, the whole security model of Bitcoin clicks into place.
The one-way street we exploit
Section titled “The one-way street we exploit”Recall the defining property of a cryptographic hash like double-SHA-256 (SHA256(SHA256(x)), the
function Bitcoin actually uses on block headers): it is fast to compute forward and
impossible to invert. Given input x, you get the 256-bit digest instantly. But given a target
digest, there is no known way to find an input that produces it short of trying inputs one by
one. There’s also the avalanche effect: flip a single bit of the input and roughly half the
output bits flip, unpredictably.
These two facts together mean a hash output is, for all practical purposes, a uniformly random 256-bit number you cannot steer. You can’t aim for a particular output. You can only roll the dice and see what comes up.
That is the raw material. Proof of Work is the lottery built on top of it.
The puzzle: get under the target
Section titled “The puzzle: get under the target”Every block has an 80-byte header that summarizes the block (previous block’s hash, a
commitment to all its transactions, a timestamp, the difficulty setting, and a 4-byte nonce). The
mining rule is brutally simple:
Find a header whose double-SHA-256 hash, read as a number, is less than or equal to the target.
The target is a big 256-bit threshold. A smaller target means fewer valid hashes, so the puzzle
is harder. Because the hash output is effectively a uniform random number in [0, 2²⁵⁶), your
chance that any single hash lands below the target is exactly:
P(one hash wins) = target / 2²⁵⁶If the target is, say, the top 1/1,000,000,000,000 of the range, then on average you must hash about
a trillion headers before one comes up valid. There is no cleverness available — you change
something in the header (the nonce, and other fields we cover in the mining
process), re-hash, and check. Win or roll again.
nonce = 0 → hash = 9c4f...e1 (too big — fail) nonce = 1 → hash = 3a7b...88 (too big — fail) nonce = 2 → hash = f019...0c (too big — fail) ... ( ~trillions of tries ) nonce = N → hash = 0000000000a3... (below target — WIN, broadcast block)The asymmetry: the whole point
Section titled “The asymmetry: the whole point”Here is the magic, and it’s worth saying slowly. Producing a valid block requires a vast number of hash attempts. But verifying one requires exactly one hash:
PRODUCE a block: ~trillions of SHA256d evaluations (months of a laptop; seconds of a farm) VERIFY a block: 1 SHA256d evaluation, then compare to target (microseconds, on anything)This is the same one-way asymmetry as a Sudoku or a jigsaw: hard to solve, instant to check. It is the property that makes the entire system work without trust. Any node — even a hobbyist’s on a Raspberry Pi — can confirm in microseconds that a block represents real expended work, without redoing that work and without trusting the miner who made it. Proof of Work is proof you can hand to a skeptic.
Why this ties influence to real-world energy
Section titled “Why this ties influence to real-world energy”A hash attempt is not free. Each one is a physical computation: transistors switch, current flows, heat is dumped into the room. To make trillions of attempts per second you buy specialized hardware (ASICs) and feed it electricity — a bill denominated in the real economy. So the rate at which you can produce blocks is proportional to the real energy and capital you pour in.
This is exactly how Proof of Work defeats the Sybil problem. Identities are free to fake; energy is not. You can pretend to be a million nodes, but you cannot pretend to have spent a million nodes’ worth of electricity — the failed-hash footprint simply won’t be there. Influence over which block comes next is rationed by a scarce physical resource that no amount of software trickery can counterfeit.
The thread
Section titled “The thread”How does this help untrusting strangers agree on one ledger? Proof of Work converts the cheap, forgeable act of “asserting the next block” into an expensive, physically grounded, instantly verifiable act. Strangers don’t have to trust the miner’s identity, intentions, or honesty — they only have to check one hash. The work is the credential. When we later say honest nodes follow the chain with the most work, this page is what makes that rule meaningful: each unit of work is a unit of unforgeable, real-world cost stacked behind the history.
Check your understanding
Section titled “Check your understanding”- Which two properties of double-SHA-256 make a hash output behave like a uniform random number you can’t steer?
- State the probability that a single hash attempt produces a valid block, in terms of the target.
- Explain the production-vs-verification asymmetry and why it’s essential to a trustless system.
- Why is “expected number of hashes” the correct way to measure a block’s work, rather than the actual number of tries the lucky miner made?
- How does the energy cost of a hash attempt defeat Sybil attacks where free identities could not?