The Byzantine Generals Problem Leslie Lamport, Robert Shostak, Marshall Pease 10.05.2015Distributed Algorithms A1 Presented by: Anna Bendersky.

Slides:



Advertisements
Similar presentations
Fault Tolerance. Basic System Concept Basic Definitions Failure: deviation of a system from behaviour described in its specification. Error: part of.
Advertisements

+ The Byzantine Generals Problem Leslie Lamport, Robert Shostak and Marshall Pease Presenter: Jose Calvo-Villagran
DISTRIBUTED SYSTEMS II FAULT-TOLERANT AGREEMENT Prof Philippas Tsigas Distributed Computing and Systems Research Group.
Byzantine Generals. Outline r Byzantine generals problem.
The Byzantine Generals Problem Leslie Lamport, Robert Shostak and Marshall Pease Presenter: Phyo Thiha Date: 4/1/2008.
Agreement: Byzantine Generals UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department CS 739 Distributed Systems Andrea C. Arpaci-Dusseau Paper: “The.
BASIC BUILDING BLOCKS -Harit Desai. Byzantine Generals Problem If a computer fails, –it behaves in a well defined manner A component always shows a zero.
The Byzantine Generals Problem Boon Thau Loo CS294-4.
Achieving Byzantine Agreement and Broadcast against Rational Adversaries Adam Groce Aishwarya Thiruvengadam Ateeq Sharfuddin CMSC 858F: Algorithmic Game.
Prepared by Ilya Kolchinsky.  n generals, communicating through messengers  some of the generals (up to m) might be traitors  all loyal generals should.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Byzantine Fault Tolerance Steve Ko Computer Sciences and Engineering University at Buffalo.
DISTRIBUTED SYSTEMS II FAULT-TOLERANT AGREEMENT Prof Philippas Tsigas Distributed Computing and Systems Research Group.
Byzantine Generals Problem: Solution using signed messages.
CPSC 668Set 10: Consensus with Byzantine Failures1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
Byzantine Generals Problem Anthony Soo Kaim Ryan Chu Stephen Wu.
Copyright 2006 Koren & Krishna ECE655/ByzGen.1 UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering Fault Tolerant Computing ECE 655.
CPSC 668Set 10: Consensus with Byzantine Failures1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
Idit Keidar, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Lecture 6: Synchronous Byzantine.
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 15 Wenbing Zhao Department of Electrical and Computer Engineering.
1 Fault-Tolerant Consensus. 2 Failures in Distributed Systems Link failure: A link fails and remains inactive; the network may get partitioned Crash:
A Look at Byzantine Generals Problem R J Walters.
Byzantine Generals Problem in the Light of P2P Computing Natalya Fedotova Luca Veltri International Workshop on Ubiquitous Access Control July 17, 2006.
Distributed systems Module 2 -Distributed algorithms Teaching unit 1 – Basic techniques Ernesto Damiani University of Bozen Lesson 4 – Consensus and reliable.
The Byzantine Generals Problem L. Lamport R. Shostak M. Pease Presented by: Emmanuel Grumbach Raphael Unglik January 2004.
Distributed Algorithms: Agreement Protocols. Problems of Agreement l A set of processes need to agree on a value (decision), after one or more processes.
The Byzantine Generals Problem Leslie Lamport Robert Shostak Marshall Pease.
Distributed Consensus Reaching agreement is a fundamental problem in distributed computing. Some examples are Leader election / Mutual Exclusion Commit.
Lecture #12 Distributed Algorithms (I) CS492 Special Topics in Computer Science: Distributed Algorithms and Systems.
“Revisiting Fault Diagnosis Agreement in a New Territory” S. C. Wang and K. Q. Yan Operating Systems Review, April 2004, p. 41– 61. An extension of the.
Ch11 Distributed Agreement. Outline Distributed Agreement Adversaries Byzantine Agreement Impossibility of Consensus Randomized Distributed Agreement.
DISTRIBUTED SYSTEMS II FAULT-TOLERANT AGREEMENT Prof Philippas Tsigas Distributed Computing and Systems Research Group.
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.
The Byzantine General Problem Leslie Lamport, Robert Shostak, Marshall Pease.SRI International presented by Muyuan Wang.
EECS 262a Advanced Topics in Computer Systems Lecture 25 Byzantine Agreement November 28 th, 2012 John Kubiatowicz and Anthony D. Joseph Electrical Engineering.
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.
CSE 486/586 CSE 486/586 Distributed Systems Byzantine Fault Tolerance Steve Ko Computer Sciences and Engineering University at Buffalo.
Chap 15. Agreement. Problem Processes need to agree on a single bit No link failures A process can fail by crashing (no malicious behavior) Messages take.
UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department
Byzantine Fault Tolerance
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Byzantine Fault Tolerance Steve Ko Computer Sciences and Engineering University at Buffalo.
Behavior of Byzantine Algorithm Chun Zhang. Index Introduction Experimental Setup Behavior Observation Result Analysis Conclusion Future Work.
Distributed Agreement. Agreement Problems High-level goal: Processes in a distributed system reach agreement on a value Numerous problems can be cast.
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
reaching agreement in the presence of faults
Synchronizing Processes
COMP28112 – Lecture 15 Byzantine fault tolerance: dealing with arbitrary failures The Byzantine Generals’ problem (Byzantine Agreement) 26-Jan-18 COMP28112.
The OM(m) algorithm Recall what the oral message model is.
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
Jacob Gardner & Chuan Guo
Byzantine Generals Problem
Byzantine Faults definition and problem statement impossibility
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.
John Kubiatowicz Electrical Engineering and Computer Sciences
COMP28112 – Lecture 13 Byzantine fault tolerance: dealing with arbitrary failures The Byzantine Generals’ problem (Byzantine Agreement) 24-Apr-19 COMP28112.
Byzantine Generals Problem
CSE 486/586 Distributed Systems Byzantine Fault Tolerance
Presentation transcript:

The Byzantine Generals Problem Leslie Lamport, Robert Shostak, Marshall Pease Distributed Algorithms A1 Presented by: Anna Bendersky

Motivation A reliable computer system must be able to cope with a failure of one or more of its components A failed computer behavior in this case: – Sending conflicting messages to different parts of the system – Not sending some of the messages

Byzantine Generals (Abstract Expression) Several divisions of the byzantine army are camped outside a city, each division has a general. The generals can communicate with each other using a messenger The generals must decide upon a common plan of action Some of the generals might be traitors! We will assume that there is a single commanding general (Commander), and the rest of the generals are his subordinates (Lieutenants)

Objective All loyal generals decide upon the same plan of action A small number of traitors will not cause the loyal generals to adopt a bad plan Formally: The Byzantine Generals Problem 1.All loyal lieutenants obey the same order 2.If the commander is loyal, then every loyal lieutenant obeys the order he sends

Outline Minimal bound on the number of traitors Oral messages algorithm to reach agreement Written messages algorithm to reach agreement

Minimal Bound on the traitors number The Byzantine Generals Problem 1.All loyal lieutenants obey the same order 2.If the commander is loyal, then every loyal lieutenant obeys the order he sends Case 1: Source process is faulty Case 2: Process L2 is faulty From now forward we will assume that the generals have to decide upon a single bit: ‘1’ for ‘Attack’, or ‘0’ for ‘Retreat’. The default operation is ‘Retreat’ L2L1 Commander attackretreat L2L1 Commander attack retreat attack

Minimal Bound on the traitors number Corollary 1: In the case of 3 processes, there is no way to deal with one faulty process. Corollary 2: No solution with fewer than 3m+1 generals can cope with m traitors

A solution with oral messages No solution with fewer than 3m+1 generals can cope with m traitors The paper shows an algorithm to solve the byzantine generals problem when the number of loyal generals > 3m The Byzantine Generals Problem 1.All loyal lieutenants obey the same order 2.If the commanding general is loyal, then every loyal lieutenant obeys the order he sends Assumptions: 1.Every message that is sent is delivered correctly 2.A receiver of a message knows who sent it 3.The absence of a message can be detected

Oral Messages Algorithm A recursive definition, with a base case for m=0, and a recursive step for m > 0: Algorithm OM(0) 1.The commander sends his value to every lieutenant. 2.Each lieutenant uses the value he receives from the commander. Algorithm OM(m), m > 0 1.The commander sends his value to each lieutenant. 2.For each i, let v i be the value lieutenant i receives from the commander. Lieutenant i acts as the commander in Algorithm OM(m-1) to send the value v i to each of the n-2 other lieutenants. 3.For each i, and each j ≠ i, let v i be the value lieutenant i received from lieutenant j in step 2 (using Algorithm OM(m-1)). Lieutenant i uses the value Majority(v 1, v 2, … v n )

Oral Messages Example (1) G m=0 The general sends a message to all lieutenants G … m=1 Each general sends the message he received to all other lieutenants Sender=P 2 Sender=P 3 Sender=P 4 Sender=P 5 Sender=P 6 DestMsgDestMsgDestMsgDestMsgDestMsg P2P2 {0,12}P2P2 {0,13}P2P2 {0,14}P2P2 {1,15}P2P2 {1,16} P3P3 {0,12}P3P3 {0,13}P3P3 {0,14}P3P3 {1,15}P3P3 {1,16} P4P4 {0,12}P4P4 {0,13}P4P4 {0,14}P4P4 {1,15}P4P4 {1,16} P5P5 {0,12}P5P5 {0,13}P5P5 {0,14}P5P5 {1,15}P5P5 {1,16} P6P6 {0,12}P6P6 {0,13}P6P6 {0,14}P6P6 {1,15}P6P6 {1,16} Sender=P 2 Sender=P 3 Sender=P 4 Sender=P 5 Sender=P 6 {0,12}{0,13}{0,14}{1,15}{1,16}

Oral Messages Example (2) Step 2: Each lieutenant sends the message he received to all other lieutenants Sender=P 2 Sender=P 3 Sender=P 4 Sender=P 5 Sender=P 6 {0,132} {0,142} {1,152} {1,162} {0,123} {0,143} {1,153} {1,163} {0,124} {0,134} {1,154} {1,164} {0,125} {0,135} {0,145} {1,165} {0,126} {0,136} {0,146} {1,156} Sender=P 2 Sender=P 3 Sender=P 4 Sender=P 5 Sender=P 6 {0,12}{0,13}{0,14}{1,15}{1,16} Messages sent in step 1: These are the messages being sent in the recursive algorithm – Lets see which value each lieutenant decides to use

Oral Messages Example (3) We could build a “recursion tree” for the decision of each lieutenant: Lieutenant i: {1,1,?} Received message Message source Decision {0,12,?} {0,13,?} {0,14,?} {1,15,?} {1,16,?} {0,12,0} {0,13,0} {0,14,0} {1,15,1} {1,16,1} {1,1,0} majority (v 1, v 2, … v n ) All lieutenants reach the decision ‘0’ The messages lieutenant i receives at step OM(1) The messages lieutenant i receives at step OM(0)

A more complex example n=7, m=2 13 G {0,1,?} {0,12,?} {0,13,?} {0,14,?} {0,15,?} {X,16,?} {X,17,?} {0,123,?} {0,124,?} {0,125,?} {X,126,?} {X,127,?} {0,132,?} {0,134,?} {0,135,?} {X,136,?} {X,137,?} {0,142,?} {0,143,?} {0,145,?} {X,146,?} {X,147,?} {0,152,?} {0,153,?} {0,154,?} {X,156,?} {X,157,?} {X,162,?} {X,163,?} {X,164,?} {X,165,?} {X,167,?} {X,172,?} {X,173,?} {X,174,?} {X,175,?} {X,176,?} {0,123,0} {0,124,0} {0,125,0} {X,126,X} {X,127,X} {0,132,0} {0,134,0} {0,135,0} {X,136,X} {X,137,X} {0,142,0} {0,143,0} {0,145,0} {X,146,X} {X,147,X} {0,152,0} {0,153,0} {0,154,0} {X,156,X} {X,157,X} {X,162,X} {X,163,X} {X,164,X} {X,165,X} {X,167,X} {X,172,X} {X,173,X} {X,174,X} {X,175,X} {X,176,X} {0,12,0} {0,13,0} {0,14,0} {0,15,0} {X,16,X} {X,17,X} {0,1,0}

Oral Messages Algorithm: Proof (1) Lemma 1: For any m and k, Algorithm OM(m) satisfies (2) if there are more than 2k+m generals and at most k traitors Proof: (by induction on m) Base: Algorithm OM(0) satisfies (2) when the commander is loyal. Assumption: the algorithm OM(m-1) satisfies (2) if there are more than 2k+m-1 generals and at most k traitors Step: In step (1) every loyal commander sends the value ‘v’ to all n-1 lieutenants. In step (2) each loyal lieutenant applies OM(m-1) with n-1 lieutenants By hypothesis,  A majority of the n-1 lieutenants are loyal  By assumption, each loyal lieutenant has v i = ‘v’ for a majority of n-1 values i.  Majority(v 1,…v n )=‘v’ in step (3) The Byzantine Generals Problem 1.All loyal lieutenants obey the same order 2.If the commander is loyal, then every loyal lieutenant obeys the order he sends

Oral Messages Algorithm: Proof (2) Theorem 1: For any m, algorithm OM(m) satisfies conditions 1 and 2 if there are more than 3m generals, and at most m traitors. Proof: (By induction on m) Base: if there are no traitors, OM(0) satisfies conditions 1 and 2 Assumption: OM(m-1) satisfies conditions 1 and 2 if there are more than 3(m-1) generals, and at most m-1 traitors Step: We can use lemma1 with k=m, and get that condition 2 holds. Condition 1 follows from condition 2 when the commander is loyal. Else, there are at most m traitors and the commander is one of them  At most m-1 of the lieutenants are traitors  At step (2) of the algorithm there are 3m-1 > 3(m-1) generals, and at most m-1 traitors  From the assumption, OM(m-1) satisfies conditions 1 and 2.  All loyal generals get the same values v j for every loyal general j.  Majority(v 1,…v n ) is the same for all loyal lieutenants in step (3) The Byzantine Generals Problem 1.All loyal lieutenants obey the same order 2.If the commander is loyal, then every loyal lieutenant obeys the order he sends QED

A solution with signed messages The problem we had: traitors could lie Assumption 4: A loyal general’s signature cannot be forged, and any alteration of the contents of his signed message can be detected Anyone can verify the authenticity of a general’s signature The previous lower bound no longer holds! There exists an algorithm that copes with m traitors for any number of generals (n≥m+2)

Signed messages example Case 1: Source process is faulty L2L1 Commander attack:0retreat:0 retreat:0:2 Commander is faulty! retreat Commander is faulty! retreat attack:0:1 Case 2: Process L2 is faulty L2L1 Commander attack:0 retreat:2 Commander is not faulty! attack Commander is not faulty! attack attack:0:1 Commander’s message cannot be forged!

Signed Messages Algorithm Algorithm SM(m) Initially V i = {} 1.The commander signs and sends his value to every lieutenant 2.For each i: 1.If Lieutenant i receives a message of the form v:0 from the commander and he has not yet received any order, then 1.V i  {v} 2.He sends the message v:0:i to every other lieutenant 2.If Lieutenant i receives a message of the form v:0:j 1 : … :j k and v is not in the set V i then 1.V i  V i U {v} 2.If k<m then he sends the message v:0:j 1 : … : j k :i to every lieutenant other than j 1,…,j k 3.For each i: When lieutenant i will receive no more messages, he obeys the order choice(V i )

Signed messages example Case 1: Source process is faulty L2L1 Commander attack:0retreat:0 retreat:0:2 Commander is faulty! retreat Commander is faulty! retreat attack:0:1 Case 2: Process L2 is faulty L2L1 Commander attack:0 retreat:2 Commander is not faulty! attack Commander is not faulty! attack attack:0:1 Commander’s message cannot be forged! V(L1) = {attack, retreat} V(L1) = {attack}

Signed Messages Algorithm: Proof If the commander is loyal, then he sends his signed order v:0 to every lieutenant in step (1), and every loyal lieutenant will add v to V i. Since no traitorous lieutenant can forge a message of the form v’:0, a loyal lieutenant can receive no other order in step (2.2). For all loyal lieutenants: V i = {v} => every loyal lieutenant obeys the order the general sends. (condition 2 OK) It remains to prove condition 1 for the case where the commander is not loyal. Two loyal lieutenants i and x obey the same order in step (3) if the sets V i = V x. => i received the message v1: – If it was received from the general – It was sent to x in step 1. – It was received by v1:0:{list}. If x is in the list, then x has. – It was received by v1:0:{list}, and x is not in the list: If one of the lieutenants in the list is loyal, then x received it when the loyal lieutenant sent it There are at most m-1 traitorous lieutenants, so in step m lieutenant i will send the message to x The Byzantine Generals Problem 1.All loyal lieutenants obey the same order 2.If the commander is loyal, then every loyal lieutenant obeys the order he sends QED

Thank You Questions?