ipdps11

download ipdps11

of 11

Transcript of ipdps11

  • 7/31/2019 ipdps11

    1/11

    The Weighted Byzantine Agreement ProblemVijay K. Garg and John Bridgman

    Department of Electrical and Computer EngineeringThe University of Texas at Austin

    Austin, TX 78712-1084, [email protected], [email protected]

    AbstractThis paper presents a weighted version of theByzantine Agreement Problem and its solution under variousconditions. In this version, each machine is assigned a weightdepending on the application. Instead of assuming that at mostf out of N machines fail, the algorithm assumes that the totalweight of the machines that fail is at most f /N. When eachmachine has weight 1/N , this problem reduces to the standardByzantine Generals Agreement Problem. By choosing weightsappropriately, the weighted Byzantine Agreement Problem can

    be applied to situations where a subset of processes are moretrusted. By using weights, the system can reach consensus inthe presence of Byzantine failures, even when more than N/3

    processes fail, so long as the total weight of the failed processesis less than 1/3. Also, a method to update the weights of the

    processes after execution of the weighted Byzantine Agreementis given. The update method guarantees that the weight of anycorrect process is never reduced and the weight of any faulty

    process, suspected by correct processes whose total weight is atleast 1/4, is reduced to 0 for future instances. A short discussionof some weight assignment strategies is also given.

    I. I NTRODUCTIONThe Byzantine Agreement (BA) [1], [2] is a fundamental

    problem in distributed computing with extensive literature [3] [5]. In the usual set-up, there are N processes required to agreeon a common value, given that at most f of them may showarbitrary or Byzantine behavior. In real-life applications, theremay be multiple classes of processes. For example, in a mobilecomputing scenario, mobile hosts may be more likely to failcompared to mobile stations. In another example, processes inthe same data center may be more likely to fail together. This

    paper denes a weighted version of the Byzantine AgreementProblem (WBA) and provides lower bounds and algorithmsfor it. In WBA, each process P

    iis assigned a weight w[i],

    such that 0 w[i] 1 and the sum of all weights is 1.The WBA problem requires a protocol to reach consensus

    when the total weight of the failed processes is at most .The weighted version gives some surprising results for theBA problem. First, even if greater than N/3 processes areByzantine, the system can still reach consensus so long as is less than 1/3. This result is quite useful in the system witha small set of trusted processes and a large set of less trusted

    processes.Secondly, the message complexity and the number of rounds

    required to achieve consensus for the weighted version isshown to always be less than or equal to those for the un-weighted version. Suppose the system must tolerate = f /Nfor any integer f such that 0 f < N/3. It is known

    that any protocol for BA requires at least f + 1 rounds [6].The unweighted version of the Queen algorithm [7] requiresf + 1 rounds, each with two phases. In this paper, the notionof anchor of a system (denoted by ) is dened as theleast number of processes whose total weight exceeds . This

    paper shows that WBA can be solved with the number of rounds equal to the systems anchor. The anchor for a systemwith = f /N is f + 1 at most and, in many cases, muchsmaller than f + 1. Two algorithms for the WBA problem

    are given: the weighted-Queen algorithm and the weighted-King algorithm. These algorithms are generalizations of thealgorithms proposed by Berman and Garay [7] and Berman,Garay and Perry [8]. The weighted-Queen algorithm takes rounds, each with two phases, and can tolerate any combi-nation of failures so long as < 1/4. The weighted-Kingalgorithm takes rounds, each with three phases, and cantolerate any combination of failures so long as < 1/3. Theweighted version of BA gives a general framework to studymany algorithms by instantiating BA with different weights.When the weight vector is (1, 0, 0, 0..0), our algorithm reducesto a centralized algorithm, where the rst process is expectednot to fail and any number of other processes may fail. If M

    out of N processes are considered more trusted, two classesof processes can be specied by setting the weight of the Mtrusted processes to 1/M and 0 for rest. The traditional BA

    problem is represented by setting all the weights to 1/N .A general approach to the problem of knowing some kind of

    structure to the ways processes can fail, has been considered by Hirt and Maurer [9]. Hirt and Maurer come up with whatis called an adversarial structure. This structure is the set of allsubsets of processes whose failure must be tolerated. Consider a set of processes P = {d, e, f, g, h, i}; then, the adversarialstructure A would be all subsets of P that should be tolerated.Hirt and Maurer show that as long as the union of any threesets in the adversarial structure does not contain all processesin P; then, an algorithm for Byzantine agreement that cantolerate that adversarial structure exists. The basis of A, whichis all maximal sets in A, is A.

    A = {{d, e, f }, {d, g}, {e, h}, {e, i}, {f, g }}

    The traditional BA algorithm can only handle one faulty process from P ; but, there exists an algorithm that can handleat least one additional faulty process for any one faulty processas indicated by A. Fitzi and Maurer [10] give an algorithmthat can perform Byzantine agreement on such an adversarial

  • 7/31/2019 ipdps11

    2/11

    structure. The algorithm by Fitzi and Maurer has messagecomplexity polynomial in the number of processes and roundcomplexity of less than two times the number of processes.The round complexity for our algorithms are optimal. For this

    particular example, a weight assignment can be found so thatthe King algorithm presented here can tolerate all processes

    in one of the subsets of P in A being faulty. One such weightassignment is shown in Table I. Also, the adversarial structuremay be exponentially larger than the weight assignment. Thealgorithms presented in this paper are considerably simpler than the one presented by Fitzi and Maurer.

    TABLE IW EIGHT

    ASSIGNMENTS FOR P WHICH SATISFY THE ADVERSARIALSTRUCTURE A.

    The Weighted Byzantine Agreement (WBA) problem can be specied as follows. All processes propose a binary valuewith the goal of deciding on one common value. Given aweight assignment to all processes, and the assumption thatthe weight of processes that fail during the execution is at most , the WBA problem is to design a protocol that satises thefollowing conditions:

    Agreement: Two correct processes cannot decide ondifferent values.

    Validity: The value decided must be proposed by somecorrect process.

    Termination: All correct processes decide in nite num- ber of steps.

    The following lower bounds follow easily from the standard

    Process d e f g h i BA lower bound arguments.Weight 1/9 1/18 8/57 1/16 5/19 5/19

    Others have considered the use of articial neural networks(ANN) for BA [11], [12]. The ideas in this paper could also beextended to use ANN. Randomization or authentication is notassumed to be available. There are many algorithms for BAwith randomization [13], [14] or with authentication [1], [15].The method of using weights and updating weights presentedhere is expected to be applicable in these settings as well.

    Methods to update weights for future rounds of WBA arealso discussed. The weight update method guarantees that theweight of a correct process is never reduced and the weight of any faulty process, suspected by correct processes whose total

    weight is at least 1/4, is reduced to 0. Initial weight assignmentis application specic. Some ideas for weight assignment andresulting probabilities and round complexity are discussed.

    Lemma 1: There is no protocol to solve the WBA problem

    for all values of w when 1/3.Proof: Any protocol to solve WBA can be used to solve

    standard BA by setting w[i] = 1/N for all i. For thisweight assignment, 1/3 implies that the number of failed

    processes f in the standard BA protocol is at least N/3. Itis well-known that no protocol exists for standard BA when3f N [1].

    For simplicity, also assume that weights associated withP

    iare in non-increasing order. This can be achieved by

    renumbering processes, if necessary. Given any and weightassignment w, dene the anchor as the minimum number of processes such that the sum of their weights is strictlygreater than . Formally,

    i=k

    The organization of the rest of this paper is as follows.

    First, the model of the system that runs algorithms is dened.

    =min {k | i=1 w[i] > }.

    Second, the Weighted-Queen Algorithm is given. Then, the

    Weighted-King Algorithm is discussed. Next, a simple weightupdate method is given. Then, some initial weight assignmentstrategies are presented. Finally, concluding remarks are made.

    II. SYSTEM MODELThe system model used in this paper is a distributed system

    with N processes, P1..P

    N, with a completely connected topol-

    ogy. The underlying system is assumed to be synchronous; i.e.,there is an upper bound on the message delay and on the du-ration of actions performed by processes. The model assumesthat processes may fail; but, the underlying communicationsystem is reliable and satises rst-in rst-out (FIFO) messageordering. The processes may fail in an arbitrary fashion; in

    particular, they may lie and collude with other failed processesto foil any protocol. The processes that do not fail in anycomputation are called correct processes. Assume that thereis a non-negative weight w[i] associated with each processP

    i. All processes in the system have complete knowledge

    of weights of all the processes. For simplicity, assume that

    weights are normalized; i.e., the sum of all weights is one.Let be the sum of weights of all failed processes. This paper assumes that is strictly less than one.

  • 7/31/2019 ipdps11

    3/11

  • 7/31/2019 ipdps11

    4/11

    Pi::

    var V : {0, 1} initially proposed value;w: const array[1..N ] of weights;

    initially j : w[j] 0 ( j: w[j] = 1)

    for q := 1 to do

    oat s0,s1 := 0.0, 0.0;

    rst phase :if (w[i] > 0) then

    send V to all processes including itself;forall j such that w[j] > 0 do

    if 1 received from P jthen

    s1 := s1 + w[j];else if 0 received from P

    jor no message from P

    j

    thens0 := s0 + w[j];

    if (s1 > 1/2) thenmyvalue := 1; myweight := s1;

    else myvalue := 0; myweight := s0;

    second phase:if (q = i) then

    send myvalue to all other processes;receive queenvalue from P

    q;

    if myweight > 3/4 thenV := myvalue;

    else V := queenvalue;

    endfor;

    output V as the decided value;

    Fig. 1. Queen algorithm for Weighted Byzantine Agreement at Pi

    be the queen for round i. In the rst phase of a round,each process exchanges its value with all other processes.

    Based on the values received and the weights of the processessending these values, the process determines its estimate in thevariable myvalue. In the second phase, the process receives

    round; then, they continue to do so at the end of the round.Proof: If all correct processes prefer v, then the value

    of myweight for all correct processes will at least be 3/4; because, is at most 1/4. Hence, they will choose myvaluein the second phase and ignore the value sent by the queen.

    Lemma 4: There is at least one round in which the queenis correct.

    Proof: By assumption, the total weight of processes thathave failed is . The for loop is executed times. Bydenition of , there exists at least one round in which thequeen is correct.

    Now the correctness of the protocol can be shown.Theorem 1: The algorithm in Fig. 1 solves the agreement

    problem for all < 1/4.Proof: The validity property follows from the persistence

    of agreement. If all processes start with the same value v, then,v is the value decided. Termination is obvious because thealgorithm takes a xed number of rounds. Next, the agreement

    property is shown. From Lemma 4, at least one of the rounds

    has a correct queen. Each correct process decides either onthe value sent by the queen in that round or its own value.It chooses its own value w only if myweight is at least 3/4.Therefore, the queen of that round must have weight of at least1/2 for that value; because, at most 1/4 of the weight in P

    i

    is from faulty processes. Thus, the value chosen by the queenis also w. Hence, each process decides on the same value atthe end of a round in which the queen is non-faulty. From

    persistence of agreement, the agreement property at the endof the algorithm follows.

    Let us analyze the algorithms message complexity. Thereare rounds, each with two phases. In the rst phase, all

    processes with positive weight send messages to all processes.

    This phase results in pN messages where p N is thenumber of processes with positive weight. The second phaseuses only N messages. Thus, the total number of messages is ( pN +N ). The number of messages can be further reduced

    by sending messages to zero weight processes only in the lastround. Note that the algorithm from [7] takes f + 1 rounds(each with two phases) when the maximum number of allowedfailures is f . The following lemma shows that the number of rounds for the weighted version is at most the number requiredfor the unweighted version.

    Lemma 5: f /N f + 1 for all w and f .Proof: It is sufcient to show that for all f , ii==1f w[i]

    the value from the queen. If Pireceives no value (because the f /N. Suppose i=f i=1w[i] < f /N for some f . This implies

    queen has failed), then Piassumes 0 (a default value) for the

    queen value. Now, Pidecides whether to use its own value

    or the queenvalue. This decision is based on the sum of theweights of the processes which proposed myvalue given by

    that the sum of the remaining weights is i=ni=f+1w[i]>(N f )/N , because all weights add up to 1. Since w is innondecreasing order, w[f + 1] > 1/N ; otherwise, the sum of the remaining weights would be at most (N f )/N. But, this

    the variable myweight. If myweight is greater than 3/4, then implies thati=f

    i=1w[i] > f /N, because w[i] for all i f is

    myvalue is chosen for V ; otherwise, queenvalue is used. The

    correctness of the protocol is shown by the following sequence

    of lemmas.

    Lemma 3 (Persistence of Agreement): Assuming < 1/4,if all correct processes prefer a value v at the beginning of a

  • 7/31/2019 ipdps11

    5/11

    at least w[f + 1]. This contradicts our original assumption.

    IV. W EIGHTED-K ING ALGORITHMThis section gives an algorithm that takes rounds with

    three phases per round to solve the WBA problem. The algo-

  • 7/31/2019 ipdps11

    6/11

    rithm is based on the Phase King algorithm by Berman, Garayand Perry [8]. The King algorithm only requires < 1/3;

    but, adds an additional phase per round compared to theQueen algorithm. The King algorithm is given in Fig. 2. Asin the Queen algorithm, the King algorithm has a rotatingcoordinator. It is assumed that the coordinator for round k is

    process P k . Each process P ihas a current preference V whichcan be 0, 1, or undecided. Initially, for every P

    i, V is either

    0 or 1.In the rst phase, if process P

    ihas a positive weight, then

    Pisends V to all processes including itself. Next, P

    ireceives

    values from every process with positive weight and adds upthe cumulative weight of processes that propose 0 as s0 and1 as s1. If s0 or s1 are greater than or equal to 2/3, then P

    i

    sets its preference V to the corresponding value; otherwise,P

    isets its preference to undecided.In phase two, P

    irst sends its new preference of V to

    every process if Pis weight is positive and resets s0, s1, and

    su. Note that in this phase, unlike in phase one, processesmay propose the value undecided. Then, P

    ireceives from all

    processes with positive weights and accumulates the sum of weights of processes into s0 for processes who propose 0,into s1 for processes who propose 1 and into su for processeswho propose undecided. The nal step in phase two is for P

    i

    to set its preference to a new value based on the cumulativeweights computed in the rst part of this phase. If one of thecumulative weights is greater than 1/3, P

    isets its preference

    to that value. If more than one of the sums is greater than 1/3,P

    igives preference to 0, then 1, then undecided. P

    ialso sets

    myweight to the cumulative weight of the value that V is set.In phase three, if P

    iis the king for the current phase, P

    i

    sends its preference V to every process. Next, all processesreceive the kings value into kingvalue. Then, if P

    iis unde-

    cided (V = undecided) or the weight stored in myweightfrom phase two is less than 2/3, P

    isets its preference to

    kingvalue if kingvalue is not undecided or 1 if kingvalueis undecided. After executing for rounds, P

    ioutputs V as

    the decided value. The correctness of the King algorithm isshown in the following lemmas.

    Lemma 6 (Persistence of Agreement): Assuming < 1/3,if all correct processes prefer a value v at the beginning of around; then, they continue to do so at the end of the round.

    Proof: If all correct processes agree at the beginning of the round; then, for the rst phase, by denition, the same

    value must be chosen as < 1/3. For the second phase, thesame value must again be chosen as < 1/3. For the third phase, because all correct processes agree and < 1/3, allcorrect processes will ignore the kings value and keep their own.

    Lemma 7: There is at least one round in which the king iscorrect.

    Proof: By assumption, the total weight of processes thathave failed is less than . The for loop is executed times.By denition of , there exists at least one round in whichthe king is correct.

    Theorem 2: The algorithm in Fig. 2 solves the agreement

    Pi::

    var V : {0, 1, undecided} initially proposed value;w: const array[1..N ] of weights;

    initially j : w[j] 0 ( j: w[j] = 1)

    for k := 1 to do

    oat s0,s1,su := 0.0, 0.0, 0.0;

    rst phase :if (w[i] > 0) then

    send V to all processes including itself;forall j such that w[j] > 0 do

    if 1 received from P jthen

    s1 := s1 + w[j];else if 0 received from P

    jthen

    s0 := s0 + w[j];

    if (s0 2/3) then V := 0;else if (s1 2/3) then V := 1;else V = undecided;

    second phase:s0,s1,su := 0.0, 0.0, 0.0;if (w[i] > 0) then

    send V to all processes including itself;forall j such that w[j] > 0 do

    if 1 received from P jthen

    s1 := s1 + w[j];else if 0 received from P

    jthen

    s0 := s0 + w[j];

    else su := su + w[j];if (s0 > 1/3) thenV := 0; myweight := s0;

    else if (s1 > 1/3) thenV := 1; myweight := s1;

    else if (su > 1/3) thenV := undecided; myweight := su;

    third phase:if (k = i) then send V to all other processes;receive kingvalue from P

    k ;

    if V = undecided or myweight < 2/3 thenif kingvalue = undecided then V = 1

    else V = kingvalue

    endfor;

    output V as the decided value;

    Fig. 2. King algorithm for Weighted Byzantine Agreement at P i

  • 7/31/2019 ipdps11

    7/11

    problem for < 1/3.Proof: Validity is satised by persistence of agreement. If

    all processes start with the same value, then that value will bedecided. Termination is obvious because the algorithm takesa xed number of rounds. From Lemma 7, in at least oneround, the king will be correct. In that round, every correct

    process will choose either the kings value, 1, or its ownvalue. The only way that a process may choose its own valueis if myweight 2/3 and the process is not undecided;otherwise, the process will choose the kings value or 1 if the king is undecided. If a process chooses its own value,then, myweight 2/3 for that process and the weight of itsvalue V will be 1/3. So, the king must also have chosenthe same value. If myweight < 2/3 or V is undecided, thenthe process will choose the kings value or 1 if the king isundecided. Because the king is correct, then all processeswillchoose the same value.

    The King algorithm takes rounds with three phases per round. In phase one and two, each process with positive weightsends N messages. In phase three, the king process sends Nmessages. This results in (2pN + N) messages where p isthe number of processes with positive weight.

    V. U PDATING WEIGHTS

    In this section, the case when the system is required to solveBA multiple times is considered. This case arises in most real-life applications of BA, such as, maintenance of replicated dataand fault-tolerant le systems [16]. In addition, each executionof the BA protocol provides certain feedback in terms of the

    processes behavior. For example, if a process did not followthe protocol (i.e., did not send the required messages), it should

    be considered less reliable for future BA instances. In thissection, a fault-tolerant method to update weights is given.For simplicity, only the weighted-Queen algorithm is given;the extension to weighted-King algorithm is similar.

    The following lemma gives the conditions sufcient for Pi

    to detect that P jis faulty.

    Lemma 8: In the Weighted-Queen algorithm, a correct pro-cess P

    ican detect that P

    jis faulty if any of the following

    conditions are met:1) If P

    jeither does not send a message or sends a message

    with wrong format in any of the rounds, then P jis faulty.

    2) If myweight > 3/4 in any round and the value sent by

    the queen in that round is different from myvalue, thenthe queen is faulty.Proof: The rst part is obvious. For the second part, note

    that if myweight > 3/4; then, the weight for the queen for that value in that round is at least 1/2. If the queen werecorrect, the value sent by the queen would have matchedmyvalue.

    The algorithm in Fig. 1 is modied by adding a variablef aultySet that keeps track of all processes that P

    ihas

    detected to be faulty based on Lemma 8. Now a method is presented to update the weights of the processes such that withevery execution of WBA, the processes get better in solvingWBA by increasing the weights of reliable processes. These

    algorithms require that the weight assignment for all correct processes be identical; so, it is not sufcient for a process toupdate its weight individually. All correct processes need toagree on the faulty set.

    The algorithm to update weights shown in Fig. 3 consistsof three phases. In the rst phase, called the learning phase,

    processes broadcast their f aultySet to learn about faulty

    processes from other correct processes. The main idea isthat if processes with total weight at least 1/4 inform Pi

    that some process P jis faulty, then P

    jis in f aultySet

    of at least one correct process. The second phase consistsof processes agreeing on the set of faulty processes. For each process j, if j is in the f aultySet of P

    i, then P

    i

    invokes Weighted-Queen-BA algorithm with 1 as the proposed value; otherwise, it invokes it with 0 as the proposedvalue. The output variable value denotes the decided value

    by the Weighted-Queen-BA algorithm. Therefore, the setof faulty processes that all correct processes agree upon isconsensusF aulty. In the third phase, processes update their weights based on consensusF aulty.

    The correctness of the algorithm in Fig. 3 is shown in thefollowing lemma and theorem.

    Lemma 9: All correct processes with positive weights be-fore the execution of the algorithm have identical w vectorsafter the execution of the algorithm.

    Proof: The weight assignment is done based onconsensusF aulty. The variable consensusF aulty is iden-tical at all correct processes based on the correctness of Weighted-Queen algorithm.

    Theorem 3: A correct process can never be inconsensusF aulty. Any faulty process that is in the

    initial f aultySet of correct processes with total weightat least 1/4 will be in consensusF aulty of all correct

    processes.

    Proof: A correct process P jcan never be in the initial

    f aultySet of any correct process (due to Lemma 8). In thelearning phase, suspectW eight[j] at any process can never

    be equal or more than 1/4, because only faulty processes cansuspect P

    j. Therefore, j is not in f aultySet of any correct

    process after the learning phase. Since all correct processeswill invoke WBA with 0 for P

    j, by validity of the Weighted-

    Queen-BA algorithm, it will not be in consensusF aulty.Any faulty process that is in the initial f aultySet of cor-

    rect processes with total weight of at least 1/4 will be inf aultySet of all correct processes after the learning phase.Again, from the validity of WBA, the faulty process will bein consensusF aulty.

    The model assumed here for updating weights is that oncea process is faulty, it will always be faulty. A modicationcan be considered where a process may become non-faultyafter being faulty for a period of time. In this case, instead of setting the weight to zero, the weight can be reduced by somemultiple.

  • 7/31/2019 ipdps11

    8/11

    1 / 3

    Pi::

    // Only processes with positive weights participate// in this algorithmvar

    f aultySet: set of processes based on Lemma 8;

    consensusf aulty: set of processes initially {};suspectW eight: array[1..p] of oat initially all 0.0;

    First phase (learning phase):forall j do

    send f aultySet to all (including itself);forall j do

    receive f aultySet jfrom P

    j;

    forall k f aultySet jdo

    suspectW eight[k] :=suspectW eight[k] + w[j];

    forall j doif suspectW eight[j] 1/4 then

    f aultySet := f aultySet {j};

    Second phase:// Do WBA on each of the processes to see// if they are faultyforall j do

    if j f aultySet thenvalue := Weighted-Queen-BA(1);

    else value := Weighted-Queen-BA(0)if (value = 1) then

    consensusF aulty := consensusF aulty {j};

    inverse of their probability of failure. Weights proportional tothe probability of not failing is the nal assignment considered.

    The graph in Fig. 4 is the probability of the weight of failed processes exceeding 1/3 versus |B| with |A| = 6, f

    a=

    0.1, f b= 0.3. This graph is only taken for points where

    the number of processes is divisible by three. The number three is chosen because taking every point produces manymore jumps in the graph which just add noise and distractfrom the trend. Notice that there are still some jumps. These

    jumps are caused by the effect of adding a process to a groupwhere that addition does not increase the number of faulty

    processes that can be tolerated. But, adding that one processincreases the expected weight of failed processes. So, there isa jump in the probability of the total weight of failed processes

    being above 1/3. Each curve starts at the same value as setB is empty. Observe that each curve initially has a positiveaverage slope. It is not until a signicant number of additional

    processes are added that the curve begins to have a negativeslope. The uniform assignment gives the worse probabilityfor a small size of B relative to the size of A. Changing

    the number of processes in set A moves the curves verticallyin relation to each other. Which weight assignment is bestdepends upon the number of processes in both A and B andtheir probability of failure. In this particular example, settingthe weight proportional to the inverse probability of failuregives the best results.

    Only A non-zero

    UniformThird phase:

    // set weight of faulty processes to 0oat totalW eight := 1.0;forall j consensusF aulty do

    totalW eight := totalW eight w[j];w[j] := 0;

    // renormalise weightsforall j do

    w[j] := w[j]/totalW eight;

    0.20

    0.15

    0.10

    0.05

    Proportional to the inverse probability of failure

    Proportional to the probability of not failing

    0.0

    0

    0 50 100 150 200 250 300 350 400

    Fig. 3. Weight-Update Algorithm for the Queen algorithm for Weighted Byzantine Agreement at P i

  • 7/31/2019 ipdps11

    9/11

    P

    r o b a

    b i l i t y o

    f t h e w e

    i g h t o f f a i l e d p r o c e s s e s e x c e e d

    VI. WEIGHT ASSIGNMENTDeciding what weight assignment to use is application spe-

    cic. A simplied example will be considered for this section.Consider two sets of processes A and B where all processesin A have probability of failure f

    aand all processes in B

    have probability of failure f b. We will consider four weight

    assignments. The rst is a uniform weight assignment for everyone. This weight assignment produces the same resultsas the classical algorithm. The next assignment is to only givenon-zero weights to the set with a lower probability of failure.The third is to give weights to each process proportional to the

    Number of processes in set B

    Fig. 4. Probability of the weight of failed processes exceeding 1/3 withversus |B| with |A| = 6, f

    a= 0.1, f

    b= 0.3.

    Fig. 5 shows the number of rounds required for the Kingalgorithm to ensure success. Notice the uniform assignment isthe highest. In both of these graphs, the uniform weight assign-ment was the least attractive. The most attractive assignmentsare only giving positive weights to group A and setting the

    weight proportional to the inverse probability of failure. For this particular setup, setting weights proportional to the inverse probability of failure is the best. When the size of set B isnot much larger than A, only giving positive weights to setA may be the best. When the size of set B is signicantly

  • 7/31/2019 ipdps11

    10/11

    140

    120

    100

    80

    60

    40

    20

    Only

    A

    non-

    zero

    UniformProportional to the inverse probability of failure

    Proportional to the probability of not failing

    [5] J. A. Garay and Y. Moses, Fully polynomial byzantine agreement in t+ 1 rounds, in STOC 93: Proceedings of the twenty-fth annual ACMsymposium on Theory of computing . New York, NY, USA: ACM, 1993,

    pp. 3141.[6] D. Dolev and H. R. Strong, Polynomial algorithms for multiple

    processor agreement, in Proceedings of the ACM symposium on Theoryof computing. New York, NY, USA: ACM, 1982, pp. 401407.

    [7] P. Berman and J. A. Garay, Asymptotically optimal distributed con-sensus, in ICALP: Proceedings of the International Colloquium onAutomata, Languages and Programming. London, UK: Springer-Verlag, 1989, pp. 8094.

    [8] P. Berman, J. Garay, and K. Perry, Towards optimal distributed con-sensus, in Foundations of Computer Science, 30 1989, pp. 410 415.

    [9] M. Hirt and U. Maurer, Complete characterization of adversariestolerable in secure multi-party computation (extended abstract), inPODC 97: Proceedings of the sixteenth annual ACM symposium onPrinciples of distributed computing. New York, NY, USA: ACM, 1997,

    pp. 2534.

    00 50 100 150 200 250 300 350 400 [10] M. Fitzi and U. M. Maurer, Efcient byzantine agreement secure Number of processes in set B

    Fig. 5. The number of rounds required for the King algorithm versus thenumber of processes in set B for the different weight assignments.

    larger than A, then setting the weights to be proportional tothe inverse probability of failure is the best.

    VII. CONCLUSIONS

    This paper has presented a weighted version of the Byzan-tine Agreement Problem and provided solutions for the prob-lem in a synchronous distributed system. We show that theweighted version has the advantage of using fewer messagesand tolerating more failures (under certain conditions) thanis required by the lower bound for the unweighted version.These algorithms have applications in many systems in whichthere are two classes of processes: trusted and untrusted

    processes. Instead of tolerating any f faults in the BA problem,these algorithms tolerate failure of processes with total weightless than f /N. For example, an implementation can nowtolerate more than f faults of untrusted processes; but, fewer than f faults of trusted processes depending on the weightassignment. A fault-tolerant method has also been presentedto update the weights at all the correct processes. This algo-

    rithm is useful for many applications where the agreement is

    required multiple times. Our update algorithm guarantees thatthe weight of a correct process is never reduced and the weightof any faulty process, suspected by correct processes whosetotal weight is at least 1/4, is reduced to 0.

    R EFERENCES

    [1] M. Pease, R. Shostak, and L. Lamport, Reaching agreements in the presence of faults, Journal of the ACM, vol. 27, no. 2, pp. 228234,Apr. 1980.

    [2] L. Lamport, R. E. Shostak, and M. C. Pease, The byzantine generals problem, ACM Trans. Program. Lang. Syst., vol. 4, no. 3, pp. 382401,1982.

    [3] P. Feldman and S. Micali, An optimal probabilistic protocol for synchronous byzantine agreement, SIAM J. Comput., vol. 26, no. 4,

    pp. 873933, 1997.[4] D. Dolev, R. Reischuk, and H. R. Strong, Early stopping in byzantine

    agreement, J. ACM, vol. 37, no. 4, pp. 720741, 1990.

  • 7/31/2019 ipdps11

    11/11

    N u m

    b e r o

    f r o u n

    against general adversaries, in DISC 98: Proceedings of the 12thInternational Symposium on Distributed Computing. London, UK:Springer-Verlag, 1998, pp. 134148.

    [11] S. C. Wang and S. H. Kao, A new approach for byzantine agreement,in Proceedings of the The International Conference on Information

    Networking. Washington, DC, USA: IEEE Computer Society, 2001, p.518.

    [12] K.-W. Lee and H.-T. Ewe, Performance study of byzantine agreement protocol with articial neural network, Inf. Sci., vol. 177, no. 21, pp.47854798, 2007.

    [13] M. O. Rabin, Randomized byzantine generals, in Foundations of Computer Science. IEEE, 1983, pp. 403409.

    [14] G. Bracha, An O(log n) expected rounds randomized Byzantine gen-

    erals protocol, Journal of the ACM, vol. 34, no. 4, pp. 910920, Oct.1987.[15] D. Dolev and H. R. Strong, Authenticated algorithms for byzantine

    agreement, SIAM J. Comput., vol. 12, no. 4, pp. 656666, 1983.[16] M. Castro and B. Liskov, Practical byzantine fault tolerance, in OSDI,

    1999, pp. 173186.