diff --git a/CHANGELOG.md b/CHANGELOG.md index 541a0c79128..7021e7154b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -72,6 +72,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Features +* [#2057](https://github.com/osmosis-labs/osmosis/pull/2057) Reduce block times to about three seconds * [#1312] Stableswap: Createpool logic * [#1230] Stableswap CFMM equations * [#1429] solver for multi-asset CFMM diff --git a/cmd/osmosisd/cmd/init.go b/cmd/osmosisd/cmd/init.go index 24d16d363c4..54e6050461b 100644 --- a/cmd/osmosisd/cmd/init.go +++ b/cmd/osmosisd/cmd/init.go @@ -100,6 +100,7 @@ func InitCmd(mbm module.BasicManager, defaultNodeHome string) *cobra.Command { config.P2P.Seeds = strings.Join(seeds, ",") config.P2P.MaxNumInboundPeers = 320 config.P2P.MaxNumOutboundPeers = 40 + config.Consensus.TimeoutCommit = 2 * time.Second config.Mempool.Size = 10000 config.StateSync.TrustPeriod = 112 * time.Hour config.FastSync.Version = "v0" diff --git a/cmd/osmosisd/cmd/root.go b/cmd/osmosisd/cmd/root.go index b1dae87cbec..c665d4d72d1 100644 --- a/cmd/osmosisd/cmd/root.go +++ b/cmd/osmosisd/cmd/root.go @@ -4,6 +4,7 @@ import ( "io" "os" "path/filepath" + "time" "github.com/prometheus/client_golang/prometheus" @@ -74,7 +75,11 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) { if err := client.SetCmdClientContextHandler(initClientCtx, cmd); err != nil { return err } + customAppTemplate, customAppConfig := initAppConfig() + serverCtx := server.GetServerContextFromCmd(cmd) + serverCtx.Config.Consensus.TimeoutCommit = 2 * time.Second + return server.InterceptConfigsPreRunHandler(cmd, customAppTemplate, customAppConfig) }, SilenceUsage: true,