General
Blockchain Fundamentals

Blockchain Fundamentals

此内容正在翻译中,完成后将会在此处提供。

Proof of Work and Proof of Stake

Cryptographic primitives prevent tampering with historical data. But everyone has a copy of the ledger. What happens when Alice tells some nodes she paid Bob, and tells other nodes she paid Carol? Who decides which version is true? This is the Byzantine Generals Problem, and blockchain consensus mechanisms solve it.

How do blockchains achieve consensus? They solve the distributed consensus problem by making lying more expensive than honest behavior. Instead of trying to identify who to trust, consensus mechanisms like Proof of Work and Proof of Stake make fraud economically irrational.

The Byzantine Generals Problem

The Byzantine Generals Problem illustrates why distributed consensus was mathematically impossible for open networks.

You are a Byzantine general planning to attack a fortified city. You have several allied generals positioned around the city, each commanding their own army. To succeed, you must coordinate a simultaneous attack. If some attack while others retreat, the attacking forces will be slaughtered.

You communicate only through messengers, and some generals might be traitors who want the attack to fail. Traitors can:

  • Send "attack" messages to some generals and "retreat" to others

  • Modify messages from loyal generals as they pass through

  • Coordinate with other traitors to maximize confusion

How do you reach consensus on "attack" or "retreat" when you cannot distinguish loyal generals from traitors, and you cannot trust the communication channels?

Computer scientists actually solved this mathematically in the 1980s, showing that to tolerate f traitors, you need at least 3f+1 total participants. The solution requires multiple rounds of communication where all generals report the orders they received to each other.

This mathematical solution works, but is impractical for open networks:

  • You must know exactly who all participants are in advance

  • Multiple message rounds between every pair of participants

  • Communication complexity grows exponentially with network size

  • In a permissionless system, attackers can create unlimited fake identities

You cannot count identities in open networks—attackers create as many as they want. Instead, blockchains count something expensive to fake.

Proof of Work: Computational Consensus

Strangers agree without authority by making lying more expensive than honesty. Proof of Work makes proposing blocks costly by requiring computational work.

To propose what should happen next in Proof of Work systems, you must prove you have done expensive computational work. Miners gather pending transactions into a block, then find a random number (nonce) that, when combined with the block data and hashed, produces a result starting with multiple zeros. The first miner to find this number broadcasts their solution to the network, where other participants can instantly verify the solution is correct and accept the new block.

Finding the nonce requires trillions of random guesses. Modern Bitcoin mining requires approximately 2^77 hash calculations to find a valid block—that is 151 million trillion trillion attempts. Verifying the solution takes milliseconds.

Each block references the previous block's hash, creating a chain. To rewrite history, an attacker would need to redo all subsequent computational work while honest miners continue extending the real chain. The attacker would need to outpace the entire network's combined computational power.

The difficulty adjusts automatically to maintain Bitcoin's 10-minute block times. If blocks come faster, difficulty increases. If blocks come slower, difficulty decreases. This maintains predictable block production regardless of how much mining power joins or leaves the network.

Attacking costs more in electricity than the attacker could gain. When this holds, the network stays secure.

Proof of Stake: Economic Consensus

Proof of Stake replaces computational work with economic stake. Instead of burning electricity, participants put their own money at risk.

Participants lock up cryptocurrency tokens as collateral. The protocol randomly selects validators to propose blocks, weighted by their stake. Selected validators propose blocks, and other validators vote to accept or reject. Honest behavior earns rewards; dishonest behavior results in slashing, where a portion of staked tokens is destroyed.

Validators have skin in the game. Attacking the network would destroy the value of their staked tokens through slashing. The economic loss from attacking exceeds any potential gain from the attack.

Proof of Stake has two major advantages over Proof of Work.

First is mathematical finality. After about 13 minutes in systems like Ethereum, transactions become mathematically irreversible. A supermajority of validators has confirmed the block, and reversing it would require provably destroying a vast amount of capital. This differs from Proof of Work's probabilistic finality, where blocks become increasingly difficult to reverse but never absolutely impossible.

Second is energy efficiency. Validators run standard servers, not specialized mining hardware burning gigawatts. Proof of Stake also enables sharding—splitting the network into parallel chains for higher throughput. Proof of Work cannot safely implement sharding because splitting mining power weakens security.

Validators act rationally and value their staked capital. When the cost of attacking (slashed stake) exceeds the potential gain, the network stays secure.

The Blockchain Trilemma

The Blockchain Trilemma states that blockchain consensus can optimize for at most two of these three properties.

Security is resistance to attacks and censorship. Can the network maintain consensus even when some participants try to break it?

Scalability is high transaction throughput. How many transactions per second can the network process?

Decentralization means no single point of control. How many independent participants validate transactions?

Bitcoin chose security and decentralization over scalability. The network has never been successfully attacked and runs on thousands of independent validators, but processes only about 7 transactions per second. Ethereum before its recent upgrades made similar choices—strong security and decentralization but approximately 15 transactions per second.

Traditional payment systems like Visa chose scalability and security over decentralization. They process 65,000 transactions per second with strong security, but a single company controls the entire system.

This explains why "just make it faster" does not work. Increasing block size allows more transactions per block, but requires more bandwidth and storage, reducing the number of participants who can validate—sacrificing decentralization. Decreasing block time increases throughput, but causes more forks and orphaned blocks, reducing security.

Layer 2 solutions, sharding, and new consensus mechanisms attempt to break the trilemma, each with different tradeoffs.

Economic Security

Both Proof of Work and Proof of Stake transform the security problem from cryptographic to economic. The network stays secure not because attacking is impossible, but because attacking is unprofitable.

In Proof of Work, the attack cost is electricity and hardware to outpace all honest miners. The attack gain is the value of double-spent transactions. Security holds when attack cost exceeds attack gain.

In Proof of Stake, the attack cost is slashed stake (destroyed capital). The attack gain is still the value of double-spent transactions. Security holds when slashed stake exceeds attack gain.

The costs are provable and automatic. In Proof of Work, electricity bills are unavoidable. In Proof of Stake, slashing is cryptographically enforced. An attacker cannot avoid these costs.

Honest behavior is profitable, dishonest behavior is costly. Rational participants choose honesty because it pays better. This transforms the Byzantine Generals Problem from an identity question ("who can we trust?") to an economic question ("what behavior do incentives encourage?").

These economic security models power all modern blockchains. Bitcoin was first, choosing specific tradeoffs that shaped the entire industry.

Blueshift © 2026Commit: 1b8118f