Compare commits

..

3 Commits

Author SHA1 Message Date
larry.lx
c409eb6ac6 release: draft v1.3.3 2023-11-30 09:35:50 +08:00
Ng Wei Han
cf80501de5 cmd/utils: exit process if txlookuplimit flag is set (#2000) 2023-11-30 09:33:17 +08:00
Ng Wei Han
3ce568ff44 fix(cmd): check pruneancient when creating db (#1986) 2023-11-30 09:31:44 +08:00
7 changed files with 17 additions and 11 deletions

View File

@@ -1,4 +1,11 @@
# Changelog # Changelog
## v1.3.3
IMPROVEMENT
* [\#2000](https://github.com/bnb-chain/bsc/pull/2000) cmd/utils: exit process if txlookuplimit flag is set
BUGFIX
* [\#1986](https://github.com/bnb-chain/bsc/pull/1986) fix(cmd): check pruneancient when creating db
## v1.3.2 ## v1.3.2
BUGFIX BUGFIX
fix: remove sharedPool fix: remove sharedPool

View File

@@ -153,11 +153,10 @@ Note: if you can not download the chaindata snapshot and want to sync from genes
So just run: `geth --datadir <datadir> init ./genesis.json` So just run: `geth --datadir <datadir> init ./genesis.json`
#### 4. Start a full node #### 4. Start a full node
```shell ```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 ## 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 #### 5. Monitor node status

View File

@@ -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 // Parse transaction history flag, if user is still using legacy config
// file with 'TxLookupLimit' configured, copy the value to 'TransactionHistory'. // file with 'TxLookupLimit' configured, copy the value to 'TransactionHistory'.
if cfg.TransactionHistory == ethconfig.Defaults.TransactionHistory && cfg.TxLookupLimit != ethconfig.Defaults.TxLookupLimit { 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'") log.Crit("The config option 'TxLookupLimit' is deprecated and may cause unexpected performance degradation issues, please use 'TransactionHistory' instead")
cfg.TransactionHistory = cfg.TxLookupLimit
} }
if ctx.IsSet(TransactionHistoryFlag.Name) { if ctx.IsSet(TransactionHistoryFlag.Name) {
cfg.TransactionHistory = ctx.Uint64(TransactionHistoryFlag.Name) cfg.TransactionHistory = ctx.Uint64(TransactionHistoryFlag.Name)
} else if ctx.IsSet(TxLookupLimitFlag.Name) { } else if ctx.IsSet(TxLookupLimitFlag.Name) {
log.Warn("The flag --txlookuplimit is deprecated and will be removed, please use --history.transactions") log.Crit("The flag --txlookuplimit is deprecated and may cause unexpected performance degradation issues. Please use --history.transactions instead")
cfg.TransactionHistory = ctx.Uint64(TransactionHistoryFlag.Name)
} }
if ctx.IsSet(PathDBSyncFlag.Name) { if ctx.IsSet(PathDBSyncFlag.Name) {
cfg.PathSyncFlush = true cfg.PathSyncFlush = true
@@ -2355,7 +2353,7 @@ func tryMakeReadOnlyDatabase(ctx *cli.Context, stack *node.Node) ethdb.Database
// If datadir doesn't exist we need to open db in write-mode // If datadir doesn't exist we need to open db in write-mode
// so database engine can create files. // so database engine can create files.
readonly := true readonly := true
if !common.FileExist(stack.ResolvePath("chaindata")) { if !common.FileExist(stack.ResolvePath("chaindata")) || ctx.Bool(PruneAncientDataFlag.Name) {
readonly = false readonly = false
} }
return MakeChainDatabase(ctx, stack, readonly, false) return MakeChainDatabase(ctx, stack, readonly, false)

View File

@@ -2,6 +2,7 @@ package log
import ( import (
"os" "os"
"time"
) )
var ( var (
@@ -105,6 +106,7 @@ func Error(msg string, ctx ...interface{}) {
// log.Crit("msg", "key1", val1, "key2", val2) // log.Crit("msg", "key1", val1, "key2", val2)
func Crit(msg string, ctx ...interface{}) { func Crit(msg string, ctx ...interface{}) {
root.write(msg, LvlCrit, ctx, skipLevel) root.write(msg, LvlCrit, ctx, skipLevel)
time.Sleep(3 * time.Second)
os.Exit(1) os.Exit(1)
} }

View File

@@ -23,7 +23,7 @@ import (
const ( const (
VersionMajor = 1 // Major version component of the current release VersionMajor = 1 // Major version component of the current release
VersionMinor = 3 // Minor version component of the current release VersionMinor = 3 // Minor version component of the current release
VersionPatch = 2 // Patch version component of the current release VersionPatch = 3 // Patch version component of the current release
VersionMeta = "" // Version metadata to append to the version string VersionMeta = "" // Version metadata to append to the version string
) )

View File

@@ -12,5 +12,5 @@ done
geth --config ${DATA_DIR}/config.toml --datadir ${DATA_DIR} --netrestrict ${CLUSTER_CIDR} \ geth --config ${DATA_DIR}/config.toml --datadir ${DATA_DIR} --netrestrict ${CLUSTER_CIDR} \
--verbosity ${VERBOSE} --nousb \ --verbosity ${VERBOSE} --nousb \
--rpc.allow-unprotected-txs --txlookuplimit 15768000 \ --rpc.allow-unprotected-txs --history.transactions 15768000 \
-unlock ${unlock_sequences} --password /dev/null -unlock ${unlock_sequences} --password /dev/null

View File

@@ -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} \ --bootnodes enode://${BOOTSTRAP_PUB_KEY}@${BOOTSTRAP_IP}:${BOOTSTRAP_TCP_PORT} \
--mine -unlock ${VALIDATOR_ADDR} --miner.etherbase ${VALIDATOR_ADDR} --password /dev/null \ --mine -unlock ${VALIDATOR_ADDR} --miner.etherbase ${VALIDATOR_ADDR} --password /dev/null \
--light.serve 50 \ --light.serve 50 \
--rpc.allow-unprotected-txs --txlookuplimit 15768000 --rpc.allow-unprotected-txs --history.transactions 15768000