Skip to content

Commit

Permalink
Update default flags (ethereum#600)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
manav2401 authored Nov 25, 2022
1 parent d69cb20 commit 095ce5e
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 47 deletions.
6 changes: 3 additions & 3 deletions builder/files/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ syncmode = "full"
# pricebump = 10

[miner]
gaslimit = 20000000
gaslimit = 30000000
gasprice = "30000000000"
# mine = true
# etherbase = "VALIDATOR ADDRESS"
Expand Down Expand Up @@ -87,11 +87,11 @@ syncmode = "full"
# vhosts = ["*"]
# corsdomain = ["*"]

# [gpo]
[gpo]
# blocks = 20
# percentile = 60
# maxprice = "5000000000000"
# ignoreprice = "2"
ignoreprice = "30000000000"

[telemetry]
metrics = true
Expand Down
15 changes: 4 additions & 11 deletions internal/cli/server/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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{
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
}

Expand Down
10 changes: 5 additions & 5 deletions packaging/templates/mainnet-v1/archive/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ gcmode = "archive"
# pricebump = 10

[miner]
gaslimit = 20000000
gaslimit = 30000000
gasprice = "30000000000"
# mine = false
# etherbase = ""
Expand Down Expand Up @@ -79,11 +79,11 @@ gcmode = "archive"
# vhosts = ["*"]
# corsdomain = ["*"]

# [gpo]
[gpo]
# blocks = 20
# percentile = 60
# maxprice = "5000000000000"
# ignoreprice = "2"
ignoreprice = "30000000000"

[telemetry]
metrics = true
Expand All @@ -102,8 +102,8 @@ gcmode = "archive"
# organization = ""
# [telemetry.influx.tags]

# [cache]
# cache = 1024
[cache]
cache = 4096
# gc = 25
# snapshot = 10
# database = 50
Expand Down
10 changes: 5 additions & 5 deletions packaging/templates/mainnet-v1/sentry/sentry/bor/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ syncmode = "full"
# pricebump = 10

[miner]
gaslimit = 20000000
gaslimit = 30000000
gasprice = "30000000000"
# mine = false
# etherbase = ""
Expand Down Expand Up @@ -79,11 +79,11 @@ syncmode = "full"
# vhosts = ["*"]
# corsdomain = ["*"]

# [gpo]
[gpo]
# blocks = 20
# percentile = 60
# maxprice = "5000000000000"
# ignoreprice = "2"
ignoreprice = "30000000000"

[telemetry]
metrics = true
Expand All @@ -102,8 +102,8 @@ syncmode = "full"
# organization = ""
# [telemetry.influx.tags]

# [cache]
# cache = 1024
[cache]
cache = 4096
# gc = 25
# snapshot = 10
# database = 50
Expand Down
10 changes: 5 additions & 5 deletions packaging/templates/mainnet-v1/sentry/validator/bor/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ syncmode = "full"

[miner]
mine = true
gaslimit = 20000000
gaslimit = 30000000
gasprice = "30000000000"
# etherbase = ""
# extradata = ""
Expand Down Expand Up @@ -81,11 +81,11 @@ syncmode = "full"
# vhosts = ["*"]
# corsdomain = ["*"]

# [gpo]
[gpo]
# blocks = 20
# percentile = 60
# maxprice = "5000000000000"
# ignoreprice = "2"
ignoreprice = "30000000000"

[telemetry]
metrics = true
Expand All @@ -104,8 +104,8 @@ syncmode = "full"
# organization = ""
# [telemetry.influx.tags]

# [cache]
# cache = 1024
[cache]
cache = 4096
# gc = 25
# snapshot = 10
# database = 50
Expand Down
10 changes: 5 additions & 5 deletions packaging/templates/mainnet-v1/without-sentry/bor/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ syncmode = "full"

[miner]
mine = true
gaslimit = 20000000
gaslimit = 30000000
gasprice = "30000000000"
# etherbase = ""
# extradata = ""
Expand Down Expand Up @@ -81,11 +81,11 @@ syncmode = "full"
# vhosts = ["*"]
# corsdomain = ["*"]

# [gpo]
[gpo]
# blocks = 20
# percentile = 60
# maxprice = "5000000000000"
# ignoreprice = "2"
ignoreprice = "30000000000"

[telemetry]
metrics = true
Expand All @@ -104,8 +104,8 @@ syncmode = "full"
# organization = ""
# [telemetry.influx.tags]

# [cache]
# cache = 1024
[cache]
cache = 4096
# gc = 25
# snapshot = 10
# database = 50
Expand Down
8 changes: 4 additions & 4 deletions packaging/templates/testnet-v4/archive/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ chain = "mumbai"
datadir = "/var/lib/bor/data"
# keystore = ""
syncmode = "full"
# gcmode = "full"
gcmode = "archive"
# snapshot = true
# ethstats = ""

Expand Down Expand Up @@ -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 = ""
Expand Down
6 changes: 3 additions & 3 deletions packaging/templates/testnet-v4/sentry/sentry/bor/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""

Expand Down
6 changes: 3 additions & 3 deletions packaging/templates/testnet-v4/without-sentry/bor/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""

Expand Down

0 comments on commit 095ce5e

Please sign in to comment.