diff --git a/README.md b/README.md index f198c999ed..b699953303 100644 --- a/README.md +++ b/README.md @@ -153,11 +153,10 @@ Note: if you can not download the chaindata snapshot and want to sync from genes So just run: `geth --datadir init ./genesis.json` #### 4. Start a full node ```shell -./geth --config ./config.toml --datadir ./node --cache 8000 --rpc.allow-unprotected-txs --txlookuplimit 0 +./geth --config ./config.toml --datadir ./node --cache 8000 --rpc.allow-unprotected-txs --history.transactions 0 ## It is recommand to run fullnode with `--tries-verify-mode none` if you want high performance and care little about state consistency -./geth --config ./config.toml --datadir ./node --cache 8000 --rpc.allow-unprotected-txs --txlookuplimit 0 --tries-verify-mode none -``` +./geth --config ./config.toml --datadir ./node --cache 8000 --rpc.allow-unprotected-txs --history.transactions 0 --tries-verify-mode none #### 5. Monitor node status diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 7c6ce0e6cb..406c5f7072 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -1948,14 +1948,12 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) { // Parse transaction history flag, if user is still using legacy config // file with 'TxLookupLimit' configured, copy the value to 'TransactionHistory'. if cfg.TransactionHistory == ethconfig.Defaults.TransactionHistory && cfg.TxLookupLimit != ethconfig.Defaults.TxLookupLimit { - log.Warn("The config option 'TxLookupLimit' is deprecated and will be removed, please use 'TransactionHistory'") - cfg.TransactionHistory = cfg.TxLookupLimit + log.Crit("The config option 'TxLookupLimit' is deprecated and may cause unexpected performance degradation issues, please use 'TransactionHistory' instead") } if ctx.IsSet(TransactionHistoryFlag.Name) { cfg.TransactionHistory = ctx.Uint64(TransactionHistoryFlag.Name) } else if ctx.IsSet(TxLookupLimitFlag.Name) { - log.Warn("The flag --txlookuplimit is deprecated and will be removed, please use --history.transactions") - cfg.TransactionHistory = ctx.Uint64(TransactionHistoryFlag.Name) + log.Crit("The flag --txlookuplimit is deprecated and may cause unexpected performance degradation issues. Please use --history.transactions instead") } if ctx.IsSet(PathDBSyncFlag.Name) { cfg.PathSyncFlush = true diff --git a/log/root.go b/log/root.go index 5a41723c3e..c8893bf80c 100644 --- a/log/root.go +++ b/log/root.go @@ -2,6 +2,7 @@ package log import ( "os" + "time" ) var ( @@ -105,6 +106,7 @@ func Error(msg string, ctx ...interface{}) { // log.Crit("msg", "key1", val1, "key2", val2) func Crit(msg string, ctx ...interface{}) { root.write(msg, LvlCrit, ctx, skipLevel) + time.Sleep(3 * time.Second) os.Exit(1) } diff --git a/tests/truffle/scripts/bsc-rpc.sh b/tests/truffle/scripts/bsc-rpc.sh index 5367b807c1..43c811c787 100755 --- a/tests/truffle/scripts/bsc-rpc.sh +++ b/tests/truffle/scripts/bsc-rpc.sh @@ -12,5 +12,5 @@ done geth --config ${DATA_DIR}/config.toml --datadir ${DATA_DIR} --netrestrict ${CLUSTER_CIDR} \ --verbosity ${VERBOSE} --nousb \ - --rpc.allow-unprotected-txs --txlookuplimit 15768000 \ + --rpc.allow-unprotected-txs --history.transactions 15768000 \ -unlock ${unlock_sequences} --password /dev/null diff --git a/tests/truffle/scripts/bsc-validator.sh b/tests/truffle/scripts/bsc-validator.sh index 4605a867a7..16b8c2ed57 100755 --- a/tests/truffle/scripts/bsc-validator.sh +++ b/tests/truffle/scripts/bsc-validator.sh @@ -15,4 +15,4 @@ geth --config ${DATA_DIR}/config.toml --datadir ${DATA_DIR} --netrestrict ${CLUS --bootnodes enode://${BOOTSTRAP_PUB_KEY}@${BOOTSTRAP_IP}:${BOOTSTRAP_TCP_PORT} \ --mine -unlock ${VALIDATOR_ADDR} --miner.etherbase ${VALIDATOR_ADDR} --password /dev/null \ --light.serve 50 \ - --rpc.allow-unprotected-txs --txlookuplimit 15768000 + --rpc.allow-unprotected-txs --history.transactions 15768000