Research Article
Rational Uniform Consensus with General Omission Failures
Algorithm 1
Agent
’s uniform consensus protocol with initial value
.(1) | function CONSENSUS() | (2) | a random number | (3) | random 1 degree polynomials with and ⊳(2, n) threshold secret sharing | (4) | | (5) | for alldo | (6) | for alldo | (7) | a random bit | (8) | random value in | (9) | puts into X-RANDOM | (10) | puts into RANDOM | (11) | | (12) | forround do | (13) | | (14) | Phase 1: send phase | (15) | for allanddo | (16) | ifthenSend to j | (17) | ifthenSendto j | (18) | ifthenSend to j | (19) | ifthenSend to j | (20) | | (21) | Phase 2: receive phase | (22) | for allanddo | (23) | if newmessage has received from jthen | (24) | puts into X-RANDOM ⊳round 1 to t + 2 | (25) | puts into RANDOM ⊳round 1 to t + 3 | (26) | ⊳round 1 to t + 3 | (27) | save and ⊳round t + 3 | (28) | ⊳round t + 4 | (29) | else | (30) | ifthen ⊳Faulty agent | (31) | Decide ⊳No decision | (32) | | (33) | Phase 3: computation phase | (34) | ifthen | (35) | | (36) | VERIFYANDUPDATE(, , , , , ) ⊳Punishment if an inconsistency is detected | (37) | ifthen | (38) | random value in | (39) | for alldo | (40) | for alldo | (41) | a random bit | (42) | puts into X-RANDOM | (43) | puts into RANDOM | (44) | else ifthen | (45) | LASTUPDATE () ⊳Update the of | (46) | fordo | (47) | ifis the first reliable round in then | (48) | ⊳decision round | (49) | the set of nonfaulty agents in ⊳decision set | (50) | for alldo | (51) | ifthe number of and then | (52) | restored by and received | (53) | | (54) | ifall values are known in then | (55) | the set of agents with the second max proposal in | (56) | ifthen | (57) | else ifthen | (58) | mod ⊳the proposals are the same for all agents in | (59) | , where is the st highest id in | (60) | else ⊳ | (61) | the second max proposal in | (62) | mod | (63) | , where is the st highest id in | (64) | else ⊳round t + 4 | (65) | ifthen | (66) | | (67) | Decide | (68) | else ⊳Inconsistency | (69) | Decide |
|