Eidode / Mô phỏng / How Consensus Works
Cách Blockchain Consensus Vận Hành — PoW, PoS và Hơn Nữa
Mỗi block trên Bitcoin, Ethereum, Solana được thêm qua cơ chế consensus. Simulator dưới đây trực quan hóa sản xuất block cho Proof of Work, Proof of Stake, DPoS, và biến thể BFT.
Chọn một cơ chế consensus
Click một trong bốn để xem cách nó tạo block. Simulator chạy cuộc đua sản xuất theo thời gian thực.
Bitcoin dùng PoW. Miner cạnh tranh tìm hash bắt đầu bằng N số 0. Ai giải trước được đề xuất block tiếp theo và nhận thưởng. Tốn điện thật (Bitcoin: ~15 GW toàn cầu). Chi phí tấn công = >50% hash rate toàn cầu, ~15 tỷ USD cho Bitcoin.
Block height
0
Finality
~60 min
Năng lượng/block
~600,000 kWh
Validator active
~15,000 miners
Chi phí tấn công (51%)
$15B+
Vừa xảy ra gì
Click Bắt đầu để bắt đầu sản xuất block.
Why blockchains need consensus
A blockchain is a shared ledger that thousands of computers each hold a copy of. They have to agree on which transactions count and in what order. Without consensus, two nodes could believe contradictory things — Alice paid Bob 1 BTC vs. Alice still has 1 BTC. Consensus mechanisms are how the network reaches agreement automatically, without a central referee.
Proof of Work (PoW) — how Bitcoin does it
Miners compete to solve a cryptographic puzzle (find a hash that starts with N zeros). First to solve gets the right to propose the next block + receives the block reward in fresh BTC. Solving the puzzle requires raw computation — measured in hashes per second. Bitcoin's global hash rate is ~600 exahashes/sec, requiring ~15GW of electricity. Attacking the network would require controlling 51% of that hash rate — economically infeasible.
Proof of Stake (PoS) — how Ethereum does it
Instead of buying mining hardware and electricity, validators put up 32 ETH as a bond ("stake"). The network randomly picks one validator per slot (every 12 seconds on Ethereum) to propose a block. Other validators attest that the block is valid. Misbehavior (proposing two conflicting blocks, going offline) gets some of the stake slashed. Energy use is ~99.95% lower than PoW because no computational race is happening.
DPoS and BFT — the alternatives
Delegated PoS (EOS, Tron) elects a small fixed set of "block producers" — fast but more centralized. BFT-family (Cosmos, NEAR, Solana's PoH+PoS hybrid) reaches finality via voting rounds — every block is final the moment it's confirmed (no chain reorgs), but networks need a known validator set. Trade-offs across all of them: speed, decentralization, security — you can usually only optimize for two of three.
Câu hỏi thường gặp
+Why does Bitcoin use so much electricity?
Proof of Work is intentionally costly. The energy spent is what makes the network secure — attacking Bitcoin would require an attacker to spend at least as much electricity as honest miners combined. Critics see it as waste; supporters see it as the price of unforgeable digital scarcity.
+Did Ethereum's switch to PoS make it less secure?
No — and arguably more secure. PoS networks have stronger penalties (slashing) for bad behavior, and capital costs of attack scale with the price of ETH. PoS also enables faster finality (~12 minutes on Ethereum) vs Bitcoin's probabilistic finality (~1 hour for high confidence).
+Can a PoS network be controlled by the rich?
In principle, yes — anyone with enough ETH could become a dominant validator. In practice, Ethereum has ~1 million validators with the largest single staking pool (Lido) below 30% share. Centralization is a real concern but not an inevitable outcome.
+What's the fastest consensus mechanism?
Solana hits ~400ms block times via Proof of History (a verifiable clock) + Proof of Stake. Cosmos chains finalize in ~1 second via Tendermint BFT. The trade-off vs Ethereum-style PoS is fewer validators and higher hardware requirements — speed costs decentralization.
+Can a blockchain change its consensus mechanism?
Yes, but it's a major event. Ethereum did it ("The Merge") in September 2022, switching from PoW to PoS after years of research. The change required coordinating thousands of node operators to upgrade simultaneously. Bitcoin will almost certainly never change — its conservative culture treats PoW as a permanent feature.