Understanding how distributed systems reach agreement in the presence of failures and malicious actors
By the end of this session, you will be able to:
The consensus problem is the challenge of getting multiple distributed nodes to agree on a single value or decision, even when some nodes may fail or act maliciously.
In distributed systems like blockchain, multiple computers (nodes) need to:
Group Decision Making: Imagine 10 friends trying to decide on a restaurant via group chat. Some phones might be dead (crashed nodes), some friends might give conflicting suggestions (malicious nodes), and messages might arrive out of order (network delays). How do they still reach a unanimous decision?
Node stops working completely but doesn't send incorrect information
Example: Server power failureMessages are lost, delayed, or duplicated during transmission
Example: Internet connectivity issuesNode behaves arbitrarily or maliciously, sending conflicting information
Example: Hacked or malicious nodeImagine several Byzantine army divisions surrounding an enemy city. Each division is led by a general, and they must coordinate to either all attack or all retreat. However:
Byzantine Fault Tolerance (BFT): A system can tolerate up to f Byzantine failures if it has at least 3f + 1 total nodes. This means if you have 4 nodes, you can tolerate 1 malicious node; if you have 7 nodes, you can tolerate 2 malicious nodes.
AAP is a framework for understanding consensus protocols through three key properties that ensure system reliability and security.
Definition: All honest nodes must agree on the same value
Blockchain: All nodes agree on the same blockchain state
Example: If one node says Alice has 10 coins, all other honest nodes must agree
Definition: Only valid values proposed by honest nodes are accepted
Blockchain: Only legitimate transactions are included in blocks
Example: Alice cannot spend coins she doesn't have
Definition: Once a value is agreed upon, it cannot be changed
Blockchain: Confirmed transactions cannot be reversed
Example: Once Alice's payment is confirmed, it's permanent
These three properties work together to ensure that:
How it works: Nodes compete to solve computational puzzles
AAP Implementation:
Example: Bitcoin
How it works: Validators are chosen based on their stake
AAP Implementation:
Example: Ethereum 2.0
Bitcoin solves the Byzantine Generals Problem using:
Private blockchains often use:
In the next session, we'll explore GARAY & RLA Models, diving into formal mathematical models that help us analyze and prove the security properties of blockchain protocols.