Lesson 5 — Consensus: How the Network Agrees

How Does Blockchain Actually Work?

1

Learning Material

1 pages

Lesson 5 — Consensus: How the Network Agrees

Seite 1 von 1

Understanding the Complex: How Does Blockchain Actually Work?


There are currently around 15,000 to 20,000 Bitcoin nodes running worldwide. Each holds a complete copy of the same blockchain — over half a terabyte of transaction history stretching back to January 2009. When Alice sends Bob 0.1 Bitcoin, her transaction must be confirmed by this network of strangers who share no common authority, have no central coordinator, and can't necessarily trust each other.

How do they all end up with the same answer?

That's the consensus problem. It's the hardest part of the blockchain design — and where Satoshi Nakamoto's real innovation lies.


Why you need consensus

Cryptographic signatures solve the authentication problem: Alice can prove she authorized a transaction. But they don't solve the ordering problem: what if Alice signs two different transactions, both spending the same funds?

This is called double-spending. In a centralized system, the bank's database settles it trivially: whichever transaction hits the database first wins; the second is rejected. In a decentralized network with thousands of nodes receiving transactions in different orders, there's no obvious "first."

The consensus mechanism is what decides which transaction is canonical — which version of history is the truth.


Proof of Work: what mining actually is

Bitcoin uses a mechanism called Proof of Work. Here's how it works.

Pending transactions float around the network in a pool. Miners — specialized computers, or pools of them — collect a batch of these transactions and assemble them into a candidate block. To add that block to the blockchain, they must solve a puzzle.

The puzzle: find a number called a nonce such that when you hash the block's header (which includes the nonce, the previous block's hash, and a hash of the transactions), the resulting hash begins with a certain number of leading zeros.

There is no shortcut. You can't reason your way to the answer. You just try numbers — billions of them per second — until one happens to produce a hash that meets the target. It's computational brute force.

When a miner finds a valid nonce, they broadcast the block to the network. Other nodes independently verify the proof of work — running the hash once to confirm the answer is correct — then accept the block and append it to their copy of the chain. The successful miner receives a reward: newly created Bitcoin (the "block reward") plus transaction fees.


Why the energy expenditure is the design

Bitcoin mining consumes roughly 100–150 terawatt-hours of electricity per year — comparable to the energy use of Poland or Argentina. This is not a bug that will eventually be fixed. It's architectural.

The energy expenditure is what makes the ledger trustworthy. To rewrite history — to alter a confirmed transaction — an attacker would need to redo the proof of work for the altered block and all subsequent blocks, faster than the honest network is adding new blocks. With over 500 exahashes per second of computational power currently securing the network, and blocks arriving every ten minutes, this is computationally unaffordable.

The energy cost is, in effect, the cost of security. It's the answer to the Byzantine Generals Problem: you can't fake participation in the consensus process, because participation requires real, measurable, irreversible expenditure of physical resources.

Whether this trade-off is worth it — whether Bitcoin's particular security model justifies its energy footprint — is a genuine controversy we'll examine in lesson eight.


Proof of Stake: Ethereum's answer

Ethereum launched in 2015 using Proof of Work like Bitcoin. In September 2022, it switched — in an event called the Merge — to Proof of Stake.

In Proof of Stake, validators replace miners. Instead of expending computation to earn the right to add a block, validators lock up ("stake") a quantity of Ether. They're then randomly selected, weighted by their stake, to propose and attest to new blocks. Dishonest validators risk having their stake destroyed — "slashed."

The result: Ethereum's energy consumption fell by approximately 99.95% overnight. The network now runs on roughly 0.01% of its previous electricity use, secured by economic collateral rather than computational expenditure.

Proof of Stake introduces different trade-offs. Critics argue it's less battle-tested than Proof of Work, that wealthy validators have more influence, and that the security model is conceptually different — economic punishment rather than physical cost. Proponents argue the security is equivalent or better, and the environmental cost is no longer a consideration.


The 51% problem and chain forks

Both mechanisms share a vulnerability: if any single entity controls more than half the network's mining power (in PoW) or staked value (in PoS), they can manipulate the consensus process — potentially double-spending or reversing recent transactions.

This has happened on smaller proof-of-work blockchains: Ethereum Classic suffered a 51% attack in 2020. Bitcoin has never been successfully attacked this way, primarily because the cost of acquiring more than half of its computational power would currently run into tens of billions of dollars — and attacking the network would likely destroy the value of the investment.

Chain forks — moments when nodes disagree about the canonical chain — happen occasionally and resolve when one version accumulates more work and becomes the longer chain, which all honest nodes follow. The "longest chain wins" rule is what ties the entire system together.


Understanding Proof of Work and Proof of Stake gives you the technical core of how blockchains maintain agreement without central authority. What they enable — beyond simple value transfer — is the subject of the next lesson: smart contracts, DeFi, and NFTs.


Next lesson: What comes after Bitcoin — Vitalik Buterin's programmable blockchain, smart contracts, decentralized finance, NFTs, and where the promises have met reality.


Reading time: approx. 9–10 minutes

Want more?

Sign up for AI tutoring, study plans, exam prep, and more.

Sign up free