Revision · Consensus — Proof of Work & Mining
Part 4 turned “Nakamoto consensus” from a slogan into mechanics: how a leaderless crowd of strangers agrees on one history by making influence cost energy and defining truth as the chain with the most work behind it.
What this part covered
Section titled “What this part covered”- Proof of work as a lottery — a hash is an unsteerable uniform random number, so finding a header below the target is brutally hard to produce but trivial (one hash) to verify, and that asymmetry is what lets a skeptic trust a block without trusting the miner.
- Energy as Sybil resistance — identities are free to fake but electricity is not, so rationing “who extends the ledger” by expended hashes is what defeats costless impersonation of the network.
- Target, bits & difficulty — the target is a 256-bit finish line packed into the compact 4-byte
bitsfield, and difficulty is the human-friendly ratiogenesis_target / current_target; a lower target means a narrower winning zone, hence harder mining. - Difficulty retargeting — every 2016 blocks the network re-prices the target from the headers’ own timestamps to hold the ~10-minute average steady across ~14 orders of magnitude of hashrate, clamped to ±4× and burdened with the frozen timewarp bug.
- The mining process — the 4-byte nonce (~4.3 billion tries) exhausts instantly, so miners roll the coinbase extranonce to rebuild the Merkle root and the timestamp too; mining is pure brute-force search where only hashrate differs.
- Mining pools & shares — solo mining is a memoryless Poisson lottery, so pools smooth variance by paying for low-difficulty shares (PPS vs PPLNS shifts who bears the luck), concentrating block construction but never the power to break consensus rules.
- The most-work chain — honest nodes follow the tip with the greatest cumulative work (not most blocks), so reversing a
k-deep transaction costs work that grows exponentially — the basis of probabilistic finality and the 6-confirmation convention. - Subsidy, halving & the 21M cap — new coins exist only as the subsidy, which halves every 210,000 blocks; the geometric series sums to ~21 million, and the engineered fade to fee-only security is a genuinely open question.
The takeaway
Section titled “The takeaway”Each piece reinforces one idea: work is expensive to produce, cheap to verify, and objective to measure, so “most accumulated work wins” becomes an arithmetic fact rather than an opinion. That is how untrusting strangers converge on a single ledger with no leader and no vote. Part 5 moves from how blocks are agreed on to how they travel — the peer-to-peer network that carries transactions and blocks to every independent verifier.