From 095ce5e1dae6591625b1bd50e9f7c032f6bd8f70 Mon Sep 17 00:00:00 2001 From: Manav Darji Date: Fri, 25 Nov 2022 21:56:31 +0530 Subject: [PATCH] Update default flags (#600) * internal/cli/server: use geth's default for txpool.pricelimit and add comments * builder/files: update config.toml for mainnet * packaging/templates: update defaults for mainnet and mumbai * internal/cli/server: skip overriding cache * packaging/templates: update cache value for mainnet * packaging/templates: update gcmode for archive mumbai node --- builder/files/config.toml | 6 +++--- internal/cli/server/config.go | 15 ++++----------- .../templates/mainnet-v1/archive/config.toml | 10 +++++----- .../mainnet-v1/sentry/sentry/bor/config.toml | 10 +++++----- .../mainnet-v1/sentry/validator/bor/config.toml | 10 +++++----- .../mainnet-v1/without-sentry/bor/config.toml | 10 +++++----- .../templates/testnet-v4/archive/config.toml | 8 ++++---- .../testnet-v4/sentry/sentry/bor/config.toml | 6 +++--- .../testnet-v4/sentry/validator/bor/config.toml | 6 +++--- .../testnet-v4/without-sentry/bor/config.toml | 6 +++--- 10 files changed, 40 insertions(+), 47 deletions(-) diff --git a/builder/files/config.toml b/builder/files/config.toml index 8f70f62a13..f79b892e7f 100644 --- a/builder/files/config.toml +++ b/builder/files/config.toml @@ -52,7 +52,7 @@ syncmode = "full" # pricebump = 10 [miner] - gaslimit = 20000000 + gaslimit = 30000000 gasprice = "30000000000" # mine = true # etherbase = "VALIDATOR ADDRESS" @@ -87,11 +87,11 @@ syncmode = "full" # vhosts = ["*"] # corsdomain = ["*"] -# [gpo] +[gpo] # blocks = 20 # percentile = 60 # maxprice = "5000000000000" - # ignoreprice = "2" + ignoreprice = "30000000000" [telemetry] metrics = true diff --git a/internal/cli/server/config.go b/internal/cli/server/config.go index 7070afca24..2e0a8f21f5 100644 --- a/internal/cli/server/config.go +++ b/internal/cli/server/config.go @@ -428,7 +428,7 @@ func DefaultConfig() *Config { NoLocals: false, Journal: "transactions.rlp", Rejournal: 1 * time.Hour, - PriceLimit: 30000000000, + PriceLimit: 1, // geth's default PriceBump: 10, AccountSlots: 16, GlobalSlots: 32768, @@ -439,8 +439,8 @@ func DefaultConfig() *Config { Sealer: &SealerConfig{ Enabled: false, Etherbase: "", - GasCeil: 30_000_000, - GasPrice: big.NewInt(1 * params.GWei), + GasCeil: 30_000_000, // geth's default + GasPrice: big.NewInt(1 * params.GWei), // geth's default ExtraData: "", }, Gpo: &GpoConfig{ @@ -497,7 +497,7 @@ func DefaultConfig() *Config { }, }, Cache: &CacheConfig{ - Cache: 1024, + Cache: 1024, // geth's default (suitable for mumbai) PercDatabase: 50, PercTrie: 15, PercGc: 25, @@ -626,13 +626,6 @@ func (c *Config) loadChain() error { c.P2P.Discovery.DNS = c.chain.DNS } - // depending on the chain we have different cache values - if c.Chain == "mainnet" { - c.Cache.Cache = 4096 - } else { - c.Cache.Cache = 1024 - } - return nil } diff --git a/packaging/templates/mainnet-v1/archive/config.toml b/packaging/templates/mainnet-v1/archive/config.toml index a44a2ed0b5..8989a1b7b5 100644 --- a/packaging/templates/mainnet-v1/archive/config.toml +++ b/packaging/templates/mainnet-v1/archive/config.toml @@ -45,7 +45,7 @@ gcmode = "archive" # pricebump = 10 [miner] - gaslimit = 20000000 + gaslimit = 30000000 gasprice = "30000000000" # mine = false # etherbase = "" @@ -79,11 +79,11 @@ gcmode = "archive" # vhosts = ["*"] # corsdomain = ["*"] -# [gpo] +[gpo] # blocks = 20 # percentile = 60 # maxprice = "5000000000000" - # ignoreprice = "2" + ignoreprice = "30000000000" [telemetry] metrics = true @@ -102,8 +102,8 @@ gcmode = "archive" # organization = "" # [telemetry.influx.tags] -# [cache] - # cache = 1024 +[cache] + cache = 4096 # gc = 25 # snapshot = 10 # database = 50 diff --git a/packaging/templates/mainnet-v1/sentry/sentry/bor/config.toml b/packaging/templates/mainnet-v1/sentry/sentry/bor/config.toml index 5bb226b913..d91e12b31e 100644 --- a/packaging/templates/mainnet-v1/sentry/sentry/bor/config.toml +++ b/packaging/templates/mainnet-v1/sentry/sentry/bor/config.toml @@ -45,7 +45,7 @@ syncmode = "full" # pricebump = 10 [miner] - gaslimit = 20000000 + gaslimit = 30000000 gasprice = "30000000000" # mine = false # etherbase = "" @@ -79,11 +79,11 @@ syncmode = "full" # vhosts = ["*"] # corsdomain = ["*"] -# [gpo] +[gpo] # blocks = 20 # percentile = 60 # maxprice = "5000000000000" - # ignoreprice = "2" + ignoreprice = "30000000000" [telemetry] metrics = true @@ -102,8 +102,8 @@ syncmode = "full" # organization = "" # [telemetry.influx.tags] -# [cache] - # cache = 1024 +[cache] + cache = 4096 # gc = 25 # snapshot = 10 # database = 50 diff --git a/packaging/templates/mainnet-v1/sentry/validator/bor/config.toml b/packaging/templates/mainnet-v1/sentry/validator/bor/config.toml index 5a7688f9e8..c9f583aae3 100644 --- a/packaging/templates/mainnet-v1/sentry/validator/bor/config.toml +++ b/packaging/templates/mainnet-v1/sentry/validator/bor/config.toml @@ -48,7 +48,7 @@ syncmode = "full" [miner] mine = true - gaslimit = 20000000 + gaslimit = 30000000 gasprice = "30000000000" # etherbase = "" # extradata = "" @@ -81,11 +81,11 @@ syncmode = "full" # vhosts = ["*"] # corsdomain = ["*"] -# [gpo] +[gpo] # blocks = 20 # percentile = 60 # maxprice = "5000000000000" - # ignoreprice = "2" + ignoreprice = "30000000000" [telemetry] metrics = true @@ -104,8 +104,8 @@ syncmode = "full" # organization = "" # [telemetry.influx.tags] -# [cache] - # cache = 1024 +[cache] + cache = 4096 # gc = 25 # snapshot = 10 # database = 50 diff --git a/packaging/templates/mainnet-v1/without-sentry/bor/config.toml b/packaging/templates/mainnet-v1/without-sentry/bor/config.toml index 74094bfa80..5c4a057b91 100644 --- a/packaging/templates/mainnet-v1/without-sentry/bor/config.toml +++ b/packaging/templates/mainnet-v1/without-sentry/bor/config.toml @@ -48,7 +48,7 @@ syncmode = "full" [miner] mine = true - gaslimit = 20000000 + gaslimit = 30000000 gasprice = "30000000000" # etherbase = "" # extradata = "" @@ -81,11 +81,11 @@ syncmode = "full" # vhosts = ["*"] # corsdomain = ["*"] -# [gpo] +[gpo] # blocks = 20 # percentile = 60 # maxprice = "5000000000000" -# ignoreprice = "2" + ignoreprice = "30000000000" [telemetry] metrics = true @@ -104,8 +104,8 @@ syncmode = "full" # organization = "" # [telemetry.influx.tags] -# [cache] -# cache = 1024 +[cache] + cache = 4096 # gc = 25 # snapshot = 10 # database = 50 diff --git a/packaging/templates/testnet-v4/archive/config.toml b/packaging/templates/testnet-v4/archive/config.toml index 0438ffe3ae..5b7cbdd78e 100644 --- a/packaging/templates/testnet-v4/archive/config.toml +++ b/packaging/templates/testnet-v4/archive/config.toml @@ -4,7 +4,7 @@ chain = "mumbai" datadir = "/var/lib/bor/data" # keystore = "" syncmode = "full" -# gcmode = "full" +gcmode = "archive" # snapshot = true # ethstats = "" @@ -41,12 +41,12 @@ syncmode = "full" # locals = [] # journal = "" # rejournal = "1h0m0s" - # pricelimit = 30000000000 + # pricelimit = 1 # pricebump = 10 [miner] - gaslimit = 20000000 - # gasprice = "30000000000" + gaslimit = 30000000 + # gasprice = "1000000000" # mine = false # etherbase = "" # extradata = "" diff --git a/packaging/templates/testnet-v4/sentry/sentry/bor/config.toml b/packaging/templates/testnet-v4/sentry/sentry/bor/config.toml index 155a33373b..f98e04ff42 100644 --- a/packaging/templates/testnet-v4/sentry/sentry/bor/config.toml +++ b/packaging/templates/testnet-v4/sentry/sentry/bor/config.toml @@ -41,12 +41,12 @@ syncmode = "full" # locals = [] # journal = "" # rejournal = "1h0m0s" - # pricelimit = 30000000000 + # pricelimit = 1 # pricebump = 10 [miner] - gaslimit = 20000000 - # gasprice = "30000000000" + gaslimit = 30000000 + # gasprice = "1000000000" # mine = false # etherbase = "" # extradata = "" diff --git a/packaging/templates/testnet-v4/sentry/validator/bor/config.toml b/packaging/templates/testnet-v4/sentry/validator/bor/config.toml index 19b9a4452c..e2a404263d 100644 --- a/packaging/templates/testnet-v4/sentry/validator/bor/config.toml +++ b/packaging/templates/testnet-v4/sentry/validator/bor/config.toml @@ -43,13 +43,13 @@ syncmode = "full" # locals = [] # journal = "" # rejournal = "1h0m0s" - # pricelimit = 30000000000 + # pricelimit = 1 # pricebump = 10 [miner] mine = true - gaslimit = 20000000 - # gasprice = "30000000000" + gaslimit = 30000000 + # gasprice = "1000000000" # etherbase = "" # extradata = "" diff --git a/packaging/templates/testnet-v4/without-sentry/bor/config.toml b/packaging/templates/testnet-v4/without-sentry/bor/config.toml index c4de3e87c4..567c9a5b0a 100644 --- a/packaging/templates/testnet-v4/without-sentry/bor/config.toml +++ b/packaging/templates/testnet-v4/without-sentry/bor/config.toml @@ -43,13 +43,13 @@ syncmode = "full" # locals = [] # journal = "" # rejournal = "1h0m0s" - # pricelimit = 30000000000 + # pricelimit = 1 # pricebump = 10 [miner] mine = true - gaslimit = 20000000 - # gasprice = "30000000000" + gaslimit = 30000000 + # gasprice = "1000000000" # etherbase = "" # extradata = ""