Skip to content

Commit

Permalink
Bump default value of txpool global slots
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cffls committed Jan 10, 2025
1 parent f4788d3 commit 230be40
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 37 deletions.
6 changes: 3 additions & 3 deletions builder/files/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down
14 changes: 7 additions & 7 deletions docs/cli/server.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 (<number>=<hash>)

- ```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)

Expand Down Expand Up @@ -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)

Expand All @@ -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)

Expand Down Expand Up @@ -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)

Expand All @@ -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)
6 changes: 3 additions & 3 deletions internal/cli/server/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
6 changes: 3 additions & 3 deletions internal/cli/server/testdata/default.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
6 changes: 3 additions & 3 deletions packaging/templates/mainnet-v1/archive/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down
6 changes: 3 additions & 3 deletions packaging/templates/mainnet-v1/sentry/sentry/bor/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down
6 changes: 3 additions & 3 deletions packaging/templates/mainnet-v1/without-sentry/bor/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down

0 comments on commit 230be40

Please sign in to comment.