From b725f1709e469b33ae4c587607eb4c89bb78e2e8 Mon Sep 17 00:00:00 2001 From: Adam Tucker Date: Mon, 1 Apr 2024 22:34:44 -0600 Subject: [PATCH] chore: default TimeoutCommit to 2s (#7912) * timeout commit to 2s * changelog (cherry picked from commit abbc0a5900d3d28417863a4c5193b350118c1a5e) --- CHANGELOG.md | 1 + cmd/osmosisd/cmd/init.go | 4 ++-- cmd/osmosisd/cmd/root.go | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 31497ecb01d..ea8740014cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -82,6 +82,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * [#7527](https://github.com/osmosis-labs/osmosis/pull/7527) Add 30M gas limit to CW pool contract calls * [#7855](https://github.com/osmosis-labs/osmosis/pull/7855) Whitelist address parameter for setting fee tokens * [#7857](https://github.com/osmosis-labs/osmosis/pull/7857) SuperfluidDelegationsByValidatorDenom query now returns equivalent staked amount +* [#7912](https://github.com/osmosis-labs/osmosis/pull/7912) Default timeoutCommit to 2s ### SDK diff --git a/cmd/osmosisd/cmd/init.go b/cmd/osmosisd/cmd/init.go index 70cceec8fc1..6d84abfe472 100644 --- a/cmd/osmosisd/cmd/init.go +++ b/cmd/osmosisd/cmd/init.go @@ -112,8 +112,8 @@ func InitCmd(mbm module.BasicManager, defaultNodeHome string) *cobra.Command { config.StateSync.TrustPeriod = 112 * time.Hour // The original default is 5s and is set in Cosmos SDK. - // We lower it to 3s for faster block times. - config.Consensus.TimeoutCommit = 3 * time.Second + // We lower it to 2s for faster block times. + config.Consensus.TimeoutCommit = 2 * time.Second config.SetRoot(clientCtx.HomeDir) diff --git a/cmd/osmosisd/cmd/root.go b/cmd/osmosisd/cmd/root.go index d86dfdfe475..da79a30cc2f 100644 --- a/cmd/osmosisd/cmd/root.go +++ b/cmd/osmosisd/cmd/root.go @@ -443,7 +443,7 @@ func overwriteConfigTomlValues(serverCtx *server.Context) error { // It does not exist, so we update the default config.toml to update // We modify the default config.toml to have faster block times // It will be written by server.InterceptConfigsPreRunHandler - tmcConfig.Consensus.TimeoutCommit = 3 * time.Second + tmcConfig.Consensus.TimeoutCommit = 2 * time.Second } else { // config.toml exists @@ -469,8 +469,8 @@ func overwriteConfigTomlValues(serverCtx *server.Context) error { } // The original default is 5s and is set in Cosmos SDK. - // We lower it to 3s for faster block times. - serverCtx.Config.Consensus.TimeoutCommit = 3 * time.Second + // We lower it to 2s for faster block times. + serverCtx.Config.Consensus.TimeoutCommit = 2 * time.Second defer func() { if err := recover(); err != nil {