Distributed Consensus

Distributed Consensus

Achieving overall system reliability in the presence of a number of faulty processes is a challenge. Requirements for a consensus protocol may include Agreement, Strong validity and Termination: all processes must eventually decide on an output value.

How do blockchains agree on what is true without a central authority?

Blockchains use a consensus protocol: rules that let many independent computers converge on one version of history even when some of them fail or lie. Proof of work makes agreement expensive to attack, and proof of stake makes it financially costly.

The problem

Take thousands of computers, spread across the world, run by strangers, with no one in charge. Some are slow. Some are broken. Some are actively lying. Now get them all to agree on a single shared list of transactions, in order.

That is the problem distributed consensus solves, and it is the reason blockchains are interesting rather than merely being databases.

Byzantine fault tolerance

The classic framing is the Byzantine Generals Problem: several generals surround a city and must agree to attack or retreat, communicating only by messenger, knowing some generals may be traitors sending contradictory orders.

A system is Byzantine fault tolerant if it reaches correct agreement despite some participants behaving arbitrarily badly. Most practical designs tolerate up to a third of participants misbehaving.

What a consensus protocol guarantees

  • Agreement: honest participants decide on the same value.
  • Validity: the value decided was actually proposed by someone.
  • Termination: the process finishes rather than stalling forever.

Proof of work

Participants compete to solve a computational puzzle. The winner proposes the next block. The puzzle is hard to solve and trivial to verify, so rewriting history means redoing all that work faster than everyone else combined.

Security comes from the cost of electricity, which is also the main criticism.

Proof of stake

Participants lock up capital as collateral and are selected to propose blocks. Misbehaviour costs them their stake.

Security comes from financial exposure rather than energy expenditure. Ethereum moved from proof of work to proof of stake in 2022.

Why it matters

Consensus is what makes a blockchain trustworthy without a trusted party. Every other property, censorship resistance, immutability, permissionless access, follows from it.

Meetups that covered this

Join the community

Every event is announced on Meetup. That is where you RSVP, see the venue and get reminders.

1117

members on Meetup

Blockchain Brussels brings together anyone curious about bitcoin, cryptocurrencies and blockchains, from the deeply technical to the merely curious. Talks are in English, entry is free and newcomers are welcome.