From d0610c37739ebf6a2adeb244b2a518f5c959b498 Mon Sep 17 00:00:00 2001 From: leovct Date: Thu, 26 Oct 2023 20:02:14 +0200 Subject: [PATCH 1/9] chore: update `txarrivalwait` flag description --- internal/cli/server/flags.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/cli/server/flags.go b/internal/cli/server/flags.go index 12995977ff..d5fcfe1cc8 100644 --- a/internal/cli/server/flags.go +++ b/internal/cli/server/flags.go @@ -787,7 +787,7 @@ func (c *Command) Flags(config *Config) *flagset.Flagset { }) f.DurationFlag(&flagset.DurationFlag{ Name: "txarrivalwait", - Usage: "Maximum duration to wait for a transaction before explicitly requesting it (defaults to 500ms)", + Usage: "Maximum duration to wait for a transaction before explicitly requesting it", Value: &c.cliConfig.P2P.TxArrivalWait, Default: c.cliConfig.P2P.TxArrivalWait, Group: "P2P", From 0656586e24817bfb94f9d36eaa646c776aaa52cf Mon Sep 17 00:00:00 2001 From: leovct Date: Thu, 26 Oct 2023 20:04:04 +0200 Subject: [PATCH 2/9] chore: update docs --- docs/cli/account_list.md | 4 +- docs/cli/bootnode.md | 8 +- docs/cli/peers_remove.md | 4 +- docs/cli/server.md | 256 +++++++++++++++---------------- docs/cli/snapshot_prune-state.md | 4 +- 5 files changed, 140 insertions(+), 136 deletions(-) diff --git a/docs/cli/account_list.md b/docs/cli/account_list.md index a11b4a05e7..4b34a7a0c4 100644 --- a/docs/cli/account_list.md +++ b/docs/cli/account_list.md @@ -4,6 +4,6 @@ The `account list` command lists all the accounts in the Bor data directory. ## Options -- ```datadir```: Path of the data directory to store information +- ```keystore```: Path of the data directory to store keys -- ```keystore```: Path of the data directory to store keys \ No newline at end of file +- ```datadir```: Path of the data directory to store information \ No newline at end of file diff --git a/docs/cli/bootnode.md b/docs/cli/bootnode.md index e4111160a0..4ae3996372 100644 --- a/docs/cli/bootnode.md +++ b/docs/cli/bootnode.md @@ -4,9 +4,9 @@ - ```listen-addr```: listening address of bootnode (:) (default: 0.0.0.0:30303) -- ```v5```: Enable UDP v5 (default: false) +- ```metrics```: Enable metrics collection and reporting (default: true) -- ```verbosity```: Logging verbosity (5=trace|4=debug|3=info|2=warn|1=error|0=crit) (default: 3) +- ```prometheus-addr```: listening address of bootnode (:) (default: 127.0.0.1:7071) - ```log-level```: log level (trace|debug|info|warn|error|crit), will be deprecated soon. Use verbosity instead (default: info) @@ -14,6 +14,10 @@ - ```node-key```: file or hex node key +- ```v5```: Enable UDP v5 (default: false) + +- ```verbosity```: Logging verbosity (5=trace|4=debug|3=info|2=warn|1=error|0=crit) (default: 3) + - ```save-key```: path to save the ecdsa private key - ```dry-run```: validates parameters and prints bootnode configurations, but does not start bootnode (default: false) \ No newline at end of file diff --git a/docs/cli/peers_remove.md b/docs/cli/peers_remove.md index f731f12f6f..ba8641cf33 100644 --- a/docs/cli/peers_remove.md +++ b/docs/cli/peers_remove.md @@ -4,6 +4,6 @@ The ```peers remove ``` command disconnects the local client from a conne ## Options -- ```address```: Address of the grpc endpoint (default: 127.0.0.1:3131) +- ```trusted```: Add the peer as a trusted (default: false) -- ```trusted```: Add the peer as a trusted (default: false) \ No newline at end of file +- ```address```: Address of the grpc endpoint (default: 127.0.0.1:3131) \ No newline at end of file diff --git a/docs/cli/server.md b/docs/cli/server.md index 865b54e3f0..4ef60fd3db 100644 --- a/docs/cli/server.md +++ b/docs/cli/server.md @@ -4,91 +4,91 @@ The ```bor server``` command runs the Bor client. ## Options -- ```chain```: Name of the chain to sync ('mumbai', 'mainnet') or path to a genesis file (default: mainnet) +- ```bor.withoutheimdall```: Run without Heimdall service (for testing purpose) (default: false) -- ```identity```: Name/Identity of the node +- ```ethstats```: Reporting URL of a ethstats service (nodename:secret@host:port) -- ```verbosity```: Logging verbosity for the server (5=trace|4=debug|3=info|2=warn|1=error|0=crit), default = 3 (default: 3) +- ```rpc.batchlimit```: Maximum number of messages in a batch (default=100, use 0 for no limits) (default: 100) -- ```log-level```: Log level for the server (trace|debug|info|warn|error|crit), will be deprecated soon. Use verbosity instead +- ```gcmode```: Blockchain garbage collection mode ("full", "archive") (default: full) -- ```datadir```: Path of the data directory to store information +- ```config```: Path to the TOML configuration file -- ```vmdebug```: Record information useful for VM and contract debugging (default: false) +- ```gpo.maxblockhistory```: Maximum block history of gasprice oracle (default: 1024) -- ```datadir.ancient```: Data directory for ancient chain segments (default = inside chaindata) +- ```bor.runheimdall```: Run Heimdall service as a child process (default: false) -- ```db.engine```: Backing database implementation to use ('leveldb' or 'pebble') (default: leveldb) +- ```bor.runheimdallargs```: Arguments to pass to Heimdall service -- ```keystore```: Path of the directory where keystores are located +- ```bor.heimdall```: URL of Heimdall service (default: http://localhost:1317) -- ```rpc.batchlimit```: Maximum number of messages in a batch (default=100, use 0 for no limits) (default: 100) +- ```datadir```: Path of the data directory to store information -- ```rpc.returndatalimit```: Maximum size (in bytes) a result of an rpc request could have (default=100000, use 0 for no limits) (default: 100000) +- ```db.engine```: Backing database implementation to use ('leveldb' or 'pebble') (default: leveldb) -- ```config```: Path to the TOML configuration file +- ```disable-bor-wallet```: Disable the personal wallet endpoints (default: true) -- ```syncmode```: Blockchain sync mode (only "full" sync supported) (default: full) +- ```grpc.addr```: Address and port to bind the GRPC server (default: :3131) -- ```gcmode```: Blockchain garbage collection mode ("full", "archive") (default: full) +- ```gpo.maxheaderhistory```: Maximum header history of gasprice oracle (default: 1024) -- ```eth.requiredblocks```: Comma separated block number-to-hash mappings to require for peering (=) +- ```keystore```: Path of the directory where keystores are located -- ```snapshot```: Enables the snapshot-database mode (default: true) +- ```bor.useheimdallapp```: Use child heimdall process to fetch data, Only works when bor.runheimdall is true (default: false) -- ```bor.logs```: Enables bor log retrieval (default: false) +- ```gpo.blocks```: Number of recent blocks to check for gas prices (default: 20) -- ```bor.heimdall```: URL of Heimdall service (default: http://localhost:1317) +- ```pprof.addr```: pprof HTTP server listening interface (default: 127.0.0.1) -- ```bor.withoutheimdall```: Run without Heimdall service (for testing purpose) (default: false) +- ```syncmode```: Blockchain sync mode (only "full" sync supported) (default: full) -- ```bor.devfakeauthor```: Run miner without validator set authorization [dev mode] : Use with '--bor.withoutheimdall' (default: false) +- ```gpo.maxprice```: Maximum gas price will be recommended by gpo (default: 500000000000) -- ```bor.heimdallgRPC```: Address of Heimdall gRPC service +- ```verbosity```: Logging verbosity for the server (5=trace|4=debug|3=info|2=warn|1=error|0=crit), default = 3 (default: 3) -- ```bor.runheimdall```: Run Heimdall service as a child process (default: false) +- ```bor.devfakeauthor```: Run miner without validator set authorization [dev mode] : Use with '--bor.withoutheimdall' (default: false) -- ```bor.runheimdallargs```: Arguments to pass to Heimdall service +- ```pprof.port```: pprof HTTP server listening port (default: 6060) -- ```bor.useheimdallapp```: Use child heimdall process to fetch data, Only works when bor.runheimdall is true (default: false) +- ```log-level```: Log level for the server (trace|debug|info|warn|error|crit), will be deprecated soon. Use verbosity instead -- ```ethstats```: Reporting URL of a ethstats service (nodename:secret@host:port) +- ```vmdebug```: Record information useful for VM and contract debugging (default: false) -- ```gpo.blocks```: Number of recent blocks to check for gas prices (default: 20) +- ```pprof```: Enable the pprof HTTP server (default: false) -- ```gpo.percentile```: Suggested gas price is the given percentile of a set of recent transaction gas prices (default: 60) +- ```parallelevm.enable```: Enable Block STM (default: true) -- ```gpo.maxheaderhistory```: Maximum header history of gasprice oracle (default: 1024) +- ```dev.gaslimit```: Initial block gas limit (default: 11500000) -- ```gpo.maxblockhistory```: Maximum block history of gasprice oracle (default: 1024) +- ```eth.requiredblocks```: Comma separated block number-to-hash mappings to require for peering (=) -- ```gpo.maxprice```: Maximum gas price will be recommended by gpo (default: 500000000000) +- ```snapshot```: Enables the snapshot-database mode (default: true) -- ```gpo.ignoreprice```: Gas price below which gpo will ignore transactions (default: 2) +- ```bor.logs```: Enables bor log retrieval (default: false) -- ```disable-bor-wallet```: Disable the personal wallet endpoints (default: true) +- ```pprof.blockprofilerate```: Turn on block profiling with the given rate (default: 0) -- ```grpc.addr```: Address and port to bind the GRPC server (default: :3131) +- ```datadir.ancient```: Data directory for ancient chain segments (default = inside chaindata) -- ```dev```: Enable developer mode with ephemeral proof-of-authority network and a pre-funded developer account, mining enabled (default: false) +- ```parallelevm.procs```: Number of speculative processes (cores) in Block STM (default: 8) -- ```dev.period```: Block period to use in developer mode (0 = mine only if transaction pending) (default: 0) +- ```identity```: Name/Identity of the node -- ```parallelevm.enable```: Enable Block STM (default: true) +- ```rpc.returndatalimit```: Maximum size (in bytes) a result of an rpc request could have (default=100000, use 0 for no limits) (default: 100000) -- ```parallelevm.procs```: Number of speculative processes (cores) in Block STM (default: 8) +- ```gpo.percentile```: Suggested gas price is the given percentile of a set of recent transaction gas prices (default: 60) -- ```dev.gaslimit```: Initial block gas limit (default: 11500000) +- ```dev.period```: Block period to use in developer mode (0 = mine only if transaction pending) (default: 0) -- ```pprof```: Enable the pprof HTTP server (default: false) +- ```pprof.memprofilerate```: Turn on memory profiling with the given rate (default: 524288) -- ```pprof.port```: pprof HTTP server listening port (default: 6060) +- ```dev```: Enable developer mode with ephemeral proof-of-authority network and a pre-funded developer account, mining enabled (default: false) -- ```pprof.addr```: pprof HTTP server listening interface (default: 127.0.0.1) +- ```chain```: Name of the chain to sync ('mumbai', 'mainnet') or path to a genesis file (default: mainnet) -- ```pprof.memprofilerate```: Turn on memory profiling with the given rate (default: 524288) +- ```bor.heimdallgRPC```: Address of Heimdall gRPC service -- ```pprof.blockprofilerate```: Turn on block profiling with the given rate (default: 0) +- ```gpo.ignoreprice```: Gas price below which gpo will ignore transactions (default: 2) ### Account Management Options @@ -102,206 +102,206 @@ The ```bor server``` command runs the Bor client. ### Cache Options -- ```cache```: Megabytes of memory allocated to internal caching (default: 1024) - -- ```cache.database```: Percentage of cache memory allowance to use for database io (default: 50) +- ```fdlimit```: Raise the open file descriptor resource limit (default = system fd limit) (default: 0) -- ```cache.trie```: Percentage of cache memory allowance to use for trie caching (default: 15) +- ```cache```: Megabytes of memory allocated to internal caching (default: 1024) - ```cache.trie.journal```: Disk journal directory for trie cache to survive node restarts (default: triecache) -- ```cache.trie.rejournal```: Time interval to regenerate the trie cache journal (default: 1h0m0s) - - ```cache.gc```: Percentage of cache memory allowance to use for trie pruning (default: 25) - ```cache.snapshot```: Percentage of cache memory allowance to use for snapshot caching (default: 10) -- ```cache.noprefetch```: Disable heuristic state prefetch during block import (less CPU and disk IO, more time waiting for data) (default: false) - - ```cache.preimages```: Enable recording the SHA3/keccak preimages of trie keys (default: false) +- ```cache.noprefetch```: Disable heuristic state prefetch during block import (less CPU and disk IO, more time waiting for data) (default: false) + - ```cache.triesinmemory```: Number of block states (tries) to keep in memory (default = 128) (default: 128) - ```txlookuplimit```: Number of recent blocks to maintain transactions index for (default: 2350000) -- ```fdlimit```: Raise the open file descriptor resource limit (default = system fd limit) (default: 0) +- ```cache.database```: Percentage of cache memory allowance to use for database io (default: 50) -### ExtraDB Options +- ```cache.trie.rejournal```: Time interval to regenerate the trie cache journal (default: 1h0m0s) -- ```leveldb.compaction.table.size```: LevelDB SSTable/file size in mebibytes (default: 2) +- ```cache.trie```: Percentage of cache memory allowance to use for trie caching (default: 15) + +### ExtraDB Options - ```leveldb.compaction.table.size.multiplier```: Multiplier on LevelDB SSTable/file size. Size for a level is determined by: `leveldb.compaction.table.size * (leveldb.compaction.table.size.multiplier ^ Level)` (default: 1) - ```leveldb.compaction.total.size```: Total size in mebibytes of SSTables in a given LevelDB level. Size for a level is determined by: `leveldb.compaction.total.size * (leveldb.compaction.total.size.multiplier ^ Level)` (default: 10) +- ```leveldb.compaction.table.size```: LevelDB SSTable/file size in mebibytes (default: 2) + - ```leveldb.compaction.total.size.multiplier```: Multiplier on level size on LevelDB levels. Size for a level is determined by: `leveldb.compaction.total.size * (leveldb.compaction.total.size.multiplier ^ Level)` (default: 10) ### JsonRPC Options -- ```rpc.gascap```: Sets a cap on gas that can be used in eth_call/estimateGas (0=infinite) (default: 50000000) +- ```http.api```: API's offered over the HTTP-RPC interface (default: eth,net,web3,txpool,bor) -- ```rpc.evmtimeout```: Sets a timeout used for eth_call (0=infinite) (default: 5s) +- ```ipcpath```: Filename for IPC socket/pipe within the datadir (explicit paths escape it) -- ```rpc.txfeecap```: Sets a cap on transaction fee (in ether) that can be sent via the RPC APIs (0 = no cap) (default: 5) +- ```http```: Enable the HTTP-RPC server (default: false) -- ```rpc.allow-unprotected-txs```: Allow for unprotected (non EIP155 signed) transactions to be submitted via RPC (default: false) +- ```http.ep-size```: Maximum size of workers to run in rpc execution pool for HTTP requests (default: 40) -- ```rpc.enabledeprecatedpersonal```: Enables the (deprecated) personal namespace (default: false) +- ```graphql.vhosts```: Comma separated list of virtual hostnames from which to accept requests (server enforced). Accepts '*' wildcard. (default: localhost) -- ```ipcdisable```: Disable the IPC-RPC server (default: false) +- ```ws.ep-size```: Maximum size of workers to run in rpc execution pool for WS requests (default: 40) -- ```ipcpath```: Filename for IPC socket/pipe within the datadir (explicit paths escape it) +- ```http.port```: HTTP-RPC server listening port (default: 8545) -- ```authrpc.jwtsecret```: Path to a JWT secret to use for authenticated RPC endpoints +- ```ws.rpcprefix```: HTTP path prefix on which JSON-RPC is served. Use '/' to serve on all paths. -- ```authrpc.addr```: Listening address for authenticated APIs (default: localhost) +- ```ws.ep-requesttimeout```: Request Timeout for rpc execution pool for WS requests (default: 0s) -- ```authrpc.port```: Listening port for authenticated APIs (default: 8551) +- ```ws.addr```: WS-RPC server listening interface (default: localhost) -- ```authrpc.vhosts```: Comma separated list of virtual hostnames from which to accept requests (server enforced). Accepts '*' wildcard. (default: localhost) +- ```rpc.txfeecap```: Sets a cap on transaction fee (in ether) that can be sent via the RPC APIs (0 = no cap) (default: 5) -- ```http.corsdomain```: Comma separated list of domains from which to accept cross origin requests (browser enforced) (default: localhost) +- ```authrpc.addr```: Listening address for authenticated APIs (default: localhost) -- ```http.vhosts```: Comma separated list of virtual hostnames from which to accept requests (server enforced). Accepts '*' wildcard. (default: localhost) +- ```rpc.gascap```: Sets a cap on gas that can be used in eth_call/estimateGas (0=infinite) (default: 50000000) -- ```ws.origins```: Origins from which to accept websockets requests (default: localhost) +- ```authrpc.port```: Listening port for authenticated APIs (default: 8551) -- ```graphql.corsdomain```: Comma separated list of domains from which to accept cross origin requests (browser enforced) (default: localhost) +- ```http.addr```: HTTP-RPC server listening interface (default: localhost) -- ```graphql.vhosts```: Comma separated list of virtual hostnames from which to accept requests (server enforced). Accepts '*' wildcard. (default: localhost) +- ```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) -- ```http```: Enable the HTTP-RPC server (default: false) +- ```ws.port```: WS-RPC server listening port (default: 8546) -- ```http.addr```: HTTP-RPC server listening interface (default: localhost) +- ```authrpc.vhosts```: Comma separated list of virtual hostnames from which to accept requests (server enforced). Accepts '*' wildcard. (default: localhost) -- ```http.port```: HTTP-RPC server listening port (default: 8545) +- ```http.vhosts```: Comma separated list of virtual hostnames from which to accept requests (server enforced). Accepts '*' wildcard. (default: localhost) -- ```http.rpcprefix```: HTTP path path prefix on which JSON-RPC is served. Use '/' to serve on all paths. +- ```ipcdisable```: Disable the IPC-RPC server (default: false) -- ```http.api```: API's offered over the HTTP-RPC interface (default: eth,net,web3,txpool,bor) +- ```ws.api```: API's offered over the WS-RPC interface (default: net,web3) -- ```http.ep-size```: Maximum size of workers to run in rpc execution pool for HTTP requests (default: 40) +- ```rpc.evmtimeout```: Sets a timeout used for eth_call (0=infinite) (default: 5s) -- ```http.ep-requesttimeout```: Request Timeout for rpc execution pool for HTTP requests (default: 0s) +- ```authrpc.jwtsecret```: Path to a JWT secret to use for authenticated RPC endpoints -- ```ws```: Enable the WS-RPC server (default: false) +- ```rpc.allow-unprotected-txs```: Allow for unprotected (non EIP155 signed) transactions to be submitted via RPC (default: false) -- ```ws.addr```: WS-RPC server listening interface (default: localhost) +- ```ws.origins```: Origins from which to accept websockets requests (default: localhost) -- ```ws.port```: WS-RPC server listening port (default: 8546) +- ```http.ep-requesttimeout```: Request Timeout for rpc execution pool for HTTP requests (default: 0s) -- ```ws.rpcprefix```: HTTP path prefix on which JSON-RPC is served. Use '/' to serve on all paths. +- ```rpc.enabledeprecatedpersonal```: Enables the (deprecated) personal namespace (default: false) -- ```ws.api```: API's offered over the WS-RPC interface (default: net,web3) +- ```ws```: Enable the WS-RPC server (default: false) -- ```ws.ep-size```: Maximum size of workers to run in rpc execution pool for WS requests (default: 40) +- ```http.corsdomain```: Comma separated list of domains from which to accept cross origin requests (browser enforced) (default: localhost) -- ```ws.ep-requesttimeout```: Request Timeout for rpc execution pool for WS requests (default: 0s) +- ```graphql.corsdomain```: Comma separated list of domains from which to accept cross origin requests (browser enforced) (default: localhost) -- ```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) +- ```http.rpcprefix```: HTTP path path prefix on which JSON-RPC is served. Use '/' to serve on all paths. ### Logging Options +- ```log.debug```: Prepends log messages with call-site location (file and line number) (default: false) + +- ```log.backtrace```: Request a stack trace at a specific logging statement (e.g. 'block.go:271') + - ```vmodule```: Per-module verbosity: comma-separated list of = (e.g. eth/*=5,p2p=4) - ```log.json```: Format logs with JSON (default: false) -- ```log.backtrace```: Request a stack trace at a specific logging statement (e.g. 'block.go:271') +### P2P Options -- ```log.debug```: Prepends log messages with call-site location (file and line number) (default: false) +- ```netrestrict```: Restricts network communication to the given IP networks (CIDR masks) -### P2P Options +- ```nodiscover```: Disables the peer discovery mechanism (manual peer addition) (default: false) - ```bind```: Network binding address (default: 0.0.0.0) -- ```port```: Network listening port (default: 30303) +- ```maxpeers```: Maximum number of network peers (network disabled if set to 0) (default: 50) -- ```bootnodes```: Comma separated enode URLs for P2P discovery bootstrap +- ```v5disc```: Enables the experimental RLPx V5 (Topic Discovery) mechanism (default: false) -- ```maxpeers```: Maximum number of network peers (network disabled if set to 0) (default: 50) +- ```txarrivalwait```: Maximum duration to wait for a transaction before explicitly requesting it (default: 500ms) -- ```maxpendpeers```: Maximum number of pending connection attempts (default: 50) +- ```nodekeyhex```: P2P node key as hex -- ```nat```: NAT port mapping mechanism (any|none|upnp|pmp|extip:) (default: any) +- ```bootnodes```: Comma separated enode URLs for P2P discovery bootstrap -- ```netrestrict```: Restricts network communication to the given IP networks (CIDR masks) +- ```port```: Network listening port (default: 30303) - ```nodekey```: P2P node key file -- ```nodekeyhex```: P2P node key as hex +- ```maxpendpeers```: Maximum number of pending connection attempts (default: 50) -- ```nodiscover```: Disables the peer discovery mechanism (manual peer addition) (default: false) +- ```nat```: NAT port mapping mechanism (any|none|upnp|pmp|extip:) (default: any) -- ```v5disc```: Enables the experimental RLPx V5 (Topic Discovery) mechanism (default: false) +### Sealer Options -- ```txarrivalwait```: Maximum duration to wait for a transaction before explicitly requesting it (defaults to 500ms) (default: 500ms) +- ```miner.gaslimit```: Target gas ceiling (gas limit) for mined blocks (default: 30000000) -### Sealer Options +- ```miner.interruptcommit```: Interrupt block commit when block creation time is passed (default: true) -- ```mine```: Enable mining (default: false) +- ```miner.recommit```: The time interval for miner to re-create mining work (default: 2m5s) -- ```miner.etherbase```: Public address for block mining rewards +- ```mine```: Enable mining (default: false) - ```miner.extradata```: Block extra data set by the miner (default = client version) -- ```miner.gaslimit```: Target gas ceiling (gas limit) for mined blocks (default: 30000000) +- ```miner.etherbase```: Public address for block mining rewards - ```miner.gasprice```: Minimum gas price for mining a transaction (default: 1000000000) -- ```miner.recommit```: The time interval for miner to re-create mining work (default: 2m5s) - -- ```miner.interruptcommit```: Interrupt block commit when block creation time is passed (default: true) - ### Telemetry Options - ```metrics```: Enable metrics collection and reporting (default: false) -- ```metrics.expensive```: Enable expensive metrics collection and reporting (default: false) +- ```metrics.influxdb.endpoint```: InfluxDB API endpoint to report metrics to -- ```metrics.influxdb```: Enable metrics export/push to an external InfluxDB database (v1) (default: false) +- ```metrics.prometheus-addr```: Address for Prometheus Server (default: 127.0.0.1:7071) -- ```metrics.influxdb.endpoint```: InfluxDB API endpoint to report metrics to +- ```metrics.opencollector-endpoint```: OpenCollector Endpoint (host:port) -- ```metrics.influxdb.database```: InfluxDB database name to push reported metrics to +- ```metrics.influxdb```: Enable metrics export/push to an external InfluxDB database (v1) (default: false) -- ```metrics.influxdb.username```: Username to authorize access to the database +- ```metrics.expensive```: Enable expensive metrics collection and reporting (default: false) -- ```metrics.influxdb.password```: Password to authorize access to the database +- ```metrics.influxdb.database```: InfluxDB database name to push reported metrics to -- ```metrics.influxdb.tags```: Comma-separated InfluxDB tags (key/values) attached to all measurements +- ```metrics.influxdb.organization```: InfluxDB organization name (v2 only) -- ```metrics.prometheus-addr```: Address for Prometheus Server (default: 127.0.0.1:7071) +- ```metrics.influxdb.bucket```: InfluxDB bucket name to push reported metrics to (v2 only) -- ```metrics.opencollector-endpoint```: OpenCollector Endpoint (host:port) +- ```metrics.influxdb.password```: Password to authorize access to the database - ```metrics.influxdbv2```: Enable metrics export/push to an external InfluxDB v2 database (default: false) -- ```metrics.influxdb.token```: Token to authorize access to the database (v2 only) +- ```metrics.influxdb.tags```: Comma-separated InfluxDB tags (key/values) attached to all measurements -- ```metrics.influxdb.bucket```: InfluxDB bucket name to push reported metrics to (v2 only) +- ```metrics.influxdb.token```: Token to authorize access to the database (v2 only) -- ```metrics.influxdb.organization```: InfluxDB organization name (v2 only) +- ```metrics.influxdb.username```: Username to authorize access to the database ### Transaction Pool Options -- ```txpool.locals```: Comma separated accounts to treat as locals (no flush, priority inclusion) - -- ```txpool.nolocals```: Disables price exemptions for locally submitted transactions (default: false) - - ```txpool.journal```: Disk journal for local transaction to survive node restarts (default: transactions.rlp) - ```txpool.rejournal```: Time interval to regenerate the local transaction journal (default: 1h0m0s) -- ```txpool.pricelimit```: Minimum gas price limit to enforce for acceptance into the pool (default: 1) +- ```txpool.accountslots```: Minimum number of executable transaction slots guaranteed per account (default: 16) -- ```txpool.pricebump```: Price bump percentage to replace an already existing transaction (default: 10) +- ```txpool.globalqueue```: Maximum number of non-executable transaction slots for all accounts (default: 32768) -- ```txpool.accountslots```: Minimum number of executable transaction slots guaranteed per account (default: 16) +- ```txpool.nolocals```: Disables price exemptions for locally submitted transactions (default: false) -- ```txpool.globalslots```: Maximum number of executable transaction slots for all accounts (default: 32768) +- ```txpool.pricebump```: Price bump percentage to replace an already existing transaction (default: 10) + +- ```txpool.pricelimit```: Minimum gas price limit to enforce for acceptance into the pool (default: 1) - ```txpool.accountqueue```: Maximum number of non-executable transaction slots permitted per account (default: 16) -- ```txpool.globalqueue```: Maximum number of non-executable transaction slots for all accounts (default: 32768) +- ```txpool.lifetime```: Maximum amount of time non-executable transaction are queued (default: 3h0m0s) + +- ```txpool.globalslots```: Maximum number of executable transaction slots for all accounts (default: 32768) -- ```txpool.lifetime```: Maximum amount of time non-executable transaction are queued (default: 3h0m0s) \ No newline at end of file +- ```txpool.locals```: Comma separated accounts to treat as locals (no flush, priority inclusion) \ No newline at end of file diff --git a/docs/cli/snapshot_prune-state.md b/docs/cli/snapshot_prune-state.md index 73742faeac..15bfd9f111 100644 --- a/docs/cli/snapshot_prune-state.md +++ b/docs/cli/snapshot_prune-state.md @@ -4,14 +4,14 @@ The ```bor snapshot prune-state``` command will prune historical state data with ## Options +- ```bloomfilter.size```: Size of the bloom filter (default: 2048) + - ```datadir```: Path of the data directory to store information - ```keystore```: Path of the data directory to store keys - ```datadir.ancient```: Path of the ancient data directory to store information -- ```bloomfilter.size```: Size of the bloom filter (default: 2048) - ### Cache Options - ```cache```: Megabytes of memory allocated to internal caching (default: 1024) From 77d1964e34c2b2dca53a01f92ace78fa01a72d74 Mon Sep 17 00:00:00 2001 From: leovct Date: Thu, 26 Oct 2023 20:17:15 +0200 Subject: [PATCH 3/9] chore: update other flags --- docs/cli/account_import.md | 4 +- docs/cli/account_list.md | 4 +- docs/cli/attach.md | 6 +- docs/cli/bootnode.md | 10 +- docs/cli/debug_pprof.md | 8 +- docs/cli/server.md | 258 +++++++++++++++---------------- docs/cli/snapshot_prune-state.md | 8 +- internal/cli/server/flags.go | 8 +- 8 files changed, 153 insertions(+), 153 deletions(-) diff --git a/docs/cli/account_import.md b/docs/cli/account_import.md index 697d951fd3..582f15f261 100644 --- a/docs/cli/account_import.md +++ b/docs/cli/account_import.md @@ -4,6 +4,6 @@ The ```account import``` command imports an account in Json format to the Bor da ## Options -- ```datadir```: Path of the data directory to store information +- ```keystore```: Path of the data directory to store keys -- ```keystore```: Path of the data directory to store keys \ No newline at end of file +- ```datadir```: Path of the data directory to store information \ No newline at end of file diff --git a/docs/cli/account_list.md b/docs/cli/account_list.md index 4b34a7a0c4..a11b4a05e7 100644 --- a/docs/cli/account_list.md +++ b/docs/cli/account_list.md @@ -4,6 +4,6 @@ The `account list` command lists all the accounts in the Bor data directory. ## Options -- ```keystore```: Path of the data directory to store keys +- ```datadir```: Path of the data directory to store information -- ```datadir```: Path of the data directory to store information \ No newline at end of file +- ```keystore```: Path of the data directory to store keys \ No newline at end of file diff --git a/docs/cli/attach.md b/docs/cli/attach.md index 6e323b8d18..469ba6ab80 100644 --- a/docs/cli/attach.md +++ b/docs/cli/attach.md @@ -4,8 +4,8 @@ Connect to remote Bor IPC console. ## Options -- ```exec```: Command to run in remote console - - ```preload```: Comma separated list of JavaScript files to preload into the console -- ```jspath```: JavaScript root path for `loadScript` \ No newline at end of file +- ```jspath```: JavaScript root path for `loadScript` + +- ```exec```: Command to run in remote console \ No newline at end of file diff --git a/docs/cli/bootnode.md b/docs/cli/bootnode.md index 4ae3996372..1047e0cfb6 100644 --- a/docs/cli/bootnode.md +++ b/docs/cli/bootnode.md @@ -4,20 +4,20 @@ - ```listen-addr```: listening address of bootnode (:) (default: 0.0.0.0:30303) -- ```metrics```: Enable metrics collection and reporting (default: true) - - ```prometheus-addr```: listening address of bootnode (:) (default: 127.0.0.1:7071) - ```log-level```: log level (trace|debug|info|warn|error|crit), will be deprecated soon. Use verbosity instead (default: info) -- ```nat```: port mapping mechanism (any|none|upnp|pmp|extip:) (default: none) - - ```node-key```: file or hex node key +- ```save-key```: path to save the ecdsa private key + +- ```metrics```: Enable metrics collection and reporting (default: true) + - ```v5```: Enable UDP v5 (default: false) - ```verbosity```: Logging verbosity (5=trace|4=debug|3=info|2=warn|1=error|0=crit) (default: 3) -- ```save-key```: path to save the ecdsa private key +- ```nat```: port mapping mechanism (any|none|upnp|pmp|extip:) (default: none) - ```dry-run```: validates parameters and prints bootnode configurations, but does not start bootnode (default: false) \ No newline at end of file diff --git a/docs/cli/debug_pprof.md b/docs/cli/debug_pprof.md index 78e75f2134..0f4a497acc 100644 --- a/docs/cli/debug_pprof.md +++ b/docs/cli/debug_pprof.md @@ -4,10 +4,10 @@ The ```debug pprof ``` command will create an archive containing bor ppro ## Options -- ```address```: Address of the grpc endpoint (default: 127.0.0.1:3131) +- ```output```: Output directory -- ```seconds```: seconds to profile (default: 2) +- ```skiptrace```: Skip running the trace (default: false) -- ```output```: Output directory +- ```address```: Address of the grpc endpoint (default: 127.0.0.1:3131) -- ```skiptrace```: Skip running the trace (default: false) \ No newline at end of file +- ```seconds```: seconds to profile (default: 2) \ No newline at end of file diff --git a/docs/cli/server.md b/docs/cli/server.md index 4ef60fd3db..2538913d9c 100644 --- a/docs/cli/server.md +++ b/docs/cli/server.md @@ -4,304 +4,304 @@ The ```bor server``` command runs the Bor client. ## Options -- ```bor.withoutheimdall```: Run without Heimdall service (for testing purpose) (default: false) - -- ```ethstats```: Reporting URL of a ethstats service (nodename:secret@host:port) +- ```log-level```: Log level for the server (trace|debug|info|warn|error|crit), will be deprecated soon. Use verbosity instead -- ```rpc.batchlimit```: Maximum number of messages in a batch (default=100, use 0 for no limits) (default: 100) +- ```snapshot```: Enables the snapshot-database mode (default: true) -- ```gcmode```: Blockchain garbage collection mode ("full", "archive") (default: full) +- ```datadir.ancient```: Data directory for ancient chain segments (default = inside chaindata) -- ```config```: Path to the TOML configuration file +- ```parallelevm.enable```: Enable Block STM (default: true) -- ```gpo.maxblockhistory```: Maximum block history of gasprice oracle (default: 1024) +- ```pprof.blockprofilerate```: Turn on block profiling with the given rate (default: 0) -- ```bor.runheimdall```: Run Heimdall service as a child process (default: false) +- ```gpo.ignoreprice```: Gas price below which gpo will ignore transactions (default: 2) -- ```bor.runheimdallargs```: Arguments to pass to Heimdall service +- ```gcmode```: Blockchain garbage collection mode ("full", "archive") (default: full) -- ```bor.heimdall```: URL of Heimdall service (default: http://localhost:1317) +- ```verbosity```: Logging verbosity for the server (5=trace|4=debug|3=info|2=warn|1=error|0=crit) (default: 3) - ```datadir```: Path of the data directory to store information -- ```db.engine```: Backing database implementation to use ('leveldb' or 'pebble') (default: leveldb) +- ```bor.heimdall```: URL of Heimdall service (default: http://localhost:1317) -- ```disable-bor-wallet```: Disable the personal wallet endpoints (default: true) +- ```bor.devfakeauthor```: Run miner without validator set authorization [dev mode] : Use with '--bor.withoutheimdall' (default: false) -- ```grpc.addr```: Address and port to bind the GRPC server (default: :3131) +- ```identity```: Name/Identity of the node -- ```gpo.maxheaderhistory```: Maximum header history of gasprice oracle (default: 1024) +- ```vmdebug```: Record information useful for VM and contract debugging (default: false) -- ```keystore```: Path of the directory where keystores are located +- ```pprof```: Enable the pprof HTTP server (default: false) -- ```bor.useheimdallapp```: Use child heimdall process to fetch data, Only works when bor.runheimdall is true (default: false) +- ```pprof.port```: pprof HTTP server listening port (default: 6060) -- ```gpo.blocks```: Number of recent blocks to check for gas prices (default: 20) +- ```gpo.percentile```: Suggested gas price is the given percentile of a set of recent transaction gas prices (default: 60) -- ```pprof.addr```: pprof HTTP server listening interface (default: 127.0.0.1) +- ```parallelevm.procs```: Number of speculative processes (cores) in Block STM (default: 8) + +- ```keystore```: Path of the directory where keystores are located - ```syncmode```: Blockchain sync mode (only "full" sync supported) (default: full) -- ```gpo.maxprice```: Maximum gas price will be recommended by gpo (default: 500000000000) +- ```dev.period```: Block period to use in developer mode (0 = mine only if transaction pending) (default: 0) -- ```verbosity```: Logging verbosity for the server (5=trace|4=debug|3=info|2=warn|1=error|0=crit), default = 3 (default: 3) +- ```bor.withoutheimdall```: Run without Heimdall service (for testing purpose) (default: false) -- ```bor.devfakeauthor```: Run miner without validator set authorization [dev mode] : Use with '--bor.withoutheimdall' (default: false) +- ```gpo.blocks```: Number of recent blocks to check for gas prices (default: 20) -- ```pprof.port```: pprof HTTP server listening port (default: 6060) +- ```rpc.returndatalimit```: Maximum size (in bytes) a result of an rpc request could have (use 0 for no limits) (default: 100000) -- ```log-level```: Log level for the server (trace|debug|info|warn|error|crit), will be deprecated soon. Use verbosity instead +- ```bor.logs```: Enables bor log retrieval (default: false) -- ```vmdebug```: Record information useful for VM and contract debugging (default: false) +- ```disable-bor-wallet```: Disable the personal wallet endpoints (default: true) -- ```pprof```: Enable the pprof HTTP server (default: false) +- ```gpo.maxblockhistory```: Maximum block history of gasprice oracle (default: 1024) -- ```parallelevm.enable```: Enable Block STM (default: true) +- ```grpc.addr```: Address and port to bind the GRPC server (default: :3131) -- ```dev.gaslimit```: Initial block gas limit (default: 11500000) +- ```db.engine```: Backing database implementation to use ('leveldb' or 'pebble') (default: leveldb) -- ```eth.requiredblocks```: Comma separated block number-to-hash mappings to require for peering (=) +- ```bor.heimdallgRPC```: Address of Heimdall gRPC service -- ```snapshot```: Enables the snapshot-database mode (default: true) +- ```ethstats```: Reporting URL of a ethstats service (nodename:secret@host:port) -- ```bor.logs```: Enables bor log retrieval (default: false) +- ```gpo.maxheaderhistory```: Maximum header history of gasprice oracle (default: 1024) -- ```pprof.blockprofilerate```: Turn on block profiling with the given rate (default: 0) +- ```chain```: Name of the chain to sync ('mumbai', 'mainnet') or path to a genesis file (default: mainnet) -- ```datadir.ancient```: Data directory for ancient chain segments (default = inside chaindata) +- ```gpo.maxprice```: Maximum gas price will be recommended by gpo (default: 500000000000) -- ```parallelevm.procs```: Number of speculative processes (cores) in Block STM (default: 8) +- ```bor.runheimdall```: Run Heimdall service as a child process (default: false) -- ```identity```: Name/Identity of the node +- ```bor.useheimdallapp```: Use child heimdall process to fetch data, Only works when bor.runheimdall is true (default: false) -- ```rpc.returndatalimit```: Maximum size (in bytes) a result of an rpc request could have (default=100000, use 0 for no limits) (default: 100000) +- ```dev```: Enable developer mode with ephemeral proof-of-authority network and a pre-funded developer account, mining enabled (default: false) -- ```gpo.percentile```: Suggested gas price is the given percentile of a set of recent transaction gas prices (default: 60) +- ```rpc.batchlimit```: Maximum number of messages in a batch (use 0 for no limits) (default: 100) -- ```dev.period```: Block period to use in developer mode (0 = mine only if transaction pending) (default: 0) +- ```eth.requiredblocks```: Comma separated block number-to-hash mappings to require for peering (=) -- ```pprof.memprofilerate```: Turn on memory profiling with the given rate (default: 524288) +- ```config```: Path to the TOML configuration file -- ```dev```: Enable developer mode with ephemeral proof-of-authority network and a pre-funded developer account, mining enabled (default: false) +- ```pprof.addr```: pprof HTTP server listening interface (default: 127.0.0.1) -- ```chain```: Name of the chain to sync ('mumbai', 'mainnet') or path to a genesis file (default: mainnet) +- ```dev.gaslimit```: Initial block gas limit (default: 11500000) -- ```bor.heimdallgRPC```: Address of Heimdall gRPC service +- ```pprof.memprofilerate```: Turn on memory profiling with the given rate (default: 524288) -- ```gpo.ignoreprice```: Gas price below which gpo will ignore transactions (default: 2) +- ```bor.runheimdallargs```: Arguments to pass to Heimdall service ### Account Management Options - ```unlock```: Comma separated list of accounts to unlock -- ```password```: Password file to use for non-interactive password input +- ```lightkdf```: Reduce key-derivation RAM & CPU usage at some expense of KDF strength (default: false) - ```allow-insecure-unlock```: Allow insecure account unlocking when account-related RPCs are exposed by http (default: false) -- ```lightkdf```: Reduce key-derivation RAM & CPU usage at some expense of KDF strength (default: false) +- ```password```: Password file to use for non-interactive password input ### Cache Options - ```fdlimit```: Raise the open file descriptor resource limit (default = system fd limit) (default: 0) -- ```cache```: Megabytes of memory allocated to internal caching (default: 1024) - -- ```cache.trie.journal```: Disk journal directory for trie cache to survive node restarts (default: triecache) +- ```cache.database```: Percentage of cache memory allowance to use for database io (default: 50) - ```cache.gc```: Percentage of cache memory allowance to use for trie pruning (default: 25) -- ```cache.snapshot```: Percentage of cache memory allowance to use for snapshot caching (default: 10) +- ```txlookuplimit```: Number of recent blocks to maintain transactions index for (default: 2350000) -- ```cache.preimages```: Enable recording the SHA3/keccak preimages of trie keys (default: false) +- ```cache.trie.rejournal```: Time interval to regenerate the trie cache journal (default: 1h0m0s) -- ```cache.noprefetch```: Disable heuristic state prefetch during block import (less CPU and disk IO, more time waiting for data) (default: false) +- ```cache.trie.journal```: Disk journal directory for trie cache to survive node restarts (default: triecache) -- ```cache.triesinmemory```: Number of block states (tries) to keep in memory (default = 128) (default: 128) +- ```cache.snapshot```: Percentage of cache memory allowance to use for snapshot caching (default: 10) -- ```txlookuplimit```: Number of recent blocks to maintain transactions index for (default: 2350000) +- ```cache.trie```: Percentage of cache memory allowance to use for trie caching (default: 15) -- ```cache.database```: Percentage of cache memory allowance to use for database io (default: 50) +- ```cache.preimages```: Enable recording the SHA3/keccak preimages of trie keys (default: false) -- ```cache.trie.rejournal```: Time interval to regenerate the trie cache journal (default: 1h0m0s) +- ```cache.noprefetch```: Disable heuristic state prefetch during block import (less CPU and disk IO, more time waiting for data) (default: false) -- ```cache.trie```: Percentage of cache memory allowance to use for trie caching (default: 15) +- ```cache```: Megabytes of memory allocated to internal caching (default: 1024) -### ExtraDB Options +- ```cache.triesinmemory```: Number of block states (tries) to keep in memory (default: 128) -- ```leveldb.compaction.table.size.multiplier```: Multiplier on LevelDB SSTable/file size. Size for a level is determined by: `leveldb.compaction.table.size * (leveldb.compaction.table.size.multiplier ^ Level)` (default: 1) +### ExtraDB Options - ```leveldb.compaction.total.size```: Total size in mebibytes of SSTables in a given LevelDB level. Size for a level is determined by: `leveldb.compaction.total.size * (leveldb.compaction.total.size.multiplier ^ Level)` (default: 10) -- ```leveldb.compaction.table.size```: LevelDB SSTable/file size in mebibytes (default: 2) +- ```leveldb.compaction.table.size.multiplier```: Multiplier on LevelDB SSTable/file size. Size for a level is determined by: `leveldb.compaction.table.size * (leveldb.compaction.table.size.multiplier ^ Level)` (default: 1) - ```leveldb.compaction.total.size.multiplier```: Multiplier on level size on LevelDB levels. Size for a level is determined by: `leveldb.compaction.total.size * (leveldb.compaction.total.size.multiplier ^ Level)` (default: 10) +- ```leveldb.compaction.table.size```: LevelDB SSTable/file size in mebibytes (default: 2) + ### JsonRPC Options - ```http.api```: API's offered over the HTTP-RPC interface (default: eth,net,web3,txpool,bor) -- ```ipcpath```: Filename for IPC socket/pipe within the datadir (explicit paths escape it) +- ```graphql.vhosts```: Comma separated list of virtual hostnames from which to accept requests (server enforced). Accepts '*' wildcard. (default: localhost) -- ```http```: Enable the HTTP-RPC server (default: false) +- ```authrpc.addr```: Listening address for authenticated APIs (default: localhost) -- ```http.ep-size```: Maximum size of workers to run in rpc execution pool for HTTP requests (default: 40) +- ```ws.ep-requesttimeout```: Request Timeout for rpc execution pool for WS requests (default: 0s) -- ```graphql.vhosts```: Comma separated list of virtual hostnames from which to accept requests (server enforced). Accepts '*' wildcard. (default: localhost) +- ```rpc.gascap```: Sets a cap on gas that can be used in eth_call/estimateGas (0=infinite) (default: 50000000) -- ```ws.ep-size```: Maximum size of workers to run in rpc execution pool for WS requests (default: 40) +- ```rpc.allow-unprotected-txs```: Allow for unprotected (non EIP155 signed) transactions to be submitted via RPC (default: false) -- ```http.port```: HTTP-RPC server listening port (default: 8545) +- ```ws.api```: API's offered over the WS-RPC interface (default: net,web3) -- ```ws.rpcprefix```: HTTP path prefix on which JSON-RPC is served. Use '/' to serve on all paths. +- ```http.addr```: HTTP-RPC server listening interface (default: localhost) -- ```ws.ep-requesttimeout```: Request Timeout for rpc execution pool for WS requests (default: 0s) +- ```http```: Enable the HTTP-RPC server (default: false) -- ```ws.addr```: WS-RPC server listening interface (default: localhost) +- ```http.ep-size```: Maximum size of workers to run in rpc execution pool for HTTP requests (default: 40) -- ```rpc.txfeecap```: Sets a cap on transaction fee (in ether) that can be sent via the RPC APIs (0 = no cap) (default: 5) +- ```ws.addr```: WS-RPC server listening interface (default: localhost) -- ```authrpc.addr```: Listening address for authenticated APIs (default: localhost) +- ```ipcdisable```: Disable the IPC-RPC server (default: false) -- ```rpc.gascap```: Sets a cap on gas that can be used in eth_call/estimateGas (0=infinite) (default: 50000000) +- ```graphql.corsdomain```: Comma separated list of domains from which to accept cross origin requests (browser enforced) (default: localhost) -- ```authrpc.port```: Listening port for authenticated APIs (default: 8551) +- ```rpc.evmtimeout```: Sets a timeout used for eth_call (0=infinite) (default: 5s) -- ```http.addr```: HTTP-RPC server listening interface (default: localhost) +- ```http.port```: HTTP-RPC server listening port (default: 8545) -- ```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) +- ```rpc.enabledeprecatedpersonal```: Enables the (deprecated) personal namespace (default: false) -- ```ws.port```: WS-RPC server listening port (default: 8546) +- ```ipcpath```: Filename for IPC socket/pipe within the datadir (explicit paths escape it) -- ```authrpc.vhosts```: Comma separated list of virtual hostnames from which to accept requests (server enforced). Accepts '*' wildcard. (default: localhost) +- ```ws.ep-size```: Maximum size of workers to run in rpc execution pool for WS requests (default: 40) -- ```http.vhosts```: Comma separated list of virtual hostnames from which to accept requests (server enforced). Accepts '*' wildcard. (default: localhost) +- ```ws```: Enable the WS-RPC server (default: false) -- ```ipcdisable```: Disable the IPC-RPC server (default: false) +- ```authrpc.jwtsecret```: Path to a JWT secret to use for authenticated RPC endpoints -- ```ws.api```: API's offered over the WS-RPC interface (default: net,web3) +- ```ws.rpcprefix```: HTTP path prefix on which JSON-RPC is served. Use '/' to serve on all paths. -- ```rpc.evmtimeout```: Sets a timeout used for eth_call (0=infinite) (default: 5s) +- ```ws.port```: WS-RPC server listening port (default: 8546) -- ```authrpc.jwtsecret```: Path to a JWT secret to use for authenticated RPC endpoints +- ```authrpc.port```: Listening port for authenticated APIs (default: 8551) -- ```rpc.allow-unprotected-txs```: Allow for unprotected (non EIP155 signed) transactions to be submitted via RPC (default: false) +- ```http.corsdomain```: Comma separated list of domains from which to accept cross origin requests (browser enforced) (default: localhost) -- ```ws.origins```: Origins from which to accept websockets requests (default: localhost) +- ```http.vhosts```: Comma separated list of virtual hostnames from which to accept requests (server enforced). Accepts '*' wildcard. (default: localhost) - ```http.ep-requesttimeout```: Request Timeout for rpc execution pool for HTTP requests (default: 0s) -- ```rpc.enabledeprecatedpersonal```: Enables the (deprecated) personal namespace (default: false) +- ```rpc.txfeecap```: Sets a cap on transaction fee (in ether) that can be sent via the RPC APIs (0 = no cap) (default: 5) -- ```ws```: Enable the WS-RPC server (default: false) +- ```http.rpcprefix```: HTTP path path prefix on which JSON-RPC is served. Use '/' to serve on all paths. -- ```http.corsdomain```: Comma separated list of domains from which to accept cross origin requests (browser enforced) (default: localhost) +- ```authrpc.vhosts```: Comma separated list of virtual hostnames from which to accept requests (server enforced). Accepts '*' wildcard. (default: localhost) -- ```graphql.corsdomain```: Comma separated list of domains from which to accept cross origin requests (browser enforced) (default: localhost) +- ```ws.origins```: Origins from which to accept websockets requests (default: localhost) -- ```http.rpcprefix```: HTTP path path prefix on which JSON-RPC is served. Use '/' to serve on all paths. +- ```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) ### Logging Options -- ```log.debug```: Prepends log messages with call-site location (file and line number) (default: false) - -- ```log.backtrace```: Request a stack trace at a specific logging statement (e.g. 'block.go:271') +- ```log.json```: Format logs with JSON (default: false) - ```vmodule```: Per-module verbosity: comma-separated list of = (e.g. eth/*=5,p2p=4) -- ```log.json```: Format logs with JSON (default: false) +- ```log.backtrace```: Request a stack trace at a specific logging statement (e.g. 'block.go:271') + +- ```log.debug```: Prepends log messages with call-site location (file and line number) (default: false) ### P2P Options -- ```netrestrict```: Restricts network communication to the given IP networks (CIDR masks) +- ```bind```: Network binding address (default: 0.0.0.0) -- ```nodiscover```: Disables the peer discovery mechanism (manual peer addition) (default: false) +- ```maxpendpeers```: Maximum number of pending connection attempts (default: 50) -- ```bind```: Network binding address (default: 0.0.0.0) +- ```port```: Network listening port (default: 30303) + +- ```nat```: NAT port mapping mechanism (any|none|upnp|pmp|extip:) (default: any) - ```maxpeers```: Maximum number of network peers (network disabled if set to 0) (default: 50) -- ```v5disc```: Enables the experimental RLPx V5 (Topic Discovery) mechanism (default: false) +- ```bootnodes```: Comma separated enode URLs for P2P discovery bootstrap - ```txarrivalwait```: Maximum duration to wait for a transaction before explicitly requesting it (default: 500ms) +- ```nodiscover```: Disables the peer discovery mechanism (manual peer addition) (default: false) + - ```nodekeyhex```: P2P node key as hex -- ```bootnodes```: Comma separated enode URLs for P2P discovery bootstrap +- ```v5disc```: Enables the experimental RLPx V5 (Topic Discovery) mechanism (default: false) -- ```port```: Network listening port (default: 30303) +- ```netrestrict```: Restricts network communication to the given IP networks (CIDR masks) - ```nodekey```: P2P node key file -- ```maxpendpeers```: Maximum number of pending connection attempts (default: 50) - -- ```nat```: NAT port mapping mechanism (any|none|upnp|pmp|extip:) (default: any) - ### Sealer Options - ```miner.gaslimit```: Target gas ceiling (gas limit) for mined blocks (default: 30000000) -- ```miner.interruptcommit```: Interrupt block commit when block creation time is passed (default: true) - -- ```miner.recommit```: The time interval for miner to re-create mining work (default: 2m5s) +- ```miner.gasprice```: Minimum gas price for mining a transaction (default: 1000000000) - ```mine```: Enable mining (default: false) +- ```miner.interruptcommit```: Interrupt block commit when block creation time is passed (default: true) + - ```miner.extradata```: Block extra data set by the miner (default = client version) - ```miner.etherbase```: Public address for block mining rewards -- ```miner.gasprice```: Minimum gas price for mining a transaction (default: 1000000000) +- ```miner.recommit```: The time interval for miner to re-create mining work (default: 2m5s) ### Telemetry Options -- ```metrics```: Enable metrics collection and reporting (default: false) - -- ```metrics.influxdb.endpoint```: InfluxDB API endpoint to report metrics to - -- ```metrics.prometheus-addr```: Address for Prometheus Server (default: 127.0.0.1:7071) - -- ```metrics.opencollector-endpoint```: OpenCollector Endpoint (host:port) - - ```metrics.influxdb```: Enable metrics export/push to an external InfluxDB database (v1) (default: false) -- ```metrics.expensive```: Enable expensive metrics collection and reporting (default: false) - -- ```metrics.influxdb.database```: InfluxDB database name to push reported metrics to - - ```metrics.influxdb.organization```: InfluxDB organization name (v2 only) +- ```metrics.influxdbv2```: Enable metrics export/push to an external InfluxDB v2 database (default: false) + - ```metrics.influxdb.bucket```: InfluxDB bucket name to push reported metrics to (v2 only) +- ```metrics.influxdb.endpoint```: InfluxDB API endpoint to report metrics to + - ```metrics.influxdb.password```: Password to authorize access to the database -- ```metrics.influxdbv2```: Enable metrics export/push to an external InfluxDB v2 database (default: false) +- ```metrics.influxdb.token```: Token to authorize access to the database (v2 only) + +- ```metrics.expensive```: Enable expensive metrics collection and reporting (default: false) + +- ```metrics```: Enable metrics collection and reporting (default: false) - ```metrics.influxdb.tags```: Comma-separated InfluxDB tags (key/values) attached to all measurements -- ```metrics.influxdb.token```: Token to authorize access to the database (v2 only) +- ```metrics.prometheus-addr```: Address for Prometheus Server (default: 127.0.0.1:7071) + +- ```metrics.influxdb.database```: InfluxDB database name to push reported metrics to - ```metrics.influxdb.username```: Username to authorize access to the database +- ```metrics.opencollector-endpoint```: OpenCollector Endpoint (host:port) + ### Transaction Pool Options +- ```txpool.pricelimit```: Minimum gas price limit to enforce for acceptance into the pool (default: 1) + - ```txpool.journal```: Disk journal for local transaction to survive node restarts (default: transactions.rlp) - ```txpool.rejournal```: Time interval to regenerate the local transaction journal (default: 1h0m0s) -- ```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.lifetime```: Maximum amount of time non-executable transaction are queued (default: 3h0m0s) -- ```txpool.nolocals```: Disables price exemptions for locally submitted transactions (default: false) +- ```txpool.globalslots```: Maximum number of executable transaction slots for all accounts (default: 32768) -- ```txpool.pricebump```: Price bump percentage to replace an already existing transaction (default: 10) +- ```txpool.accountqueue```: Maximum number of non-executable transaction slots permitted per account (default: 16) -- ```txpool.pricelimit```: Minimum gas price limit to enforce for acceptance into the pool (default: 1) +- ```txpool.globalqueue```: Maximum number of non-executable transaction slots for all accounts (default: 32768) -- ```txpool.accountqueue```: Maximum number of non-executable transaction slots permitted per account (default: 16) +- ```txpool.locals```: Comma separated accounts to treat as locals (no flush, priority inclusion) -- ```txpool.lifetime```: Maximum amount of time non-executable transaction are queued (default: 3h0m0s) +- ```txpool.accountslots```: Minimum number of executable transaction slots guaranteed per account (default: 16) -- ```txpool.globalslots```: Maximum number of executable transaction slots for all accounts (default: 32768) +- ```txpool.pricebump```: Price bump percentage to replace an already existing transaction (default: 10) -- ```txpool.locals```: Comma separated accounts to treat as locals (no flush, priority inclusion) \ No newline at end of file +- ```txpool.nolocals```: Disables price exemptions for locally submitted transactions (default: false) \ No newline at end of file diff --git a/docs/cli/snapshot_prune-state.md b/docs/cli/snapshot_prune-state.md index 15bfd9f111..4c0528e7a3 100644 --- a/docs/cli/snapshot_prune-state.md +++ b/docs/cli/snapshot_prune-state.md @@ -4,14 +4,14 @@ The ```bor snapshot prune-state``` command will prune historical state data with ## Options -- ```bloomfilter.size```: Size of the bloom filter (default: 2048) - -- ```datadir```: Path of the data directory to store information - - ```keystore```: Path of the data directory to store keys - ```datadir.ancient```: Path of the ancient data directory to store information +- ```bloomfilter.size```: Size of the bloom filter (default: 2048) + +- ```datadir```: Path of the data directory to store information + ### Cache Options - ```cache```: Megabytes of memory allocated to internal caching (default: 1024) diff --git a/internal/cli/server/flags.go b/internal/cli/server/flags.go index d5fcfe1cc8..aab23978b6 100644 --- a/internal/cli/server/flags.go +++ b/internal/cli/server/flags.go @@ -28,7 +28,7 @@ func (c *Command) Flags(config *Config) *flagset.Flagset { }) f.IntFlag(&flagset.IntFlag{ Name: "verbosity", - Usage: "Logging verbosity for the server (5=trace|4=debug|3=info|2=warn|1=error|0=crit), default = 3", + Usage: "Logging verbosity for the server (5=trace|4=debug|3=info|2=warn|1=error|0=crit)", Value: &c.cliConfig.Verbosity, Default: c.cliConfig.Verbosity, }) @@ -70,13 +70,13 @@ func (c *Command) Flags(config *Config) *flagset.Flagset { }) f.Uint64Flag(&flagset.Uint64Flag{ Name: "rpc.batchlimit", - Usage: "Maximum number of messages in a batch (default=100, use 0 for no limits)", + Usage: "Maximum number of messages in a batch (use 0 for no limits)", Value: &c.cliConfig.RPCBatchLimit, Default: c.cliConfig.RPCBatchLimit, }) f.Uint64Flag(&flagset.Uint64Flag{ Name: "rpc.returndatalimit", - Usage: "Maximum size (in bytes) a result of an rpc request could have (default=100000, use 0 for no limits)", + Usage: "Maximum size (in bytes) a result of an rpc request could have (use 0 for no limits)", Value: &c.cliConfig.RPCReturnDataLimit, Default: c.cliConfig.RPCReturnDataLimit, }) @@ -432,7 +432,7 @@ func (c *Command) Flags(config *Config) *flagset.Flagset { }) f.Uint64Flag(&flagset.Uint64Flag{ Name: "cache.triesinmemory", - Usage: "Number of block states (tries) to keep in memory (default = 128)", + Usage: "Number of block states (tries) to keep in memory", Value: &c.cliConfig.Cache.TriesInMemory, Default: c.cliConfig.Cache.TriesInMemory, Group: "Cache", From 92ecb791f0af148e1bdd7c503b7d662ccae0ca82 Mon Sep 17 00:00:00 2001 From: leovct Date: Thu, 26 Oct 2023 20:46:45 +0200 Subject: [PATCH 4/9] fix: doc generation is now deterministic --- docs/cli/account_import.md | 4 +- docs/cli/attach.md | 4 +- docs/cli/bootnode.md | 18 +-- docs/cli/debug_pprof.md | 8 +- docs/cli/peers_remove.md | 4 +- docs/cli/server.md | 252 +++++++++++++++---------------- docs/cli/snapshot_prune-state.md | 8 +- internal/cli/flagset/flagset.go | 14 +- 8 files changed, 162 insertions(+), 150 deletions(-) diff --git a/docs/cli/account_import.md b/docs/cli/account_import.md index 582f15f261..697d951fd3 100644 --- a/docs/cli/account_import.md +++ b/docs/cli/account_import.md @@ -4,6 +4,6 @@ The ```account import``` command imports an account in Json format to the Bor da ## Options -- ```keystore```: Path of the data directory to store keys +- ```datadir```: Path of the data directory to store information -- ```datadir```: Path of the data directory to store information \ No newline at end of file +- ```keystore```: Path of the data directory to store keys \ No newline at end of file diff --git a/docs/cli/attach.md b/docs/cli/attach.md index 469ba6ab80..7430a9cfd2 100644 --- a/docs/cli/attach.md +++ b/docs/cli/attach.md @@ -4,8 +4,8 @@ Connect to remote Bor IPC console. ## Options -- ```preload```: Comma separated list of JavaScript files to preload into the console +- ```exec```: Command to run in remote console - ```jspath```: JavaScript root path for `loadScript` -- ```exec```: Command to run in remote console \ No newline at end of file +- ```preload```: Comma separated list of JavaScript files to preload into the console \ No newline at end of file diff --git a/docs/cli/bootnode.md b/docs/cli/bootnode.md index 1047e0cfb6..d68c94ff01 100644 --- a/docs/cli/bootnode.md +++ b/docs/cli/bootnode.md @@ -2,22 +2,22 @@ ## Options -- ```listen-addr```: listening address of bootnode (:) (default: 0.0.0.0:30303) +- ```dry-run```: validates parameters and prints bootnode configurations, but does not start bootnode (default: false) -- ```prometheus-addr```: listening address of bootnode (:) (default: 127.0.0.1:7071) +- ```listen-addr```: listening address of bootnode (:) (default: 0.0.0.0:30303) - ```log-level```: log level (trace|debug|info|warn|error|crit), will be deprecated soon. Use verbosity instead (default: info) -- ```node-key```: file or hex node key +- ```metrics```: Enable metrics collection and reporting (default: true) -- ```save-key```: path to save the ecdsa private key +- ```nat```: port mapping mechanism (any|none|upnp|pmp|extip:) (default: none) -- ```metrics```: Enable metrics collection and reporting (default: true) +- ```node-key```: file or hex node key -- ```v5```: Enable UDP v5 (default: false) +- ```prometheus-addr```: listening address of bootnode (:) (default: 127.0.0.1:7071) -- ```verbosity```: Logging verbosity (5=trace|4=debug|3=info|2=warn|1=error|0=crit) (default: 3) +- ```save-key```: path to save the ecdsa private key -- ```nat```: port mapping mechanism (any|none|upnp|pmp|extip:) (default: none) +- ```v5```: Enable UDP v5 (default: false) -- ```dry-run```: validates parameters and prints bootnode configurations, but does not start bootnode (default: false) \ No newline at end of file +- ```verbosity```: Logging verbosity (5=trace|4=debug|3=info|2=warn|1=error|0=crit) (default: 3) \ No newline at end of file diff --git a/docs/cli/debug_pprof.md b/docs/cli/debug_pprof.md index 0f4a497acc..d6cd3bee43 100644 --- a/docs/cli/debug_pprof.md +++ b/docs/cli/debug_pprof.md @@ -4,10 +4,10 @@ The ```debug pprof ``` command will create an archive containing bor ppro ## Options -- ```output```: Output directory +- ```address```: Address of the grpc endpoint (default: 127.0.0.1:3131) -- ```skiptrace```: Skip running the trace (default: false) +- ```output```: Output directory -- ```address```: Address of the grpc endpoint (default: 127.0.0.1:3131) +- ```seconds```: seconds to profile (default: 2) -- ```seconds```: seconds to profile (default: 2) \ No newline at end of file +- ```skiptrace```: Skip running the trace (default: false) \ No newline at end of file diff --git a/docs/cli/peers_remove.md b/docs/cli/peers_remove.md index ba8641cf33..f731f12f6f 100644 --- a/docs/cli/peers_remove.md +++ b/docs/cli/peers_remove.md @@ -4,6 +4,6 @@ The ```peers remove ``` command disconnects the local client from a conne ## Options -- ```trusted```: Add the peer as a trusted (default: false) +- ```address```: Address of the grpc endpoint (default: 127.0.0.1:3131) -- ```address```: Address of the grpc endpoint (default: 127.0.0.1:3131) \ No newline at end of file +- ```trusted```: Add the peer as a trusted (default: false) \ No newline at end of file diff --git a/docs/cli/server.md b/docs/cli/server.md index 2538913d9c..ecfd4ee19b 100644 --- a/docs/cli/server.md +++ b/docs/cli/server.md @@ -4,304 +4,304 @@ The ```bor server``` command runs the Bor client. ## Options -- ```log-level```: Log level for the server (trace|debug|info|warn|error|crit), will be deprecated soon. Use verbosity instead - -- ```snapshot```: Enables the snapshot-database mode (default: true) +- ```bor.devfakeauthor```: Run miner without validator set authorization [dev mode] : Use with '--bor.withoutheimdall' (default: false) -- ```datadir.ancient```: Data directory for ancient chain segments (default = inside chaindata) +- ```bor.heimdall```: URL of Heimdall service (default: http://localhost:1317) -- ```parallelevm.enable```: Enable Block STM (default: true) +- ```bor.heimdallgRPC```: Address of Heimdall gRPC service -- ```pprof.blockprofilerate```: Turn on block profiling with the given rate (default: 0) +- ```bor.logs```: Enables bor log retrieval (default: false) -- ```gpo.ignoreprice```: Gas price below which gpo will ignore transactions (default: 2) +- ```bor.runheimdall```: Run Heimdall service as a child process (default: false) -- ```gcmode```: Blockchain garbage collection mode ("full", "archive") (default: full) +- ```bor.runheimdallargs```: Arguments to pass to Heimdall service -- ```verbosity```: Logging verbosity for the server (5=trace|4=debug|3=info|2=warn|1=error|0=crit) (default: 3) +- ```bor.useheimdallapp```: Use child heimdall process to fetch data, Only works when bor.runheimdall is true (default: false) -- ```datadir```: Path of the data directory to store information +- ```bor.withoutheimdall```: Run without Heimdall service (for testing purpose) (default: false) -- ```bor.heimdall```: URL of Heimdall service (default: http://localhost:1317) +- ```chain```: Name of the chain to sync ('mumbai', 'mainnet') or path to a genesis file (default: mainnet) -- ```bor.devfakeauthor```: Run miner without validator set authorization [dev mode] : Use with '--bor.withoutheimdall' (default: false) +- ```config```: Path to the TOML configuration file -- ```identity```: Name/Identity of the node +- ```datadir```: Path of the data directory to store information -- ```vmdebug```: Record information useful for VM and contract debugging (default: false) +- ```datadir.ancient```: Data directory for ancient chain segments (default = inside chaindata) -- ```pprof```: Enable the pprof HTTP server (default: false) +- ```db.engine```: Backing database implementation to use ('leveldb' or 'pebble') (default: leveldb) -- ```pprof.port```: pprof HTTP server listening port (default: 6060) +- ```dev```: Enable developer mode with ephemeral proof-of-authority network and a pre-funded developer account, mining enabled (default: false) -- ```gpo.percentile```: Suggested gas price is the given percentile of a set of recent transaction gas prices (default: 60) +- ```dev.gaslimit```: Initial block gas limit (default: 11500000) -- ```parallelevm.procs```: Number of speculative processes (cores) in Block STM (default: 8) +- ```dev.period```: Block period to use in developer mode (0 = mine only if transaction pending) (default: 0) -- ```keystore```: Path of the directory where keystores are located +- ```disable-bor-wallet```: Disable the personal wallet endpoints (default: true) -- ```syncmode```: Blockchain sync mode (only "full" sync supported) (default: full) +- ```eth.requiredblocks```: Comma separated block number-to-hash mappings to require for peering (=) -- ```dev.period```: Block period to use in developer mode (0 = mine only if transaction pending) (default: 0) +- ```ethstats```: Reporting URL of a ethstats service (nodename:secret@host:port) -- ```bor.withoutheimdall```: Run without Heimdall service (for testing purpose) (default: false) +- ```gcmode```: Blockchain garbage collection mode ("full", "archive") (default: full) - ```gpo.blocks```: Number of recent blocks to check for gas prices (default: 20) -- ```rpc.returndatalimit```: Maximum size (in bytes) a result of an rpc request could have (use 0 for no limits) (default: 100000) +- ```gpo.ignoreprice```: Gas price below which gpo will ignore transactions (default: 2) -- ```bor.logs```: Enables bor log retrieval (default: false) +- ```gpo.maxblockhistory```: Maximum block history of gasprice oracle (default: 1024) -- ```disable-bor-wallet```: Disable the personal wallet endpoints (default: true) +- ```gpo.maxheaderhistory```: Maximum header history of gasprice oracle (default: 1024) -- ```gpo.maxblockhistory```: Maximum block history of gasprice oracle (default: 1024) +- ```gpo.maxprice```: Maximum gas price will be recommended by gpo (default: 500000000000) + +- ```gpo.percentile```: Suggested gas price is the given percentile of a set of recent transaction gas prices (default: 60) - ```grpc.addr```: Address and port to bind the GRPC server (default: :3131) -- ```db.engine```: Backing database implementation to use ('leveldb' or 'pebble') (default: leveldb) +- ```identity```: Name/Identity of the node -- ```bor.heimdallgRPC```: Address of Heimdall gRPC service +- ```keystore```: Path of the directory where keystores are located -- ```ethstats```: Reporting URL of a ethstats service (nodename:secret@host:port) +- ```log-level```: Log level for the server (trace|debug|info|warn|error|crit), will be deprecated soon. Use verbosity instead -- ```gpo.maxheaderhistory```: Maximum header history of gasprice oracle (default: 1024) +- ```parallelevm.enable```: Enable Block STM (default: true) -- ```chain```: Name of the chain to sync ('mumbai', 'mainnet') or path to a genesis file (default: mainnet) +- ```parallelevm.procs```: Number of speculative processes (cores) in Block STM (default: 8) -- ```gpo.maxprice```: Maximum gas price will be recommended by gpo (default: 500000000000) +- ```pprof```: Enable the pprof HTTP server (default: false) -- ```bor.runheimdall```: Run Heimdall service as a child process (default: false) +- ```pprof.addr```: pprof HTTP server listening interface (default: 127.0.0.1) -- ```bor.useheimdallapp```: Use child heimdall process to fetch data, Only works when bor.runheimdall is true (default: false) +- ```pprof.blockprofilerate```: Turn on block profiling with the given rate (default: 0) -- ```dev```: Enable developer mode with ephemeral proof-of-authority network and a pre-funded developer account, mining enabled (default: false) +- ```pprof.memprofilerate```: Turn on memory profiling with the given rate (default: 524288) -- ```rpc.batchlimit```: Maximum number of messages in a batch (use 0 for no limits) (default: 100) +- ```pprof.port```: pprof HTTP server listening port (default: 6060) -- ```eth.requiredblocks```: Comma separated block number-to-hash mappings to require for peering (=) +- ```rpc.batchlimit```: Maximum number of messages in a batch (use 0 for no limits) (default: 100) -- ```config```: Path to the TOML configuration file +- ```rpc.returndatalimit```: Maximum size (in bytes) a result of an rpc request could have (use 0 for no limits) (default: 100000) -- ```pprof.addr```: pprof HTTP server listening interface (default: 127.0.0.1) +- ```snapshot```: Enables the snapshot-database mode (default: true) -- ```dev.gaslimit```: Initial block gas limit (default: 11500000) +- ```syncmode```: Blockchain sync mode (only "full" sync supported) (default: full) -- ```pprof.memprofilerate```: Turn on memory profiling with the given rate (default: 524288) +- ```verbosity```: Logging verbosity for the server (5=trace|4=debug|3=info|2=warn|1=error|0=crit) (default: 3) -- ```bor.runheimdallargs```: Arguments to pass to Heimdall service +- ```vmdebug```: Record information useful for VM and contract debugging (default: false) ### Account Management Options -- ```unlock```: Comma separated list of accounts to unlock +- ```allow-insecure-unlock```: Allow insecure account unlocking when account-related RPCs are exposed by http (default: false) - ```lightkdf```: Reduce key-derivation RAM & CPU usage at some expense of KDF strength (default: false) -- ```allow-insecure-unlock```: Allow insecure account unlocking when account-related RPCs are exposed by http (default: false) - - ```password```: Password file to use for non-interactive password input +- ```unlock```: Comma separated list of accounts to unlock + ### Cache Options -- ```fdlimit```: Raise the open file descriptor resource limit (default = system fd limit) (default: 0) +- ```cache```: Megabytes of memory allocated to internal caching (default: 1024) - ```cache.database```: Percentage of cache memory allowance to use for database io (default: 50) - ```cache.gc```: Percentage of cache memory allowance to use for trie pruning (default: 25) -- ```txlookuplimit```: Number of recent blocks to maintain transactions index for (default: 2350000) - -- ```cache.trie.rejournal```: Time interval to regenerate the trie cache journal (default: 1h0m0s) +- ```cache.noprefetch```: Disable heuristic state prefetch during block import (less CPU and disk IO, more time waiting for data) (default: false) -- ```cache.trie.journal```: Disk journal directory for trie cache to survive node restarts (default: triecache) +- ```cache.preimages```: Enable recording the SHA3/keccak preimages of trie keys (default: false) - ```cache.snapshot```: Percentage of cache memory allowance to use for snapshot caching (default: 10) - ```cache.trie```: Percentage of cache memory allowance to use for trie caching (default: 15) -- ```cache.preimages```: Enable recording the SHA3/keccak preimages of trie keys (default: false) - -- ```cache.noprefetch```: Disable heuristic state prefetch during block import (less CPU and disk IO, more time waiting for data) (default: false) +- ```cache.trie.journal```: Disk journal directory for trie cache to survive node restarts (default: triecache) -- ```cache```: Megabytes of memory allocated to internal caching (default: 1024) +- ```cache.trie.rejournal```: Time interval to regenerate the trie cache journal (default: 1h0m0s) - ```cache.triesinmemory```: Number of block states (tries) to keep in memory (default: 128) +- ```fdlimit```: Raise the open file descriptor resource limit (default = system fd limit) (default: 0) + +- ```txlookuplimit```: Number of recent blocks to maintain transactions index for (default: 2350000) + ### ExtraDB Options -- ```leveldb.compaction.total.size```: Total size in mebibytes of SSTables in a given LevelDB level. Size for a level is determined by: `leveldb.compaction.total.size * (leveldb.compaction.total.size.multiplier ^ Level)` (default: 10) +- ```leveldb.compaction.table.size```: LevelDB SSTable/file size in mebibytes (default: 2) - ```leveldb.compaction.table.size.multiplier```: Multiplier on LevelDB SSTable/file size. Size for a level is determined by: `leveldb.compaction.table.size * (leveldb.compaction.table.size.multiplier ^ Level)` (default: 1) -- ```leveldb.compaction.total.size.multiplier```: Multiplier on level size on LevelDB levels. Size for a level is determined by: `leveldb.compaction.total.size * (leveldb.compaction.total.size.multiplier ^ Level)` (default: 10) +- ```leveldb.compaction.total.size```: Total size in mebibytes of SSTables in a given LevelDB level. Size for a level is determined by: `leveldb.compaction.total.size * (leveldb.compaction.total.size.multiplier ^ Level)` (default: 10) -- ```leveldb.compaction.table.size```: LevelDB SSTable/file size in mebibytes (default: 2) +- ```leveldb.compaction.total.size.multiplier```: Multiplier on level size on LevelDB levels. Size for a level is determined by: `leveldb.compaction.total.size * (leveldb.compaction.total.size.multiplier ^ Level)` (default: 10) ### JsonRPC Options -- ```http.api```: API's offered over the HTTP-RPC interface (default: eth,net,web3,txpool,bor) - -- ```graphql.vhosts```: Comma separated list of virtual hostnames from which to accept requests (server enforced). Accepts '*' wildcard. (default: localhost) - - ```authrpc.addr```: Listening address for authenticated APIs (default: localhost) -- ```ws.ep-requesttimeout```: Request Timeout for rpc execution pool for WS requests (default: 0s) +- ```authrpc.jwtsecret```: Path to a JWT secret to use for authenticated RPC endpoints -- ```rpc.gascap```: Sets a cap on gas that can be used in eth_call/estimateGas (0=infinite) (default: 50000000) +- ```authrpc.port```: Listening port for authenticated APIs (default: 8551) -- ```rpc.allow-unprotected-txs```: Allow for unprotected (non EIP155 signed) transactions to be submitted via RPC (default: false) +- ```authrpc.vhosts```: Comma separated list of virtual hostnames from which to accept requests (server enforced). Accepts '*' wildcard. (default: localhost) -- ```ws.api```: API's offered over the WS-RPC interface (default: net,web3) +- ```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) -- ```http.addr```: HTTP-RPC server listening interface (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) - ```http```: Enable the HTTP-RPC server (default: false) -- ```http.ep-size```: Maximum size of workers to run in rpc execution pool for HTTP requests (default: 40) +- ```http.addr```: HTTP-RPC server listening interface (default: localhost) -- ```ws.addr```: WS-RPC server listening interface (default: localhost) +- ```http.api```: API's offered over the HTTP-RPC interface (default: eth,net,web3,txpool,bor) -- ```ipcdisable```: Disable the IPC-RPC server (default: false) +- ```http.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) +- ```http.ep-requesttimeout```: Request Timeout for rpc execution pool for HTTP requests (default: 0s) -- ```rpc.evmtimeout```: Sets a timeout used for eth_call (0=infinite) (default: 5s) +- ```http.ep-size```: Maximum size of workers to run in rpc execution pool for HTTP requests (default: 40) - ```http.port```: HTTP-RPC server listening port (default: 8545) -- ```rpc.enabledeprecatedpersonal```: Enables the (deprecated) personal namespace (default: false) +- ```http.rpcprefix```: HTTP path path prefix on which JSON-RPC is served. Use '/' to serve on all paths. -- ```ipcpath```: Filename for IPC socket/pipe within the datadir (explicit paths escape it) +- ```http.vhosts```: Comma separated list of virtual hostnames from which to accept requests (server enforced). Accepts '*' wildcard. (default: localhost) -- ```ws.ep-size```: Maximum size of workers to run in rpc execution pool for WS requests (default: 40) +- ```ipcdisable```: Disable the IPC-RPC server (default: false) -- ```ws```: Enable the WS-RPC server (default: false) +- ```ipcpath```: Filename for IPC socket/pipe within the datadir (explicit paths escape it) -- ```authrpc.jwtsecret```: Path to a JWT secret to use for authenticated RPC endpoints +- ```rpc.allow-unprotected-txs```: Allow for unprotected (non EIP155 signed) transactions to be submitted via RPC (default: false) -- ```ws.rpcprefix```: HTTP path prefix on which JSON-RPC is served. Use '/' to serve on all paths. +- ```rpc.enabledeprecatedpersonal```: Enables the (deprecated) personal namespace (default: false) -- ```ws.port```: WS-RPC server listening port (default: 8546) +- ```rpc.evmtimeout```: Sets a timeout used for eth_call (0=infinite) (default: 5s) -- ```authrpc.port```: Listening port for authenticated APIs (default: 8551) +- ```rpc.gascap```: Sets a cap on gas that can be used in eth_call/estimateGas (0=infinite) (default: 50000000) -- ```http.corsdomain```: Comma separated list of domains from which to accept cross origin requests (browser enforced) (default: localhost) +- ```rpc.txfeecap```: Sets a cap on transaction fee (in ether) that can be sent via the RPC APIs (0 = no cap) (default: 5) -- ```http.vhosts```: Comma separated list of virtual hostnames from which to accept requests (server enforced). Accepts '*' wildcard. (default: localhost) +- ```ws```: Enable the WS-RPC server (default: false) -- ```http.ep-requesttimeout```: Request Timeout for rpc execution pool for HTTP requests (default: 0s) +- ```ws.addr```: WS-RPC server listening interface (default: localhost) -- ```rpc.txfeecap```: Sets a cap on transaction fee (in ether) that can be sent via the RPC APIs (0 = no cap) (default: 5) +- ```ws.api```: API's offered over the WS-RPC interface (default: net,web3) -- ```http.rpcprefix```: HTTP path path prefix on which JSON-RPC is served. Use '/' to serve on all paths. +- ```ws.ep-requesttimeout```: Request Timeout for rpc execution pool for WS requests (default: 0s) -- ```authrpc.vhosts```: Comma separated list of virtual hostnames from which to accept requests (server enforced). Accepts '*' wildcard. (default: localhost) +- ```ws.ep-size```: Maximum size of workers to run in rpc execution pool for WS requests (default: 40) - ```ws.origins```: Origins from which to accept websockets requests (default: localhost) -- ```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) - -### Logging Options +- ```ws.port```: WS-RPC server listening port (default: 8546) -- ```log.json```: Format logs with JSON (default: false) +- ```ws.rpcprefix```: HTTP path prefix on which JSON-RPC is served. Use '/' to serve on all paths. -- ```vmodule```: Per-module verbosity: comma-separated list of = (e.g. eth/*=5,p2p=4) +### Logging Options - ```log.backtrace```: Request a stack trace at a specific logging statement (e.g. 'block.go:271') - ```log.debug```: Prepends log messages with call-site location (file and line number) (default: false) +- ```log.json```: Format logs with JSON (default: false) + +- ```vmodule```: Per-module verbosity: comma-separated list of = (e.g. eth/*=5,p2p=4) + ### P2P Options - ```bind```: Network binding address (default: 0.0.0.0) -- ```maxpendpeers```: Maximum number of pending connection attempts (default: 50) +- ```bootnodes```: Comma separated enode URLs for P2P discovery bootstrap -- ```port```: Network listening port (default: 30303) +- ```maxpeers```: Maximum number of network peers (network disabled if set to 0) (default: 50) + +- ```maxpendpeers```: Maximum number of pending connection attempts (default: 50) - ```nat```: NAT port mapping mechanism (any|none|upnp|pmp|extip:) (default: any) -- ```maxpeers```: Maximum number of network peers (network disabled if set to 0) (default: 50) +- ```netrestrict```: Restricts network communication to the given IP networks (CIDR masks) -- ```bootnodes```: Comma separated enode URLs for P2P discovery bootstrap +- ```nodekey```: P2P node key file -- ```txarrivalwait```: Maximum duration to wait for a transaction before explicitly requesting it (default: 500ms) +- ```nodekeyhex```: P2P node key as hex - ```nodiscover```: Disables the peer discovery mechanism (manual peer addition) (default: false) -- ```nodekeyhex```: P2P node key as hex +- ```port```: Network listening port (default: 30303) + +- ```txarrivalwait```: Maximum duration to wait for a transaction before explicitly requesting it (default: 500ms) - ```v5disc```: Enables the experimental RLPx V5 (Topic Discovery) mechanism (default: false) -- ```netrestrict```: Restricts network communication to the given IP networks (CIDR masks) +### Sealer Options -- ```nodekey```: P2P node key file +- ```mine```: Enable mining (default: false) -### Sealer Options +- ```miner.etherbase```: Public address for block mining rewards + +- ```miner.extradata```: Block extra data set by the miner (default = client version) - ```miner.gaslimit```: Target gas ceiling (gas limit) for mined blocks (default: 30000000) - ```miner.gasprice```: Minimum gas price for mining a transaction (default: 1000000000) -- ```mine```: Enable mining (default: false) - - ```miner.interruptcommit```: Interrupt block commit when block creation time is passed (default: true) -- ```miner.extradata```: Block extra data set by the miner (default = client version) - -- ```miner.etherbase```: Public address for block mining rewards - - ```miner.recommit```: The time interval for miner to re-create mining work (default: 2m5s) ### Telemetry Options -- ```metrics.influxdb```: Enable metrics export/push to an external InfluxDB database (v1) (default: false) +- ```metrics```: Enable metrics collection and reporting (default: false) -- ```metrics.influxdb.organization```: InfluxDB organization name (v2 only) +- ```metrics.expensive```: Enable expensive metrics collection and reporting (default: false) -- ```metrics.influxdbv2```: Enable metrics export/push to an external InfluxDB v2 database (default: false) +- ```metrics.influxdb```: Enable metrics export/push to an external InfluxDB database (v1) (default: false) - ```metrics.influxdb.bucket```: InfluxDB bucket name to push reported metrics to (v2 only) -- ```metrics.influxdb.endpoint```: InfluxDB API endpoint to report metrics to - -- ```metrics.influxdb.password```: Password to authorize access to the database +- ```metrics.influxdb.database```: InfluxDB database name to push reported metrics to -- ```metrics.influxdb.token```: Token to authorize access to the database (v2 only) +- ```metrics.influxdb.endpoint```: InfluxDB API endpoint to report metrics to -- ```metrics.expensive```: Enable expensive metrics collection and reporting (default: false) +- ```metrics.influxdb.organization```: InfluxDB organization name (v2 only) -- ```metrics```: Enable metrics collection and reporting (default: false) +- ```metrics.influxdb.password```: Password to authorize access to the database - ```metrics.influxdb.tags```: Comma-separated InfluxDB tags (key/values) attached to all measurements -- ```metrics.prometheus-addr```: Address for Prometheus Server (default: 127.0.0.1:7071) - -- ```metrics.influxdb.database```: InfluxDB database name to push reported metrics to +- ```metrics.influxdb.token```: Token to authorize access to the database (v2 only) - ```metrics.influxdb.username```: Username to authorize access to the database +- ```metrics.influxdbv2```: Enable metrics export/push to an external InfluxDB v2 database (default: false) + - ```metrics.opencollector-endpoint```: OpenCollector Endpoint (host:port) -### Transaction Pool Options +- ```metrics.prometheus-addr```: Address for Prometheus Server (default: 127.0.0.1:7071) -- ```txpool.pricelimit```: Minimum gas price limit to enforce for acceptance into the pool (default: 1) +### Transaction Pool Options -- ```txpool.journal```: Disk journal for local transaction to survive node restarts (default: transactions.rlp) +- ```txpool.accountqueue```: Maximum number of non-executable transaction slots permitted per account (default: 16) -- ```txpool.rejournal```: Time interval to regenerate the local transaction journal (default: 1h0m0s) +- ```txpool.accountslots```: Minimum number of executable transaction slots guaranteed per account (default: 16) -- ```txpool.lifetime```: Maximum amount of time non-executable transaction are queued (default: 3h0m0s) +- ```txpool.globalqueue```: Maximum number of non-executable transaction slots for all accounts (default: 32768) - ```txpool.globalslots```: Maximum number of executable transaction slots for all accounts (default: 32768) -- ```txpool.accountqueue```: Maximum number of non-executable transaction slots permitted per account (default: 16) +- ```txpool.journal```: Disk journal for local transaction to survive node restarts (default: transactions.rlp) -- ```txpool.globalqueue```: Maximum number of non-executable transaction slots for all accounts (default: 32768) +- ```txpool.lifetime```: Maximum amount of time non-executable transaction are queued (default: 3h0m0s) - ```txpool.locals```: Comma separated accounts to treat as locals (no flush, priority inclusion) -- ```txpool.accountslots```: Minimum number of executable transaction slots guaranteed per account (default: 16) +- ```txpool.nolocals```: Disables price exemptions for locally submitted transactions (default: false) - ```txpool.pricebump```: Price bump percentage to replace an already existing transaction (default: 10) -- ```txpool.nolocals```: Disables price exemptions for locally submitted transactions (default: false) \ No newline at end of file +- ```txpool.pricelimit```: Minimum gas price limit to enforce for acceptance into the pool (default: 1) + +- ```txpool.rejournal```: Time interval to regenerate the local transaction journal (default: 1h0m0s) \ No newline at end of file diff --git a/docs/cli/snapshot_prune-state.md b/docs/cli/snapshot_prune-state.md index 4c0528e7a3..bd053324da 100644 --- a/docs/cli/snapshot_prune-state.md +++ b/docs/cli/snapshot_prune-state.md @@ -4,14 +4,14 @@ The ```bor snapshot prune-state``` command will prune historical state data with ## Options -- ```keystore```: Path of the data directory to store keys - -- ```datadir.ancient```: Path of the ancient data directory to store information - - ```bloomfilter.size```: Size of the bloom filter (default: 2048) - ```datadir```: Path of the data directory to store information +- ```datadir.ancient```: Path of the ancient data directory to store information + +- ```keystore```: Path of the data directory to store keys + ### Cache Options - ```cache```: Megabytes of memory allocated to internal caching (default: 1024) diff --git a/internal/cli/flagset/flagset.go b/internal/cli/flagset/flagset.go index 679c78c4a7..681614addf 100644 --- a/internal/cli/flagset/flagset.go +++ b/internal/cli/flagset/flagset.go @@ -39,6 +39,13 @@ type FlagVar struct { Value Updatable } +// ByName implements sort.Interface for []*FlagVar based on the Name field. +type ByName []*FlagVar + +func (a ByName) Len() int { return len(a) } +func (a ByName) Swap(i, j int) { a[i], a[j] = a[j], a[i] } +func (a ByName) Less(i, j int) bool { return a[i].Name < a[j].Name } + func (f *Flagset) addFlag(fl *FlagVar) { f.flags[fl.Name] = fl } @@ -102,7 +109,12 @@ func (f *Flagset) MarkDown() string { items = append(items, fmt.Sprintf("### %s Options", k)) } - for _, item := range groups[k] { + flags := make([]*FlagVar, len(groups[k])) + copy(flags, groups[k]) + sort.Sort(ByName(flags)) + + for _, item := range flags { + fmt.Printf("\nDEBUG: %+v\n", *item) if item.Default != nil { items = append(items, fmt.Sprintf("- ```%s```: %s (default: %v)", item.Name, item.Usage, item.Default)) } else { From e378b71adaf6a0cb473be4604884d1080e1c20a3 Mon Sep 17 00:00:00 2001 From: leovct Date: Thu, 26 Oct 2023 20:47:48 +0200 Subject: [PATCH 5/9] chore: remove debug --- internal/cli/flagset/flagset.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/cli/flagset/flagset.go b/internal/cli/flagset/flagset.go index 681614addf..cfe788864a 100644 --- a/internal/cli/flagset/flagset.go +++ b/internal/cli/flagset/flagset.go @@ -114,7 +114,6 @@ func (f *Flagset) MarkDown() string { sort.Sort(ByName(flags)) for _, item := range flags { - fmt.Printf("\nDEBUG: %+v\n", *item) if item.Default != nil { items = append(items, fmt.Sprintf("- ```%s```: %s (default: %v)", item.Name, item.Usage, item.Default)) } else { From f233208a976afb7e86e89673109d0edd93e2c8a4 Mon Sep 17 00:00:00 2001 From: leovct Date: Thu, 26 Oct 2023 20:57:11 +0200 Subject: [PATCH 6/9] feat: sort options in `bor server --help` --- internal/cli/flagset/flagset.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/cli/flagset/flagset.go b/internal/cli/flagset/flagset.go index cfe788864a..630b5ac716 100644 --- a/internal/cli/flagset/flagset.go +++ b/internal/cli/flagset/flagset.go @@ -55,7 +55,13 @@ func (f *Flagset) Help() string { items := []string{} + var flags []*FlagVar for _, item := range f.flags { + flags = append(flags, item) + } + sort.Sort(ByName(flags)) + + for _, item := range flags { if item.Default != nil { items = append(items, fmt.Sprintf(" -%s\n %s (default: %v)", item.Name, item.Usage, item.Default)) } else { From 70be67d91eadf7609fdfa7722bd7c2c4912383d7 Mon Sep 17 00:00:00 2001 From: leovct Date: Thu, 26 Oct 2023 21:06:41 +0200 Subject: [PATCH 7/9] fix: prealloc array --- internal/cli/flagset/flagset.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/cli/flagset/flagset.go b/internal/cli/flagset/flagset.go index 630b5ac716..cc960f0287 100644 --- a/internal/cli/flagset/flagset.go +++ b/internal/cli/flagset/flagset.go @@ -55,7 +55,7 @@ func (f *Flagset) Help() string { items := []string{} - var flags []*FlagVar + flags := make([]*FlagVar, len(f.flags)) for _, item := range f.flags { flags = append(flags, item) } From 1a45b4eccaee511e29e49ddb9cf2e93571fc3477 Mon Sep 17 00:00:00 2001 From: leovct Date: Thu, 26 Oct 2023 21:44:02 +0200 Subject: [PATCH 8/9] fix: lint issues --- internal/cli/flagset/flagset.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/cli/flagset/flagset.go b/internal/cli/flagset/flagset.go index cc960f0287..0145baa2e1 100644 --- a/internal/cli/flagset/flagset.go +++ b/internal/cli/flagset/flagset.go @@ -55,10 +55,11 @@ func (f *Flagset) Help() string { items := []string{} - flags := make([]*FlagVar, len(f.flags)) + flags := []*FlagVar{} for _, item := range f.flags { flags = append(flags, item) } + //nolint: wsl sort.Sort(ByName(flags)) for _, item := range flags { From 5000d257ee4e3a17765e9b1850e948a992daf905 Mon Sep 17 00:00:00 2001 From: Manav Darji Date: Tue, 7 Nov 2023 10:22:01 +0530 Subject: [PATCH 9/9] internal/cli: remove nolint --- internal/cli/flagset/flagset.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/cli/flagset/flagset.go b/internal/cli/flagset/flagset.go index 0145baa2e1..85a846a40b 100644 --- a/internal/cli/flagset/flagset.go +++ b/internal/cli/flagset/flagset.go @@ -59,7 +59,7 @@ func (f *Flagset) Help() string { for _, item := range f.flags { flags = append(flags, item) } - //nolint: wsl + sort.Sort(ByName(flags)) for _, item := range flags {