# PBTS: Protocol Specification (first draft)
This specification is OUTDATED. Please refer to the new version.
# Updated Consensus Algorithm
# Outline
The algorithm in the arXiv paper (opens new window) evaluates rules of the received messages without making explicit how these messages are received. In our solution, we will make some message filtering explicit. We will assume that there are message reception steps (where messages are received and possibly stored locally for later evaluation of rules) and processing steps (the latter roughly as described in a way similar to the pseudo code of the arXiv paper).
In contrast to the original algorithm the field proposal in the PROPOSE message is a pair (v, time), of the proposed consensus value v and the proposed time time.
# [PBTS-RECEPTION-STEP.0]
In the reception step at process p at local time now_p, upon receiving a message m:
- if the message
mis of typePROPOSEand satisfiesnow_p - PRECISION < m.time < now_p + PRECISION + MSGDELAY, then mark the message astimely
if
mdoes not satisfy the constraint consider ituntimely
# [PBTS-PROCESSING-STEP.0]
In the processing step, based on the messages stored, the rules of the algorithms are executed. Note that the processing step only operates on messages for the current height. The consensus algorithm rules are defined by the following updates to arXiv paper.
# New StartRound
There are two additions
- in case the proposer's local time is smaller than the time of the previous block, the proposer waits until this is not the case anymore (to ensure the block time is monotonically increasing)
- the proposer sends its time
now_pas part of its proposal
We update the timeout for the PROPOSE step according to the following reasoning:
- If a correct proposer needs to wait to make sure its proposed time is larger than the
blockTimeof the previous block, then it sends by realtimeblockTime + ACCURACY(By this time, its local clock must exceedblockTime) - the receiver will receive a
PROPOSEmessage byblockTime + ACCURACY + MSGDELAY - the receiver's local clock will be
<= blockTime + 2 * ACCURACY + MSGDELAY - thus when the receiver
penters this round it can set its timeout to a valuewaitingTime => blockTime + 2 * ACCURACY + MSGDELAY - now_p
So we should set the timeout to max(timeoutPropose(round_p), waitingTime).
If, in the future, a block delay parameter
BLOCKDELAYis introduced, this means that the proposer should wait fornow_p > blockTime + BLOCKDELAYbefore sending aPROPOSEmessage. Also,BLOCKDELAYneeds to be added towaitingTime.
# [PBTS-ALG-STARTROUND.0]
# New Rule Replacing Lines 22 - 27
- a validator prevotes for the consensus value
vand the timet - the code changes as the
PROPOSALmessage carries time (whilelockedValuedoes not)
# [PBTS-ALG-UPON-PROP.0]
# New Rule Replacing Lines 28 - 33
In case consensus is not reached in round 1, in StartRound the proposer of future rounds may propose the same value but with a different time.
Thus, the time tprop in the PROPOSAL message need not match the time tvote in the (old) PREVOTE messages.
A validator may send PREVOTE for the current round as long as the value v matches.
This gives the following rule:
# [PBTS-ALG-OLD-PREVOTE.0]
# New Rule Replacing Lines 36 - 43
- As above, in the following
(v,t)is part of the message rather thanv - the stored values (i.e.,
lockedValue,validValue) do not contain the time
# [PBTS-ALG-NEW-PREVOTE.0]
# New Rule Replacing Lines 49 - 54
- we decide on
vas well as on the time from the proposal message - here we do not care whether the proposal was received timely.
In particular we need to take care of the case where the proposer is untimely to one correct validator only. We need to ensure that this validator decides if all decide.
# [PBTS-ALG-DECIDE.0]
All other rules remains unchanged.
Back to main document.