Randomized Algorithms for Distributed Agreement Problems Peter Robinson.

Slides:



Advertisements
Similar presentations
The Contest between Simplicity and Efficiency in Asynchronous Byzantine Agreement Allison Lewko The University of Texas at Austin TexPoint fonts used in.
Advertisements

Impossibility of Distributed Consensus with One Faulty Process
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.
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
Distributed Computing 8. Impossibility of consensus Shmuel Zaks ©
CSE 2331/5331 Topic 5: Prob. Analysis Randomized Alg.
Byzantine Generals Problem: Solution using signed messages.
Randomized Algorithms for Reliable Broadcast (IBM T.J. Watson) Vinod Vaikuntanathan Michael Ben-OrShafi GoldwasserElan Pavlov.
CPSC 668Set 10: Consensus with Byzantine Failures1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
© 2004 Goodrich, Tamassia Skip Lists1  S0S0 S1S1 S2S2 S3S3    2315.
Distributed systems Module 2 -Distributed algorithms Teaching unit 1 – Basic techniques Ernesto Damiani University of Bozen Lesson 3 – Distributed Systems.
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.
1 University of Freiburg Computer Networks and Telematics Prof. Christian Schindelhauer Distributed Coloring in Õ(  log n) Bit Rounds COST 293 GRAAL and.
CPSC 668Set 10: Consensus with Byzantine Failures1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
Parallel Routing Bruce, Chiu-Wing Sham. Overview Background Routing in parallel computers Routing in hypercube network –Bit-fixing routing algorithm –Randomized.
Randomized Byzantine Agreements (Sam Toueg 1984).
1 Fault-Tolerant Consensus. 2 Failures in Distributed Systems Link failure: A link fails and remains inactive; the network may get partitioned Crash:
Randomized and Quantum Protocols in Distributed Computation Michael Ben-Or The Hebrew University Michael Rabin’s Birthday Celebration.
Breaking the O(n 2 ) Bit Barrier: Scalable Byzantine Agreement with an Adaptive Adversary Valerie King Jared Saia Univ. of VictoriaUniv. of New Mexico.
Idit Keidar, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Lecture 5: Synchronous Uniform.
Derandomizing LOGSPACE Based on a paper by Russell Impagliazo, Noam Nissan and Avi Wigderson Presented by Amir Rosenfeld.
Bit Complexity of Breaking and Achieving Symmetry in Chains and Rings.
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 2006 Prof. Jennifer Welch.
CPSC 668Set 11: Asynchronous Consensus1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
DANSS Colloquium By Prof. Danny Dolev Presented by Rica Gonen
Maximal Independent Set Distributed Algorithms for Multi-Agent Networks Instructor: K. Sinan YILDIRIM.
On the Cost of Fault-Tolerant Consensus When There are no Faults Idit Keidar & Sergio Rajsbaum Appears in SIGACT News; MIT Tech. Report.
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.
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.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Set 11: Asynchronous Consensus 1.
Consensus and Its Impossibility in Asynchronous Systems.
Ch11 Distributed Agreement. Outline Distributed Agreement Adversaries Byzantine Agreement Impossibility of Consensus Randomized Distributed Agreement.
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.
Paxos: Agreement for Replicated State Machines Brad Karp UCL Computer Science CS GZ03 / M st, 23 rd October, 2008.
Skip Lists 二○一七年四月二十五日
Distributed systems Consensus Prof R. Guerraoui Distributed Programming Laboratory.
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
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
2/19/2016 3:18 PMSkip Lists1  S0S0 S1S1 S2S2 S3S3    2315.
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 4.1 Hash Functions and Data Integrity A cryptographic hash function can provide assurance of data integrity. ex: Bob can verify if y = h K (x) h is a.
1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Christian Schindelhauer Algorithms for Radio Networks Winter Term 2005/2006.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Skip Lists S3   S2   S1   S0  
Skip Lists 5/10/2018 Presentation for use with the textbook Data Structures and Algorithms in Java, 6th edition, by M. T. Goodrich, R. Tamassia, and M.
The consensus problem in distributed systems
When Is Agreement Possible
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Skip Lists S3 + - S2 + - S1 + - S0 + -
Skip Lists S3 + - S2 + - S1 + - S0 + -
Alternating Bit Protocol
Distributed Consensus
Agreement Protocols CS60002: Distributed Systems
Distributed Consensus
Skip Lists S3 + - S2 + - S1 + - S0 + -
Consensus in Synchronous Systems: Byzantine Generals Problem
Topic 3: Prob. Analysis Randomized Alg.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Announcement Sign up google sheet for in class lectures
Presentation transcript:

Randomized Algorithms for Distributed Agreement Problems Peter Robinson

Distributed System a a c c d d b b network consists of n distributed nodes sending/receiving messages over links nodes have local view good nodes execute algorithm Adversary controls behavior of t bad (Byzantine, malicious) nodes 0 1

Round-Based Computation round 1round 2round 3 space-time diagram visualizes run of algorithm round: send – receive – compute a a c c b b

Agreement Problems Nodes start with input value (e.g. {0, 1} or ids) Goal: after R rounds, all nodes decide on same value Easy without Byzantine nodes a a c c d d b b dec 1

Simple Algorithm - no Byzantine nodes round 1 a a c c b b node decides on majority value dec 1

Simple Algorithm – foiled by Adversary round 1 a a c c node decides on majority value dec 1 dec 0 Adversary knows starting values! Byzantine nodes know current network state

Important Agreement Problems Byzantine Agreement Nodes start with 0, 1 Eventually, all good nodes decide on same value v. If every node started with w, then decision value must be w. Leader Election Set A of Byzantine nodes Eventually, all good nodes elect same node as the leader. Requirement: bound on probability that leader is bad.

Byzantine Agreement (BA) Theorem. Any deterministic BA protocol takes at least t + 1 rounds. Theorem. There is a Las Vegas BA protocol that reaches agreement in O(1) rounds.

Assumptions Global coin: Every node can read outcome of global coin toss in every round. # of bad nodes bad nodes cannot fake other nodes’ identity when sending messages In every round, adversary knows entire state of network. BUT: it doesn’t know outcome of future coin flips!

Randomized BA - Code for Node i Input: value b i vote = b i For each round do 1. broadcast vote 2. receive votes from all other nodes 3. maj := majority value among rcvd votes (incl. vote) 4. tally := # of occurrences of maj among rcvd votes 5. if global-coin = HEADS then threshold := 5n/ else threshold := 6n/ if tally ≥ threshold then vote := maj 8. else vote := 0 9. if tally ≥ 7n/8 then decide on maj

Lemma 1. If all good nodes have same vote = b in some round, then all decide in O(1) rounds. Lemma 2. Suppose 2 good nodes compute different values for maj in round r. Then, all nodes have tally < threshold in r and decide on 0 in r+1. ⇒ we can focus on case where maj values are the same!

Lemma 4. Suppose all good nodes compute same values for maj in round r. The expected number of rounds before reaching an unfoiled round is 2. Round r is foiled if 2 good nodes compute different values for vote in r. Lemma 3. If round r is unfoiled, then all good nodes decide by round r+1. Theorem. There is a Las Vegas BA protocol that reaches agreement in O(1) rounds.

Leader Election Set of t bad nodes chosen by adversary Eventually, all good nodes elect the same node as the leader. Requirement: bound on probability that leader is bad. Every node has private coin.

Baton Passing Protocol Works for Byzantine nodes O(n) rounds for election Initially node 1 has baton. For rounds do: 1.Let U be set of nodes that have not yet held baton 2.Let node p be the current baton-holder 3.Node p passes baton to a randomly chosen node in U. In round n: current baton holder becomes leader

Theorem. The baton passing protocol elects a good leader with probability if, for some constant c, for any. Good node chooses next nodes at random Bad nodes will try to pass baton to good nodes. Adversary will not choose initial node to be Byzantine.

f(s,t) = prob of electing bad node, given s unselected good nodes, t unselected bad nodes, and current baton holder is good. g(s,t) = prob of electing bad node, given s unselected good nodes, t unselected bad nodes, and current baton holder is bad.

Lemma 1 (adversary strategy). For all s, t, it holds that. Lemma 2.

Lemma 1 (recurrence bound) For all s ≥0, t ≥ 1: Consider some and. We get, i.e. success probability of. Drawbacks of baton passing: “sequential” - election time O(n) rounds cannot tolerate linear # of bad nodes

Lightest Bin Protocol Uses balls-into-bins model to foil adversary Tolerates bad nodes Running time O(log * n) rounds Requires atomic broadcast – restricts adversary.

Subroutine: Simple 2-Bin Protocol Let X := set of nodes In every round do, while |X| > 1: 1.Nodes in X broadcast private random bit. 2.Let X i be set of nodes that send value i. Atomic broadcast provides consistent views. 3.if |X 0 | ≥ |X|/2 then X := X 1 else X := X 0 Elect remaining element of X. k = 2 h good nodes, for some h ≥ 1 k > n/2

Lemma 1. The simple protocol elects a good leader with probability ≥ in O(log n) rounds.

The Lightest Bin Protocol Let be number of bins. In every round do, while |X| > C, for fixed constant C: 1.Every node in X randomly chooses one of m bins. 2. X := lightest bin, i.e., chosen by fewest nodes Run Simple 2-bin protocol on nodes in X. Elect remaining node to be leader.

Lemma 1. At the end of every round, set X contains a majority of good nodes with high probability. Lemma 2. The lightest bin protocol has a round complexity of O(log * n) rounds.

Leader Election - Success Probability Lower Bound Consider run of A without bad nodes. p i = probability of node i to become leader: Set T of t largest p i ’s add up to. Adversary can choose T to be bad. Theorem. The failure probability of any leader election protocol A is at least t/n.