Fieres Blockchain CLI Parameters
This reference describes the syntax of the QI Blockchain Command Line Interface (CLI) options.
Specifying options
You can specify QI options:
On the command line.
As an environment variable. For each command line option, the equivalent environment variable is:
Uppercase.
_
replaces-
.Has a
BESU_
prefix.
For example, set
--miner-coinbase
using theBESU_MINER_COINBASE
environment variable.
If you specify an option in more than one place, the order of priority is command line, environment variable, configuration file.
If using Bash or Z shell, you can view option suggestions by entering --
and pressing the Tab key twice.
Options
api-gas-price-blocks
api-gas-price-blocks
Syntax
Number of blocks back from the head block to examine for eth_gasPrice
. The default is 100
.
api-gas-price-max
api-gas-price-max
Syntax
Maximum gas price to return for eth_gasPrice
, regardless of the percentile value measured. The default is 500000000000
(500 GWei).
api-gas-price-percentile
api-gas-price-percentile
Syntax
Percentile value to measure for eth_gasPrice
. The default is 50.0
.
For eth_gasPrice
, to return the:
Highest gas price in
--api-gas-price-blocks
, set to100
.Lowest gas price in
--api-gas-price-blocks
, set to0
.
bootnodes
bootnodes
Syntax
A list of comma-separated enode URLs for P2P discovery bootstrap.
When connecting to Mainnet or public testnets, the default is a predefined list of enode URLs.
In private networks defined using --genesis-file
or when using --network=dev
, the default is an empty list of bootnodes.
color-enabled
color-enabled
Syntax
ExampleEnvironment variableExample configuration file
Enables or disables color output to console. The default is true
.
config-file
config-file
Syntax
The path to the TOML configuration file. The default is none
.
data-path
data-path
Syntax
The path to the Besu data directory. The default is the directory you installed Besu in.
discovery-dns-url
discovery-dns-url
Syntax
The enrtree
URL of the DNS node list for node discovery via DNS. The default is null
.
discovery-enabled
discovery-enabled
Syntax
Enables or disables P2P discovery. The default is true
.
Note
You can override the default DNS server if it’s unreliable or doesn’t serve TCP DNS requests, using the experimental option --Xp2p-dns-discovery-server=<HOST>
.
engine-host-allowlist
engine-host-allowlist
Syntax
A comma-separated list of hostnames to allow for Engine API access (applies to both HTTP and WebSocket).
Tip
To allow all hostnames, use "*"
. We don’t recommend allowing all hostnames in production environments.
engine-rpc-port
engine-rpc-port
Syntax
The listening port for the Engine API calls (ENGINE
, ETH
) for JSON-RPC over HTTP and WebSocket. The default is 8551
.
ethstats
ethstats
Syntax
Reporting URL of an Ethstats server.
ethstats-contact
ethstats-contact
Syntax
Contact email address to send to the Ethstats server specified by --ethstats
.
Note
A server must be specified by --ethstats
in order to use this option.
fast-sync-min-peers
fast-sync-min-peers
Syntax
The minimum number of peers required before starting fast synchronization. The default is 5.
Note
If synchronizing in FAST
mode, most historical world state data is unavailable. Any methods attempting to access unavailable world state data return null
.
genesis-file
genesis-file
Use the genesis file to create a custom network.
Tip
To use a public Ethereum network such as Rinkeby, use the --network
option. The network option defines the genesis file for public networks.
Syntax
The path to the genesis file.
Important
You cannot use the --genesis-file
and --network
options at the same time.
graphql-http-cors-origins
graphql-http-cors-origins
Syntax
A list of comma-separated origin domain URLs for CORS validation. The default is none.
graphql-http-enabled
graphql-http-enabled
Syntax
Enables or disables the GraphQL HTTP service. The default is false
.
The default GraphQL HTTP service endpoint is http://127.0.0.1:8547/graphql
if set to true
.
graphql-http-host
graphql-http-host
Syntax
The host on which GraphQL HTTP listens. The default is 127.0.0.1
.
To allow remote connections, set to 0.0.0.0
.
graphql-http-port
graphql-http-port
Syntax
The port (TCP) on which GraphQL HTTP listens. The default is 8547
. Ports must be exposed appropriately.
help
help
Syntax
Show the help message and exit.
host-allowlist
host-allowlist
Syntax
A comma-separated list of hostnames to access the JSON-RPC API and pull Besu metrics. By default, Besu accepts requests from localhost
and 127.0.0.1
.
Note
If using Prometheus to pull metrics from a node, you must specify all the other nodes you want to pull metrics from in the list of allowed hostnames.
logging
logging
Syntax
Sets logging verbosity. Log levels are OFF
, FATAL
, ERROR
, WARN
, INFO
, DEBUG
, TRACE
, ALL
. The default is INFO
.
max-peers
max-peers
Syntax
The maximum number of P2P connections you can establish. The default is 25.
metrics-category
metrics-category
Syntax
A comma-separated list of categories for which to track metrics. The defaults are BLOCKCHAIN
, ETHEREUM
, EXECUTORS
, JVM
, NETWORK
, PEERS
, PERMISSIONING
, PROCESS
, PRUNER
, RPC
, STRATUM
, SYNCHRONIZER
, and TRANSACTION_POOL
.
Other categories are KVSTORE_ROCKSDB
, KVSTORE_PRIVATE_ROCKSDB
, KVSTORE_ROCKSDB_STATS
, and KVSTORE_PRIVATE_ROCKSDB_STATS
.
Categories containing PRIVATE
track metrics when you enable private transactions.
metrics-enabled
metrics-enabled
Syntax
Enables or disables the metrics exporter. The default is false
.
You can’t specify --metrics-enabled
with --metrics-push-enabled
. That is, you can enable either Prometheus polling or Prometheus push gateway support, but not both at once.
metrics-host
metrics-host
Syntax
The host on which Prometheus accesses Besu metrics. The metrics server respects the --host-allowlist
option.
The default is 127.0.0.1
.
metrics-port
metrics-port
Syntax
The port (TCP) on which Prometheus accesses Besu metrics. The default is 9545
. Ports must be exposed appropriately.
metrics-protocol
metrics-protocol
Syntax
Metrics protocol to use: PROMETHEUS
, OPENTELEMETRY
, or NONE
. The default is PROMETHEUS
.
metrics-push-enabled
metrics-push-enabled
Syntax
Enables or disables push gateway integration.
You can’t specify --metrics-push-enabled
with --metrics-enabled
. That is, you can enable either Prometheus polling or Prometheus push gateway support, but not both at once.
metrics-push-host
metrics-push-host
Syntax
The host of the Prometheus Push Gateway. The default is 127.0.0.1
. The metrics server respects the --host-allowlist
option.
Note
When pushing metrics, ensure you set --metrics-push-host
to the machine on which the push gateway is. Generally, this is a different machine to the machine on which Besu is running.
metrics-push-interval
metrics-push-interval
Syntax
The interval, in seconds, to push metrics when in push
mode. The default is 15.
metrics-push-port
metrics-push-port
Syntax
The port (TCP) of the Prometheus Push Gateway. The default is 9001
. Ports must be exposed appropriately.
miner-coinbase
miner-coinbase
Syntax
The account you pay mining rewards to. You must specify a valid coinbase when you enable mining using the --miner-enabled
option or the miner_start
JSON-RPC API method.
miner-enabled
miner-enabled
Syntax
Enables or disables mining when you start the node. The default is false
.
miner-extra-data
miner-extra-data
Syntax
A hex string representing the 32 bytes included in the extra data field of a mined block. The default is 0x.
miner-stratum-enabled
miner-stratum-enabled
Syntax
Enables a node to perform stratum mining. The default is false
.
miner-stratum-host
miner-stratum-host
Syntax
The host of the stratum mining service. The default is 0.0.0.0
.
miner-stratum-port
miner-stratum-port
Syntax
The port of the stratum mining service. The default is 8008
. You must expose ports appropriately.
min-gas-price
min-gas-price
Syntax
The minimum price a transaction offers to include it in a mined block. The minimum gas price is the lowest value eth_gasPrice
can return. The default is 1000 Wei.
Important
In a free gas network, ensure the minimum gas price is set to zero for every node. Any node with a minimum gas price set higher than zero will silently drop transactions with a zero gas price. You can query a node’s gas configuration using eth_gasPrice
.
nat-method
nat-method
Syntax
Specify the method for handling NAT environments. The options are:
UPNP
UPNPP2PONLY
KUBERNETES
DOCKER
AUTO
NONE
.
The default is AUTO
. NONE
disables NAT functionality.
Tip
UPnP support is often disabled by default in networking firmware. If disabled by default, explicitly enable UPnP support.
You must specify DOCKER
when using the Besu Docker image.
network-id
network-id
Syntax
The P2P network identifier.
Use this option to override the default network ID. The default value is the same as the chain ID defined in the genesis file.
node-private-key-file
node-private-key-file
Syntax
The private key file for the node. The default is the key file in the data directory. If no key file exists, Besu creates a key file containing the generated private key, otherwise, the existing key file specifies the node private key.
Attention
The private key is not encrypted.
This option is ignored if --security-module
is set to a non-default value.
p2p-enabled
p2p-enabled
Syntax
Enables or disables all P2P communication. The default is true
.
p2p-host
p2p-host
Syntax
The advertised host that can be used to access the node from outside the network in P2P communication. The default is 127.0.0.1
.
Info
If --nat-method
is set to NONE
, --p2p-host
is not overridden and must be specified for the node to be accessed from outside the network.
p2p-interface
p2p-interface
Syntax
The network interface on which the node listens for P2P communication. Use the option to specify the required network interface when the device that Besu is running on has multiple network interfaces. The default is 0.0.0.0 (all interfaces).
p2p-port
p2p-port
Syntax
The P2P listening ports (UDP and TCP). The default is 30303
. You must expose ports appropriately.
pruning-block-confirmations
pruning-block-confirmations
Syntax
The minimum number of confirmations on a block before marking of newly-stored or in-use state trie nodes that cannot be pruned. The default is 10.
Important
Using pruning with private transactions is not supported.
pruning-blocks-retained
pruning-blocks-retained
Syntax
The minimum number of recent blocks to keep the entire world state for. The default is 1024.
pruning-enabled
pruning-enabled
Syntax
Enables pruning to reduce storage required for the world state. The default is false
.
random-peer-priority-enabled
random-peer-priority-enabled
Syntax
Enables or disables random prioritisation of incoming connections. Enable in small, stable networks to prevent closed groups of peers forming. The default is false
.
remote-connections-limit-enabled
remote-connections-limit-enabled
Syntax
Enables or disables using the --remote-connections-max-percentage
option to limit the percentage of remote P2P connections initiated by peers. The default is true
.
Important
To prevent eclipse attacks, ensure you enable the remote connections limit when connecting to any public network, and especially when using --sync-mode
and --fast-sync-min-peers
.
remote-connections-max-percentage
remote-connections-max-percentage
Syntax
The percentage of remote P2P connections you can establish with the node. Must be between 0 and 100, inclusive. The default is 60.
required-block
required-block
Syntax
Requires a peer with the specified block number to have the specified hash when connecting, or Besu rejects that peer.
revert-reason-enabled
revert-reason-enabled
Syntax
Enables or disables including the revert reason in the transaction receipt, eth_estimateGas
error response, eth_call
error response, and trace
response. The default is false
.
Caution
Enabling revert reason may use a significant amount of memory.
rpc-http-api
rpc-http-api
Syntax
A comma-separated list of APIs to enable on the HTTP JSON-RPC channel. When you use this option you must also specify the --rpc-http-enabled
option. The available API options are: ADMIN
, CLIQUE
, DEBUG
, EEA
, ETH
, IBFT
, MINER
, NET
, PERM
, PLUGINS
, PRIV
, QBFT
, TRACE
, TXPOOL
, and WEB3
. The default is: ETH
, NET
, WEB3
.
Tip
The singular --rpc-http-api
and plural --rpc-http-apis
are available and are two names for the same option.
rpc-http-authentication-credentials-file
rpc-http-authentication-credentials-file
Syntax
The credentials file for JSON-RPC API authentication.
rpc-http-authentication-enabled
rpc-http-authentication-enabled
Syntax
Enables or disables authentication for the HTTP JSON-RPC service.
rpc-http-cors-origins
rpc-http-cors-origins
Syntax
A list of domain URLs for CORS validation.
Listed domains can access the node using JSON-RPC. If your client interacts with Besu using a browser app (such as Remix or a block explorer), add the client domain to the list.
The default value is "none"
. If you do not list any domains, browser apps cannot interact with your QI node.
rpc-http-enabled
rpc-http-enabled
Syntax
Enables or disables the HTTP JSON-RPC service. The default is false
.
rpc-http-host
rpc-http-host
Syntax
The host on which HTTP JSON-RPC listens. The default is 127.0.0.1
.
To allow remote connections, set to 0.0.0.0
.
Caution
Setting the host to 0.0.0.0
exposes the RPC connection on your node to any remote connection. In a production environment, ensure you are using a firewall to avoid exposing your node to the internet.
rpc-http-max-active-connections
rpc-http-max-active-connections
Syntax
The maximum number of allowed HTTP JSON-RPC connections. Once this limit is reached, incoming connections are rejected. The default is 80.
rpc-http-port
rpc-http-port
Syntax
The port (TCP) on which HTTP JSON-RPC listens. The default is 8545
. You must expose ports appropriately.
rpc-http-tls-ca-clients-enabled
rpc-http-tls-ca-clients-enabled
Syntax
Enables or disables clients with trusted CA certificates to connect. The default is false
.
Note
You must enable client authentication using the ---rpc-http-tls-client-auth-enabled
option.
rpc-http-tls-enabled
rpc-http-tls-enabled
Syntax
Enables or disables TLS for the JSON-RPC HTTP service. The default is false
.
Note
--rpc-http-enabled
must be enabled.
rpc-http-tls-keystore-file
rpc-http-tls-keystore-file
Syntax
The Keystore file (in PKCS #12 format) that contains private key and the certificate presented to the client during authentication.
rpc-http-tls-keystore-password-file
rpc-http-tls-keystore-password-file
Syntax
The path to the file containing the password to decrypt the keystore.
rpc-http-tls-protocol
rpc-http-tls-protocol
Syntax
A list of comma-separated TLS protocols to support. The default is DEFAULT_TLS_PROTOCOLS
, a list which includes TLSv1.3
and TLSv1.2
.
Tip
The singular --rpc-http-tls-protocol
and plural --rpc-http-tls-protocols
are available and are two names for the same option.
rpc-tx-feecap
rpc-tx-feecap
Syntax
The maximum transaction fee (in Wei) accepted for transactions submitted through the eth_sendRawTransaction
RPC. The default is 1000000000000000000 (1 ether).
If set to 0, then this option is ignored and no cap is applied.
rpc-ws-api
rpc-ws-api
Syntax
A comma-separated list of APIs to enable on the WebSockets channel. When you use this option you must also specify the --rpc-ws-enabled
option. The available API options are: ADMIN
, CLIQUE
, DEBUG
, EEA
, ETH
, IBFT
, MINER
, NET
, PERM
, PLUGINS
, PRIV
, QBFT
, TRACE
, TXPOOL
, and WEB3
. The default is: ETH
, NET
, WEB3
.
Tip
The singular --rpc-ws-api
and plural --rpc-ws-apis
options are available and are two names for the same option.
rpc-ws-enabled
rpc-ws-enabled
Syntax
Enables or disables the WebSocket JSON-RPC service. The default is false
.
rpc-ws-host
rpc-ws-host
Syntax
The host on which WebSocket JSON-RPC listens. The default is 127.0.0.1
.
To allow remote connections, set to 0.0.0.0
rpc-ws-max-active-connections
rpc-ws-max-active-connections
Syntax
The maximum number of WebSocket connections allowed for JSON-RPC. Once this limit is reached, incoming connections are rejected. The default is 80.
rpc-ws-max-frame-size
rpc-ws-max-frame-size
Syntax
The maximum size in bytes for JSON-RPC WebSocket frames. If this limit is exceeded, the WebSocket disconnects. The default is 1048576 (or 1 MB).
rpc-ws-port
rpc-ws-port
Syntax
The port (TCP) on which WebSocket JSON-RPC listens. The default is 8546
. You must expose ports appropriately.
strict-tx-replay-protection-enabled
strict-tx-replay-protection-enabled
Syntax
Enables or disables replay protection, in accordance with EIP-155, on transactions submitted using JSON-RPC. The default is false
.
sync-mode
sync-mode
Syntax
The synchronization mode. Use FAST
for fast sync, FULL
for full sync, X_SNAP
for snap sync, and X_CHECKPOINT
for checkpoint sync.
The default is
FULL
when connecting to a private network by not using the--network
option and specifying the--genesis-file
option.The default is
FAST
when using the--network
option with named networks.
version
version
Syntax
Prints version information and exit.
Last updated