前置知识
Blockchain: Trust Without Trustees
Satoshi Nakamoto's Bitcoin whitepaper introduced a mechanism for consensus without central authority — and sparked a revolution in decentralized systems.
TL;DR
Digital money had been attempted for decades — DigiCash, e-gold, Hashcash, b-money — but they all required a trusted third party to prevent the same coin from being spent twice. In October 2008, a pseudonymous author calling themselves Satoshi Nakamoto published a nine-page whitepaper describing Bitcoin: a peer-to-peer electronic cash system that solved the double-spending problem without any central authority. The mechanism was a distributed ledger — the blockchain — where transactions are grouped into blocks, each block linked to the previous one by a cryptographic hash, and the entire chain secured by proof-of-work: a competition where miners expend computational energy to earn the right to add the next block. The result was a system where trust comes from mathematics and economics, not institutions. Bitcoin launched in January 2009. The blockchain concept it introduced — distributed consensus through cryptographic proof — has since been applied to smart contracts, decentralized finance, and digital ownership, though whether most of these applications deliver lasting value remains fiercely debated.
The Double-Spend Problem
Digital information can be copied perfectly. This is a feature for documents and music. It’s a fatal flaw for money.
If you have a digital file that represents $10, what stops you from copying it and spending it twice? In the physical world, handing someone a $10 bill means you don’t have it anymore. In the digital world, sending someone a file means you still have the original.
Every previous digital currency solved this with a trusted intermediary. A bank, a payment processor, a central server — someone who maintains the authoritative ledger and rejects duplicate transactions. Visa processes 65,000 transactions per second through centralized data centers. It works. But it requires trusting Visa.
Nakamoto’s question: can you build a payment system where no single entity controls the ledger?
The Whitepaper
On October 31, 2008 — six weeks after Lehman Brothers collapsed and the global financial system nearly imploded — Nakamoto posted “Bitcoin: A Peer-to-Peer Electronic Cash System” to a cryptography mailing list.
The paper was nine pages. It described a complete system:
- Transactions are broadcast to a network of peers
- Each node collects transactions into a block
- Nodes compete to solve a computational puzzle (proof-of-work)
- The winner broadcasts the block; others verify and accept it
- Each block contains a hash of the previous block, forming a chain
- The longest chain represents the network’s consensus on the true history
No central server. No trusted authority. No identity required. Just cryptography, economics, and game theory.
The Chain
A blockchain is a linked list of blocks, where each block contains a hash of its predecessor:
Block 0 (Genesis) Block 1 Block 2
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ Prev: 0000 │ │ Prev: a1b2 │ │ Prev: c3d4 │
│ Hash: a1b2 │◄────│ Hash: c3d4 │◄────│ Hash: e5f6 │
│ Nonce: 74892 │ │ Nonce: 31047 │ │ Nonce: 88213 │
│ Timestamp │ │ Timestamp │ │ Timestamp │
│ Txns: │ │ Txns: │ │ Txns: │
│ coinbase→A │ │ A→B: 5 BTC │ │ B→C: 2 BTC │
└──────────────┘ │ A→C: 3 BTC │ │ A→D: 1 BTC │
└──────────────┘ └──────────────┘
The hash of each block depends on its contents — the transactions, the timestamp, the nonce, and the hash of the previous block. Change one transaction in Block 1, and its hash changes. That breaks Block 2’s reference. And Block 3’s. And every block after. To tamper with history, you’d have to recompute every subsequent block — and do it faster than the rest of the network is extending the chain.
import hashlib
import json
import time
def compute_hash(block):
"""Hash of a block's contents — the cryptographic link."""
block_string = json.dumps(block, sort_keys=True)
return hashlib.sha256(block_string.encode()).hexdigest()
def mine_block(transactions, previous_hash, difficulty=4):
"""Find a nonce that makes the block hash start with '0' * difficulty."""
block = {
"transactions": transactions,
"previous_hash": previous_hash,
"timestamp": time.time(),
"nonce": 0,
}
target = "0" * difficulty
while not compute_hash(block).startswith(target):
block["nonce"] += 1
block["hash"] = compute_hash(block)
return block
# Genesis block
genesis = mine_block(["coinbase → Alice: 50 BTC"], "0" * 64)
# Block 1
block1 = mine_block(["Alice → Bob: 5 BTC"], genesis["hash"])
Proof-of-Work: Trust Through Energy
The blockchain’s security comes from proof-of-work — a computational puzzle that’s hard to solve but easy to verify.
To add a block, a miner must find a nonce (a random number) such that the block’s hash starts with a certain number of zeros. The only way to find it is brute force — try billions of nonces until one works. This takes enormous computational power and, by extension, real-world energy.
Why does this work? Because rewriting history costs energy. An attacker who wants to alter a past transaction must redo the proof-of-work for that block and every block after it, all while the honest network keeps extending the chain. As long as the attacker controls less than 50% of the network’s total computing power, they’ll always fall behind.
The difficulty adjusts every 2,016 blocks (~two weeks) to maintain an average of one block every 10 minutes, regardless of how much computing power joins or leaves the network. More miners means harder puzzles. The system self-regulates.
Miners are incentivized by block rewards (newly minted Bitcoin) and transaction fees. They expend real resources (electricity, hardware) in exchange for digital currency. This is the bridge between the digital ledger and the physical world — the “work” in proof-of-work that makes the system tamper-resistant.
Decentralized Consensus
Bitcoin’s most profound achievement isn’t digital money. It’s consensus without authority.
In distributed systems, the consensus problem is fundamental: how do a group of nodes agree on a single truth when some nodes may be faulty, slow, or malicious? The Byzantine Generals Problem (1982) proved this was theoretically difficult. Bitcoin provided a practical solution: make lying expensive.
The longest chain is the truth. Not because it’s declared true by an authority, but because it represents the most cumulative computational work. An attacker would need to outspend the entire network to create a longer false chain. The game theory makes honest behavior the economically rational choice.
This is a different kind of trust. Not “I trust this institution” but “I trust that no single entity will expend more energy than the rest of the network combined.” It’s trust grounded in economics and physics, not reputation and regulation.
Beyond Bitcoin
Nakamoto invented blockchain for payments. Others saw a more general platform:
Ethereum (2015) — Vitalik Buterin, then 21, proposed a blockchain that could run arbitrary programs. Smart contracts — code that executes automatically when conditions are met — turned the blockchain from a ledger into a decentralized computer. If Bitcoin is a calculator, Ethereum is a general-purpose machine.
// A simple Ethereum smart contract
contract Escrow {
address public buyer;
address public seller;
function release() public {
require(msg.sender == buyer);
payable(seller).transfer(address(this).balance);
}
}
DeFi (Decentralized Finance) — lending, borrowing, and trading without banks, built on smart contracts. By 2021, DeFi protocols held over $100 billion in assets. By 2022, a series of spectacular collapses (Terra/Luna, FTX) revealed that decentralized finance had replicated traditional finance’s leverage and fragility without its regulatory safeguards.
NFTs (Non-Fungible Tokens) — unique digital tokens representing ownership of art, music, or collectibles. The 2021 boom (Beeple’s $69 million sale) and subsequent crash illustrated both the potential and the speculative excess of tokenized ownership.
Proof-of-Stake — Ethereum switched from proof-of-work to proof-of-stake in 2022 (“The Merge”), reducing energy consumption by ~99.9%. Instead of competing with computation, validators lock up cryptocurrency as collateral. Misbehavior is punished by destroying the stake. The security model shifts from “trust through energy” to “trust through economic risk.”
What Blockchain Got Right
Blockchain is the most polarizing technology in this series. Its advocates see a new foundation for digital trust. Its critics see an expensive solution looking for problems. The technical achievement, divorced from the hype, is real:
- Distributed consensus without authority — solving the double-spend problem in a permissionless network, where anyone can join and no one is trusted, was a genuine breakthrough. The specific mechanism (proof-of-work) may be superseded, but the demonstrated possibility — that strangers can agree on a shared ledger without a mediator — opened a new design space for distributed systems.
- Immutability through cryptographic linking — the chain structure, where each block’s hash depends on its predecessor, makes retroactive modification detectable and prohibitively expensive. This property is useful beyond cryptocurrency: supply chain verification, audit trails, and certificate transparency all benefit from tamper-evident data structures. Git uses the same principle for source code history.
- Programmable money — smart contracts demonstrated that financial agreements could be encoded in software and executed automatically. The vision — disintermediate brokers, escrow agents, and clearing houses — is compelling even if the current implementations are immature and frequently exploited.
- Economic security models — proof-of-work and proof-of-stake introduced the idea that system security can be grounded in economic incentives rather than perimeter defense. Attacking Bitcoin isn’t impossible — it’s just unprofitable. This game-theoretic approach to security is conceptually different from traditional computer security and influences how designers think about incentive-compatible systems.
The honest assessment: blockchain’s most successful application is still cryptocurrency, and cryptocurrency’s most successful use case is still speculation. The technology is genuinely novel, but the gap between the technical achievement and the real-world utility delivered so far is wider than advocates admit. Distributed consensus is solved. What to do with it — beyond moving money without banks — remains an open question.