Presentation is loading. Please wait.

Presentation is loading. Please wait.

Byzantine Fault Tolerance in Stateful Web Service Yilei ZHANG 30/10/2009.

Similar presentations


Presentation on theme: "Byzantine Fault Tolerance in Stateful Web Service Yilei ZHANG 30/10/2009."— Presentation transcript:

1 Byzantine Fault Tolerance in Stateful Web Service Yilei ZHANG 30/10/2009

2 Outline Byzantine generals problem BFT in Stateful Web service

3 Once upon a time... The pictures are taken from: R. Goscinny and A. Uderzo, Asterix and Latraviata. Communicating only by messenger Generals must agree upon a common battle plan Some of them may be traitors who will try to confuse the others several divisions of the Byzantine army each commande d by its own general

4 Byzantine generals problem Find an algorithm to ensure that:  A. All loyal generals decide upon the same plan of action. (consistent agreement)  B. A small number of traitors cannot cause the loyal generals to adopt a bad plan. (reasonable plan) Notation  vi: message sent by general i.  n: number of generals.  f: number of traitors.

5 Byzantine generals problem Condition A: All loyal generals decide upon the same plan of action. (consistent agreement) For condition A to be satisfied, the following must be true:  1. Every loyal general must obtain the same information v1...., vn.  2. If the ith general is loyal, then the value that he sends must be used by every loyal general as the value of vi.

6 Byzantine generals problem To hold condition 1 & 2, how does a single general send his value to the others? Remodeled as a commanding general sending an order to his lieutenants:  IC1. All loyal lieutenants obey the same order.  IC2. If the commanding general is loyal, then every loyal lieutenant obeys the order he sends. If n<3f+1, then there is no solution

7 Example: Poor Lieutenant 1 ’ s Dilemma Lieutenant 1 Attack He said retreat Lieutenant 2 (Traitor) Commander Lieutenant 1 Attack Retreat He said retreat Lieutenant 2 Commander (Traitor) The two situations are identical to me! IC1 violated ! Attack Retreat

8 BFT Solution for more than 3f+1 generals with f traitors Assumptions  A1. Every message that is sent is delivered correctly.  A2. The receiver of a message knows who sent it.  A3. The absence of a message can be detected. Function 'majority':  With the property that if a majority of the values v i equals v, then majority(v 1,...,v n-1 ) equals v. Order set V i  Each lieutenant uses it to store orders from others Algorithm OM(m) can deal with m traitors  Defined recursively

9 Base case: OM(0) Lieutenant i attack Lieutenant k Commander 0 Lieutenant j attack Commander sends messages to Lieutenants Each Lieutenant receives and records it. V i ={v 0 :attack}

10 OM(m) Lieutenant i attack Lieutenant k Commander Lieutenant j attack …… attack Each Lieutenant act as the commander in OM(m-1) Send messages to ‘his’ Lieutenants Do this recursively attack

11 Step 3: Majority Vote Lieutenant 1Lieutenant n-1 Commander Lieutenant 2 My decision is: majority(v1,v2,…,v_n-1) …… Me too For any m, Algorithm OM(m) satisfies conditions IC1 and IC2 if there are more than 3m generals and at most m traitors

12 OM(1): Lieutenant 3 is a traitor Lieutenant 1 Attack Lieutenant 3 (Traitor) Commander Lieutenant 2 Attack Retreat Attack Majority(attack,attack,attack) =attack Majority(attack,attack,retreat) =attack IC1 achieved IC2 achieved

13 OM(1): Commander is a traitor Lieutenant 1 Attack Retreat IC1 achieved IC2 need not be satisfied Lieutenant 3 Commander (Traitor) Lieutenant 2 Attack Retreat AttackRetreat Majority(attack,retreat,retreat) =retreat Majority(attack,retreat,retreat) =retreat Majority(attack,retreat,retreat) =retreat

14 BFT in stateful Web service Voting center  (a, b, a, c)->a Majority voting  1: (a, a, a, b)->a  3: (a, b, a, b)->a/b  4: (a, b, a, b)->a/b BFT  1: (a, x, a, b)->a  3: (a, x, a, b)->a  4: (a, x, a, b)->a


Download ppt "Byzantine Fault Tolerance in Stateful Web Service Yilei ZHANG 30/10/2009."

Similar presentations


Ads by Google