Jacob Gardner & Chuan Guo

Slides:



Advertisements
Similar presentations
+ The Byzantine Generals Problem Leslie Lamport, Robert Shostak and Marshall Pease Presenter: Jose Calvo-Villagran
Advertisements

Byzantine Generals. Outline r Byzantine generals problem.
Agreement: Byzantine Generals UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department CS 739 Distributed Systems Andrea C. Arpaci-Dusseau Paper: “The.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Byzantine Fault Tolerance Steve Ko Computer Sciences and Engineering University at Buffalo.
The Byzantine Generals Problem Boon Thau Loo CS294-4.
The Byzantine Generals Problem Leslie Lamport, Robert Shostak, Marshall Pease Distributed Algorithms A1 Presented by: Anna Bendersky.
Prepared by Ilya Kolchinsky.  n generals, communicating through messengers  some of the generals (up to m) might be traitors  all loyal generals should.
Byzantine Generals Problem: Solution using signed messages.
Byzantine Generals Problem Anthony Soo Kaim Ryan Chu Stephen Wu.
Yee Jiun Song Cornell University. CS5410 Fall 2008.
Copyright 2006 Koren & Krishna ECE655/ByzGen.1 UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering Fault Tolerant Computing ECE 655.
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 16 Wenbing Zhao Department of Electrical and Computer Engineering.
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 15 Wenbing Zhao Department of Electrical and Computer Engineering.
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 16 Wenbing Zhao Department of Electrical and Computer Engineering.
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 15 Wenbing Zhao Department of Electrical and Computer Engineering.
Practical Byzantine Fault Tolerance (The Byzantine Generals Problem)
The Byzantine Generals Problem Leslie Lamport Robert Shostak Marshall Pease.
Byzantine Fault Tolerance CS 425: Distributed Systems Fall Material drived from slides by I. Gupta and N.Vaidya.
Securing Every Bit: Authenticated Broadcast in Wireless Networks Dan Alistarh, Seth Gilbert, Rachid Guerraoui, Zarko Milosevic, and Calvin Newport.
Practical Byzantine Fault Tolerance
Byzantine fault-tolerance COMP 413 Fall Overview Models –Synchronous vs. asynchronous systems –Byzantine failure model Secure storage with self-certifying.
From Viewstamped Replication to BFT Barbara Liskov MIT CSAIL November 2007.
1 The Byzantine Generals Problem Leslie Lamport, Robert Shostak, Marshall Pease Presented by Radu Handorean.
Byzantine Fault Tolerance in Stateful Web Service Yilei ZHANG 30/10/2009.
1 Resilience by Distributed Consensus : Byzantine Generals Problem Adapted from various sources by: T. K. Prasad, Professor Kno.e.sis : Ohio Center of.
1 ZYZZYVA: SPECULATIVE BYZANTINE FAULT TOLERANCE R.Kotla, L. Alvisi, M. Dahlin, A. Clement and E. Wong U. T. Austin Best Paper Award at SOSP 2007.
Byzantine fault tolerance
Practical Byzantine Fault Tolerance and Proactive Recovery
The Byzantine General Problem Leslie Lamport, Robert Shostak, Marshall Pease.SRI International presented by Muyuan Wang.
Byzantine Fault Tolerance CS 425: Distributed Systems Fall 2012 Lecture 26 November 29, 2012 Presented By: Imranul Hoque 1.
CS 425/ECE 428/CSE424 Distributed Systems (Fall 2009) Lecture 9 Consensus I Section Klara Nahrstedt.
CSE 60641: Operating Systems Implementing Fault-Tolerant Services Using the State Machine Approach: a tutorial Fred B. Schneider, ACM Computing Surveys.
Hwajung Lee. Reaching agreement is a fundamental problem in distributed computing. Some examples are Leader election / Mutual Exclusion Commit or Abort.
EEC 688/788 Secure and Dependable Computing Lecture 15 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department
Byzantine Fault Tolerance
Systems Research Barbara Liskov October Replication Goal: provide reliability and availability by storing information at several nodes.
Fault Tolerance
Distributed Agreement. Agreement Problems High-level goal: Processes in a distributed system reach agreement on a value Numerous problems can be cast.
Fail-Stop Processors UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department CS 739 Distributed Systems Andrea C. Arpaci-Dusseau One paper: Byzantine.
1 AGREEMENT PROTOCOLS. 2 Introduction Processes/Sites in distributed systems often compete as well as cooperate to achieve a common goal. Mutual Trust/agreement.
Byzantine fault tolerance Srivatsan ravi. BYZANTINE GENERALS Lamport Shostak Marshall Pease.
CSE 486/586 Distributed Systems Byzantine Fault Tolerance
Synchronizing Processes
BChain: High-Throughput BFT Protocols
The OM(m) algorithm Recall what the oral message model is.
8.2. Process resilience Shreyas Karandikar.
COMP28112 – Lecture 14 Byzantine fault tolerance: dealing with arbitrary failures The Byzantine Generals’ problem (Byzantine Agreement) 13-Oct-18 COMP28112.
Byzantine Fault Tolerance
CSE 486/586 Distributed Systems Byzantine Fault Tolerance
COMP28112 – Lecture 13 Byzantine fault tolerance: dealing with arbitrary failures The Byzantine Generals’ problem (Byzantine Agreement) 19-Nov-18 COMP28112.
Distributed Consensus
Agreement Protocols CS60002: Distributed Systems
Distributed Consensus
Principles of Computer Security
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
Distributed Systems CS
Byzantine Generals Problem
Byzantine Faults definition and problem statement impossibility
From Viewstamped Replication to BFT
Consensus in Synchronous Systems: Byzantine Generals Problem
The Byzantine Generals Problem
COMP28112 – Lecture 13 Byzantine fault tolerance: dealing with arbitrary failures The Byzantine Generals’ problem (Byzantine Agreement) 22-Feb-19 COMP28112.
EEC 688/788 Secure and Dependable Computing
Building Dependable Distributed Systems, Copyright Wenbing Zhao
John Kubiatowicz Electrical Engineering and Computer Sciences
Byzantine Generals Problem
Sisi Duan Assistant Professor Information Systems
Presentation transcript:

Jacob Gardner & Chuan Guo Byzantine Agreement Jacob Gardner & Chuan Guo

What is agreement?

What is agreement? Attack, or Retreat?

What is agreement? Attack! Attack, or Retreat? Attack! Attack!

What is agreement? Attack! Attack, or Retreat? Attack! Attack!

What is agreement? Retreat! Attack, or Retreat? Retreat! Retreat!

What is agreement? Retreat! Attack, or Retreat? Retreat! Retreat!

What is agreement? Attack! Attack, or Retreat? Retreat! Retreat!

What is agreement? Attack! Attack, or Retreat? Retreat! Retreat!

All generals decide upon the same plan of action. What is agreement? All generals decide upon the same plan of action. Caveat: This is not a paper about military strategy.

All generals decide upon the same plan of action. What is agreement? All generals decide upon the same plan of action. What basic tools do we need to achieve agreement? Caveat: This is not a paper about military strategy.

Assumptions (p 387) All messages are delivered correctly. All recipients can verify who sent each message. The absence of a message can be detected. “Oral Messages”

Agreement A! A Attack, or Retreat? A! R! A R

Agreement A! A Attack, or Retreat? A! R! A A R

Agreement A! A R Attack, or Retreat? A! R! A R A R

Agreement A! A R Attack, or Retreat? A! R! A R A R

Agreement Attack! A R Attack, or Retreat? Attack! Attack! A R A R

Agreement Observation (p 384) Attack! A R Attack, or Retreat? Observation (p 384) We can restrict our consideration to the problem of how a single general sends his value to the others. Attack! Attack! v(1) A R A R

Reformulation Attack, or Retreat?

Reformulation Attack, or Retreat?

Reformulation A! Attack, or Retreat?

Reformulation A! Attack, or Retreat? Attack! Attack!

Reformulation A! Attack, or Retreat? Attack! Attack! Attack! Attack!

Reformulation A! Attack, or Retreat? Attack! Attack! Attack! Attack! How does this differ from Paxos?

All generals decide upon the same plan of action. What is agreement? All generals decide upon the same plan of action. Caveat: This is not a paper about military strategy.

All generals decide upon the same plan of action. What is agreement? Loyal v All generals decide upon the same plan of action. Caveat: This is not a paper about military strategy.

All generals decide upon the same plan of action. What is agreement? Loyal v All generals decide upon the same plan of action. Why? Caveat: This is not a paper about military strategy.

What could go wrong? Attack, or Retreat?

What could go wrong? Attack, or Retreat? Attack! Retreat!

What could go wrong? Attack, or Retreat? Attack! Retreat! Attack!

What could go wrong? Attack, or Retreat? Attack! Retreat! Attack!

What could go wrong? Attack, or Retreat? Attack! Retreat! Attack! He said attack!

What could go wrong? Attack, or Retreat? Attack! Retreat! Attack! I’m confused! He said attack!

What could go wrong? Attack, or Retreat?

What could go wrong? Attack, or Retreat? Attack! Attack!

What could go wrong? Attack, or Retreat? Attack! Attack! He said retreat!

What could go wrong? Attack, or Retreat? Attack! Attack! I’m confused! He said retreat!

What could go wrong? Attack, or Retreat? Retreat! Retreat!

What could go wrong? Attack, or Retreat? Retreat! Retreat! He said attack!

What could go wrong? Attack, or Retreat? Retreat! Retreat! I’m confused! Retreat! He said attack!

A B Retreat! He said attack! Attack! Retreat! He said attack!

Coping with 1 traitor requires more than 3 generals. B Retreat! He said attack! Attack! Retreat! He said attack! Result: Coping with 1 traitor requires more than 3 generals.

>3 Generals Attack, or Retreat?

>3 Generals Attack, or Retreat?

>3 Generals Attack, or Retreat?

>3 Generals Attack, or Retreat?

No solution with fewer than 3𝑚+1 generals can cope with 𝑚 traitors. Attack, or Retreat? Result: No solution with fewer than 3𝑚+1 generals can cope with 𝑚 traitors.

OM(0) A! Number of traitors assumed

OM(0) A! Number of traitors assumed A

OM(0) A! Number of traitors assumed A A

OM(0) A! Number of traitors assumed A A A

OM(0) A! Number of traitors assumed A A A

OM(1) Number of traitors assumed A A R

OM(1) Number of traitors assumed A A A R

OM(1) Number of traitors assumed A A A R

OM(1) Number of traitors assumed A R A R A R

OM(1) Number of traitors assumed A R A R A R

OM(1) A! Number of traitors assumed A A ??

OM(1) A! Number of traitors assumed A A R

OM(1) A! Number of traitors assumed A A ?? R

OM(1) A! Number of traitors assumed A A ?? R

OM(1) A! Number of traitors assumed A R A R ?? R

OM(1) A! Number of traitors assumed A R A R ?? R

OM(2) Number of traitors assumed

OM(2) Number of traitors assumed

OM(2) Number of traitors assumed

OM(2) Number of traitors assumed

OM(2) Number of traitors assumed

OM(2) Number of traitors assumed What are some drawbacks of this?

Assumptions (p 387) All messages are delivered correctly. All recipients can verify who sent each message. The absence of a message can be detected. “Oral Messages”

Assumptions (p 391) “Signed Messages” All messages are delivered correctly. All recipients can verify who sent each message. The absence of a message can be detected. A loyal general's signature cannot be forged, alterations can be detected, and anyone can verify authenticity of signatures. “Signed Messages”

SM(0) A A A A

SM(0) A A A A A

SM(0) A A A A A A

SM(0) A A A A A A

SM(1) R A A A R A R R

SM(1) What’s different here? R A A A R A R R

SM(1) What’s different here? R A A A R A R R

SM(1) R A A R What are some drawbacks of this? What’s different here?

Relation to State Machine Replication All messages are delivered correctly. All recipients can verify who sent each message.

Relation to State Machine Replication All messages are delivered correctly. Communication lines can fail, and we treat each failure as a node failure. All recipients can verify who sent each message.

Relation to State Machine Replication All messages are delivered correctly. Communication lines can fail, and we treat each failure as a node failure. All recipients can verify who sent each message. Messages need to be sent directly rather than using packet switching. Alternatively, we can use digital signatures or message authentication codes (MACs) to ensure authenticity.

Relation to State Machine Replication The absence of a message can be detected. A loyal general’s signature cannot be forged, alternations can be detected, and anyone can verify authenticity of signatures.

Relation to State Machine Replication The absence of a message can be detected. Use a synchronized clock and set timeout for incoming messages. A loyal general’s signature cannot be forged, alternations can be detected, and anyone can verify authenticity of signatures.

Relation to State Machine Replication The absence of a message can be detected. Use a synchronized clock and set timeout for incoming messages. A loyal general’s signature cannot be forged, alternations can be detected, and anyone can verify authenticity of signatures. Use digital signatures (e.g. RSA, DSA). Question: Why not use MACs?

Efficiency Issues OM(m) is impractical since the message complexity is 𝑂 𝑛 𝑚 for n nodes SM(m) has message complexity 𝑂( 𝑛 2 ), but each node needs to send and verify 𝑂 𝑛 signatures for every request Time measurements for a 64-byte message with 1024-bit key Signature generation: 43ms Signature verification: 0.6ms Very high response time!

Practical Byzantine Fault Tolerance Miguel Castro and Barbara Liskov, OSDI 1999 Semi-synchronous Operates asynchronously until a view change (to be defined later) occurs Requires 𝑛=3𝑚+1 nodes to tolerate m failures 3% slower than non-tolerant implementation of a network file system

Practical Byzantine Fault Tolerance Basic Idea: Commander sends 𝑣(𝑖) to lieutenant 𝑖 Every lieutenant sends commander’s order to every other lieutenant Lieutenant 𝑖 waits for at least 2𝑚−1 messages of 𝑣(𝑖) from different lieutenants before committing

Practical Byzantine Fault Tolerance Why does this work? Suppose lieutenant 𝑖 commits 𝑣 𝑖 and lieutenant 𝑗 commits 𝑣(𝑗) Since at most 𝑚 generals are Byzantine, at least 𝑚+1 loyal generals (including 𝑖 himself) have sent 𝑣(𝑖) Same argument for 𝑣(𝑗) There are only 2𝑚+1 loyal generals, so some loyal general must have sent both 𝑣(𝑖) and 𝑣(𝑗). Hence 𝑣 𝑖 =𝑣(𝑗) Question: Liveness?

Practical Byzantine Fault Tolerance To ensure liveness Use a local timer to check for timeouts Cycle between generals (i.e. nodes) to operate as commander (i.e. primary node), called views Initiate a synchronous view change consensus protocol if timeout occurs Full protocol involves many stages, too complicated to explain

Efficiency Asynchronous part does not require signatures Use MACs to ensure authenticity of message MACs can be computed 3 orders of magnitude faster than digital signatures! Synchronous view change protocol requires digital signatures Happens rarely in realistic settings Faulty node can only cause view change if it is the primary node

Follow-ups Many papers built on top of PBFT 2000: Castro and Liskov – Proactive Recovery in a Byzantine-fault-tolerant System 2005: Abd-El-Malek et al. – Fault-scalable Byzantine Fault Tolerant Services. 2009: Kotla et al. – Zyzzyva: Speculative Byzantine Fault Tolerance 2009: Clement et al. – Making Byzantine Fault Tolerant Systems Tolerate Byzantine Faults 2010: Guerraoui et al. – The Next 700 BFT Protocols 2013: Aublin et al. – RBFT: Redundant Byzantine Fault Tolerance 2013: Veronese et al. – Efficient Byzantine Fault-Tolerance 2015: Bahsoun et al. – Making BFT Protocols Really Adaptive

Authenticated Messages Review 𝑚= number of faults tolerated 𝑛= number of replicas needed Today Thursday Synchronous Semi-Synchronous Asynchronous Oral Messages Sufficient 𝑛≥3𝑚+1 [LSP80] Impossible 𝑛≤3𝑚 [LSP80] 𝑚≥1 [FLP82] Authenticated Messages 1≤𝑛 [LSP80] 𝑛≥3𝑚+1 [CL99] Credit: Eleanor Birrell, CS 6410, Fall 2010