Proposed
Tendermint's consensus timeout parameters are currently configured locally by each validator in the validator's config.toml. This means that the validators on a Tendermint network may have different timeouts from each other. There is no reason for validators on the same network to configure different timeout values. Proper functioning of the Tendermint consensus algorithm relies on these parameters being uniform across validators.
The configurable values are as follows:
TimeoutPropose
TimeoutPropose
, then the consensus algorithm will issue a nil prevote.TimeoutProposeDelta
TimeoutPropose
grows each round.TimeoutPrevote
TimeoutPrevoteDelta
TimeoutPrevote
increases with each round.TimeoutPrecommit
TimeoutPrecommitDelta
TimeoutPrecommit
increases with each round.TimeoutCommit
SkipTimeoutCommit
We will consolidate the timeout parameters and migrate them from the node-local
config.toml
file into the network-global consensus parameters.
The 8 timeout parameters will be consolidated down to 6. These will be as follows:
TimeoutPropose
TimeoutPropose
.TimeoutProposeDelta
TimeoutProposeDelta
.TimeoutVote
TimeoutPrevote
and TimeoutPrecommit
parameters.TimeoutVoteDelta
TimeoutVote
will grow each successive round.
This parameter subsumes the current TimeoutPrevoteDelta
and TimeoutPrecommitDelta
parameters.TimeoutCommit
TimeoutCommit
.BypassCommitTimeout
SkipTimeoutCommit
, renamed for clarity.A safe default will be provided by Tendermint for each of these parameters and networks will be able to update the parameters as they see fit. Local updates to these parameters will no longer be possible; instead, the application will control updating the parameters. Applications using the Cosmos SDK will be automatically be able to change the values of these consensus parameters via a governance proposal.
This change is low-risk. While parameters are locally configurable, many running chains
do not change them from their default values. For example, initializing
a node on Osmosis, Terra, and the Cosmos Hub using the their init
command produces
a config.toml
with Tendermint's default values for these parameters.
Reducing the number of parameters is good for UX. Fewer superfluous parameters makes running and operating a Tendermint network less confusing.
The Prevote and Precommit messages are both similar sizes, require similar amounts of processing so there is no strong need for them to be configured separately.
The TimeoutPropose
parameter governs how long Tendermint will wait for the proposed
block to be gossiped. Blocks are much larger than votes and therefore tend to be
gossiped much more slowly. It therefore makes sense to keep TimeoutPropose
and
the TimeoutProposeDelta
as parameters separate from the vote timeouts.
TimeoutCommit
is used by chains to ensure that the network waits for the votes from
slower validators before proceeding to the next height. Without this timeout, the votes
from slower validators would consistently not be included in blocks and those validators
would not be counted as 'up' from the chain's perspective. Being down damages a validator's
reputation and causes potential stakers to think twice before delegating to that validator.
TimeoutCommit
also prevents the network from producing the next height as soon as validators
on the fastest hardware with a summed voting power of +2/3 of the network's total have
completed execution of the block. Allowing the network to proceed as soon as the fastest
+2/3 completed execution would have a cumulative effect over heights, eventually
leaving slower validators unable to participate in consensus at all. TimeoutCommit
therefore allows networks to have greater variability in hardware. Additional
discussion of this can be found in tendermint issue 5911
and spec issue 359.
Many Tendermint networks run on similar cloud-hosted infrastructure. Therefore, they have similar bandwidth and machine resources. The timings for propagating votes and blocks are likely to be reasonably similar across networks. As a result, the timeout parameters are good candidates for being hardcoded. Hardcoding the timeouts in Tendermint would mean entirely removing these parameters from any configuration that could be altered by either an application or a node operator. Instead, Tendermint would ship with a set of timeouts and all applications using Tendermint would use this exact same set of values.
While Tendermint nodes often run with similar bandwidth and on similar cloud-hosted
machines, there are enough points of variability to make configuring
consensus timeouts meaningful. Namely, Tendermint network topologies are likely to be
very different from chain to chain. Additionally, applications may vary greatly in
how long the Commit
phase may take. Applications that perform more work during Commit
require a longer TimeoutCommit
to allow the application to complete its work
and be prepared for the next height.
The decision has been made to implement this work, with the caveat that the specific mechanism for introducing the new parameters to chains is still ongoing.
A new TimeoutParams
message
will be added to the [params.proto file][consensus-params-proto].
This message will have the following form:
message TimeoutParams {
google.protobuf.Duration propose = 1;
google.protobuf.Duration propose_delta = 2;
google.protobuf.Duration vote = 3;
google.protobuf.Duration vote_delta = 4;
google.protobuf.Duration commit = 5;
bool bypass_commit_timeout = 6;
}
This new message will be added as a field into the [ConsensusParams
message][consensus-params-proto]. The same default values that are currently
set for these parameters in the local configuration
file will be used as the defaults for these new consensus parameters in the
consensus parameter defaults.
The new consensus parameters will be subject to the same validity rules as the current configuration values, namely, each value must be non-negative.
The new ConsensusParameters
will be added during an upcoming release. In this
release, the old config.toml
parameters will cease to control the timeouts and
an error will be logged on nodes that continue to specify these values. The specific
mechanism by which these parameters will added to a chain is being discussed in
RFC-009 and will be decided ahead of the next release.
The specific mechanism for adding these parameters depends on work related to soft upgrades, which is still ongoing.