In Tendermint consensus, the first version of how time is computed and stored in a block works as follows:
precommit
messagesprecommit
messages that the proposer uses to build a commit to be put in the next block, the proposer computes the time
of the next block as the median (weighted over voting power) of the times in the precommit
messages.bfttime
as it is indeed fault-tolerant: if less than a third of the validators is faulty (counted in voting power), it is guaranteed that the computed time lies between the minimum and the maximum times sent by correct validators.1/2
of the voting power (which is in fact more than one third and less than two thirds of the voting power) is held by faulty validators, then the time is under total control of the faulty validators. (This is particularly challenging in the context of lightclient security.)bfttime
, since it computes the median time based on the timestamps from precommit
messages sent by
2f + 1
correct validators.
n
different timestamps in the precommit
messages, the proposer can use any subset of timestamps that add up to 2f + 1
of the voting power in order to compute the median.time
and real time.precommit
messages contain the local times, all these precommit
messages typically differ in the time field, which prevents the use of aggregate signatures.An alternative approach to time has been discussed: Rather than having the validators send the time in the precommit
messages, the proposer in the consensus algorithm sends its time in the propose
message, and the validators locally check whether the time is OK (by comparing to their local clock).
This proposed solution adds the requirement of having synchronized clocks, and other implicit assumptions.
time
can be corrupted only in the extreme case when
>2/3
of the validators are faulty.<1/3
faulty validators.time
and real time.precommit
messages free of time, which allows for aggregate signatures.We assume that the field proposal
in the PROPOSE
message is a pair (v, time)
, of the proposed consensus value v
and the proposed time time
.
In the reception step at node p
at local time now_p
, upon receiving a message m
:
m
is of type PROPOSE
and satisfies now_p - PRECISION < m.time < now_p + PRECISION + MSGDELAY
, then mark the message as timely
.PRECISION
and MSGDELAY
being system parameters, see below)after the presentation in the dev session, we realized that different semantics for the reception step is closer aligned to the implementation. Instead of dropping propose messages, we keep all of them, and mark timely ones.
arXiv paper | Proposer-based time |
---|---|
|
|
arXiv paper | Proposer-based time |
---|---|
|
|
arXiv paper | Proposer-based time |
---|---|
|
|
For safety (Point 1, Point 2, Point 3i) and liveness (Point 4) we need the following assumptions:
PRECISION
such that for any two correct validators V
and W
, and at any real-time t
, their local times C_V(t)
and C_W(t)
differ by less than PRECISION
time units,
i.e., |C_V(t) - C_W(t)| < PRECISION
PROPOSE
messages) is less than MSGDELAY
.For analyzing real-time safety (Point 5), we use a system parameter ACCURACY
, such that for all real-times t
and all correct validators V
, we have | C_V(t) - t | < ACCURACY
.
ACCURACY
is not necessarily visible at the code level. We might even viewACCURACY
as variable over time. The smaller it is during a consensus instance, the closer the block time will be to real-time.Note that
PRECISION
andMSGDELAY
show up in the code.
This specification describes the changes needed to be done to the Tendermint consensus algorithm as described in the arXiv paper and the simplified specification in TLA+, and makes precise the underlying assumptions and the required properties.