diff --git a/config/config.go b/config/config.go index 5ec0c44f9ac..d0cf4cac14c 100644 --- a/config/config.go +++ b/config/config.go @@ -42,6 +42,8 @@ const ( MempoolTypeFlood = "flood" MempoolTypeNop = "nop" + + TimeoutProposeOverride = 1 * time.Second ) // NOTE: Most of the structs & relevant comments + the @@ -981,6 +983,7 @@ type ConsensusConfig struct { walFile string // overrides WalPath if set // How long we wait for a proposal block before prevoting nil + // Deprecated: a software default of 1 second is used instead. TimeoutPropose time.Duration `mapstructure:"timeout_propose"` // How much timeout_propose increases with each round TimeoutProposeDelta time.Duration `mapstructure:"timeout_propose_delta"` @@ -1058,7 +1061,9 @@ func (cfg *ConsensusConfig) WaitForTxs() bool { // Propose returns the amount of time to wait for a proposal func (cfg *ConsensusConfig) Propose(round int32) time.Duration { return time.Duration( - cfg.TimeoutPropose.Nanoseconds()+cfg.TimeoutProposeDelta.Nanoseconds()*int64(round), + // Provide an override for `timeout_propose`. This value should be consistent across the network + // for synchrony, and should never be tweaked by individual validators in practice. + TimeoutProposeOverride.Nanoseconds()+cfg.TimeoutProposeDelta.Nanoseconds()*int64(round), ) * time.Nanosecond } diff --git a/config/toml.go b/config/toml.go index 76ef3d06c25..eab84ebcc6e 100644 --- a/config/toml.go +++ b/config/toml.go @@ -461,6 +461,7 @@ version = "{{ .BlockSync.Version }}" wal_file = "{{ js .Consensus.WalPath }}" # How long we wait for a proposal block before prevoting nil +# Deprecated: a software default of 1 second is used instead. timeout_propose = "{{ .Consensus.TimeoutPropose }}" # How much timeout_propose increases with each round timeout_propose_delta = "{{ .Consensus.TimeoutProposeDelta }}"