found few people who were comfortable with Paxos, even among seasoned researchers. We… were not able to understand the complete protocol until after reading several simplified explanations and designing our own alternative protocol, a process that took almost a year.” (from the Raft paper) 14
Naive Solution • proposer node sends new value to every other node in the system Paxos • proposer node sends out ballots that other nodes can vote on • each round of consensus requires two rounds of voting
number nʹ value: prepared: n accepted: n value: prepared: n accepted: n value: prepared: n accepted: n value: prepared: n accepted: n value: prepared: n accepted: n
1: Prepare the ballot number nʹ prepare(nʹ) value: prepared: n accepted: n value: prepared: n accepted: n value: prepared: n accepted: n value: prepared: n accepted: n value: prepared: n accepted: n
prepared: nʹ accepted: n value: prepared: nʹ accepted: n value: prepared: nʹ accepted: n value: prepared: nʹ accepted: n value: prepared: nʹ accepted: n
accept the value value: prepared: nʹ accepted: n value: prepared: nʹ accepted: n value: prepared: nʹ accepted: n value: prepared: nʹ accepted: n value: prepared: nʹ accepted: n
x) accept(nʹ, x) Step 3b: Tell nodes to accept the value accept(nʹ, x) value: prepared: nʹ accepted: n value: prepared: nʹ accepted: n value: prepared: nʹ accepted: n value: prepared: nʹ accepted: n value: prepared: nʹ accepted: n
number nʹ value: prepared: n accepted: n value: prepared: n accepted: n value: prepared: n accepted: n value: prepared: n accepted: n value: prepared: n accepted: n
1: Prepare the ballot number nʹ prepare(nʹ) value: prepared: n accepted: n value: prepared: n accepted: n value: prepared: n accepted: n value: prepared: n accepted: n value: prepared: n accepted: n
1: Prepare the ballot number nʹ prepare(nʹ) value: prepared: n accepted: n value: prepared: n accepted: n value: prepared: n accepted: n value: prepared: n accepted: n
number nʹ value: prepared: n accepted: n value: prepared: n accepted: n value: prepared: n accepted: n value: prepared: n accepted: n value: prepared: n accepted: n
1: Prepare the ballot number nʹ prepare(nʹ) value: prepared: n accepted: n value: prepared: n accepted: n value: prepared: n accepted: n value: prepared: n accepted: n value: prepared: n accepted: n
prepared: nʹ accepted: n value: prepared: nʹ accepted: n value: prepared: nʹ accepted: n value: prepared: nʹ accepted: n value: prepared: nʹ accepted: n
4/5 nodes Step 3a: Count acks value: prepared: nʹ accepted: n value: prepared: nʹ accepted: n value: prepared: nʹ accepted: n value: prepared: nʹ accepted: n value: prepared: nʹ accepted: n I have received acks from 1/5 nodes, so I must stop
accept the value value: prepared: nʹ accepted: n value: prepared: nʹ accepted: n value: prepared: nʹ accepted: n value: prepared: nʹ accepted: n value: prepared: nʹ accepted: n
x) accept(nʹ, x) Step 3b: Tell nodes to accept the value accept(nʹ, x) value: prepared: nʹ accepted: n value: prepared: nʹ accepted: n value: prepared: nʹ accepted: n value: prepared: nʹ accepted: n value: prepared: nʹ accepted: n
hash: 8e43 nonce: 89 hash: 9876 nonce: abc hash: 89a0 block, hash block, hash block, hash block, hash * in Bitcoin, nodes gossip; not every node is connected to every other node
• multiple nodes can propose blocks simultaneously • longest* chain is the valid one • nodes are incentivized to choose the most-work chain, so they’ll eventually converge Proof of Work
• tricks like ASICs (application-specific integrated circuits, special hardware) can make it less fair • boils the ocean the trouble with Proof of Work
Paxos: http://www.cs.yale.edu/homes/aspnes/pinewiki/Paxos.html • Leslie Lamport on Paxos: https://lamport.azurewebsites.net/pubs/pubs.html#lamport-paxos • In Search of an Understandable Consensus Algorithm (Raft): https://raft.github.io/raft.pdf • The Morning Paper: Practical Byzantine Fault Tolerance: https://blog.acolyer.org/2015/05/18/practical- byzantine-fault-tolerance • On the Practicality of ‘Practical’ Byzantine Fault Tolerance: https://arxiv.org/abs/1110.4854v1 • Ethereum Proof of Stake FAQ: https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQs • Consensus Compare: Casper vs. Tendermint: https://blog.cosmos.network/consensus-compare-casper- vs-tendermint-6df154ad56ae • Tendermint Consensus Overview: https://tendermint.com/docs/introduction/ introduction.html#consensus-overview • The Stellar Consensus Protocol: A Federated Model for Internet-level Consensus: https:// www.stellar.org/papers/stellar-consensus-protocol.pdf • Monty Python picture from https://welovebudapest.com/en/event/gyalog-galopp/ • Mr. Jones picture from https://www.amazon.com/Indiana-Jones-Complete-Adventure-Collection/dp/ B001E75QH0 references & further reading 78