2022-09-09 09:28:25 -03:00
|
|
|
---
|
|
|
|
title: Command-line Options
|
|
|
|
description: A list of commands for Geth
|
|
|
|
---
|
|
|
|
|
2023-03-15 14:41:04 +01:00
|
|
|
Geth is primarily controlled using the command line. Geth is started using the `geth`
|
|
|
|
command. It is stopped by pressing `ctrl-c`.
|
|
|
|
|
|
|
|
You can configure Geth using command-line options (a.k.a. flags). Geth also has
|
|
|
|
sub-commands, which can be used to invoke functionality such as the console or blockchain
|
|
|
|
import/export.
|
|
|
|
|
|
|
|
The command-line help listing is reproduced below for your convenience. The same
|
|
|
|
information can be obtained at any time from your own Geth instance by running:
|
2022-09-09 09:28:25 -03:00
|
|
|
|
|
|
|
```sh
|
|
|
|
geth --help
|
|
|
|
```
|
|
|
|
|
2022-11-25 17:34:46 +00:00
|
|
|
## Commands {#commands}
|
2022-09-09 09:28:25 -03:00
|
|
|
|
2022-11-30 10:38:00 +00:00
|
|
|
```sh
|
2022-09-09 09:28:25 -03:00
|
|
|
NAME:
|
|
|
|
geth - the go-ethereum command line interface
|
|
|
|
|
|
|
|
USAGE:
|
2023-03-15 14:41:04 +01:00
|
|
|
geth [global options] command [command options] [arguments...]
|
2022-09-09 09:28:25 -03:00
|
|
|
|
|
|
|
VERSION:
|
2023-09-20 18:29:26 +02:00
|
|
|
1.13.1-stable-3f40e65c
|
2022-09-09 09:28:25 -03:00
|
|
|
|
|
|
|
COMMANDS:
|
2023-03-15 14:41:04 +01:00
|
|
|
account Manage accounts
|
|
|
|
attach Start an interactive JavaScript environment (connect to node)
|
|
|
|
console Start an interactive JavaScript environment
|
|
|
|
db Low level database operations
|
|
|
|
dump Dump a specific block from storage
|
|
|
|
dumpconfig Export configuration values in a TOML format
|
|
|
|
dumpgenesis Dumps genesis block JSON configuration to stdout
|
|
|
|
export Export blockchain into file
|
|
|
|
export-preimages Export the preimage database into an RLP stream
|
|
|
|
import Import a blockchain file
|
|
|
|
import-preimages Import the preimage database from an RLP stream
|
|
|
|
init Bootstrap and initialize a new genesis block
|
|
|
|
js (DEPRECATED) Execute the specified JavaScript files
|
|
|
|
license Display license information
|
|
|
|
removedb Remove blockchain and state databases
|
|
|
|
show-deprecated-flags Show flags that have been deprecated
|
|
|
|
snapshot A set of commands based on the snapshot
|
|
|
|
verkle A set of experimental verkle tree management commands
|
|
|
|
version Print version numbers
|
|
|
|
version-check Checks (online) for known Geth security vulnerabilities
|
|
|
|
wallet Manage Ethereum presale wallets
|
|
|
|
help, h Shows a list of commands or help for one command
|
|
|
|
|
|
|
|
GLOBAL OPTIONS:
|
2023-09-20 18:29:26 +02:00
|
|
|
|
|
|
|
--log.rotate (default: false) ($GETH_LOG_ROTATE)
|
|
|
|
Enables log file rotation
|
|
|
|
|
2023-03-15 14:41:04 +01:00
|
|
|
ACCOUNT
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
|
|
|
|
--allow-insecure-unlock (default: false) ($GETH_ALLOW_INSECURE_UNLOCK)
|
2023-03-15 14:41:04 +01:00
|
|
|
Allow insecure account unlocking when account-related RPCs are exposed by http
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--keystore value ($GETH_KEYSTORE)
|
2023-03-15 14:41:04 +01:00
|
|
|
Directory for the keystore (default = inside the datadir)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--lightkdf (default: false) ($GETH_LIGHTKDF)
|
2023-03-15 14:41:04 +01:00
|
|
|
Reduce key-derivation RAM & CPU usage at some expense of KDF strength
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--password value ($GETH_PASSWORD)
|
2023-03-15 14:41:04 +01:00
|
|
|
Password file to use for non-interactive password input
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--pcscdpath value (default: "/run/pcscd/pcscd.comm") ($GETH_PCSCDPATH)
|
2023-03-15 14:41:04 +01:00
|
|
|
Path to the smartcard daemon (pcscd) socket file
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--signer value ($GETH_SIGNER)
|
2023-03-15 14:41:04 +01:00
|
|
|
External signer (url or path to ipc file)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--unlock value ($GETH_UNLOCK)
|
2023-03-15 14:41:04 +01:00
|
|
|
Comma separated list of accounts to unlock
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--usb (default: false) ($GETH_USB)
|
2023-03-15 14:41:04 +01:00
|
|
|
Enable monitoring and management of USB hardware wallets
|
|
|
|
|
|
|
|
ALIASED (deprecated)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
|
|
|
|
--cache.trie.journal value ($GETH_CACHE_TRIE_JOURNAL)
|
|
|
|
Disk journal directory for trie cache to survive node restarts
|
|
|
|
|
|
|
|
--cache.trie.rejournal value (default: 0s) ($GETH_CACHE_TRIE_REJOURNAL)
|
|
|
|
Time interval to regenerate the trie cache journal
|
|
|
|
|
|
|
|
--nousb (default: false) ($GETH_NOUSB)
|
2023-03-15 14:41:04 +01:00
|
|
|
Disables monitoring for and managing USB hardware wallets (deprecated)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--txlookuplimit value (default: 2350000) ($GETH_TXLOOKUPLIMIT)
|
|
|
|
Number of recent blocks to maintain transactions index for (default = about one
|
|
|
|
year, 0 = entire chain) (deprecated, use history.transactions instead)
|
|
|
|
|
|
|
|
--v5disc (default: false) ($GETH_V5DISC)
|
|
|
|
Enables the experimental RLPx V5 (Topic Discovery) mechanism (deprecated, use
|
|
|
|
--discv5 instead)
|
|
|
|
|
|
|
|
--whitelist value ($GETH_WHITELIST)
|
2023-03-15 14:41:04 +01:00
|
|
|
Comma separated block number-to-hash mappings to enforce (<number>=<hash>)
|
|
|
|
(deprecated in favor of --eth.requiredblocks)
|
|
|
|
|
|
|
|
API AND CONSOLE
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
|
|
|
|
--authrpc.addr value (default: "localhost") ($GETH_AUTHRPC_ADDR)
|
2023-03-15 14:41:04 +01:00
|
|
|
Listening address for authenticated APIs
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--authrpc.jwtsecret value ($GETH_AUTHRPC_JWTSECRET)
|
2023-03-15 14:41:04 +01:00
|
|
|
Path to a JWT secret to use for authenticated RPC endpoints
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--authrpc.port value (default: 8551) ($GETH_AUTHRPC_PORT)
|
2023-03-15 14:41:04 +01:00
|
|
|
Listening port for authenticated APIs
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--authrpc.vhosts value (default: "localhost") ($GETH_AUTHRPC_VHOSTS)
|
2023-03-15 14:41:04 +01:00
|
|
|
Comma separated list of virtual hostnames from which to accept requests (server
|
|
|
|
enforced). Accepts '*' wildcard.
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--exec value ($GETH_EXEC)
|
2023-03-15 14:41:04 +01:00
|
|
|
Execute JavaScript statement
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--graphql (default: false) ($GETH_GRAPHQL)
|
2023-03-15 14:41:04 +01:00
|
|
|
Enable GraphQL on the HTTP-RPC server. Note that GraphQL can only be started if
|
|
|
|
an HTTP server is started as well.
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--graphql.corsdomain value ($GETH_GRAPHQL_CORSDOMAIN)
|
2023-03-15 14:41:04 +01:00
|
|
|
Comma separated list of domains from which to accept cross origin requests
|
|
|
|
(browser enforced)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--graphql.vhosts value (default: "localhost") ($GETH_GRAPHQL_VHOSTS)
|
2023-03-15 14:41:04 +01:00
|
|
|
Comma separated list of virtual hostnames from which to accept requests (server
|
|
|
|
enforced). Accepts '*' wildcard.
|
|
|
|
|
|
|
|
--header value, -H value
|
|
|
|
Pass custom headers to the RPC server when using --remotedb or the geth attach
|
|
|
|
console. This flag can be given multiple times.
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--http (default: false) ($GETH_HTTP)
|
2023-03-15 14:41:04 +01:00
|
|
|
Enable the HTTP-RPC server
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--http.addr value (default: "localhost") ($GETH_HTTP_ADDR)
|
2023-03-15 14:41:04 +01:00
|
|
|
HTTP-RPC server listening interface
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--http.api value ($GETH_HTTP_API)
|
2023-03-15 14:41:04 +01:00
|
|
|
API's offered over the HTTP-RPC interface
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--http.corsdomain value ($GETH_HTTP_CORSDOMAIN)
|
2023-03-15 14:41:04 +01:00
|
|
|
Comma separated list of domains from which to accept cross origin requests
|
|
|
|
(browser enforced)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--http.port value (default: 8545) ($GETH_HTTP_PORT)
|
2023-03-15 14:41:04 +01:00
|
|
|
HTTP-RPC server listening port
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--http.rpcprefix value ($GETH_HTTP_RPCPREFIX)
|
2023-03-15 14:41:04 +01:00
|
|
|
HTTP path path prefix on which JSON-RPC is served. Use '/' to serve on all
|
|
|
|
paths.
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--http.vhosts value (default: "localhost") ($GETH_HTTP_VHOSTS)
|
2023-03-15 14:41:04 +01:00
|
|
|
Comma separated list of virtual hostnames from which to accept requests (server
|
|
|
|
enforced). Accepts '*' wildcard.
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--ipcdisable (default: false) ($GETH_IPCDISABLE)
|
2023-03-15 14:41:04 +01:00
|
|
|
Disable the IPC-RPC server
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--ipcpath value ($GETH_IPCPATH)
|
2023-03-15 14:41:04 +01:00
|
|
|
Filename for IPC socket/pipe within the datadir (explicit paths escape it)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--jspath value (default: .) ($GETH_JSPATH)
|
2023-03-15 14:41:04 +01:00
|
|
|
JavaScript root path for `loadScript`
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--preload value ($GETH_PRELOAD)
|
2023-03-15 14:41:04 +01:00
|
|
|
Comma separated list of JavaScript files to preload into the console
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--rpc.allow-unprotected-txs (default: false) ($GETH_RPC_ALLOW_UNPROTECTED_TXS)
|
2023-03-15 14:41:04 +01:00
|
|
|
Allow for unprotected (non EIP155 signed) transactions to be submitted via RPC
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--rpc.batch-request-limit value (default: 1000) ($GETH_RPC_BATCH_REQUEST_LIMIT)
|
|
|
|
Maximum number of requests in a batch
|
|
|
|
|
|
|
|
--rpc.batch-response-max-size value (default: 25000000) ($GETH_RPC_BATCH_RESPONSE_MAX_SIZE)
|
|
|
|
Maximum number of bytes returned from a batched call
|
|
|
|
|
|
|
|
--rpc.enabledeprecatedpersonal (default: false) ($GETH_RPC_ENABLEDEPRECATEDPERSONAL)
|
2023-03-15 14:41:04 +01:00
|
|
|
Enables the (deprecated) personal namespace
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--rpc.evmtimeout value (default: 5s) ($GETH_RPC_EVMTIMEOUT)
|
2023-03-15 14:41:04 +01:00
|
|
|
Sets a timeout used for eth_call (0=infinite)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--rpc.gascap value (default: 50000000) ($GETH_RPC_GASCAP)
|
2023-03-15 14:41:04 +01:00
|
|
|
Sets a cap on gas that can be used in eth_call/estimateGas (0=infinite)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--rpc.txfeecap value (default: 1)
|
2023-03-15 14:41:04 +01:00
|
|
|
Sets a cap on transaction fee (in ether) that can be sent via the RPC APIs (0 =
|
|
|
|
no cap)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--ws (default: false) ($GETH_WS)
|
2023-03-15 14:41:04 +01:00
|
|
|
Enable the WS-RPC server
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--ws.addr value (default: "localhost") ($GETH_WS_ADDR)
|
2023-03-15 14:41:04 +01:00
|
|
|
WS-RPC server listening interface
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--ws.api value ($GETH_WS_API)
|
2023-03-15 14:41:04 +01:00
|
|
|
API's offered over the WS-RPC interface
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--ws.origins value ($GETH_WS_ORIGINS)
|
2023-03-15 14:41:04 +01:00
|
|
|
Origins from which to accept websockets requests
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--ws.port value (default: 8546) ($GETH_WS_PORT)
|
2023-03-15 14:41:04 +01:00
|
|
|
WS-RPC server listening port
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--ws.rpcprefix value ($GETH_WS_RPCPREFIX)
|
2023-03-15 14:41:04 +01:00
|
|
|
HTTP path prefix on which JSON-RPC is served. Use '/' to serve on all paths.
|
|
|
|
|
|
|
|
DEVELOPER CHAIN
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
|
|
|
|
--dev (default: false) ($GETH_DEV)
|
2023-03-15 14:41:04 +01:00
|
|
|
Ephemeral proof-of-authority network with a pre-funded developer account, mining
|
|
|
|
enabled
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--dev.gaslimit value (default: 11500000) ($GETH_DEV_GASLIMIT)
|
2023-03-15 14:41:04 +01:00
|
|
|
Initial block gas limit
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--dev.period value (default: 0) ($GETH_DEV_PERIOD)
|
2023-03-15 14:41:04 +01:00
|
|
|
Block period to use in developer mode (0 = mine only if transaction pending)
|
|
|
|
|
|
|
|
ETHEREUM
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
|
|
|
|
--bloomfilter.size value (default: 2048) ($GETH_BLOOMFILTER_SIZE)
|
2023-03-15 14:41:04 +01:00
|
|
|
Megabytes of memory allocated to bloom-filter for pruning
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--config value ($GETH_CONFIG)
|
2023-03-15 14:41:04 +01:00
|
|
|
TOML configuration file
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--datadir value (default: /root/.ethereum) ($GETH_DATADIR)
|
2023-03-15 14:41:04 +01:00
|
|
|
Data directory for the databases and keystore
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--datadir.ancient value ($GETH_DATADIR_ANCIENT)
|
2023-03-15 14:41:04 +01:00
|
|
|
Root directory for ancient data (default = inside chaindata)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--datadir.minfreedisk value ($GETH_DATADIR_MINFREEDISK)
|
2023-03-15 14:41:04 +01:00
|
|
|
Minimum free disk space in MB, once reached triggers auto shut down (default =
|
|
|
|
--cache.gc converted to MB, 0 = disabled)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--db.engine value ($GETH_DB_ENGINE)
|
|
|
|
Backing database implementation to use ('pebble' or 'leveldb')
|
2023-03-15 14:41:04 +01:00
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--eth.requiredblocks value ($GETH_ETH_REQUIREDBLOCKS)
|
2023-03-15 14:41:04 +01:00
|
|
|
Comma separated block number-to-hash mappings to require for peering
|
|
|
|
(<number>=<hash>)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--exitwhensynced (default: false) ($GETH_EXITWHENSYNCED)
|
2023-03-15 14:41:04 +01:00
|
|
|
Exits after block synchronisation completes
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--goerli (default: false) ($GETH_GOERLI)
|
2023-03-15 14:41:04 +01:00
|
|
|
Görli network: pre-configured proof-of-authority test network
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--holesky (default: false) ($GETH_HOLESKY)
|
|
|
|
Holesky network: pre-configured proof-of-stake test network
|
|
|
|
|
|
|
|
--mainnet (default: false) ($GETH_MAINNET)
|
2023-03-15 14:41:04 +01:00
|
|
|
Ethereum mainnet
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--networkid value (default: 1) ($GETH_NETWORKID)
|
|
|
|
Explicitly set network id (integer)(For testnets: use --goerli, --sepolia,
|
|
|
|
--holesky instead)
|
2023-03-15 14:41:04 +01:00
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--override.cancun value (default: 0) ($GETH_OVERRIDE_CANCUN)
|
|
|
|
Manually specify the Cancun fork timestamp, overriding the bundled setting
|
2023-03-15 14:41:04 +01:00
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--override.verkle value (default: 0) ($GETH_OVERRIDE_VERKLE)
|
|
|
|
Manually specify the Verkle fork timestamp, overriding the bundled setting
|
2023-03-15 14:41:04 +01:00
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--sepolia (default: false) ($GETH_SEPOLIA)
|
2023-03-15 14:41:04 +01:00
|
|
|
Sepolia network: pre-configured proof-of-work test network
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--snapshot (default: true) ($GETH_SNAPSHOT)
|
2023-03-15 14:41:04 +01:00
|
|
|
Enables snapshot-database mode (default = enable)
|
|
|
|
|
|
|
|
GAS PRICE ORACLE
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
|
|
|
|
--gpo.blocks value (default: 20) ($GETH_GPO_BLOCKS)
|
2023-03-15 14:41:04 +01:00
|
|
|
Number of recent blocks to check for gas prices
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--gpo.ignoreprice value (default: 2)
|
2023-03-15 14:41:04 +01:00
|
|
|
Gas price below which gpo will ignore transactions
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--gpo.maxprice value (default: 500000000000)
|
2023-03-15 14:41:04 +01:00
|
|
|
Maximum transaction priority fee (or gasprice before London fork) to be
|
|
|
|
recommended by gpo
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--gpo.percentile value (default: 60) ($GETH_GPO_PERCENTILE)
|
2023-03-15 14:41:04 +01:00
|
|
|
Suggested gas price is the given percentile of a set of recent transaction gas
|
|
|
|
prices
|
|
|
|
|
|
|
|
LIGHT CLIENT
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
|
|
|
|
--light.egress value (default: 0) ($GETH_LIGHT_EGRESS)
|
2023-03-15 14:41:04 +01:00
|
|
|
Outgoing bandwidth limit for serving light clients (kilobytes/sec, 0 =
|
|
|
|
unlimited)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--light.ingress value (default: 0) ($GETH_LIGHT_INGRESS)
|
2023-03-15 14:41:04 +01:00
|
|
|
Incoming bandwidth limit for serving light clients (kilobytes/sec, 0 =
|
|
|
|
unlimited)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--light.maxpeers value (default: 100) ($GETH_LIGHT_MAXPEERS)
|
2023-03-15 14:41:04 +01:00
|
|
|
Maximum number of light clients to serve, or light servers to attach to
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--light.nopruning (default: false) ($GETH_LIGHT_NOPRUNING)
|
2023-03-15 14:41:04 +01:00
|
|
|
Disable ancient light chain data pruning
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--light.nosyncserve (default: false) ($GETH_LIGHT_NOSYNCSERVE)
|
2023-03-15 14:41:04 +01:00
|
|
|
Enables serving light clients before syncing
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--light.serve value (default: 0) ($GETH_LIGHT_SERVE)
|
2023-03-15 14:41:04 +01:00
|
|
|
Maximum percentage of time allowed for serving LES requests (multi-threaded
|
|
|
|
processing allows values over 100)
|
|
|
|
|
|
|
|
LOGGING AND DEBUGGING
|
|
|
|
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--log.backtrace value ($GETH_LOG_BACKTRACE)
|
2023-03-15 14:41:04 +01:00
|
|
|
Request a stack trace at a specific logging statement (e.g. "block.go:271")
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--log.compress (default: false) ($GETH_LOG_COMPRESS)
|
|
|
|
Compress the log files
|
|
|
|
|
|
|
|
--log.debug (default: false) ($GETH_LOG_DEBUG)
|
2023-03-15 14:41:04 +01:00
|
|
|
Prepends log messages with call-site location (file and line number)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--log.file value ($GETH_LOG_FILE)
|
2023-03-15 14:41:04 +01:00
|
|
|
Write logs to a file
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--log.format value ($GETH_LOG_FORMAT)
|
|
|
|
Log format to use (json|logfmt|terminal)
|
|
|
|
|
|
|
|
--log.maxage value (default: 30) ($GETH_LOG_MAXAGE)
|
|
|
|
Maximum number of days to retain a log file
|
|
|
|
|
|
|
|
--log.maxbackups value (default: 10) ($GETH_LOG_MAXBACKUPS)
|
|
|
|
Maximum number of log files to retain
|
|
|
|
|
|
|
|
--log.maxsize value (default: 100) ($GETH_LOG_MAXSIZE)
|
|
|
|
Maximum size in MBs of a single log file
|
|
|
|
|
|
|
|
--log.vmodule value ($GETH_LOG_VMODULE)
|
|
|
|
Per-module verbosity: comma-separated list of <pattern>=<level> (e.g.
|
|
|
|
eth/*=5,p2p=4)
|
2023-03-15 14:41:04 +01:00
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--nocompaction (default: false) ($GETH_NOCOMPACTION)
|
2023-03-15 14:41:04 +01:00
|
|
|
Disables db compaction after import
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--pprof (default: false) ($GETH_PPROF)
|
2023-03-15 14:41:04 +01:00
|
|
|
Enable the pprof HTTP server
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--pprof.addr value (default: "127.0.0.1") ($GETH_PPROF_ADDR)
|
2023-03-15 14:41:04 +01:00
|
|
|
pprof HTTP server listening interface
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--pprof.blockprofilerate value (default: 0) ($GETH_PPROF_BLOCKPROFILERATE)
|
2023-03-15 14:41:04 +01:00
|
|
|
Turn on block profiling with the given rate
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--pprof.cpuprofile value ($GETH_PPROF_CPUPROFILE)
|
2023-03-15 14:41:04 +01:00
|
|
|
Write CPU profile to the given file
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--pprof.memprofilerate value (default: 524288) ($GETH_PPROF_MEMPROFILERATE)
|
2023-03-15 14:41:04 +01:00
|
|
|
Turn on memory profiling with the given rate
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--pprof.port value (default: 6060) ($GETH_PPROF_PORT)
|
2023-03-15 14:41:04 +01:00
|
|
|
pprof HTTP server listening port
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--remotedb value ($GETH_REMOTEDB)
|
2023-03-15 14:41:04 +01:00
|
|
|
URL for remote database
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--trace value ($GETH_TRACE)
|
2023-03-15 14:41:04 +01:00
|
|
|
Write execution trace to the given file
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--verbosity value (default: 3) ($GETH_VERBOSITY)
|
2023-03-15 14:41:04 +01:00
|
|
|
Logging verbosity: 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=detail
|
|
|
|
|
|
|
|
METRICS AND STATS
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
|
|
|
|
--ethstats value ($GETH_ETHSTATS)
|
2023-03-15 14:41:04 +01:00
|
|
|
Reporting URL of a ethstats service (nodename:secret@host:port)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--metrics (default: false) ($GETH_METRICS)
|
2023-03-15 14:41:04 +01:00
|
|
|
Enable metrics collection and reporting
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--metrics.addr value ($GETH_METRICS_ADDR)
|
2023-03-15 14:41:04 +01:00
|
|
|
Enable stand-alone metrics HTTP server listening interface.
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--metrics.expensive (default: false) ($GETH_METRICS_EXPENSIVE)
|
2023-03-15 14:41:04 +01:00
|
|
|
Enable expensive metrics collection and reporting
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--metrics.influxdb (default: false) ($GETH_METRICS_INFLUXDB)
|
2023-03-15 14:41:04 +01:00
|
|
|
Enable metrics export/push to an external InfluxDB database
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--metrics.influxdb.bucket value (default: "geth") ($GETH_METRICS_INFLUXDB_BUCKET)
|
2023-03-15 14:41:04 +01:00
|
|
|
InfluxDB bucket name to push reported metrics to (v2 only)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--metrics.influxdb.database value (default: "geth") ($GETH_METRICS_INFLUXDB_DATABASE)
|
2023-03-15 14:41:04 +01:00
|
|
|
InfluxDB database name to push reported metrics to
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--metrics.influxdb.endpoint value (default: "http://localhost:8086") ($GETH_METRICS_INFLUXDB_ENDPOINT)
|
2023-03-15 14:41:04 +01:00
|
|
|
InfluxDB API endpoint to report metrics to
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--metrics.influxdb.organization value (default: "geth") ($GETH_METRICS_INFLUXDB_ORGANIZATION)
|
2023-03-15 14:41:04 +01:00
|
|
|
InfluxDB organization name (v2 only)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--metrics.influxdb.password value (default: "test") ($GETH_METRICS_INFLUXDB_PASSWORD)
|
2023-03-15 14:41:04 +01:00
|
|
|
Password to authorize access to the database
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--metrics.influxdb.tags value (default: "host=localhost") ($GETH_METRICS_INFLUXDB_TAGS)
|
2023-03-15 14:41:04 +01:00
|
|
|
Comma-separated InfluxDB tags (key/values) attached to all measurements
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--metrics.influxdb.token value (default: "test") ($GETH_METRICS_INFLUXDB_TOKEN)
|
2023-03-15 14:41:04 +01:00
|
|
|
Token to authorize access to the database (v2 only)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--metrics.influxdb.username value (default: "test") ($GETH_METRICS_INFLUXDB_USERNAME)
|
2023-03-15 14:41:04 +01:00
|
|
|
Username to authorize access to the database
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--metrics.influxdbv2 (default: false) ($GETH_METRICS_INFLUXDBV2)
|
2023-03-15 14:41:04 +01:00
|
|
|
Enable metrics export/push to an external InfluxDB v2 database
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--metrics.port value (default: 6060) ($GETH_METRICS_PORT)
|
2023-03-15 14:41:04 +01:00
|
|
|
Metrics HTTP server listening port.
|
|
|
|
Please note that --metrics.addr must be set
|
|
|
|
to start the server.
|
|
|
|
|
|
|
|
MINER
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
|
|
|
|
--mine (default: false) ($GETH_MINE)
|
2023-03-15 14:41:04 +01:00
|
|
|
Enable mining
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--miner.etherbase value ($GETH_MINER_ETHERBASE)
|
2023-03-15 14:41:04 +01:00
|
|
|
0x prefixed public address for block mining rewards
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--miner.extradata value ($GETH_MINER_EXTRADATA)
|
2023-03-15 14:41:04 +01:00
|
|
|
Block extra data set by the miner (default = client version)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--miner.gaslimit value (default: 30000000) ($GETH_MINER_GASLIMIT)
|
2023-03-15 14:41:04 +01:00
|
|
|
Target gas ceiling for mined blocks
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--miner.gasprice value (default: 0) ($GETH_MINER_GASPRICE)
|
2023-03-15 14:41:04 +01:00
|
|
|
Minimum gas price for mining a transaction
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--miner.newpayload-timeout value (default: 2s) ($GETH_MINER_NEWPAYLOAD_TIMEOUT)
|
2023-03-15 14:41:04 +01:00
|
|
|
Specify the maximum time allowance for creating a new payload
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--miner.recommit value (default: 2s) ($GETH_MINER_RECOMMIT)
|
2023-03-15 14:41:04 +01:00
|
|
|
Time interval to recreate the block being mined
|
|
|
|
|
|
|
|
MISC
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
|
|
|
|
--help, -h (default: false)
|
2023-03-15 14:41:04 +01:00
|
|
|
show help
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--synctarget value ($GETH_SYNCTARGET)
|
2023-03-15 14:41:04 +01:00
|
|
|
File for containing the hex-encoded block-rlp as sync target(dev feature)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--version, -v (default: false)
|
2023-03-15 14:41:04 +01:00
|
|
|
print the version
|
|
|
|
|
|
|
|
NETWORKING
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
|
|
|
|
--bootnodes value ($GETH_BOOTNODES)
|
2023-03-15 14:41:04 +01:00
|
|
|
Comma separated enode URLs for P2P discovery bootstrap
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--discovery.dns value ($GETH_DISCOVERY_DNS)
|
2023-03-15 14:41:04 +01:00
|
|
|
Sets DNS discovery entry points (use "" to disable DNS)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--discovery.port value (default: 30303) ($GETH_DISCOVERY_PORT)
|
2023-03-15 14:41:04 +01:00
|
|
|
Use a custom UDP port for P2P discovery
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--discovery.v4, --discv4 (default: true) ($GETH_DISCOVERY_V4)
|
|
|
|
Enables the V4 discovery mechanism
|
|
|
|
|
|
|
|
--discovery.v5, --discv5 (default: false) ($GETH_DISCOVERY_V5)
|
|
|
|
Enables the experimental RLPx V5 (Topic Discovery) mechanism
|
|
|
|
|
|
|
|
--identity value ($GETH_IDENTITY)
|
2023-03-15 14:41:04 +01:00
|
|
|
Custom node name
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--maxpeers value (default: 50) ($GETH_MAXPEERS)
|
2023-03-15 14:41:04 +01:00
|
|
|
Maximum number of network peers (network disabled if set to 0)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--maxpendpeers value (default: 0) ($GETH_MAXPENDPEERS)
|
2023-03-15 14:41:04 +01:00
|
|
|
Maximum number of pending connection attempts (defaults used if set to 0)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--nat value (default: "any") ($GETH_NAT)
|
2023-03-15 14:41:04 +01:00
|
|
|
NAT port mapping mechanism (any|none|upnp|pmp|pmp:<IP>|extip:<IP>)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--netrestrict value ($GETH_NETRESTRICT)
|
2023-03-15 14:41:04 +01:00
|
|
|
Restricts network communication to the given IP networks (CIDR masks)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--nodekey value ($GETH_NODEKEY)
|
2023-03-15 14:41:04 +01:00
|
|
|
P2P node key file
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--nodekeyhex value ($GETH_NODEKEYHEX)
|
2023-03-15 14:41:04 +01:00
|
|
|
P2P node key as hex (for testing)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--nodiscover (default: false) ($GETH_NODISCOVER)
|
2023-03-15 14:41:04 +01:00
|
|
|
Disables the peer discovery mechanism (manual peer addition)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--port value (default: 30303) ($GETH_PORT)
|
2023-03-15 14:41:04 +01:00
|
|
|
Network listening port
|
|
|
|
|
|
|
|
PERFORMANCE TUNING
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
|
|
|
|
--cache value (default: 1024) ($GETH_CACHE)
|
2023-03-15 14:41:04 +01:00
|
|
|
Megabytes of memory allocated to internal caching (default = 4096 mainnet full
|
|
|
|
node, 128 light mode)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--cache.blocklogs value (default: 32) ($GETH_CACHE_BLOCKLOGS)
|
2023-03-15 14:41:04 +01:00
|
|
|
Size (in number of blocks) of the log cache for filtering
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--cache.database value (default: 50) ($GETH_CACHE_DATABASE)
|
2023-03-15 14:41:04 +01:00
|
|
|
Percentage of cache memory allowance to use for database io
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--cache.gc value (default: 25) ($GETH_CACHE_GC)
|
2023-03-15 14:41:04 +01:00
|
|
|
Percentage of cache memory allowance to use for trie pruning (default = 25% full
|
|
|
|
mode, 0% archive mode)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--cache.noprefetch (default: false) ($GETH_CACHE_NOPREFETCH)
|
2023-03-15 14:41:04 +01:00
|
|
|
Disable heuristic state prefetch during block import (less CPU and disk IO, more
|
|
|
|
time waiting for data)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--cache.preimages (default: false) ($GETH_CACHE_PREIMAGES)
|
2023-03-15 14:41:04 +01:00
|
|
|
Enable recording the SHA3/keccak preimages of trie keys
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--cache.snapshot value (default: 10) ($GETH_CACHE_SNAPSHOT)
|
2023-03-15 14:41:04 +01:00
|
|
|
Percentage of cache memory allowance to use for snapshot caching (default = 10%
|
|
|
|
full mode, 20% archive mode)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--cache.trie value (default: 15) ($GETH_CACHE_TRIE)
|
2023-03-15 14:41:04 +01:00
|
|
|
Percentage of cache memory allowance to use for trie caching (default = 15% full
|
|
|
|
mode, 30% archive mode)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--crypto.kzg value (default: "gokzg") ($GETH_CRYPTO_KZG)
|
|
|
|
KZG library implementation to use; gokzg (recommended) or ckzg
|
2023-03-15 14:41:04 +01:00
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--fdlimit value (default: 0) ($GETH_FDLIMIT)
|
2023-03-15 14:41:04 +01:00
|
|
|
Raise the open file descriptor resource limit (default = system fd limit)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
STATE HISTORY MANAGEMENT
|
2023-03-15 14:41:04 +01:00
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
|
|
|
|
--gcmode value (default: "full") ($GETH_GCMODE)
|
|
|
|
Blockchain garbage collection mode, only relevant in state.scheme=hash ("full",
|
|
|
|
"archive")
|
|
|
|
|
|
|
|
--history.state value (default: 90000) ($GETH_HISTORY_STATE)
|
|
|
|
Number of recent blocks to retain state history for (default = 90,000 blocks, 0
|
|
|
|
= entire chain)
|
|
|
|
|
|
|
|
--history.transactions value (default: 2350000) ($GETH_HISTORY_TRANSACTIONS)
|
|
|
|
Number of recent blocks to maintain transactions index for (default = about one
|
|
|
|
year, 0 = entire chain)
|
|
|
|
|
|
|
|
--state.scheme value (default: "hash") ($GETH_STATE_SCHEME)
|
|
|
|
Scheme to use for storing ethereum state ('hash' or 'path')
|
|
|
|
|
|
|
|
--syncmode value (default: snap) ($GETH_SYNCMODE)
|
|
|
|
Blockchain sync mode ("snap", "full" or "light")
|
|
|
|
|
|
|
|
TRANSACTION POOL (BLOB)
|
|
|
|
|
|
|
|
|
|
|
|
--blobpool.datacap value (default: 10737418240) ($GETH_BLOBPOOL_DATACAP)
|
|
|
|
Disk space to allocate for pending blob transactions (soft limit)
|
|
|
|
|
|
|
|
--blobpool.datadir value (default: "blobpool") ($GETH_BLOBPOOL_DATADIR)
|
|
|
|
Data directory to store blob transactions in
|
|
|
|
|
|
|
|
--blobpool.pricebump value (default: 100) ($GETH_BLOBPOOL_PRICEBUMP)
|
|
|
|
Price bump percentage to replace an already existing blob transaction
|
|
|
|
|
|
|
|
TRANSACTION POOL (EVM)
|
|
|
|
|
|
|
|
|
|
|
|
--txpool.accountqueue value (default: 64) ($GETH_TXPOOL_ACCOUNTQUEUE)
|
2023-03-15 14:41:04 +01:00
|
|
|
Maximum number of non-executable transaction slots permitted per account
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--txpool.accountslots value (default: 16) ($GETH_TXPOOL_ACCOUNTSLOTS)
|
2023-03-15 14:41:04 +01:00
|
|
|
Minimum number of executable transaction slots guaranteed per account
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--txpool.globalqueue value (default: 1024) ($GETH_TXPOOL_GLOBALQUEUE)
|
2023-03-15 14:41:04 +01:00
|
|
|
Maximum number of non-executable transaction slots for all accounts
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--txpool.globalslots value (default: 5120) ($GETH_TXPOOL_GLOBALSLOTS)
|
2023-03-15 14:41:04 +01:00
|
|
|
Maximum number of executable transaction slots for all accounts
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--txpool.journal value (default: "transactions.rlp") ($GETH_TXPOOL_JOURNAL)
|
2023-03-15 14:41:04 +01:00
|
|
|
Disk journal for local transaction to survive node restarts
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--txpool.lifetime value (default: 3h0m0s) ($GETH_TXPOOL_LIFETIME)
|
2023-03-15 14:41:04 +01:00
|
|
|
Maximum amount of time non-executable transaction are queued
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--txpool.locals value ($GETH_TXPOOL_LOCALS)
|
2023-03-15 14:41:04 +01:00
|
|
|
Comma separated accounts to treat as locals (no flush, priority inclusion)
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--txpool.nolocals (default: false) ($GETH_TXPOOL_NOLOCALS)
|
2023-03-15 14:41:04 +01:00
|
|
|
Disables price exemptions for locally submitted transactions
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--txpool.pricebump value (default: 10) ($GETH_TXPOOL_PRICEBUMP)
|
2023-03-15 14:41:04 +01:00
|
|
|
Price bump percentage to replace an already existing transaction
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--txpool.pricelimit value (default: 1) ($GETH_TXPOOL_PRICELIMIT)
|
|
|
|
Minimum gas price tip to enforce for acceptance into the pool
|
2023-03-15 14:41:04 +01:00
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
--txpool.rejournal value (default: 1h0m0s) ($GETH_TXPOOL_REJOURNAL)
|
2023-03-15 14:41:04 +01:00
|
|
|
Time interval to regenerate the local transaction journal
|
|
|
|
|
|
|
|
VIRTUAL MACHINE
|
|
|
|
|
2023-09-20 18:29:26 +02:00
|
|
|
|
|
|
|
--vmdebug (default: false) ($GETH_VMDEBUG)
|
2023-03-15 14:41:04 +01:00
|
|
|
Record information useful for VM and contract debugging
|
2022-09-09 09:28:25 -03:00
|
|
|
|
|
|
|
|
|
|
|
COPYRIGHT:
|
2023-03-15 14:41:04 +01:00
|
|
|
Copyright 2013-2023 The go-ethereum Authors
|
2022-09-09 09:28:25 -03:00
|
|
|
```
|