EDDYMENS

Published a year ago

What Is The Byzantine Generals Problem?

Table of contents

The Byzantine Generals Problem is a problem that revolves around trusting information that is difficult to verify.

I'll tell you the story in a slightly different way, one that makes the solution easier to understand.

The story

Imagine there are five generals, each commanding an army that once belonged to the same kingdom.

They are positioned at different points around a battlefield and must decide whether to attack or withdraw.

To succeed, they must act in unison. If some attack while others retreat, the attack will fail, and the entire kingdom suffers.

However, there is a challenge: the generals can only communicate through messengers, and it is possible that some generals or messengers might be unreliable or compromised.

One dishonest general could intercept a messenger and send false orders, confusing the rest.

How can they work around this problem?

Before we discuss the solution, it is important to note that this is a general computational problem that appears in distributed systems; it didn't originate with blockchain technology.

It's often mentioned in blockchain discussions because blockchains are distributed systems that must also reach consensus even when some participants may act dishonestly.

The solution (continuing the analogy)

In our army story, the generals continue to send messages as before, but with a rule: Each general shares their decision with every other general, and everyone compares the messages they receive.

Because all generals have a shared stake in the battle's outcome, the final decision is reached through majority consensus, whatever most generals agree on becomes the collective choice.

  • If all generals are dishonest, the result reflects that dishonesty.
  • If all are honest, the result reflects that honesty.

Connecting to Blockchain

This same principle forms the foundation of blockchain consensus mechanisms. Each node in the network acts like a general, it independently verifies data and participates in reaching an agreement on what gets added to the blockchain.

If the majority of nodes agree on a version of the truth, that version becomes the official record.

However, a risk remains: if a small group gains more than half of the decision-making power, it can override the rest. In blockchain terms, this is called a 51% attack [→], where a majority coalition can manipulate or rewrite the ledger.

Here is another article you might like 😊 What Is Block Time?