From 230be40ae206cf27c0b62d0aff3d4fa2a3ff8136 Mon Sep 17 00:00:00 2001 From: Jerry Date: Thu, 9 Jan 2025 23:06:16 -0800 Subject: [PATCH] Bump default value of txpool global slots Increase the default value in order to reduce the time spent in txpool reorg. When txpool is saturated, txpool reorg can take more than a few seconds to run. This impacts block producer because the producer would need to get the pending txns from txpool, which is blocked by reorg. --- builder/files/config.toml | 6 +++--- docs/cli/server.md | 14 +++++++------- internal/cli/server/config.go | 6 +++--- internal/cli/server/testdata/default.toml | 6 +++--- packaging/templates/mainnet-v1/archive/config.toml | 6 +++--- .../mainnet-v1/sentry/sentry/bor/config.toml | 6 +++--- .../mainnet-v1/sentry/sentry/bor/pbss_config.toml | 6 +++--- .../mainnet-v1/sentry/validator/bor/config.toml | 6 +++--- .../sentry/validator/bor/pbss_config.toml | 6 +++--- .../mainnet-v1/without-sentry/bor/config.toml | 6 +++--- .../mainnet-v1/without-sentry/bor/pbss_config.toml | 6 +++--- 11 files changed, 37 insertions(+), 37 deletions(-) diff --git a/builder/files/config.toml b/builder/files/config.toml index df34031979..d35c46c0b6 100644 --- a/builder/files/config.toml +++ b/builder/files/config.toml @@ -58,9 +58,9 @@ syncmode = "full" nolocals = true pricelimit = 25000000000 accountslots = 16 - globalslots = 32768 - accountqueue = 16 - globalqueue = 32768 + globalslots = 131072 + accountqueue = 64 + globalqueue = 131072 lifetime = "1h30m0s" # locals = [] # journal = "" diff --git a/docs/cli/server.md b/docs/cli/server.md index 243e83406d..aae0c19a8e 100644 --- a/docs/cli/server.md +++ b/docs/cli/server.md @@ -40,7 +40,7 @@ The ```bor server``` command runs the Bor client. - ```eth.requiredblocks```: Comma separated block number-to-hash mappings to require for peering (=) -- ```ethstats```: Reporting URL of an ethstats service (nodename:secret@host:port) +- ```ethstats```: Reporting URL of a ethstats service (nodename:secret@host:port) - ```gcmode```: Blockchain garbage collection mode ("full", "archive") (default: full) @@ -148,7 +148,7 @@ The ```bor server``` command runs the Bor client. - ```graphql```: Enable GraphQL on the HTTP-RPC server. Note that GraphQL can only be started if an HTTP server is started as well. (default: false) -- ```graphql.corsdomain```: Comma separated list of domains from which to accept cross-origin requests (browser enforced) (default: localhost) +- ```graphql.corsdomain```: Comma separated list of domains from which to accept cross origin requests (browser enforced) (default: localhost) - ```graphql.vhosts```: Comma separated list of virtual hostnames from which to accept requests (server enforced). Accepts '*' wildcard. (default: localhost) @@ -158,7 +158,7 @@ The ```bor server``` command runs the Bor client. - ```http.api```: API's offered over the HTTP-RPC interface (default: eth,net,web3,txpool,bor) -- ```http.corsdomain```: Comma separated list of domains from which to accept cross-origin requests (browser enforced) (default: localhost) +- ```http.corsdomain```: Comma separated list of domains from which to accept cross origin requests (browser enforced) (default: localhost) - ```http.ep-requesttimeout```: Request Timeout for rpc execution pool for HTTP requests (default: 0s) @@ -290,13 +290,13 @@ The ```bor server``` command runs the Bor client. ### Transaction Pool Options -- ```txpool.accountqueue```: Maximum number of non-executable transaction slots permitted per account (default: 16) +- ```txpool.accountqueue```: Maximum number of non-executable transaction slots permitted per account (default: 64) - ```txpool.accountslots```: Minimum number of executable transaction slots guaranteed per account (default: 16) -- ```txpool.globalqueue```: Maximum number of non-executable transaction slots for all accounts (default: 32768) +- ```txpool.globalqueue```: Maximum number of non-executable transaction slots for all accounts (default: 131072) -- ```txpool.globalslots```: Maximum number of executable transaction slots for all accounts (default: 32768) +- ```txpool.globalslots```: Maximum number of executable transaction slots for all accounts (default: 131072) - ```txpool.journal```: Disk journal for local transaction to survive node restarts (default: transactions.rlp) @@ -310,4 +310,4 @@ The ```bor server``` command runs the Bor client. - ```txpool.pricelimit```: Minimum gas price limit to enforce for acceptance into the pool (default: 25000000000) -- ```txpool.rejournal```: Time interval to regenerate the local transaction journal (default: 1h0m0s) +- ```txpool.rejournal```: Time interval to regenerate the local transaction journal (default: 1h0m0s) \ No newline at end of file diff --git a/internal/cli/server/config.go b/internal/cli/server/config.go index 5960fdeab0..89078b30e4 100644 --- a/internal/cli/server/config.go +++ b/internal/cli/server/config.go @@ -658,9 +658,9 @@ func DefaultConfig() *Config { PriceLimit: params.BorDefaultTxPoolPriceLimit, // bor's default PriceBump: 10, AccountSlots: 16, - GlobalSlots: 32768, - AccountQueue: 16, - GlobalQueue: 32768, + GlobalSlots: 131072, + AccountQueue: 64, + GlobalQueue: 131072, LifeTime: 3 * time.Hour, }, Sealer: &SealerConfig{ diff --git a/internal/cli/server/testdata/default.toml b/internal/cli/server/testdata/default.toml index 0df37d610c..fcf2121270 100644 --- a/internal/cli/server/testdata/default.toml +++ b/internal/cli/server/testdata/default.toml @@ -61,9 +61,9 @@ devfakeauthor = false pricelimit = 25000000000 pricebump = 10 accountslots = 16 - globalslots = 32768 - accountqueue = 16 - globalqueue = 32768 + globalslots = 131072 + accountqueue = 64 + globalqueue = 131072 lifetime = "3h0m0s" [miner] diff --git a/packaging/templates/mainnet-v1/archive/config.toml b/packaging/templates/mainnet-v1/archive/config.toml index a62dda85b1..77699dae04 100644 --- a/packaging/templates/mainnet-v1/archive/config.toml +++ b/packaging/templates/mainnet-v1/archive/config.toml @@ -53,9 +53,9 @@ gcmode = "archive" nolocals = true pricelimit = 25000000000 accountslots = 16 - globalslots = 32768 - accountqueue = 16 - globalqueue = 32768 + globalslots = 131072 + accountqueue = 64 + globalqueue = 131072 lifetime = "1h30m0s" # locals = [] # journal = "" diff --git a/packaging/templates/mainnet-v1/sentry/sentry/bor/config.toml b/packaging/templates/mainnet-v1/sentry/sentry/bor/config.toml index 0ee56f339c..9148973338 100644 --- a/packaging/templates/mainnet-v1/sentry/sentry/bor/config.toml +++ b/packaging/templates/mainnet-v1/sentry/sentry/bor/config.toml @@ -53,9 +53,9 @@ syncmode = "full" nolocals = true pricelimit = 25000000000 accountslots = 16 - globalslots = 32768 - accountqueue = 16 - globalqueue = 32768 + globalslots = 131072 + accountqueue = 64 + globalqueue = 131072 lifetime = "1h30m0s" # locals = [] # journal = "" diff --git a/packaging/templates/mainnet-v1/sentry/sentry/bor/pbss_config.toml b/packaging/templates/mainnet-v1/sentry/sentry/bor/pbss_config.toml index 3d1d06400e..7a11e6a7d2 100644 --- a/packaging/templates/mainnet-v1/sentry/sentry/bor/pbss_config.toml +++ b/packaging/templates/mainnet-v1/sentry/sentry/bor/pbss_config.toml @@ -55,9 +55,9 @@ syncmode = "full" nolocals = true pricelimit = 25000000000 accountslots = 16 - globalslots = 32768 - accountqueue = 16 - globalqueue = 32768 + globalslots = 131072 + accountqueue = 64 + globalqueue = 131072 lifetime = "1h30m0s" # locals = [] # journal = "" diff --git a/packaging/templates/mainnet-v1/sentry/validator/bor/config.toml b/packaging/templates/mainnet-v1/sentry/validator/bor/config.toml index bcf19bbcbe..9ab0802d46 100644 --- a/packaging/templates/mainnet-v1/sentry/validator/bor/config.toml +++ b/packaging/templates/mainnet-v1/sentry/validator/bor/config.toml @@ -55,9 +55,9 @@ syncmode = "full" nolocals = true pricelimit = 25000000000 accountslots = 16 - globalslots = 32768 - accountqueue = 16 - globalqueue = 32768 + globalslots = 131072 + accountqueue = 64 + globalqueue = 131072 lifetime = "1h30m0s" # locals = [] # journal = "" diff --git a/packaging/templates/mainnet-v1/sentry/validator/bor/pbss_config.toml b/packaging/templates/mainnet-v1/sentry/validator/bor/pbss_config.toml index 6e71ad1cf9..75954b38e6 100644 --- a/packaging/templates/mainnet-v1/sentry/validator/bor/pbss_config.toml +++ b/packaging/templates/mainnet-v1/sentry/validator/bor/pbss_config.toml @@ -57,9 +57,9 @@ syncmode = "full" nolocals = true pricelimit = 25000000000 accountslots = 16 - globalslots = 32768 - accountqueue = 16 - globalqueue = 32768 + globalslots = 131072 + accountqueue = 64 + globalqueue = 131072 lifetime = "1h30m0s" # locals = [] # journal = "" diff --git a/packaging/templates/mainnet-v1/without-sentry/bor/config.toml b/packaging/templates/mainnet-v1/without-sentry/bor/config.toml index 24d25b4406..d43b87c23e 100644 --- a/packaging/templates/mainnet-v1/without-sentry/bor/config.toml +++ b/packaging/templates/mainnet-v1/without-sentry/bor/config.toml @@ -55,9 +55,9 @@ syncmode = "full" nolocals = true pricelimit = 25000000000 accountslots = 16 - globalslots = 32768 - accountqueue = 16 - globalqueue = 32768 + globalslots = 131072 + accountqueue = 64 + globalqueue = 131072 lifetime = "1h30m0s" # locals = [] # journal = "" diff --git a/packaging/templates/mainnet-v1/without-sentry/bor/pbss_config.toml b/packaging/templates/mainnet-v1/without-sentry/bor/pbss_config.toml index ac23de5789..20a5b02f0a 100644 --- a/packaging/templates/mainnet-v1/without-sentry/bor/pbss_config.toml +++ b/packaging/templates/mainnet-v1/without-sentry/bor/pbss_config.toml @@ -56,9 +56,9 @@ syncmode = "full" nolocals = true pricelimit = 25000000000 accountslots = 16 - globalslots = 32768 - accountqueue = 16 - globalqueue = 32768 + globalslots = 131072 + accountqueue = 64 + globalqueue = 131072 lifetime = "1h30m0s" # locals = [] # journal = ""