Skip to content

Commit

Permalink
Merge PR: fix config of timeout_commit (#2806)
Browse files Browse the repository at this point in the history
* fix config of timeout_commit

* fix config fmt

* add db_backend

* add pendingPool=false

* del setEnv rocksdb

* unify timeout_commit define in one place

* testnet.sh

* add log

* add log

Co-authored-by: xiangjianmeng <[email protected]>
  • Loading branch information
chengzhinei and xiangjianmeng authored Nov 27, 2022
1 parent 06d1998 commit cf81f29
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
6 changes: 4 additions & 2 deletions app/node_mode.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,13 @@ func setValidatorConfig(ctx *server.Context) {
viper.SetDefault(evmtypes.FlagEnableBloomFilter, false)
viper.SetDefault(watcher.FlagFastQuery, false)
viper.SetDefault(appconfig.FlagMaxGasUsedPerBlock, 120000000)
viper.SetDefault(mempool.FlagEnablePendingPool, false)

ctx.Logger.Info(fmt.Sprintf("Set --%s=%v\n--%s=%v\n--%s=%v\n--%s=%v\n--%s=%v\n--%s=%v\n--%s=%v\n--%s=%v by validator node mode",
ctx.Logger.Info(fmt.Sprintf("Set --%s=%v\n--%s=%v\n--%s=%v\n--%s=%v\n--%s=%v\n--%s=%v\n--%s=%v\n--%s=%v\n--%s=%v by validator node mode",
abcitypes.FlagDisableABCIQueryMutex, true, appconfig.FlagDynamicGpMode, types.CloseMode, iavl.FlagIavlEnableAsyncCommit, true,
store.FlagIavlCacheSize, 10000000, server.FlagPruning, "everything",
evmtypes.FlagEnableBloomFilter, false, watcher.FlagFastQuery, false, appconfig.FlagMaxGasUsedPerBlock, 120000000))
evmtypes.FlagEnableBloomFilter, false, watcher.FlagFastQuery, false, appconfig.FlagMaxGasUsedPerBlock, 120000000,
mempool.FlagEnablePendingPool, false))
}

func setArchiveConfig(ctx *server.Context) {
Expand Down
1 change: 1 addition & 0 deletions cmd/exchaind/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ func initEnv() {
checkSetEnv("mempool_cache_size", "300000")
checkSetEnv("mempool_force_recheck_gap", "2000")
checkSetEnv("mempool_recheck", "false")
checkSetEnv("consensus_timeout_commit", fmt.Sprintf("%dms", tmtypes.TimeoutCommit))
}

func checkSetEnv(envName string, value string) {
Expand Down
2 changes: 1 addition & 1 deletion libs/tendermint/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ func DefaultConsensusConfig() *ConsensusConfig {
TimeoutPrevoteDelta: 500 * time.Millisecond,
TimeoutPrecommit: 1000 * time.Millisecond,
TimeoutPrecommitDelta: 500 * time.Millisecond,
TimeoutCommit: 3800 * time.Millisecond,
TimeoutCommit: types.TimeoutCommit * time.Millisecond,
TimeoutConsensus: 1000 * time.Millisecond,
SkipTimeoutCommit: false,
CreateEmptyBlocks: true,
Expand Down
3 changes: 3 additions & 0 deletions libs/tendermint/types/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ import (
const (
// MaxBlockSizeBytes is the maximum permitted size of the blocks.
MaxBlockSizeBytes = 104857600 // 100MB

// TimeoutCommit is set for the stable of blockTime
TimeoutCommit = 3800 // 3.8s
)

var (
Expand Down

0 comments on commit cf81f29

Please sign in to comment.