Skip to content

Commit

Permalink
Merge PR: optimize start params (#2762)
Browse files Browse the repository at this point in the history
* optimize start params

* optimize start param

* optimize start param

* optimize start param
  • Loading branch information
xiangjianmeng authored Nov 20, 2022
1 parent 5039f2e commit e827f96
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
6 changes: 4 additions & 2 deletions app/node_mode.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion app/types/node_mode.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion cmd/client/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
3 changes: 2 additions & 1 deletion libs/tendermint/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e827f96

Please sign in to comment.