From e827f96d56c76b4c7d618efe326a818f236dcce6 Mon Sep 17 00:00:00 2001 From: xiangjianmeng <805442788@qq.com> Date: Sun, 20 Nov 2022 11:22:52 +0800 Subject: [PATCH] Merge PR: optimize start params (#2762) * optimize start params * optimize start param * optimize start param * optimize start param --- app/node_mode.go | 6 ++++-- app/types/node_mode.go | 2 +- cmd/client/flags.go | 2 +- libs/tendermint/config/config.go | 3 ++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/node_mode.go b/app/node_mode.go index ae9bd017b5..72091951a2 100644 --- a/app/node_mode.go +++ b/app/node_mode.go @@ -76,10 +76,12 @@ func setValidatorConfig(ctx *server.Context) { viper.SetDefault(server.FlagPruning, "everything") viper.SetDefault(evmtypes.FlagEnableBloomFilter, false) viper.SetDefault(watcher.FlagFastQuery, 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 by validator node mode", + viper.SetDefault(appconfig.FlagMaxGasUsedPerBlock, 120000000) + + 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", abcitypes.FlagDisableABCIQueryMutex, true, appconfig.FlagEnableDynamicGp, false, iavl.FlagIavlEnableAsyncCommit, true, store.FlagIavlCacheSize, 10000000, server.FlagPruning, "everything", - evmtypes.FlagEnableBloomFilter, false, watcher.FlagFastQuery, false)) + evmtypes.FlagEnableBloomFilter, false, watcher.FlagFastQuery, false, appconfig.FlagMaxGasUsedPerBlock, 120000000)) } func setArchiveConfig(ctx *server.Context) { diff --git a/app/types/node_mode.go b/app/types/node_mode.go index d1b642dcff..f35b484ff0 100644 --- a/app/types/node_mode.go +++ b/app/types/node_mode.go @@ -5,7 +5,7 @@ type NodeMode string const ( // node mode values RpcNode NodeMode = "rpc" - ValidatorNode NodeMode = "validator" + ValidatorNode NodeMode = "val" ArchiveNode NodeMode = "archive" InnertxNode NodeMode = "innertx" diff --git a/cmd/client/flags.go b/cmd/client/flags.go index c1efea771f..f891af12a1 100644 --- a/cmd/client/flags.go +++ b/cmd/client/flags.go @@ -101,7 +101,7 @@ func RegisterAppFlag(cmd *cobra.Command) { cmd.Flags().String(tmdb.FlagGoLeveldbOpts, "", "Options of goleveldb. (cache_size=128MB,handlers_num=1024)") cmd.Flags().String(tmdb.FlagRocksdbOpts, "", "Options of rocksdb. (block_size=4KB,block_cache=1GB,statistics=true,allow_mmap_reads=true,max_open_files=-1)") - cmd.Flags().String(types.FlagNodeMode, "", "Node mode (rpc|validator|archive) is used to manage flags") + cmd.Flags().String(types.FlagNodeMode, "", "Node mode (rpc|val|archive) is used to manage flags") cmd.Flags().Bool(consensus.EnablePrerunTx, true, "enable proactively runtx mode, default close") cmd.Flags().String(automation.ConsensusRole, "", "consensus role") diff --git a/libs/tendermint/config/config.go b/libs/tendermint/config/config.go index f8dd7d2e0d..4c175f3f43 100644 --- a/libs/tendermint/config/config.go +++ b/libs/tendermint/config/config.go @@ -696,13 +696,14 @@ func DefaultMempoolConfig() *MempoolConfig { // ABCI Recheck Size: 200_000, // exchain memory pool size(max tx num) MaxTxsBytes: 1024 * 1024 * 1024, // 1GB - CacheSize: 10000, + CacheSize: 300_000, MaxTxBytes: 1024 * 1024, // 1MB MaxTxNumPerBlock: 300, MaxGasUsedPerBlock: -1, SortTxByGp: true, ForceRecheckGap: 2000, TxPriceBump: 10, + EnablePendingPool: true, PendingPoolSize: 50000, PendingPoolPeriod: 3, PendingPoolReserveBlocks: 100,