From 6d89d5043ecbdcc7bc500e1f18616525c1254bc9 Mon Sep 17 00:00:00 2001 From: Daniel Wedul Date: Wed, 21 Jun 2023 16:40:50 -0600 Subject: [PATCH] Change the default consensus.timeout_commit to 1500ms. (#1600) * Change the DefaultConsensusTimeoutCommit to 1500ms. * Update the pre-upgrade command to change all consensus.timeout_commit settings to 1500ms. * Update the log warning about the consensus.timeout_commit value. * Add changelog entry. * Fix some broken unit tests. * Make those tests I just fixed more robust. They now just use the provconfig.DefaultConsensusTimeoutCommit value instead of a hard-coded value. * Add some unit tests on the config warner. --- CHANGELOG.md | 4 +- cmd/provenanced/cmd/config_test.go | 6 +- cmd/provenanced/cmd/pre_upgrade.go | 4 +- cmd/provenanced/cmd/pre_upgrade_test.go | 113 +++++++++----- cmd/provenanced/cmd/root.go | 33 +++-- cmd/provenanced/cmd/root_test.go | 189 ++++++++++++++++++++++++ cmd/provenanced/config/manager.go | 2 +- cmd/provenanced/config/manager_test.go | 2 +- 8 files changed, 302 insertions(+), 51 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91bca38b77..9bb62d70c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,12 +39,12 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Features -* Add pre-upgrade command that updates config files to newest format and sets `consensus.timeout_commit` to `5s` [PR 1594](https://github.com/provenance-io/provenance/pull/1594) +* Add pre-upgrade command that updates config files to newest format and sets `consensus.timeout_commit` to `1500ms` [PR 1594](https://github.com/provenance-io/provenance/pull/1594), [PR 1600](https://github.com/provenance-io/provenance/pull/1600). ### Bug Fixes * Add `NewUpdateAccountAttributeExpirationCmd` to the CLI [#1592](https://github.com/provenance-io/provenance/issues/1592). -* Fix `minimum-gas-prices` from sometimes getting unset in the configs [PR 1594](https://github.com/provenance-io/provenance/pull/1594) +* Fix `minimum-gas-prices` from sometimes getting unset in the configs [PR 1594](https://github.com/provenance-io/provenance/pull/1594). --- diff --git a/cmd/provenanced/cmd/config_test.go b/cmd/provenanced/cmd/config_test.go index da53ba4edb..a8a099bec5 100644 --- a/cmd/provenanced/cmd/config_test.go +++ b/cmd/provenanced/cmd/config_test.go @@ -247,7 +247,7 @@ func (s *ConfigTestSuite) TestConfigCmdGet() { // Tendermint header and a few entries. {"tendermint header", regexp.MustCompile(`(?m)^Tendermint Config: .*/config/` + s.BaseFNTM + ` \(or env\)$`)}, {"tendermint fast_sync", regexp.MustCompile(`(?m)^fast_sync=true$`)}, - {"tendermint consensus.timeout_commit", regexp.MustCompile(`(?m)^consensus.timeout_commit="5s"$`)}, + {"tendermint consensus.timeout_commit", regexp.MustCompile(`(?m)^consensus.timeout_commit=` + fmt.Sprintf("%q", provconfig.DefaultConsensusTimeoutCommit) + `$`)}, {"tendermint mempool.size", regexp.MustCompile(`(?m)^mempool.size=5000$`)}, {"tendermint statesync.trust_period", regexp.MustCompile(`(?m)^statesync.trust_period="168h0m0s"$`)}, {"tendermint p2p.recv_rate", regexp.MustCompile(`(?m)^p2p.recv_rate=5120000$`)}, @@ -609,7 +609,7 @@ func (s *ConfigTestSuite) TestConfigCmdSet() { }, { name: "consensus.timeout_commit", - oldVal: `"5s"`, + oldVal: fmt.Sprintf("%q", provconfig.DefaultConsensusTimeoutCommit), newVal: `"2s"`, toMatch: []*regexp.Regexp{reTMConfigUpdated}, }, @@ -701,7 +701,7 @@ func (s *ConfigTestSuite) TestConfigSetMulti() { out: s.makeMultiLine( s.makeTMConfigUpdateLines(), s.makeKeyUpdatedLine("log_format", `"plain"`, `"json"`), - s.makeKeyUpdatedLine("consensus.timeout_commit", `"5s"`, `"950ms"`), + s.makeKeyUpdatedLine("consensus.timeout_commit", fmt.Sprintf("%q", provconfig.DefaultConsensusTimeoutCommit), `"950ms"`), ""), }, { diff --git a/cmd/provenanced/cmd/pre_upgrade.go b/cmd/provenanced/cmd/pre_upgrade.go index 7613f2c7fc..7532e0c2f9 100644 --- a/cmd/provenanced/cmd/pre_upgrade.go +++ b/cmd/provenanced/cmd/pre_upgrade.go @@ -82,9 +82,9 @@ func UpdateConfig(cmd *cobra.Command) error { } if clientCfg.ChainID == "pio-mainnet-1" { - // Update the timeout commit if it's too low. + // Update the timeout commit. timeoutCommit := config.DefaultConsensusTimeoutCommit - if tmCfg.Consensus.TimeoutCommit < timeoutCommit/2 { + if tmCfg.Consensus.TimeoutCommit != timeoutCommit { cmd.Printf("Updating consensus.timeout_commit config value to %q (from %q)\n", timeoutCommit, tmCfg.Consensus.TimeoutCommit) tmCfg.Consensus.TimeoutCommit = timeoutCommit diff --git a/cmd/provenanced/cmd/pre_upgrade_test.go b/cmd/provenanced/cmd/pre_upgrade_test.go index 7c402820a4..e2b3c1b148 100644 --- a/cmd/provenanced/cmd/pre_upgrade_test.go +++ b/cmd/provenanced/cmd/pre_upgrade_test.go @@ -249,9 +249,12 @@ func TestPreUpgradeCmd(t *testing.T) { appCfgC := config.DefaultAppConfig() appCfgC.API.Enable = true appCfgC.API.Swagger = true - tmCfgC := config.DefaultTmConfig() - tmCfgC.Consensus.TimeoutCommit = 1 * time.Second - tmCfgC.LogLevel = "debug" + tmCfgLower := config.DefaultTmConfig() + tmCfgLower.Consensus.TimeoutCommit = tmCfgD.Consensus.TimeoutCommit - 500*time.Millisecond + tmCfgLower.LogLevel = "debug" + tmCfgHigher := config.DefaultTmConfig() + tmCfgHigher.Consensus.TimeoutCommit = tmCfgD.Consensus.TimeoutCommit + 500*time.Millisecond + tmCfgHigher.LogLevel = "debug" clientCfgC := config.DefaultClientConfig() clientCfgC.Output = "json" clientCfgMainnetC := config.DefaultClientConfig() @@ -261,9 +264,6 @@ func TestPreUpgradeCmd(t *testing.T) { tmCfgCFixed := config.DefaultTmConfig() tmCfgCFixed.LogLevel = "debug" - tmCfgNoChange := config.DefaultTmConfig() - tmCfgNoChange.Consensus.TimeoutCommit = 3 * time.Second - successMsg := "pre-upgrade successful" updatingMsg := func(old time.Duration) string { return fmt.Sprintf("Updating consensus.timeout_commit config value to %q (from %q)", config.DefaultConsensusTimeoutCommit, old) @@ -276,6 +276,7 @@ func TestPreUpgradeCmd(t *testing.T) { expExitCode int expInStdout []string expInStderr []string + expNot []string expAppCfg *serverconfig.Config expTmCfg *tmconfig.Config expClientCfg *config.ClientConfig @@ -325,14 +326,44 @@ func TestPreUpgradeCmd(t *testing.T) { expClientCfg: clientCfgD, }, { - name: "mainnet unpacked config with changes", + name: "mainnet unpacked config lower than default", + setup: func(t *testing.T) (string, func(), bool) { + home, success := newHome(t, "mainnet_unpacked_lower", appCfgC, tmCfgLower, clientCfgMainnetC) + return home, nil, success + }, + expExitCode: 0, + expInStdout: []string{ + updatingMsg(tmCfgLower.Consensus.TimeoutCommit), + successMsg, + }, + expAppCfg: appCfgC, + expTmCfg: tmCfgCFixed, + expClientCfg: clientCfgMainnetC, + }, + { + name: "mainnet unpacked config higher than default", + setup: func(t *testing.T) (string, func(), bool) { + home, success := newHome(t, "mainnet_unpacked_higher", appCfgC, tmCfgHigher, clientCfgMainnetC) + return home, nil, success + }, + expExitCode: 0, + expInStdout: []string{ + updatingMsg(tmCfgHigher.Consensus.TimeoutCommit), + successMsg, + }, + expAppCfg: appCfgC, + expTmCfg: tmCfgCFixed, + expClientCfg: clientCfgMainnetC, + }, + { + name: "mainnet packed config lower than default", setup: func(t *testing.T) (string, func(), bool) { - home, success := newHome(t, "mainnet_changed_unpacked", appCfgC, tmCfgC, clientCfgMainnetC) + home, success := newHomePacked(t, "mainnet_packed_lower", appCfgC, tmCfgLower, clientCfgMainnetC) return home, nil, success }, expExitCode: 0, expInStdout: []string{ - updatingMsg(tmCfgC.Consensus.TimeoutCommit), + updatingMsg(tmCfgLower.Consensus.TimeoutCommit), successMsg, }, expAppCfg: appCfgC, @@ -340,14 +371,14 @@ func TestPreUpgradeCmd(t *testing.T) { expClientCfg: clientCfgMainnetC, }, { - name: "mainnet packed config with changes", + name: "mainnet packed config higher than default", setup: func(t *testing.T) (string, func(), bool) { - home, success := newHomePacked(t, "mainnet_changed_packed", appCfgC, tmCfgC, clientCfgMainnetC) + home, success := newHomePacked(t, "mainnet_packed_higher", appCfgC, tmCfgHigher, clientCfgMainnetC) return home, nil, success }, expExitCode: 0, expInStdout: []string{ - updatingMsg(tmCfgC.Consensus.TimeoutCommit), + updatingMsg(tmCfgHigher.Consensus.TimeoutCommit), successMsg, }, expAppCfg: appCfgC, @@ -357,7 +388,7 @@ func TestPreUpgradeCmd(t *testing.T) { { name: "mainnet cannot write new file", setup: func(t *testing.T) (string, func(), bool) { - home, success := newHomePacked(t, "mainnet_cannot_write", appCfgC, tmCfgC, clientCfgMainnetC) + home, success := newHomePacked(t, "mainnet_cannot_write", appCfgC, tmCfgLower, clientCfgMainnetC) if !success { return home, nil, success } @@ -371,53 +402,65 @@ func TestPreUpgradeCmd(t *testing.T) { return home, deferrable, success }, expExitCode: 30, - expInStdout: []string{updatingMsg(tmCfgC.Consensus.TimeoutCommit)}, + expInStdout: []string{updatingMsg(tmCfgLower.Consensus.TimeoutCommit)}, expInStderr: []string{"could not update config file(s):", "error saving config file(s):", "permission denied"}, }, { - name: "mainnet timeout commit low but not too low", + name: "other net unpacked config lower than default", setup: func(t *testing.T) (string, func(), bool) { - home, success := newHome(t, "mainnet_different_not_changed", appCfgD, tmCfgNoChange, clientCfgD) + home, success := newHome(t, "other_unpacked_lower", appCfgC, tmCfgLower, clientCfgC) return home, nil, success }, expExitCode: 0, expInStdout: []string{successMsg}, - expAppCfg: appCfgD, - expTmCfg: tmCfgNoChange, - expClientCfg: clientCfgD, + expNot: []string{"Updating consensus.timeout_commit config value"}, + expAppCfg: appCfgC, + expTmCfg: tmCfgLower, + expClientCfg: clientCfgC, }, { - name: "other net unpacked config with changes", + name: "other net unpacked config higher than default", setup: func(t *testing.T) (string, func(), bool) { - home, success := newHome(t, "other_changed_unpacked", appCfgC, tmCfgC, clientCfgC) + home, success := newHome(t, "other_unpacked_higher", appCfgC, tmCfgHigher, clientCfgC) return home, nil, success }, - expExitCode: 0, - expInStdout: []string{ - successMsg, - }, + expExitCode: 0, + expInStdout: []string{successMsg}, + expNot: []string{"Updating consensus.timeout_commit config value"}, expAppCfg: appCfgC, - expTmCfg: tmCfgC, + expTmCfg: tmCfgHigher, expClientCfg: clientCfgC, }, { - name: "other net packed config with changes", + name: "other net packed config lower than default", setup: func(t *testing.T) (string, func(), bool) { - home, success := newHomePacked(t, "other_changed_packed", appCfgC, tmCfgC, clientCfgC) + home, success := newHomePacked(t, "other_packed_lower", appCfgC, tmCfgLower, clientCfgC) return home, nil, success }, - expExitCode: 0, - expInStdout: []string{ - successMsg, + expExitCode: 0, + expInStdout: []string{successMsg}, + expNot: []string{"Updating consensus.timeout_commit config value"}, + expAppCfg: appCfgC, + expTmCfg: tmCfgLower, + expClientCfg: clientCfgC, + }, + { + name: "other net packed config higher than default", + setup: func(t *testing.T) (string, func(), bool) { + home, success := newHomePacked(t, "other_packed_higher", appCfgC, tmCfgHigher, clientCfgC) + return home, nil, success }, + expExitCode: 0, + expInStdout: []string{successMsg}, + expNot: []string{"Updating consensus.timeout_commit config value"}, expAppCfg: appCfgC, - expTmCfg: tmCfgC, + expTmCfg: tmCfgHigher, expClientCfg: clientCfgC, }, { name: "other net cannot write new file", setup: func(t *testing.T) (string, func(), bool) { - home, success := newHomePacked(t, "other_cannot_write", appCfgC, tmCfgC, clientCfgC) + home, success := newHomePacked(t, "other_cannot_write", appCfgC, tmCfgLower, clientCfgC) if !success { return home, nil, success } @@ -456,6 +499,10 @@ func TestPreUpgradeCmd(t *testing.T) { } else { assertContainsAll(t, res.Stderr, tc.expInStderr, "stderr") } + for _, unexp := range tc.expNot { + assert.NotContains(t, res.Stdout, unexp, "stdout") + assert.NotContains(t, res.Stderr, unexp, "stderr") + } if res.ExitCode != 0 { return diff --git a/cmd/provenanced/cmd/root.go b/cmd/provenanced/cmd/root.go index 1e9bcd8beb..d85cf9ad07 100644 --- a/cmd/provenanced/cmd/root.go +++ b/cmd/provenanced/cmd/root.go @@ -7,6 +7,7 @@ import ( "io" "os" "path/filepath" + "time" "github.com/rs/zerolog" "github.com/spf13/cast" @@ -235,16 +236,9 @@ func txCommand() *cobra.Command { } func newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, appOpts servertypes.AppOptions) servertypes.Application { - var cache sdk.MultiStorePersistentCache + warnAboutSettings(logger, appOpts) - chainID := cast.ToString(appOpts.Get(flags.FlagChainID)) - if chainID == "pio-mainnet-1" { - timeoutCommit := cast.ToDuration(appOpts.Get("consensus.timeout_commit")) - if timeoutCommit < config.DefaultConsensusTimeoutCommit/2 { - logger.Error(fmt.Sprintf("Your consensus.timeout_commit config value is too low and should be increased to %q (it is currently %q).", - config.DefaultConsensusTimeoutCommit, timeoutCommit)) - } - } + var cache sdk.MultiStorePersistentCache if cast.ToBool(appOpts.Get(server.FlagInterBlockCache)) { cache = store.NewCommitKVStoreCacheManager() @@ -303,6 +297,27 @@ func newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, appOpts serverty ) } +// warnAboutSettings logs warnings about any settings that might cause problems. +func warnAboutSettings(logger log.Logger, appOpts servertypes.AppOptions) { + defer func() { + // If this func panics, just move on. It's just supposed to log things anyway. + _ = recover() + }() + + chainID := cast.ToString(appOpts.Get(flags.FlagChainID)) + if chainID == "pio-mainnet-1" { + skipTimeoutCommit := cast.ToBool(appOpts.Get("consensus.skip_timeout_commit")) + if !skipTimeoutCommit { + timeoutCommit := cast.ToDuration(appOpts.Get("consensus.timeout_commit")) + upperLimit := config.DefaultConsensusTimeoutCommit + 2*time.Second + if timeoutCommit > upperLimit { + logger.Error(fmt.Sprintf("Your consensus.timeout_commit config value is too high and should be decreased to at most %q. The recommended value is %q. Your current value is %q.", + upperLimit, config.DefaultConsensusTimeoutCommit, timeoutCommit)) + } + } + } +} + func createAppAndExport( logger log.Logger, db dbm.DB, diff --git a/cmd/provenanced/cmd/root_test.go b/cmd/provenanced/cmd/root_test.go index dd204228e1..abcd69e24f 100644 --- a/cmd/provenanced/cmd/root_test.go +++ b/cmd/provenanced/cmd/root_test.go @@ -1,15 +1,204 @@ package cmd import ( + "bytes" + "fmt" + "strings" "testing" + "time" + "github.com/rs/zerolog" "github.com/spf13/cast" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/server" serverconfig "github.com/cosmos/cosmos-sdk/server/config" + servertypes "github.com/cosmos/cosmos-sdk/server/types" sdksim "github.com/cosmos/cosmos-sdk/simapp" + + "github.com/provenance-io/provenance/cmd/provenanced/config" ) func TestIAVLConfig(t *testing.T) { require.Equal(t, getIAVLCacheSize(sdksim.EmptyAppOptions{}), cast.ToInt(serverconfig.DefaultConfig().IAVLCacheSize)) } + +type testOpts map[string]interface{} + +var _ servertypes.AppOptions = (*testOpts)(nil) + +func (o testOpts) Get(key string) interface{} { + return o[key] +} + +type panicOpts struct{} + +var _ servertypes.AppOptions = (*panicOpts)(nil) + +func (o panicOpts) Get(key string) interface{} { + panic(fmt.Errorf("panic forced while getting option %q", key)) +} + +func TestWarnAboutSettings(t *testing.T) { + keyChainID := flags.FlagChainID + keySkipTimeoutCommit := "consensus.skip_timeout_commit" + keyTimeoutCommit := "consensus.timeout_commit" + + upperLimit := config.DefaultConsensusTimeoutCommit + 2*time.Second + overUpperLimit := upperLimit + 1*time.Millisecond + mainnetChainID := "pio-mainnet-1" + notMainnetChainID := "not-" + mainnetChainID + + tooHighMsg := func(timeoutCommit time.Duration) string { + return fmt.Sprintf("ERR Your consensus.timeout_commit config value is too high and should be decreased to at most %q. The recommended value is %q. Your current value is %q.", + upperLimit, config.DefaultConsensusTimeoutCommit, timeoutCommit) + } + + mainnetOpts := func(skipTimeoutCommit bool, timeoutCommit time.Duration) testOpts { + return testOpts{ + keyChainID: mainnetChainID, + keySkipTimeoutCommit: skipTimeoutCommit, + keyTimeoutCommit: timeoutCommit, + } + } + notMainnetOpts := func(skipTimeoutCommit bool, timeoutCommit time.Duration) testOpts { + return testOpts{ + keyChainID: notMainnetChainID, + keySkipTimeoutCommit: skipTimeoutCommit, + keyTimeoutCommit: timeoutCommit, + } + } + + tests := []struct { + name string + appOpts servertypes.AppOptions + expLogged []string + }{ + { + name: "mainnet not skipped value over upper limit", + appOpts: mainnetOpts(false, overUpperLimit), + expLogged: []string{tooHighMsg(overUpperLimit)}, + }, + { + name: "mainnet not skipped value at limit", + appOpts: mainnetOpts(false, upperLimit), + }, + { + name: "mainnet not skipped value at default", + appOpts: mainnetOpts(false, config.DefaultConsensusTimeoutCommit), + }, + { + name: "mainnet not skipped value at zero", + appOpts: mainnetOpts(false, 0), + }, + { + name: "mainnet skipped value over upper limit", + appOpts: mainnetOpts(true, overUpperLimit), + }, + { + name: "mainnet skipped value at upper limit", + appOpts: mainnetOpts(true, upperLimit), + }, + { + name: "mainnet skipped value at default", + appOpts: mainnetOpts(true, config.DefaultConsensusTimeoutCommit), + }, + { + name: "mainnet skipped value at zero", + appOpts: mainnetOpts(true, 0), + }, + { + name: "not mainnet not skipped value over upper limit", + appOpts: notMainnetOpts(false, overUpperLimit), + }, + { + name: "not mainnet not skipped value at upper limit", + appOpts: notMainnetOpts(false, upperLimit), + }, + { + name: "not mainnet not skipped value at default", + appOpts: notMainnetOpts(false, config.DefaultConsensusTimeoutCommit), + }, + { + name: "not mainnet not skipped value at zero", + appOpts: notMainnetOpts(false, 0), + }, + { + name: "not mainnet skipped value over upper limit", + appOpts: notMainnetOpts(true, overUpperLimit), + }, + { + name: "not mainnet skipped value at upper limit", + appOpts: notMainnetOpts(true, upperLimit), + }, + { + name: "not mainnet skipped value at default", + appOpts: notMainnetOpts(true, config.DefaultConsensusTimeoutCommit), + }, + { + name: "not mainnet skipped value at zero", + appOpts: notMainnetOpts(true, 0), + }, + { + name: "timeout commit opt not a duration", + appOpts: testOpts{keyChainID: mainnetChainID, keySkipTimeoutCommit: false, keyTimeoutCommit: "nope"}, + }, + { + name: "empty opts", + appOpts: testOpts{}, + }, + { + name: "only chain-id mainnet", + appOpts: testOpts{keyChainID: mainnetChainID}, + }, + { + name: "only chain-id not mainnet", + appOpts: testOpts{keyChainID: mainnetChainID}, + }, + { + name: "mainnet not skipped no timeout commit opt", + appOpts: testOpts{keyChainID: mainnetChainID, keySkipTimeoutCommit: false}, + }, + { + name: "panic from getter", + appOpts: panicOpts{}, + }, + } + + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + // If expLogged isn't defined, we're expecting zero logged lines. + if tc.expLogged == nil { + tc.expLogged = make([]string, 0) + } + + // Create a logger wrapped around our own buffer so we can see what was logged. + var buf bytes.Buffer + lw := zerolog.ConsoleWriter{ + Out: &buf, + NoColor: true, + PartsExclude: []string{"time"}, // Without this, each line starts with " " + } + // Error log lines will start with "ERR ". + // Info log lines will start with "INF ". + // Debug log lines are omitted, but would start with "DBG ". + logger := server.ZeroLogWrapper{Logger: zerolog.New(lw).Level(zerolog.InfoLevel)} + + // Make sure the function never panics. + require.NotPanics(t, func() { warnAboutSettings(logger, tc.appOpts) }, "warnAboutSettings") + + // Make sure the logged output is as expected. + out := buf.String() + // Splitting it into lines and comparing the string slices makes test failure output nicer than + // if we just compare two multi-line strings. + loggedLines := strings.Split(out, "\n") + // Get rid of last "line" if it's just an empty string. Happens when out ends with "\n". + if len(loggedLines[len(loggedLines)-1]) == 0 { + loggedLines = loggedLines[:len(loggedLines)-1] + } + assert.Equal(t, tc.expLogged, loggedLines, "lines logged during warnAboutSettings") + }) + } +} diff --git a/cmd/provenanced/config/manager.go b/cmd/provenanced/config/manager.go index 6b15091119..0320da3fd7 100644 --- a/cmd/provenanced/config/manager.go +++ b/cmd/provenanced/config/manager.go @@ -23,7 +23,7 @@ import ( ) // DefaultConsensusTimeoutCommit is the default value used for the consensus.timeout_commit config value. -var DefaultConsensusTimeoutCommit = 5 * time.Second +var DefaultConsensusTimeoutCommit = 1500 * time.Millisecond // PackConfig generates and saves the packed config file then removes the individual config files. func PackConfig(cmd *cobra.Command) error { diff --git a/cmd/provenanced/config/manager_test.go b/cmd/provenanced/config/manager_test.go index 16c96a7d6a..46cf7d1a65 100644 --- a/cmd/provenanced/config/manager_test.go +++ b/cmd/provenanced/config/manager_test.go @@ -354,7 +354,7 @@ func (s *ConfigManagerTestSuite) TestDefaultTmConfig() { cfg := DefaultTmConfig() s.Run("consensus.commit_timeout", func() { - exp := 5 * time.Second + exp := 1500 * time.Millisecond act := cfg.Consensus.TimeoutCommit s.Assert().Equal(exp, act, "cfg.Consensus.TimeoutCommit") })