Skip to content
London, United Kingdom · Est. 1994
English

Unit 3: Consensus Mechanisms

How independent computers agree on a single version of the ledger, how proof of work and proof of stake compare, and how permissioned networks and scaling solutions approach the same problem.

Unit 3 of 5 · about 54 minutes

3.1 Why blockchains need consensus

A blockchain is copied across many computers. New transactions arrive constantly, from all over the world, and messages take time to travel across the network. Some participants may be faulty, offline or deliberately dishonest. How can all these computers agree on exactly which transactions are valid and in what order they happened? The answer is a consensus mechanism: a set of rules and incentives that allows a network to agree on one shared version of the ledger.

The coordination problem

Computer scientists have long studied how independent computers can reach agreement when some of them may fail or lie. A classic thought experiment, known as the Byzantine Generals Problem, imagines several generals surrounding a city who must agree whether to attack or retreat. They can only communicate by messenger, and some generals may be traitors sending conflicting messages. The challenge is to design a method that lets the loyal generals reach the same decision despite the traitors.

A system that can keep working correctly even when some participants behave arbitrarily or maliciously is described as Byzantine fault tolerant. Blockchains need this property, particularly public ones where anyone can join and nobody is vetted.

What consensus must achieve

  1. Agreement: honest nodes end up with the same ledger.
  2. Validity: only transactions that follow the rules are accepted, for example no spending of funds the sender does not hold.
  3. Ordering: all nodes agree on the sequence of transactions, which is what prevents double spending.
  4. Liveness: the network continues to process new transactions rather than stalling.
  5. Resistance to manipulation: no single participant, or small group, can rewrite history or censor valid transactions.

The Sybil problem

In an open network, one person could create thousands of fake identities and use them to outvote everyone else. This is called a Sybil attack. A simple "one node, one vote" system would therefore not work on a public blockchain. Public consensus mechanisms solve this by tying influence to something that is costly and cannot be faked by creating more identities, such as computing power and energy (in proof of work) or a financial stake (in proof of stake).

Remember: Public blockchain consensus is as much about economic incentives as about computer science. Honest behaviour is rewarded, and dishonest behaviour is made expensive.

Incentives and rewards

Running nodes and creating blocks costs money. Public blockchains usually reward the participants who do this work through block rewards (newly created units of the network's cryptocurrency) and transaction fees paid by users. These rewards are what attract enough independent participants to make the network secure. It also means that the security of a public blockchain is connected to the value of its token, which is one reason public networks and cryptocurrencies are so closely linked.

Forks

Sometimes the chain splits into two branches, called a fork. Forks happen for two main reasons:

  • Temporary forks occur when two valid blocks are created at almost the same time. Nodes follow rules to choose one branch, and the other is abandoned shortly afterwards. Transactions in the abandoned block return to the waiting pool.
  • Protocol forks occur when the rules of the network change. A soft fork tightens rules in a way that older software still accepts. A hard fork changes rules in a way that is not backward-compatible, so nodes must upgrade. If part of the community refuses, the network can permanently split into two separate blockchains, each with its own history from that point.

Hard forks show an important point: blockchain records are hard to change, but the rules themselves are decided by people, through governance processes that may be informal and contested.

Comparing consensus approaches

There are many consensus mechanisms. When comparing them, useful questions include:

  • How is the right to propose blocks decided?
  • How quickly do transactions become final?
  • How many transactions can be processed, and at what cost?
  • How much energy does the mechanism use?
  • How many participants would need to collude to attack the network?
  • Who can take part, and how decentralised is control in reality?

In practice

When a supplier or project describes a blockchain as "secure", ask what consensus mechanism it uses and who the validators are. A public network secured by thousands of independent participants offers very different guarantees from a private network where three servers, all run by the same company, approve every block. Both may be legitimate designs, but they should not be described in the same terms.

3.2 Proof of work and proof of stake

The two best-known consensus mechanisms for public blockchains are proof of work and proof of stake. Bitcoin uses proof of work. Ethereum, the second-largest public blockchain, used proof of work until September 2022, when it switched to proof of stake in an upgrade widely known as "the Merge". Understanding both helps explain debates about energy, security and decentralisation.

Proof of work

In proof of work, participants called miners compete to add the next block. To do so, they must find a number which, combined with the block's contents and hashed, produces a hash below a target value. Because hash outputs cannot be predicted, the only way to find such a number is to try enormous numbers of guesses. The first miner to succeed broadcasts the block, other nodes check it quickly, and the winner receives the block reward and fees.

The network adjusts the difficulty regularly so that blocks are found at a roughly steady rate. On Bitcoin, the target is about one block every ten minutes.

When two competing versions of the chain exist, nodes follow the one with the most accumulated work. To rewrite history, an attacker would need to redo the work for the altered block and every block after it, faster than the rest of the network adds new blocks. This would require control of more than half of the network's total computing power, known as a 51 percent attack. On large networks, this is extremely costly; on small networks, such attacks have occurred.

Strengths and criticisms of proof of work

  • Strengths: a long track record, a simple security model and the fact that attacking the network requires real-world resources.
  • Energy use: mining consumes very large amounts of electricity, which has attracted significant environmental criticism. The overall impact depends heavily on the energy sources miners use.
  • Hardware concentration: mining is dominated by specialised hardware and large operations, often grouped in mining pools, which raises concerns about concentration.
  • Throughput: the number of transactions per second is limited.

Proof of stake

In proof of stake, participants called validators lock up, or "stake", an amount of the network's cryptocurrency as a security deposit. The protocol selects validators to propose new blocks, and other validators vote to confirm them. Selection is typically random but weighted by the amount staked.

Honest validators earn rewards. Validators who break the rules, for example by signing two conflicting blocks, can have part of their stake destroyed, a penalty known as slashing. Security therefore comes from financial stake rather than energy expenditure: attacking the network would require acquiring a very large share of the staked currency and risking its loss.

FeatureProof of workProof of stake
ParticipantsMinersValidators
Influence based onComputing powerAmount of currency staked
Main resource usedElectricity and specialised hardwareLocked-up capital
Energy useVery highFar lower
Penalty for cheatingWasted energy and lost rewardsLoss of staked funds (slashing)
Main concernEnvironmental impact, mining concentrationConcentration of stake among large holders and services

Strengths and criticisms of proof of stake

Ethereum's move to proof of stake was reported to have reduced its energy use by more than 99 percent, a figure published by the Ethereum Foundation, which supports the network's development. Proof of stake can also offer clearer finality, where blocks are formally confirmed after a set process. Critics point to the risk that large holders, exchanges and staking services could control a large share of the stake, and note that proof of stake has a shorter track record than proof of work at very large scale.

Tip: Be cautious of simple claims that one mechanism is "better". Each involves trade-offs between security, energy use, decentralisation and complexity, and the right choice depends on the purpose of the network.

Other variants

Many variations exist. In delegated proof of stake, token holders vote for a small number of delegates who validate blocks, which increases speed but reduces decentralisation. Other designs combine elements of several approaches. New mechanisms continue to be proposed and tested.

In practice

If your organisation has sustainability commitments and is considering using a public blockchain, the consensus mechanism is directly relevant. Recording data on a proof-of-stake network generally has a far smaller energy footprint than doing so on a proof-of-work network. Asking about the consensus mechanism, the number and independence of validators, and the typical time to finality should be a standard part of evaluating any blockchain platform.

3.3 Permissioned consensus, finality and scaling

Proof of work and proof of stake were designed for open networks where participants are unknown. Permissioned blockchains face a different situation: participants are identified and approved, so different, often faster, consensus methods can be used. This lesson also looks at finality and at one of the biggest challenges for public blockchains: scaling to handle large volumes of transactions.

Consensus in permissioned networks

Because members of a permissioned network are known and bound by agreements, there is no need to make participation artificially costly to prevent fake identities. Common approaches include:

  • Byzantine fault tolerant (BFT) voting: a known set of validators exchange messages and vote on each block. Classic BFT designs can tolerate up to roughly one third of validators being faulty or dishonest, and provide immediate finality once enough votes are collected.
  • Crash fault tolerant ordering: some business platforms use an ordering service that sequences transactions and tolerates nodes failing, but assumes nodes are not malicious. This is simpler and faster but offers weaker guarantees.
  • Proof of authority: a small group of approved, identified validators, whose reputation is at stake, takes turns creating blocks.

These methods can process transactions quickly and use little energy. Their security depends on the honesty and independence of the approved validators, and on the governance agreements between members.

Probabilistic and deterministic finality

As introduced in Unit 1, finality is the point at which a transaction cannot realistically be reversed.

  1. Probabilistic finality, as in Bitcoin, means the chance of reversal becomes smaller with each additional block but never formally reaches zero. Recipients choose how many confirmations to wait for, depending on the value at stake.
  2. Deterministic finality, as in BFT-based systems and in proof-of-stake networks after a formal confirmation step, means that once a block is finalised, it cannot be reversed without breaking the protocol's rules in a detectable way.

For business uses such as settling payments between institutions, clear and fast finality is often essential, because legal and accounting processes need to know exactly when a transfer is complete.

Remember: "Final" on a blockchain is a technical concept. Whether a transfer is legally final, for example for the purposes of insolvency or contract law, is a separate question that depends on the applicable legal framework.

The scalability trilemma

A frequently discussed idea, often called the blockchain trilemma, suggests that it is difficult for a blockchain to achieve all three of the following at once:

  • Decentralisation: many independent participants, with no small group in control;
  • Security: strong resistance to attack;
  • Scalability: high transaction capacity at low cost.

Improving one often means compromising another. For example, using a small number of powerful validators can greatly increase speed but reduces decentralisation. The trilemma is a design guide rather than a law, but it explains why different blockchains make different choices.

Scaling solutions

Several approaches aim to increase capacity:

  1. Layer 2 networks process many transactions away from the main blockchain, known as layer 1, and periodically record summaries or proofs on it. Examples include payment channels, which let two parties exchange many payments and settle only the final balance, and rollups, which bundle many transactions together and post compressed data or cryptographic proofs to the main chain.
  2. Sharding divides a network's workload into parts processed in parallel.
  3. Sidechains are separate blockchains connected to a main chain, with their own security arrangements.

Scaling solutions can greatly reduce costs and increase speed, but they introduce additional components and trust assumptions. Connections between blockchains, known as bridges, have been the target of some of the largest thefts in the sector, as Unit 5 notes.

Choosing for a business case

  • How many transactions per day are expected, and how quickly must they be final?
  • Who needs to act as validators, and are they genuinely independent?
  • What happens if a validator leaves the network or behaves badly?
  • Does the solution depend on layer 2 networks or bridges, and how are they secured?

In practice

Consider a group of six regional energy suppliers wanting to track renewable energy certificates. A public proof-of-work blockchain would be slow and energy-intensive for this purpose. A permissioned network using BFT voting among the six suppliers and the industry regulator could offer fast, deterministic finality, low energy use and known accountability. The key design questions would then be governance, onboarding of new members and how disputes are resolved.

Case study: Choosing a consensus model for a trade finance consortium

Marlowe Trade Network, a fictional consortium of five mid-sized banks and two insurers, planned a shared ledger to record letters of credit and reduce document fraud. The technical working group initially proposed building on a public blockchain to "maximise security".

The consortium's risk committee asked them to compare options against business needs. Transactions had to be final within seconds, because banks release funds against confirmed documents. Data had to remain confidential among members. Every participant was a regulated institution bound by the consortium agreement, so anonymous Sybil attacks were not a concern. Energy use also mattered to members with sustainability commitments.

The group chose a permissioned network using a Byzantine fault tolerant voting protocol, with each of the seven members running one validator in a different data centre. The design could tolerate two validators failing or misbehaving. The consortium agreement set out rules for admitting new members, removing validators that broke the rules and resolving disputes. The committee noted that the security of the system now depended largely on governance, and scheduled an annual independent review.

Activity

Choose one of two scenarios: a public digital currency open to anyone in the world, or a shared record of medical equipment maintenance between six hospitals. Recommend a consensus approach for your chosen scenario and explain your reasoning with reference to participants, finality, energy use and decentralisation.

Compare with a model answer

For the public currency, a strong answer recognises that participants are unknown, so Sybil resistance is essential. It might recommend proof of stake for its lower energy use and clearer finality, while noting the risk of stake becoming concentrated, or proof of work for its long track record, while acknowledging its high energy consumption.

For the hospitals, a strong answer recognises that participants are known and accountable. It recommends a permissioned network with BFT voting or proof of authority, giving fast, deterministic finality and low energy use. It notes that security depends on governance among the hospitals, and that patient data should stay off the chain. The best answers explicitly weigh trade-offs rather than claiming one approach is simply better.

Key takeaways

  • Consensus mechanisms allow independent nodes to agree on one valid, ordered ledger, even when some participants are faulty or dishonest.
  • Public blockchains must resist Sybil attacks, so they tie influence to costly resources such as computing power or staked currency.
  • Proof of work secures networks through energy-intensive computation, while proof of stake uses locked-up funds and slashing, with far lower energy use.
  • Permissioned networks can use BFT voting or proof of authority among known validators, offering fast, deterministic finality but relying on governance.
  • The scalability trilemma explains trade-offs between decentralisation, security and scalability; layer 2 solutions and bridges add capacity but also new risks.

Unit check

Create a free account to answer the check, save your progress and receive your free certificate.

Create a free account Log in
← Unit 2 Unit 4 →
WhatsApp