-
Notifications
You must be signed in to change notification settings - Fork 117
Description
We had a discussion around the case where lockedRoundp = vr ∧ lockedValuep != v here as it should only happen if we accept equivocating votes.
28: upon (PROPOSAL, hp, roundp, v, vr) from proposer(hp, roundp) AND 2f + 1 (PREVOTE, hp, vr, id(v)) while
step = propose ∧ (vr ≥ 0 ∧ vr < roundp) do
29: if valid(v) ∧ (lockedRoundp ≤ vr ∨ lockedValuep = v) then
30: broadcast (PREVOTE, hp, roundp, id(v))
31: else
32: broadcast (PREVOTE, hp, roundp, nil)
33: step ← prevote
@milosevic clarified:
The condition lockedValuep = v is probably not needed for the correctness as the important part is having 2f+1 prevotes for some value in the higher or equal round to the lockedRoundp. I cannot recall why we have added this condition as it would basically allow a process that have locked value v in higher round than the validRoundp to prevote for it. But this is actually not really needed for the correctness and can be seen as optimisation but it is probably insignificant and should be removed so it does not create confusion.
Concretly the proposal is to change to:
28: upon (PROPOSAL, hp, roundp, v, vr) from proposer(hp, roundp) AND 2f + 1 (PREVOTE, hp, vr, id(v)) while
step = propose ∧ (vr ≥ 0 ∧ vr < roundp) do
29: if valid(v) ∧ lockedRoundp ≤ vr then
30: broadcast (PREVOTE, hp, roundp, id(v))
31: else
32: broadcast (PREVOTE, hp, roundp, nil)
33: step ← prevote
And the case where lockedRoundp = vr ∧ lockedValuep != v should have been caught by equivocation system, making it impossible to reach L28 in this case. Nevertheless in the code we will check for this case and not prevote, neither id(v) nor nil