Skip to content

Commit

Permalink
chore: default TimeoutCommit to 2s (#7912) (#7914)
Browse files Browse the repository at this point in the history
* timeout commit to 2s

* changelog

(cherry picked from commit abbc0a5)

Co-authored-by: Adam Tucker <[email protected]>
  • Loading branch information
mergify[bot] and czarcas7ic authored Apr 2, 2024
1 parent e2fe73d commit 8a99f62
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions cmd/osmosisd/cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
6 changes: 3 additions & 3 deletions cmd/osmosisd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 {
Expand Down

0 comments on commit 8a99f62

Please sign in to comment.