Randomized Byzantine Agreements (Sam Toueg 1984).

Slides:



Advertisements
Similar presentations
Multi-Party Contract Signing Sam Hasinoff April 9, 2001.
Advertisements

Impossibility of Distributed Consensus with One Faulty Process
DISTRIBUTED SYSTEMS II FAULT-TOLERANT BROADCAST Prof Philippas Tsigas Distributed Computing and Systems Research Group.
Chapter 6 - Convergence in the Presence of Faults1-1 Chapter 6 Self-Stabilization Self-Stabilization Shlomi Dolev MIT Press, 2000 Shlomi Dolev, All Rights.
Distributed Computing 8. Impossibility of consensus Shmuel Zaks ©
Outline. Theorem For the two processor network, Bit C(Leader) = Bit C(MaxF) = 2[log 2 ((M + 2)/3.5)] and Bit C t (Leader) = Bit C t (MaxF) = 2[log 2 ((M.
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.
DISTRIBUTED SYSTEMS II FAULT-TOLERANT AGREEMENT Prof Philippas Tsigas Distributed Computing and Systems Research Group.
Distributed Computing 8. Impossibility of consensus Shmuel Zaks ©
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.
1 Principles of Reliable Distributed Systems Lectures 11: Authenticated Byzantine Consensus Spring 2005 Dr. Idit Keidar.
CPSC 668Set 5: Synchronous LE in Rings1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
The Byzantine Generals Problem (M. Pease, R. Shostak, and L. Lamport) January 2011 Presentation by Avishay Tal.
CPSC 668Set 9: Fault Tolerant Consensus1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
CPSC 668Set 9: Fault Tolerant Consensus1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
CPSC 668Set 10: Consensus with Byzantine Failures1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 16 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:
Breaking the O(n 2 ) Bit Barrier: Scalable Byzantine Agreement with an Adaptive Adversary Valerie King Jared Saia Univ. of VictoriaUniv. of New Mexico.
Clock Synchronization Ken Birman. Why do clock synchronization?  Time-based computations on multiple machines Applications that measure elapsed time.
1 Principles of Reliable Distributed Systems Recitation 8 ◊S-based Consensus Spring 2009 Alex Shraer.
Distributed systems Module 2 -Distributed algorithms Teaching unit 1 – Basic techniques Ernesto Damiani University of Bozen Lesson 4 – Consensus and reliable.
CPSC 668Set 11: Asynchronous Consensus1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
The Byzantine Generals Strike Again Danny Dolev. Introduction We’ll build on the LSP presentation. Prove a necessary and sufficient condition on the network.
Distributed Algorithms: Agreement Protocols. Problems of Agreement l A set of processes need to agree on a value (decision), after one or more processes.
On the Cost of Fault-Tolerant Consensus When There are no Faults Idit Keidar & Sergio Rajsbaum Appears in SIGACT News; MIT Tech. Report.
Systems of Distributed systems Module 2 - Distributed algorithms Teaching unit 2 – Properties of distributed algorithms Ernesto Damiani University of Bozen.
 Idit Keidar, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Lecture 7: Failure Detectors.
Efficient Algorithms to Implement Failure Detectors and Solve Consensus in Distributed Systems Mikel Larrea Departamento de Arquitectura y Tecnología de.
1 Principles of Reliable Distributed Systems Recitation 7 Byz. Consensus without Authentication ◊S-based Consensus Spring 2008 Alex Shraer.
Secure Message Transmission In Asynchronous Directed Networks Kannan Srinathan, Center for Security, Theory and Algorithmic Research, IIIT-Hyderabad. In.
Paxos Made Simple Jinghe Zhang. Introduction Lock is the easiest way to manage concurrency Mutex and semaphore. Read and write locks. In distributed system:
Distributed Consensus Reaching agreement is a fundamental problem in distributed computing. Some examples are Leader election / Mutual Exclusion Commit.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Set 11: Asynchronous Consensus 1.
Robust Sharing of Secrets when the Dealer Is Honest or Cheating Tal Rabin 1994 Brian Fry COEN
Consensus and Its Impossibility in Asynchronous Systems.
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.
Practical Byzantine Fault Tolerance
Byzantine fault-tolerance COMP 413 Fall Overview Models –Synchronous vs. asynchronous systems –Byzantine failure model Secure storage with self-certifying.
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 8 Instructor: Haifeng YU.
DISTRIBUTED ALGORITHMS AND SYSTEMS Spring 2014 Prof. Jennifer Welch Set 11: Asynchronous Consensus 1.
1 Leader Election in Rings. 2 A Ring Network Sense of direction left right.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Set 5: Synchronous LE in Rings 1.
Sliding window protocol The sender continues the send action without receiving the acknowledgements of at most w messages (w > 0), w is called the window.
Hwajung Lee. Reaching agreement is a fundamental problem in distributed computing. Some examples are Leader election / Mutual Exclusion Commit or Abort.
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.
SysRép / 2.5A. SchiperEté The consensus problem.
Chapter 21 Asynchronous Network Computing with Process Failures By Sindhu Karthikeyan.
Alternating Bit Protocol S R ABP is a link layer protocol. Works on FIFO channels only. Guarantees reliable message delivery with a 1-bit sequence number.
Fault tolerance and related issues in distributed computing Shmuel Zaks GSSI - Feb
DISTRIBUTED ALGORITHMS Spring 2014 Prof. Jennifer Welch Set 9: Fault Tolerant Consensus 1.
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 9 Instructor: Haifeng YU.
1 Fault-Tolerant Consensus. 2 Communication Model Complete graph Synchronous, network.
1 SECOND PART Algorithms for UNRELIABLE Distributed Systems: The consensus problem.
Randomized Algorithms for Distributed Agreement Problems Peter Robinson.
1 AGREEMENT PROTOCOLS. 2 Introduction Processes/Sites in distributed systems often compete as well as cooperate to achieve a common goal. Mutual Trust/agreement.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Alternating Bit Protocol
Distributed Consensus
Agreement Protocols CS60002: Distributed Systems
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
Presentation transcript:

Randomized Byzantine Agreements (Sam Toueg 1984)

2 Motivation Already know that no deterministic agreement algorithm exists for asynchronous communication. Therefore use a randomized protocol that terminates with probability 1. Show that no Byzantine Agreement algorithm can overcome more than faulty processes in asynchronous systems. Show a minimal algorithm

3 Model n processes, at most t faulty (the rest are proper ) Reliable p2p communication Digital signatures authenticate all messages

4 Model, cont’d Use idea from Shamir’s “How to Share a Secret” (1979): Divide a secret among n participants, where only (t+1)<n pieces are necessary and sufficient to decrypt Use a non-faulty dealer that generates a sequence of random bits, each bit a shared secret

5 Compute_secret function Compute_secret(s k ): Broadcast each piece to all processes Wait to receive t+1, compute s k If proper processes need not rely on faulty processes to compute the secret, then n should be at least: n>t + (t+1)  n>2t+1

6 An asynchronous broadcast algorithm Limits the power of faulty processes for n≥ 3t+1 echo_broadcast(process G, message m) G sends [ initial,G,m ] to all processes Every recipient replies with [ echo, G,m ] to all and ignores subsequent [ initial,G,m’ ] Upon receiving [ echo,G,m ] from (n+t)/2 distinct processes, then a process accepts m from G.

7 Proof for echo_broadcast All messages accepted by proper processes are identical If not, then G 1 and G 2 accept m 1 and m 2 respectively. So at least (n+t)/2 sent [ echo,G,m 1 ] and at least (n+t)/2 sent [ echo,G,m 2 ]. So more than t sent both messages and are thus faulty. Yet at most t are faulty  Contradiction If G is proper, then all proper processes accept m from G If G is proper, then it sends initial to all processes. At least n-t are proper and send echo to all processes. A proper process accepts m after receiving (n+t)/2 echo. By the req that n≥3t+1 we get that n- t > (n+t)/2 and thus all proper processes accept m.

8 Async binary Byzantine Agreement, n≥3t+1 Gi:M :=M i for k =1 t o k =R do (* Phase 1 *) broadcast M; wait to receive M-messages from n-t distinct processes; proof := set of received messages; count(1) := number of received messages with M = 1; if count(1) > n - 2t then M := 1 else M :=0; (* Phase 2 *) echo_broadcast [M, proof ]; wait to accept [M, proof ]-messages, with a correct proof, from n - t distinct processes; count(1) := number of accepted messages with M =1; compute_secret( s k ); if (s k = 0 and count(1) ≥ 1) or (s k = 1 and count(1) ≥ 2t+1) then M := 1 else M : = O; od

9

10 Proofs for bin Aync Byz Agree 1.Terminates? Yes —all non-faulty processes accept n-t messages and exit both wait phases. As for rounds, R is constant. 2.If the system is initially proper (all non-faulty processes have the same value m ) then every process terminates the algorithm with M=m.

11 Proof of part 2 Phase 1: count(1)≥n-2t iff m=1 In the beginning, at most t processes broadcast M different from 1. Therefore among n-t distinct messages received by G, at least n-2t have M=1, and at most t have 0. Therefore if m=1 then count(1)≥n-2t and if m=0 then count(1) ≤ t. Note that t<n-2t Thus every proper process sets M:=m at end of phase 1 of iteration k.

12 Proof of part 2, cont’d Phase 2: No correct proofs for any value M different from m. If m =0 then n-t have M=0 at phase start. Proof of m’=1 cannot exist: need n-2t signed messages with value 1. But n-2t>t. If m =1 then a correct proof for m ’=0 consists of n-t messages from distinct processes that have more than t+1 of them with value 0. Also impossible. Since there are no correct proofs for values different than m, every process accepts only messages with M=m in Phase 2 of the iteration. Therefore, at the end of second phase, every proper process sets M:=m, independently from the value of the bit s k

13 Proof, part 3 3.If the system is not proper, then with probability at least 1-(1/2) R, every proper process terminates the algorithm with the same value M Show that for k≥1, if state(k)=disagreement then with prob ≥ 1/2, state(k+1)=agree

14 Proof, part 3 cont.

15 Proof part 3, cont’d Let G be a proper process receiving n-t [M,proof] messages from G 1 …G n-t. Two possible cases for count(1) at G: count(1)≥t+1 : w.l.o.g G accepts a message with M=1 from G 1 …G t+1. If every other G’ accepts messages from all but t processes, then G’ must accept one message from G 1 …G t+1. Therefore count(1)≥1 for all G’ at the end of this phase.

16 Proof part 3, cont’d count(1)<t+1 : Any other proper G’ accepts messages with M=1 from at most t processes in G 1 …G n-t and from at most t processes in G n-t+1 …G n. Therefore G’ has count(1)<2t+1 at the end of this phase. Let a k denote the prob that count(1)≥ t+1. If s k =0 then all proper processes have count(1)>1 and set M:=1 at the end of iteration k. This happens with prob (1/2) a k. If s k =1 and count(1)<t+1 then all proper processes set M:=0 at the end of iteration k. This happens with prob (1/2)(1- a k ). So state(k+1)=agreement with prob at least 0.5 a k +0.5(1- a k ) = 1/2.

17 Upper bound on number of faulty processes Theorem: There are no Byzantine Agreement algorithms for asynchronous systems where n≤3t. Proof sketch: By contradiction, suppose P is an alg with n=3t processes. Divide into three groups A,B,C of size t each

18 Upper bound proof, cont’d Scenarios: 1.All processes in A,B have init val 0; C has val 1. Start running P but processes in C die immediately. Eventually P must agree on 0 using A and B, at time t 1. 2.B and C have init val 1, A has 0. A dies, B and C agree on 1, at time t 2.

19 Upper bound proof, cont’d 3.A has 0, C has 1, B is faulty. B pretends towards A that its init is 0 and to C that its init is 1. If A and C’s communication link is very slow > ( max(t 1,t 2 ) ), then processes in A see same scenario as (1) and therefore at t 1 all in A agree 0. Similarly, all in C see scenario (2) and agree on 1.  P is not a Byzantine Agreement algorithm.