cesses the votes by calling the ProcessMsg procedure for every message

Cesses the votes by calling the processmsg procedure

This preview shows page 8 - 10 out of 18 pages.

cesses the votes by calling the ProcessMsg() procedure for every message (Algorithm 6), which ensures that the vote is valid. Note that no private state is required to process these messages. ProcessMsg() returns not just the value contained in the message, but also the number of votes associated with that value. If the message was not from a chosen committee member, ProcessMsg() returns zero votes. If the committee member was chosen several times (see §5), the number of votes returned by ProcessMsg() reflects that as well. Pro- cessMsg() also returns the sortition hash, which we will use later in Algorithm 9. As soon as one value has more than T · τ votes, CountVotes() returns that value. τ is the expected num- ber of users that Sortition() selects for the committee, and is the same for each step ( τ step ) with the exception of the final step ( τ final ). T is a fraction of that expected committee size ( T > 2 3 ) that defines BA ’s voting threshold; this is also the same for every step except the final step, and we analyze it in §7.5. If not enough messages were received within the allo- cated λ time window, then CountVotes() produces timeout . 8
Image of page 8
procedure CountVotes( ctx , round , step , T , τ , λ ): start Time () counts ← {} // hash table, new keys mapped to 0 voters ← {} msgs incomingMsgs [ round , step ] . iterator () while True do m msgs . next () if m = then if Time() > start + λ then return timeout ; else votes , value , sorthash ⟩ ← ProcessMsg ( ctx , τ , m ) if pk voters or votes = 0 then continue ; voters = { pk } counts [ value ] + = votes // if we got enough votes, then output this value if counts [ value ] > T · τ then return value Algorithm 5: Counting votes for round and step . procedure ProcessMsg( ctx , τ , m ): pk , signed_m ⟩ ← m if VerifySignature ( pk , signed_m ) , OK then return 0 , , ⊥⟩ round , step , sorthash , π , hprev , value ⟩ ← signed_m // discard messages that do not extend this chain if hprev , H ( ctx . last_block ) then return 0 , , ⊥⟩ ; votes VerifySort ( pk , sorthash , π , ctx . seed , τ , “committee” , round , step , ctx . weight [ pk ] , ctx . W ) return votes , value , sorthash Algorithm 6: Validating incoming vote message m . The threshold ensures that if one honest user’s CountVotes() returns a particular value, then all other honest users will return either the same value or timeout , even under the weak synchrony assumption (see Lemma 1 in Appendix C.2 of the technical report [27]). 7.3 Reduction The Reduction() procedure, shown in Algorithm 7, converts the problem of reaching consensus on an arbitrary value (the hash of a block) to reaching consensus on one of two values: either a specific proposed block hash, or the hash of an empty block. Our reduction is inspired by Turpin and Coan’s two-step technique [ 51 ]. This reduction is important to ensure liveness. In the first step of the reduction, each committee member votes for the hash of the block passed to Reduction() by BA (). In the second step, committee members vote for the hash that received at least T · τ votes in the first step, or the hash of the default empty block if no hash received enough votes. Reduction() ensures that there is at most one non-empty block that can be returned by Reduction() for all honest users.
Image of page 9
Image of page 10

You've reached the end of your free preview.

Want to read all 18 pages?

  • Spring '19
  • NA
  • hash function, Cryptographic hash function, Algorand

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors