Skip to main content

Command line options

This reference describes the syntax of the Hyperledger Besu command line interface (CLI) options.

info

This reference contains options that apply to both public and private networks. For private-network-specific options, see the private network options reference.

Specify options

You can specify Besu options:

  • On the command line.

    besu [OPTIONS] [SUBCOMMAND]
  • 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 the BESU_MINER_COINBASE environment variable.

  • In a configuration file.

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.

besu --Tab+Tab
caution

Characters such as smart quotes and long (em) hyphens don't work in Besu command line options. Ensure quotes aren't automatically converted to smart quotes, or double hyphens combined into em hyphens.

Options

api-gas-price-blocks

Syntax

--api-gas-price-blocks=<INTEGER>

Example

--api-gas-price-blocks=50

Environment variable

BESU_API_GAS_PRICE_BLOCKS=50

Example configuration file

api-gas-price-blocks=50

Number of blocks back from the head block to examine for eth_gasPrice. The default is 100.

api-gas-price-max

Syntax

--api-gas-price-max=<INTEGER>

Example

--api-gas-price-max=20000

Environment variable

BESU_API_GAS_PRICE_MAX=20000

Example configuration file

api-gas-price-max=20000

Maximum gas price to return for eth_gasPrice, regardless of the percentile value measured. The default is 500000000000 (500 GWei).

api-gas-price-percentile

Syntax

--api-gas-price-percentile=<DOUBLE>

Example

--api-gas-price-percentile=75

Environment variable

BESU_API_GAS_PRICE_PERCENTILE=75

Example configuration file

api-gas-price-percentile=75

Percentile value to measure for eth_gasPrice. The default is 50.0.

For eth_gasPrice, to return the:

auto-log-bloom-caching-enabled

Syntax

--auto-log-bloom-caching-enabled[=<true|false>]

Example

--auto-log-bloom-caching-enabled=false

Environment variable

BESU_AUTO_LOG_BLOOM_CACHING_ENABLED=false

Example configuration file

auto-log-bloom-caching-enabled=false

Enables or disables automatic log bloom caching. APIs such as eth_getLogs and eth_getFilterLogs use the cache for improved performance. The default is true.

If automatic log bloom caching is enabled and a log bloom query reaches the end of the cache, Besu performs an uncached query for logs not yet written to the cache.

Automatic log bloom caching has a small impact on performance. If you are not querying logs blooms for a large number of blocks, you might want to disable automatic log bloom caching.

banned-node-ids

Syntax

--banned-node-ids=<bannedNodeId>[,<bannedNodeId>...]...

Example

--banned-node-ids=0xc35c3...d615f,0xf42c13...fc456

Environment variable

BESU_BANNED_NODE_IDS=0xc35c3...d615f,0xf42c13...fc456

Configuration file

banned-node-ids=["0xc35c3...d615f","0xf42c13...fc456"]

A list of node IDs with which this node will not peer. The node ID is the public key of the node. You can specify the banned node IDs with or without the 0x prefix.

tip

The singular --banned-node-id and plural --banned-node-ids are available and are two names for the same option.

bonsai-historical-block-limit

Syntax

--bonsai-historical-block-limit=256

Example

--bonsai-historical-block-limit=256

Environment variable

BESU_BONSAI_MAXIMUM_BACK_LAYERS_TO_LOAD=256

Example configuration file

bonsai-historical-block-limit=256

When using Bonsai Tries, the maximum number of previous blocks for which Bonsai can reconstruct a historical state. The default is 512.

bootnodes

Syntax

--bootnodes[=<enode://id@host:port>[,<enode://id@host:port>...]...]

Example

--bootnodes=enode://c35c3...d615f@1.2.3.4:30303,enode://f42c13...fc456@1.2.3.5:30303

Environment variable

BESU_BOOTNODES=enode://c35c3...d615f@1.2.3.4:30303,enode://f42c13...fc456@1.2.3.5:30303

Example configuration file

bootnodes=["enode://c35c3...d615f@1.2.3.4:30303","enode://f42c13...fc456@1.2.3.5:30303"]

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

Syntax

--color-enabled[=<true|false>]

Example

--color-enabled=false

Environment variable

BESU_COLOR_ENABLED=false

Example configuration file

color-enabled=false

Enables or disables color output to console. The default is true.

compatibility-eth64-forkid-enabled

Syntax

--compatibility-eth64-forkid-enabled[=<true|false>]

Example

--compatibility-eth64-forkid-enabled=true

Environment variable

BESU_COMPATIBILITY_ETH64_FORKID_ENABLED=true

Example configuration file

compatibility-eth64-forkid-enabled=true

Enables or disables the legacy Eth/64 fork ID. For any networks with nodes using Besu v1.4 or earlier and nodes using Besu v20.10.1 or later, either:

  • All nodes must be upgraded to v20.10.1 or later.
  • All nodes using v20.10.1 or later must have --compatibility-eth64-forkid-enabled set to true.

The default is false.

caution

If networks have Besu nodes using v1.4 or earlier and other Besu nodes using v20.10.1 or later, the nodes on different versions cannot communicate unless --compatibility-eth64-forkid-enabled is set to true.

config-file

Syntax

--config-file=<FILE>

Example

--config-file=/home/me/me_node/config.toml

Environment variable

BESU_CONFIG_FILE=/home/me/me_node/config.toml

The path to the TOML configuration file. The default is none.

data-path

Syntax

--data-path=<PATH>

Example

--data-path=/home/me/me_node

Environment variable

BESU_DATA_PATH=/home/me/me_node

Configuration file

data-path="/home/me/me_node"

The path to the Besu data directory. The default is the directory you installed Besu in, or /opt/besu/database if using the Besu Docker image.

data-storage-format

Syntax

--data-storage-format=<FORMAT>

Example

--data-storage-format=BONSAI

Environment variable

BESU_DATA_STORAGE_FORMAT=BONSAI

Configuration file

data-storage-format="BONSAI"

The data storage format to use. Set to BONSAI for Bonsai Tries or FOREST for Forest of Tries. The default is FOREST.

discovery-dns-url

Syntax

--discovery-dns-url=<enrtree URL>

Environment variable

BESU_DISCOVERY_DNS_URL=enrtree://AM5FCQLWIZX2QFPNJAP7VUERCCRNGRHWZG3YYHIUV7BVDQ5FDPRT2@nodes.example.org

Example configuration file

discovery-dns-url="enrtree://AM5FCQLWIZX2QFPNJAP7VUERCCRNGRHWZG3YYHIUV7BVDQ5FDPRT2@nodes.example.org"

The enrtree URL of the DNS node list for node discovery via DNS. The default is null.

discovery-enabled

Syntax

--discovery-enabled[=<true|false>]

Example

--discovery-enabled=false

Environment variable

BESU_DISCOVERY_ENABLED=false

Example configuration file

discovery-enabled=false

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 early access option --Xp2p-dns-discovery-server=<HOST>.

engine-host-allowlist

Syntax

--engine-host-allowlist=<hostname>[,<hostname>...]... or "*"

Example

--engine-host-allowlist=localhost,127.0.0.1

Environment variable

BESU_ENGINE_HOST_ALLOWLIST=localhost,127.0.0.1

Configuration file

engine-host-allowlist=["localhost","127.0.0.1"]

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-jwt-disabled

Syntax

--engine-jwt-disabled[=<true|false>]

Example

--engine-jwt-disabled=true

Environment variable

BESU_ENGINE_JWT_DISABLED=true

Configuration file

engine-jwt-disabled=true

Disables or enables authentication for Engine APIs. The default is false (authentication is enabled by default).

engine-jwt-secret

Syntax

--engine-jwt-secret=<FILE>

Example

--engine-jwt-secret=jwt.hex

Environment variable

BESU_ENGINE_JWT_SECRET="jwt.hex"

Configuration file

engine-jwt-secret="jwt.hex"

Shared secret used to authenticate consensus clients when using the Engine JSON-RPC API (both HTTP and WebSocket). Contents of file must be at least 32 hex-encoded bytes and not begin with 0x. May be a relative or absolute path. See an example of how to generate this.

engine-rpc-enabled

Syntax

--engine-rpc-enabled[=<true|false]>

Example

--engine-rpc-enabled

Environment variable

BESU_ENGINE_RPC_ENABLED=true

Configuration file

engine-rpc-enabled=true

Enables or disables the Engine API. The default is true.

engine-rpc-port

Syntax

--engine-rpc-port=<PORT>

Example

--engine-rpc-port=8551

Environment variable

BESU_ENGINE_RPC_PORT=8551

Configuration file

engine-rpc-port="8551"

The listening port for the Engine API calls (ENGINE, ETH) for JSON-RPC over HTTP and WebSocket. The default is 8551.

ethstats

Syntax

--ethstats=<[ws://|wss://]nodename:secret@host:[port]>

Example

--ethstats=Dev-Node-1:secret@127.0.0.1:3001

Environment variable

BESU_ETHSTATS=Dev-Node-1:secret@127.0.0.1:3001

Configuration file

ethstats="Dev-Node-1:secret@127.0.0.1:3001"

Reporting URL of an Ethstats server. If specified without a port, the default port is 443 for SSL connections and 80 for non-SSL connections.

You can optionally specify ws:// or wss:// in the Ethstats URL. If you specify this scheme, the connection doesn't need to switch from SSL to non-SSL on each retry logic.

ethstats-cacert-file

Syntax

--ethstats-cacert-file=<FILE>

Example

--ethstats-cacert-file=./root.cert

Environment variable

BESU_ETHSTATS_CACERT_FILE=./root.cert

Configuration file

ethstats-cacert-file="./root.cert"

Path to the root certificate authority (CA) certificate file of the Ethstats server specified by --ethstats. This option is useful in non-production environments.

ethstats-contact

Syntax

--ethstats-contact=<CONTACT>

Example

--ethstats-contact=contact@mail.com

Environment variable

BESU_ETHSTATS_CONTACT=contact@mail.com

Configuration file

ethstats-contact="contact@mail.com"

Contact email address to send to the Ethstats server specified by --ethstats.

fast-sync-min-peers

Syntax

--fast-sync-min-peers=<INTEGER>

Example

--fast-sync-min-peers=8

Environment variable

BESU_FAST_SYNC_MIN_PEERS=8

Example configuration file

fast-sync-min-peers=8

The minimum number of peers required before starting fast synchronization in proof of work networks. The default is 5.

info

This option only applies to proof of work networks.

genesis-file

Syntax

--genesis-file=<FILE>

Example

--genesis-file=/home/me/me_node/customGenesisFile.json

Environment variable

BESU_GENESIS_FILE=/home/me/me_node/customGenesisFile.json

Configuration file

genesis-file="/home/me/me_node/customGenesisFile.json"

The path to the genesis file.

caution

You can't use the --genesis-file and --network options at the same time.

graphql-http-cors-origins

Syntax

--graphql-http-cors-origins=<graphQLHttpCorsAllowedOrigins>

Example

--graphql-http-cors-origins="http://medomain.com","https://meotherdomain.com"

Environment variable

BESU_GRAPHQL_HTTP_CORS_ORIGINS="http://medomain.com","https://meotherdomain.com"

Configuration file

graphql-http-cors-origins=["http://medomain.com","https://meotherdomain.com"]

A list of comma-separated origin domain URLs for CORS validation. The default is none.

graphql-http-enabled

Syntax

--graphql-http-enabled[=<true|false>]

Example

--graphql-http-enabled

Environment variable

BESU_GRAPHQL_HTTP_ENABLED=true

Configuration file

graphql-http-enabled=true

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

Syntax

--graphql-http-host=<HOST>

Example

# to listen on all interfaces
--graphql-http-host=0.0.0.0

Environment variable

# to listen on all interfaces
BESU_GRAPHQL_HTTP_HOST=0.0.0.0

Configuration file

graphql-http-host="0.0.0.0"

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

Syntax

--graphql-http-port=<PORT>

Example

# to listen on port 6175
--graphql-http-port=6175

Environment variable

# to listen on port 6175
BESU_GRAPHQL_HTTP_PORT=6175

Configuration file

graphql-http-port="6175"

The port (TCP) on which GraphQL HTTP listens. The default is 8547. Ports must be exposed appropriately.

help

Syntax

-h, --help

Show the help message and exit.

host-allowlist

Syntax

--host-allowlist=<hostname>[,<hostname>...]... or "*"

Example

--host-allowlist=medomain.com,meotherdomain.com

Environment variable

BESU_HOST_ALLOWLIST=medomain.com,meotherdomain.com

Configuration file

host-allowlist=["medomain.com", "meotherdomain.com"]

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.

info

This isn't a permissioning feature. To restrict access to the API, we recommend using the Besu authentication mechanism with username and password authentication or JWT public key authentication.

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.

tip

To allow all hostnames, use "*". We don't recommend allowing all hostnames for production environments.

identity

Syntax

--identity=<String>

Example

--identity=MyNode

Environment variable

BESU_IDENTITY=MyNode

Configuration file

identity="MyNode"

The name for the node. If specified, it's the second section of the client ID provided by some Ethereum network explorers. For example, in the client ID besu/MyNode/v1.3.4/linux-x86_64/oracle_openjdk-java-11, the node name is MyNode.

If a name is not specified, the name section is not included in the client ID. For example, besu/v1.3.4/linux-x86_64/oracle_openjdk-java-11.

json-pretty-print-enabled

Syntax

--json-pretty-print-enabled[=<true|false>]

Example

--json-pretty-print-enabled=true

Environment variable

BESU_JSON_PRETTY_PRINT_ENABLED=true

Configuration file

json-pretty-print-enabled=true

Enables or disables the pretty-print output for HTTP and WebSocket responses. The default is false.

key-value-storage

Syntax

--key-value-storage=<keyValueStorageName>

Example

--key-value-storage=rocksdb

Environment variable

BESU_KEY_VALUE_STORAGE=rocksdb

Configuration file

key-value-storage="rocksdb"

The key-value storage to use. Use this option only if using a storage system provided with a plugin. The default is rocksdb.

For development use only, the memory option provides ephemeral storage for sync testing and debugging.

logging

Syntax

-l, --logging=<LEVEL>

Example

--logging=DEBUG

Environment variable

BESU_LOGGING=DEBUG

Example configuration file

logging="DEBUG"

Sets logging verbosity. Log levels are OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE, ALL. The default is INFO.

max-peers

Syntax

--max-peers=<INTEGER>

Example

--max-peers=42

Environment variable

BESU_MAX_PEERS=42

Configuration file

max-peers=42

The maximum number of P2P connections you can establish. The default is 25.

caution

The minimum number of peers is set by the early access option --Xp2p-peer-lower-bound, which also has a default of 25. If you reduce the --max-peers from the default, you must also set the --Xp2p-peer-lower-bound option to the same value or lower. For example, if you decrease --max-peers to 20, set --Xp2p-peer-lower-bound to 20 or lower.

metrics-category

Syntax

--metrics-category=<metrics-category>[,metrics-category...]...

Example

--metrics-category=BLOCKCHAIN,PEERS,PROCESS

Environment variable

BESU_METRICS_CATEGORY=BLOCKCHAIN,PEERS,PROCESS

Configuration file

metrics-category=["BLOCKCHAIN","PEERS","PROCESS"]

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

Syntax

--metrics-enabled[=<true|false>]

Example

--metrics-enabled

Environment variable

BESU_METRICS_ENABLED=true

Configuration file

metrics-enabled=true

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

Syntax

--metrics-host=<HOST>

Example

--metrics-host=127.0.0.1

Environment variable

BESU_METRICS_HOST=127.0.0.1

Configuration file

metrics-host="127.0.0.1"

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

Syntax

--metrics-port=<PORT>

Example

--metrics-port=6174

Environment variable

BESU_METRICS_PORT=6174

Configuration file

metrics-port="6174"

The port (TCP) on which Prometheus accesses Besu metrics. The default is 9545. Ports must be exposed appropriately.

metrics-protocol

Syntax

--metrics-protocol=<metrics-protocol>

Example

--metrics-protocol=OPENTELEMETRY

Environment variable

BESU_METRICS_PROTOCOL=OPENTELEMETRY

Configuration file

metrics-protocol="OPENTELEMETRY"

Metrics protocol to use: PROMETHEUS, OPENTELEMETRY, or NONE. The default is PROMETHEUS.

metrics-push-enabled

Syntax

--metrics-push-enabled[=<true|false>]

Example

--metrics-push-enabled=true

Environment variable

BESU_METRICS_PUSH_ENABLED=true

Configuration file

metrics-push-enabled=true

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

Syntax

--metrics-push-host=<HOST>

Example

--metrics-push-host=127.0.0.1

Environment variable

BESU_METRICS_PUSH_HOST=127.0.0.1

Configuration file

metrics-push-host="127.0.0.1"

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

Syntax

--metrics-push-interval=<INTEGER>

Example

--metrics-push-interval=30

Environment variable

BESU_METRICS_PUSH_INTERVAL=30

Configuration file

metrics-push-interval=30

The interval, in seconds, to push metrics when in push mode. The default is 15.

metrics-push-port

Syntax

--metrics-push-port=<PORT>

Example

--metrics-push-port=6174

Environment variable

BESU_METRICS_PUSH_PORT=6174

Configuration file

metrics-push-port="6174"

The port (TCP) of the Prometheus Push Gateway. The default is 9001. Ports must be exposed appropriately.

metrics-push-prometheus-job

Syntax

--metrics-push-prometheus-job=<metricsPrometheusJob>

Example

--metrics-push-prometheus-job="my-custom-job"

Environment variable

BESU_METRICS_PUSH_PROMETHEUS_JOB="my-custom-job"

Configuration file

metrics-push-prometheus-job="my-custom-job"

The job name when in push mode. The default is besu-client.

min-block-occupancy-ratio

Syntax

--min-block-occupancy-ratio=<minBlockOccupancyRatio>

Example

--min-block-occupancy-ratio=0.5

Environment variable

BESU_MIN_BLOCK_OCCUPANCY_RATIO=0.5

Configuration file

min-block-occupancy-ratio="0.5"

Minimum occupancy ratio for a mined block if the transaction pool is not empty. When filling a block during mining, the occupancy ratio indicates the threshold at which the node stops waiting for smaller transactions to fill the remaining space. The default is 0.8.

note

Besu ignores the --min-block-occupancy-ratio option for proof of stake networks (for example, Mainnet).

miner-coinbase

Syntax

--miner-coinbase=<Ethereum account address>

Example

--miner-coinbase=fe3b557e8fb62b89f4916b721be55ceb828dbd73

Environment variable

BESU_MINER_COINBASE=fe3b557e8fb62b89f4916b721be55ceb828dbd73

Configuration file

miner-coinbase="0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"

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.

note

Besu ignores this option in networks using Clique, IBFT 2.0, or QBFT consensus protocols.

miner-enabled

Syntax

--miner-enabled[=<true|false>]

Example

--miner-enabled=true

Environment variable

BESU_MINER_ENABLED=true

Configuration file

miner-enabled=true

Enables or disables mining when you start the node. The default is false.

miner-extra-data

Syntax

--miner-extra-data=<Extra data>

Example

--miner-extra-data=0x444F4E27542050414E4943202120484F444C2C20484F444C2C20484F444C2021

Environment variable

BESU_MINER_EXTRA_DATA=0x444F4E27542050414E4943202120484F444C2C20484F444C2C20484F444C2021

Configuration file

miner-extra-data="0x444F4E27542050414E4943202120484F444C2C20484F444C2C20484F444C2021"

A hex string representing the 32 bytes included in the extra data field of a mined block. The default is 0x.

miner-stratum-enabled

Syntax

--miner-stratum-enabled

Environment variable

BESU_MINER_STRATUM_ENABLED=true

Configuration file

miner-stratum-enabled=true

Enables a node to perform stratum mining. The default is false.

miner-stratum-host

Syntax

--miner-stratum-host=<HOST>

Example

--miner-stratum-host=192.168.1.132

Environment variable

BESU_MINER_STRATUM_HOST=192.168.1.132

Configuration file

miner-stratum-host="192.168.1.132"

The host of the stratum mining service. The default is 0.0.0.0.

miner-stratum-port

Syntax

--miner-stratum-port=<PORT>

Example

--miner-stratum-port=8010

Environment variable

BESU_MINER_STRATUM_PORT=8010

Configuration file

miner-stratum-port="8010"

The port of the stratum mining service. The default is 8008. You must expose ports appropriately.

min-gas-price

Syntax

--min-gas-price=<minTransactionGasPrice>

Example

--min-gas-price=1337

Environment variable

BESU_MIN_GAS_PRICE=1337

Configuration file

min-gas-price=1337

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.

tip

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

Syntax

--nat-method=UPNP

Example configuration file

nat-method="UPNP"

Specify the method for handling NAT environments. The options are:

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.

tip

Use UPNPP2PONLY if you wish to enable UPnP for p2p traffic but not JSON-RPC.

note

Specifying UPNP might introduce delays during node startup, especially on networks without a UPnP gateway device.

You must specify DOCKER when using the Besu Docker image.

network

Syntax

--network=<NETWORK>

Example

--network=goerli

Environment variable

BESU_NETWORK=goerli

Configuration file

network="goerli"

The predefined network configuration. The default is mainnet.

Possible values are:

NetworkChainTypeDefault Sync ModeDescription
mainnetETHProductionFASTThe main network
goerliETHTestFASTA PoS network
holeskyETHTestFASTA PoS network
sepoliaETHTestFASTA PoS network
devETHDevelopmentFULLA PoW network with a low difficulty to enable local CPU mining
classicETCProductionFASTThe main Ethereum Classic network
mordor ETCTestFASTA PoW network
tip

Values are case insensitive, so either mainnet or MAINNET works.

info
  • You can't use the --network and --genesis-file options at the same time.

  • The Ropsten, Rinkeby, and Kiln testnets are deprecated.

network-id

Syntax

--network-id=<INTEGER>

Example

--network-id=8675309

Environment variable

BESU_NETWORK_ID=8675309

Configuration file

network-id="8675309"

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

Syntax

--node-private-key-file=<FILE>

Example

--node-private-key-file=/home/me/me_node/myPrivateKey

Environment variable

BESU_NODE_PRIVATE_KEY_FILE=/home/me/me_node/myPrivateKey

Configuration file

node-private-key-file="/home/me/me_node/myPrivateKey"

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.

danger

The private key is not encrypted.

This option is ignored if --security-module is set to a non-default value.

p2p-enabled

Syntax

--p2p-enabled[=<true|false>]

Example

--p2p-enabled=false

Environment variable

BESU_P2P_ENABLED=false

Configuration file

p2p-enabled=false

Enables or disables all P2P communication. The default is true.

p2p-host

Syntax

--p2p-host=<HOST>

Example

# to listen on all interfaces
--p2p-host=0.0.0.0

Environment variable

# to listen on all interfaces
BESU_P2P_HOST=0.0.0.0

Configuration file

p2p-host="0.0.0.0"

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

Syntax

--p2p-interface=<HOST>

Example

--p2p-interface=192.168.1.132

Environment variable

BESU_P2P_INTERFACE=192.168.1.132

Configuration file

p2p-interface="192.168.1.132"

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

Syntax

--p2p-port=<PORT>

Example

# to listen on port 1789
--p2p-port=1789

Environment variable

# to listen on port 1789
BESU_P2P_PORT=1789

Configuration file

p2p-port="1789"

The P2P listening ports (UDP and TCP). The default is 30303. You must expose ports appropriately.

pruning-block-confirmations

Syntax

--pruning-block-confirmations=<INTEGER>

Example

--pruning-block-confirmations=5

Environment variable

BESU_PRUNING_BLOCK_CONFIRMATIONS=5

Configuration file

pruning-block-confirmations=5

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.

info

Using pruning with private transactions is not supported.

pruning-blocks-retained

Syntax

--pruning-blocks-retained=<INTEGER>

Example

--pruning-blocks-retained=10000

Environment variable

BESU_PRUNING_BLOCKS_RETAINED=10000

Configuration file

pruning-blocks-retained=10000

The minimum number of recent blocks to keep the entire world state for. The default is 1024.

info

Using pruning with private transactions isn't supported.

pruning-enabled

Syntax

--pruning-enabled

Example

--pruning-enabled=true

Environment variable

BESU_PRUNING_ENABLED=true

Configuration file

pruning-enabled=true

Enables pruning to reduce storage required for the world state. The default is false.

info

Using pruning with private transactions isn't supported.

note

Pruning is being deprecated for Bonsai Tries and is currently not being updated.

random-peer-priority-enabled

Syntax

--random-peer-priority-enabled[=<true|false>]

Example

--random-peer-priority-enabled=true

Environment variable

BESU_RANDOM_PEER_PRIORITY_ENABLED=true

Configuration file

random-peer-priority-enabled=true

Enables or disables random prioritization of incoming connections. Enable in small, stable networks to prevent closed groups of peers forming. The default is false.

remote-connections-limit-enabled

Syntax

--remote-connections-limit-enabled[=<true|false>]

Example

--remote-connections-limit-enabled=false

Environment variable

BESU_REMOTE_CONNECTIONS_LIMIT_ENABLED=false

Configuration file

remote-connections-limit-enabled=false

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.

tip

In private and permissioned networks with a level of trust between peers, disabling the remote connection limits may increase the speed at which nodes can join the network.

danger

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

Syntax

--remote-connections-max-percentage=<DOUBLE>

Example

--remote-connections-max-percentage=25

Environment variable

BESU_REMOTE_CONNECTIONS_MAX_PERCENTAGE=25

Configuration file

remote-connections-max-percentage=25

The percentage of remote P2P connections you can establish with the node. Must be between 0 and 100, inclusive. The default is 60.

reorg-logging-threshold

Syntax

--reorg-logging-threshold=<INTEGER>

Example

--reorg-logging-threshold=3

Environment variable

BESU_REORG_LOGGING_THRESHOLD=3

Configuration file

reorg-logging-threshold=3

Minimum depth of chain reorganizations to log. The default is 6.

required-block

Syntax

--required-block, --required-blocks[=BLOCK=HASH[,BLOCK=HASH...]...]

Example

--required-block=6485846=0x43f0cd1e5b1f9c4d5cda26c240b59ee4f1b510d0a185aa8fd476d091b0097a80

Environment variable

BESU_REQUIRED_BLOCK=6485846=0x43f0cd1e5b1f9c4d5cda26c240b59ee4f1b510d0a185aa8fd476d091b0097a80

Configuration file

required-block=["6485846=0x43f0cd1e5b1f9c4d5cda26c240b59ee4f1b510d0a185aa8fd476d091b0097a80"]

Requires a peer with the specified block number to have the specified hash when connecting, or Besu rejects that peer.

revert-reason-enabled

Syntax

--revert-reason-enabled[=<true|false>]

Example

--revert-reason-enabled=true

Environment variable

BESU_REVERT_REASON_ENABLED=true

Configuration file

revert-reason-enabled=true

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. We don't recommend enabling revert reason when connected to public Ethereum networks.

rpc-http-api

Syntax

--rpc-http-api=<api name>[,<api name>...]...

Example

--rpc-http-api=ETH,NET,WEB3

Environment variable

BESU_RPC_HTTP_API=ETH,NET,WEB3

Configuration file

rpc-http-api=["ETH","NET","WEB3"]

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

Syntax

--rpc-http-authentication-credentials-file=<FILE>

Example

--rpc-http-authentication-credentials-file=/home/me/me_node/auth.toml

Environment variable

BESU_RPC_HTTP_AUTHENTICATION_CREDENTIALS_FILE=/home/me/me_node/auth.toml

Configuration file

rpc-http-authentication-credentials-file="/home/me/me_node/auth.toml"

The credentials file for JSON-RPC API authentication.

rpc-http-authentication-enabled

Syntax

--rpc-http-authentication-enabled[=<true|false>]

Example

--rpc-http-authentication-enabled=true

Environment variable

BESU_RPC_HTTP_AUTHENTICATION_ENABLED=true

Configuration file

rpc-http-authentication-enabled=true

Enables or disables authentication for the HTTP JSON-RPC service.

rpc-http-authentication-jwt-public-key-file

Syntax

--rpc-http-authentication-jwt-public-key-file=<FILE>

Example

--rpc-http-authentication-jwt-public-key-file=publicKey.pem

Environment variable

BESU_RPC_HTTP_AUTHENTICATION_JWT_PUBLIC_KEY_FILE="publicKey.pem"

Configuration file

rpc-http-authentication-jwt-public-key-file="publicKey.pem"

The JWT provider's public key file used for JSON-RPC HTTP authentication with an external JWT.

rpc-http-cors-origins

Syntax

--rpc-http-cors-origins=<url>[,<url>...]... or all or "*"

Example


$# You can allow one or more domains with a comma-separated list.

--rpc-http-cors-origins=http://medomain.com,https://meotherdomain.com

Environment variable

BESU_RPC_HTTP_CORS_ORIGINS=http://medomain.com,https://meotherdomain.com

Configuration file

rpc-http-cors-origins=["http://medomain.com","https://meotherdomain.com"]

Remix example


$# The following allows Remix to interact with your Besu node.

--rpc-http-cors-origins=http://remix.ethereum.org

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 Besu node.

note

To run a local Besu node with MetaMask, set --rpc-http-cors-origins to chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn.

Remember to also include the dapp domain MetaMask interacts with, for example if your app is deployed on Remix and you're using MetaMask to interact with the contract, use --rpc-http-cors-origins=chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn,http://remix.ethereum.org

tip

For testing and development purposes, use "all" or "*" to accept requests from any domain. We don't recommend accepting requests from any domain for production environments.

rpc-http-enabled

Syntax

--rpc-http-enabled[=<true|false>]

Example

--rpc-http-enabled=true

Environment variable

BESU_RPC_HTTP_ENABLED=true

Configuration file

rpc-http-enabled=true

Enables or disables the HTTP JSON-RPC service. The default is false.

rpc-http-host

Syntax

--rpc-http-host=<HOST>

Example

# to listen on all interfaces
--rpc-http-host=0.0.0.0

Environment variable

BESU_RPC_HTTP_HOST=0.0.0.0

Configuration file

rpc-http-host="0.0.0.0"

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

Syntax

--rpc-http-max-active-connections=<INTEGER>

Example

--rpc-http-max-active-connections=100

Environment variable

BESU_RPC_HTTP_MAX_ACTIVE_CONNECTIONS=100

Configuration file

rpc-http-max-active-connections=100

The maximum number of allowed HTTP JSON-RPC connections. Once this limit is reached, incoming connections are rejected. The default is 80.

rpc-http-max-request-content-length

Syntax

--rpc-http-max-request-content-length=<LONG>

Example

--rpc-http-max-request-content-length=2097152

Environment variable

BESU_RPC_HTTP_MAX_REQUEST_CONTENT_LENGTH=2097152

Configuration file

rpc-http-max-request-content-length=2097152

The maximum request content length. Besu only accepts JSON-RPC API requests with a body size less than or equal to this value. The default is 5242880 (5 MB).

rpc-http-max-batch-size

Syntax

--rpc-http-max-batch-size=<INTEGER>

Example

--rpc-http-max-batch-size=1200

Environment variable

BESU_RPC_HTTP_MAX_BATCH_SIZE=1200

Configuration file

rpc-http-max-batch-size=1200

The maximum number of allowed requests in a RPC batch request. The default limit is 1024, and -1 specifies no limit.

rpc-http-port

Syntax

--rpc-http-port=<PORT>

Example

# to listen on port 3435
--rpc-http-port=3435

Environment variable

BESU_RPC_HTTP_PORT=3435

Configuration file

rpc-http-port="3435"

The port (TCP) on which HTTP JSON-RPC listens. The default is 8545. You must expose ports appropriately.

rpc-http-tls-ca-clients-enabled

Syntax

--rpc-http-tls-ca-clients-enabled[=<true|false>]

Example

--rpc-http-tls-ca-clients-enabled=true

Environment variable

BESU_RPC_HTTP_TLS_CA_CLIENTS_ENABLED=true

Configuration file

rpc-http-tls-ca-clients-enabled=true

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-client-auth-enabled

Syntax

--rpc-http-tls-client-auth-enabled[=<true|false>]

Example

--rpc-http-tls-client-auth-enabled=true

Environment variable

BESU_RPC_HTTP_TLS_CLIENT_AUTH_ENABLED=true

Configuration file

rpc-http-tls-client-auth-enabled=true

Enables or disables TLS client authentication for the JSON-RPC HTTP service. The default is false.

rpc-http-tls-cipher-suite

Syntax

--rpc-http-tls-cipher-suite=<cipherSuiteName>[, <cipherSuiteName>...]

Example

--rpc-http-tls-cipher-suite=TLS_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256

Environment variable

BESU_RPC_HTTP_TLS_CIPHER_SUITE=TLS_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256

Configuration file

rpc-http-tls-cipher-suite=["TLS_AES_256_GCM_SHA384","TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"]

A list of comma-separated TLS cipher suites to support.

tip

The singular --rpc-http-tls-cipher-suite and plural --rpc-http-tls-cipher-suites are available and are two names for the same option.

rpc-http-tls-enabled

Syntax

--rpc-http-tls-enabled[=<true|false>]

Example

--rpc-http-tls-enabled=true

Environment variable

BESU_RPC_HTTP_TLS_ENABLED=true

Configuration file

rpc-http-tls-enabled=true

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

Syntax

--rpc-http-tls-keystore-file=<FILE>

Example

--rpc-http-tls-keystore-file=/home/me/me_node/keystore.pfx

Environment variable

BESU_RPC_HTTP_TLS_KEYSTORE_FILE=/home/me/me_node/keystore.pfx

Configuration file

rpc-http-tls-keystore-file="/home/me/me_node/keystore.pfx"

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

Syntax

--rpc-http-tls-keystore-password-file=<FILE>

Example

--rpc-http-tls-keystore-password-file=/home/me/me_node/password

Environment variable

BESU_RPC_HTTP_TLS_KEYSTORE_PASSWORD_FILE=/home/me/me_node/password

Configuration file

rpc-http-tls-keystore-password-file="/home/me/me_node/password"

The path to the file containing the password to decrypt the keystore.

rpc-http-tls-known-clients-file

Syntax

--rpc-http-tls-known-clients-file=<FILE>

Example

--rpc-http-tls-known-clients-file=/home/me/me_node/knownClients

Environment variable

BESU_RPC_HTTP_TLS_KNOWN_CLIENTS_FILE=/home/me/me_node/knownClients

Configuration file

rpc-http-tls-known-clients-file="/home/me/me_node/knownClients"

The path to the file used to authenticate clients using self-signed certificates or non-public certificates.

Must contain the certificate's Common Name, and SHA-256 fingerprint in the format <CommonName> <hex-string>.

note

You must enable client authentication using the --rpc-http-tls-client-auth-enabled option.

rpc-http-tls-protocol

Syntax

--rpc-http-tls-protocol=<protocolName>[, <protocolName>...]

Example

--rpc-http-tls-protocol=TLSv1.3,TLSv1.2

Environment variable

BESU_RPC_HTTP_TLS_PROTOCOL=TLSv1.3,TLSv1.2

Configuration file

rpc-http-tls-protocol=["TLSv1.3","TLSv1.2"]

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-max-logs-range

Syntax

--rpc-max-logs-range=<INTEGER>

Example

--rpc-max-logs-range=500

Environment variable

BESU_RPC_MAX_LOGS_RANGE=500

Configuration file

rpc-max-logs-range=500

When using eth_getLogs, the maximum number of blocks to retrieve logs from. Set to 0 to specify no limit. The default is 5000.

caution

Using eth_getLogs to get logs from a large range of blocks, especially an entire chain from its genesis block, might cause Besu to hang for an indeterminable amount of time while generating the response.

We recommend setting a range limit or leaving this option at its default value.

rpc-tx-feecap

Syntax

--rpc-tx-feecap=<MAX_FEE>

Example

--rpc-tx-feecap=1200000000000000000

Environment variable

BESU_RPC_TX_FEECAP=1200000000000000000

Configuration file

rpc-tx-feecap=1200000000000000000

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

Syntax

--rpc-ws-api=<api name>[,<api name>...]...

Example

--rpc-ws-api=ETH,NET,WEB3

Environment variable

BESU_RPC_WS_API=ETH,NET,WEB3

Configuration file

rpc-ws-api=["ETH","NET","WEB3"]

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-authentication-credentials-file

Syntax

--rpc-ws-authentication-credentials-file=<FILE>

Example

--rpc-ws-authentication-credentials-file=/home/me/me_node/auth.toml

Environment variable

BESU_RPC_WS_AUTHENTICATION_CREDENTIALS_FILE=/home/me/me_node/auth.toml

Configuration file

rpc-ws-authentication-credentials-file="/home/me/me_node/auth.toml"

The path to the credentials file for JSON-RPC API authentication.

rpc-ws-authentication-enabled

Syntax

--rpc-ws-authentication-enabled[=<true|false>]

Example

--rpc-ws-authentication-enabled=true

Environment variable

BESU_RPC_WS_AUTHENTICATION_ENABLED=true

Configuration file

rpc-ws-authentication-enabled=true

Enables or disables authentication for the WebSocket JSON-RPC service.

note

wscat doesn't support headers. Authentication requires you to pass an authentication token in the request header. To use authentication with WebSockets, you need an app that supports headers.

rpc-ws-authentication-jwt-public-key-file

Syntax

--rpc-ws-authentication-jwt-public-key-file=<FILE>

Example

--rpc-ws-authentication-jwt-public-key-file=publicKey.pem

Environment variable

BESU_RPC_WS_AUTHENTICATION_JWT_PUBLIC_KEY_FILE="publicKey.pem"

Configuration file

rpc-ws-authentication-jwt-public-key-file="publicKey.pem"

The JWT provider's public key file used for JSON-RPC WebSocket authentication with an external JWT.

rpc-ws-enabled

Syntax

--rpc-ws-enabled[=<true|false>]

Example

--rpc-ws-enabled=true

Environment variable

BESU_RPC_WS_ENABLED=true

Configuration file

rpc-ws-enabled=true

Enables or disables the WebSocket JSON-RPC service. The default is false.

rpc-ws-host

Syntax

--rpc-ws-host=<HOST>

Example

# to listen on all interfaces
--rpc-ws-host=0.0.0.0

Environment variable

BESU_RPC_WS_HOST=0.0.0.0

Configuration file

rpc-ws-host="0.0.0.0"

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

Syntax

--rpc-ws-max-active-connections=<INTEGER>

Example

--rpc-ws-max-active-connections=100

Environment variable

BESU_RPC_WS_MAX_ACTIVE_CONNECTIONS=100

Configuration file

rpc-ws-max-active-connections=100

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

Syntax

--rpc-ws-max-frame-size=<INTEGER>

Example

--rpc-ws-max-frame-size=65536

Environment variable

BESU_RPC_WS_MAX_FRAME_SIZE=65536

Configuration file

rpc-ws-max-frame-size=65536

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

Syntax

--rpc-ws-port=<PORT>

Example

# to listen on port 6174
--rpc-ws-port=6174

Environment variable

BESU_RPC_WS_PORT=6174

Configuration file

rpc-ws-port="6174"

The port (TCP) on which WebSocket JSON-RPC listens. The default is 8546. You must expose ports appropriately.

security-module

Syntax

--security-module=<NAME>

Example

--security-module=security_module

Environment variable

BESU_SECURITY_MODULE=security_module

Configuration file

security-module="security_module"

Name of the security module plugin to use. For example, a Hardware Security Module (HSM) or V3 filestore plugin.

The default is the node's local private key file specified using --node-private-key-file.

static-nodes-file

Syntax

--static-nodes-file=<FILE>

Example

--static-nodes-file=~/besudata/static-nodes.json

Environment variable

BESU_STATIC_NODES_FILE=~/besudata/static-nodes.json

Configuration file

static-nodes-file="~/besudata/static-nodes.json"

Static nodes JSON file containing the static nodes for this node to connect to. The default is datapath/static-nodes.json.

strict-tx-replay-protection-enabled

Syntax

--strict-tx-replay-protection-enabled[=<true|false>]

Example

--strict-tx-replay-protection-enabled=false

Environment variable

STRICT_TX_REPLAY_PROTECTION_ENABLED=false

Configuration file

strict-tx-replay-protection-enabled=false

Enables or disables replay protection, in accordance with EIP-155, on transactions submitted using JSON-RPC. The default is false.

sync-mode

Syntax

--sync-mode=X_SNAP

Example

--sync-mode=X_SNAP

Environment variable

BESU_SYNC_MODE=X_SNAP

Configuration file

sync-mode="X_SNAP"

The synchronization mode. Use X_SNAP for snap sync, X_CHECKPOINT for checkpoint sync, FAST for fast sync, and FULL for full 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, except for the dev development network. FAST is also the default if running Besu on the default network (Ethereum Mainnet) by specifying neither network nor genesis file.
tip
  • We recommend using snap sync over fast sync because snap sync can be faster by several days.
  • Checkpoint sync is an early access feature.
  • It might become impossible to sync Ethereum Mainnet using fast sync in the future. Update Besu to a version that supports newer sync methods.
  • When synchronizing in a mode other than FULL, most historical world state data is unavailable. Any methods attempting to access unavailable world state data return null.

target-gas-limit

Syntax

--target-gas-limit=<INTEGER>

Example

--target-gas-limit=8000000

Environment variable

BESU_TARGET_GAS_LIMIT=8000000

Configuration file

target-gas-limit="8000000"

The gas limit toward which Besu will gradually move on an existing network, if enough miners are in agreement. To change the block gas limit set in the genesis file without creating a new network, use target-gas-limit. The gas limit between blocks can change only 1/1024th, so the target tells the block creator how to set the gas limit in its block. If the values are the same or within 1/1024th, Besu sets the limit to the specified value. Otherwise, the limit moves as far as it can within that constraint.

If a value for target-gas-limit is not specified, the block gas limit remains at the value specified in the genesis file.

Use the miner_changeTargetGasLimit API to update the target-gas-limit while Besu is running. Alternatively restart Besu with an updated target-gas-limit value.

tx-pool-disable-locals

Syntax

--tx-pool-disable-locals[=<true|false>]

Example

--tx-pool-disable-locals=true

Environment variable

BESU_TX_POOL_DISABLE_LOCALS=true

Configuration file

tx-pool-disable-locals=true

If this option is set to true, transactions received via RPC must have the same checks, and should not be prioritized over remote transactions. The default is false.

tx-pool-enable-save-restore

Syntax

--tx-pool-enable-save-restore[=<true|false>]

Example

--tx-pool-enable-save-restore=true

Environment variable

BESU_TX_POOL_ENABLE_SAVE_RESTORE=true

Configuration file

tx-pool-enable-save-restore=true

Enables or disables saving the transaction pool contents to a file on shutdown and reloading it at startup. The default is false.

You can define a custom path to the transaction pool file using the --tx-pool-save-file option.

tx-pool-limit-by-account-percentage

Syntax

--tx-pool-limit-by-account-percentage=<DOUBLE>

Example

--tx-pool-limit-by-account-percentage=0.1

Environment variable

BESU_TX_POOL_LIMIT_BY_ACCOUNT_PERCENTAGE=0.1

Configuration file

tx-pool-limit-by-account-percentage=0.4

The maximum percentage of future transactions kept in the transaction pool, per account. Accepted values are in the range (0–1]. The default is .001 or 0.1% of transactions from a single account to be kept in the pool.

caution

The default value is often unsuitable for private networks. This feature mitigates future-nonce transactions from filling the pool without ever being executable by Besu. This is important for Mainnet, but may cause issues on private networks. Please update this value or set to 1 if you know the nodes gossiping transactions in your network.

tx-pool-max-size

Syntax

--tx-pool-max-size=<INTEGER>

Example

--tx-pool-max-size=2000

Environment variable

BESU_TX_POOL_MAX_SIZE=2000

Configuration file

tx-pool-max-size="2000"

The maximum number of transactions kept in the transaction pool. The default is 4096.

tx-pool-price-bump

Syntax

--tx-pool-price-bump=<INTEGER>

Example

--tx-pool-price-bump=25

Environment variable

BESU_TX_POOL_PRICE_BUMP=25

Configuration file

tx-pool-price-bump=25

The price bump percentage to replace an existing transaction. The default is 10.

tx-pool-retention-hours

Syntax

--tx-pool-retention-hours=<INTEGER>

Example

--tx-pool-retention-hours=5

Environment variable

BESU_TX_POOL_RETENTION_HOURS=5

Configuration file

tx-pool-retention-hours=5

The maximum period, in hours, to hold pending transactions in the transaction pool. The default is 13.

tx-pool-save-file

Syntax

--tx-pool-save-file=<FILE>

Example

--tx-pool-save-file=/home/me/me_node/node_txpool.dump

Environment variable

BESU_TX_POOL_SAVE_FILE=/home/me/me_node/node_txpool.dump

Configuration file

tx-pool-save-file="/home/me/me_node/node_txpool.dump"

Path to the file that stores the transaction pool's content if the save and restore functionality is enabled using --tx-pool-enable-save-restore. The file is created on shutdown and reloaded during startup. The default file name is txpool.dump in the data directory.

Xhelp

Syntax

-X, --Xhelp

Displays the early access options and their descriptions, and exit.

caution

The displayed options are unstable and may change between releases.

version

Syntax

-V, --version

Prints version information and exit.