The Byzantine Generals Problem

Famously described in 1982 by Lamport, Shostak and Pease, it is a generalized version of the Two Generals Problem with a twist. It describes the same scenario, where instead more than two generals need to agree on a time to attack their common enemy. The added complication here is that one or more of the generals can be a traitor, meaning that they can lie about their choice (e.g. they say that they agree to attack at 0900 but instead they do not).

The leader-follower paradigm described in the Two Generals Problem is transformed to a commander-lieutenant setup. In order to achieve consensus here, the commander and every lieutenant must agree on the same decision (for simplicity attack or retreat).

page 3, The Byzantine Generals Problem

Adding to IC2., it gets interesting that if the commander is a traitor, consensus must still be achieved. As a result, all lieutenants take the majority vote.

The algorithm to reach consensus in this case is based on the value of majority of the decisions a lieutenant observes.

Theorem: For any m, Algorithm OM(m) reaches consensus if there are more than 3m generals and at most m traitors.

This implies that the algorithm can reach consensus as long as 2/3 of the actors are honest. If the traitors are more than 1/3, consensus is not reached, the armies do not coordinate their attack and the enemy wins.

m = 0 → no traitors, each lieutenant obeys | m > 0 → each lieutenant’s final choice comes from the majority of all lieutenant’s choices

This should be more clear with a visual example from Lieutentant 2’s point of view— Let C be Commander and L{i} be Lieutenant i:

OM(1): Lieutenant 3 is a traitor — L2 point of view

Steps:

Commander sends v to all Lieutenants L1 sends v to L2 | L3 sends x to L2 L2 ← majority(v,v,x) == v

The final decision is the majority vote from L1, L2, L3 and as a result consensus has been achieved

The important thing to remember is that the goal is for the majority of the lieutenants to choose the same decision, not a specific one.

Let’s examine the case of the commander being a traitor:

OM(1): Commander is a traitor

Steps:

Commander sends x, y, z to L1, L2, L3 respectively L1 sends x to L2, L3 | L2 sends y to L1, L3 | L3 sends z to L1, L2 L1 ← majority(x,y,z) | L2 ← majority(x,y,z) | L3 ← majority(x,y,z)

They all have the same value and thus consensus is reached. Take a moment here to reflect that even if x, y, z are all different the value of majority(x, y, z) is the same for all 3 Lieutenants. In the case x,y,z are totally different commands, we can assume that they act on the default option retreat.

For a more hands-on approach and a more complex example with 7 generals and 2 traitors, I suggest you read this article.