Teku command line options
This reference describes the syntax of the Teku command line interface (CLI) options.
The CLI options are currently under development and may change.
Specify options
You can specify Teku options:
-
On the command line.
teku [OPTIONS] [COMMAND]
-
As an environment variable. For each command line option, the equivalent environment variable is:
- Uppercase.
-
is replaced by_
.- Has a
TEKU_
prefix.
-
In a YAML configuration file.
If an option is specified in multiple places, the order of priority is command line, environment variable, configuration file.
Using autocomplete
If using Bash or Z shell, you can enable autocomplete support by navigating to the build
folder and running:
source teku.autocomplete.sh
Autocomplete allows you to view option suggestions by entering --
and pressing the Tab key twice.
teku --Tab+Tab
Options
beacon-liveness-tracking-enabled
- Syntax
- Example
- Environment variable
- Configuration file
--beacon-liveness-tracking-enabled[=<BOOLEAN>]
--beacon-liveness-tracking-enabled=true
TEKU_BEACON_LIVENESS_TRACKING_ENABLED=true
beacon-liveness-tracking-enabled: true
Enables or disables validator liveness tracking. Used by doppelganger detection. The default is false
.
builder-bid-compare-factor
- Syntax
- Example
- Environment variable
- Configuration file
--builder-bid-compare-factor=<STRING>
--builder-bid-compare-factor=50
TEKU_BUILDER_BID_COMPARE_FACTOR=50
builder-bid-compare-factor: 50
The builder bid compare factor. The default is 100 (100%).
Execution layer clients in Capella-enabled networks provide the execution payload and the payload value. The beacon node compares this value against the builder bid to maximize the validator's profit or decrease network censorship at a low or no cost.
Use this option to set the compare factor applied to the builder bid value when comparing it to the locally produced payload. The factor is expressed in a percentage. For example, a builder bid compare factor of 80
means the local payload is chosen when its value is at least 80% of the builder bid value.
Set this option to BUILDER_ALWAYS
to always use the builder bid, unless the bid is invalid.
builder-endpoint
- Syntax
- Example
- Environment variable
- Configuration file
--builder-endpoint=<URL>
--builder-endpoint=http://127.0.0.1:18550
TEKU_BUILDER_ENDPOINT=http://127.0.0.1:18550
builder-endpoint: "http://127.0.0.1:18550"
The address for an external builder endpoint.
builder-set-user-agent-header
- Syntax
- Example
- Environment variable
- Configuration file
--builder-set-user-agent-header[=<BOOLEAN>]
--builder-set-user-agent-header=true
TEKU_BUILDER_SET_USER_AGENT_HEADER=true
builder-set-user-agent-header: true
Set the User-Agent header to teku/v<version>
(for example, teku/v23.4.0
) when making a builder bid request to help builders identify clients and versions. The default is true
.
checkpoint-sync-url
- Syntax
- Example
- Environment variable
- Configuration file
--checkpoint-sync-url=<URL>
--checkpoint-sync-url="https://beaconstate.ethstaker.cc"
TEKU_CHECKPOINT_SYNC_URL="https://beaconstate.ethstaker.cc"
checkpoint-sync-url: "https://beaconstate.ethstaker.cc"
URL of a checkpoint state endpoint used to start Teku from a recent state.
By default, Teku tries to download the finalized state from the endpoint. If it can't download the finalized state, it tries to download the genesis state.
When this option is set, and --deposit-snapshot-enabled
is also not set or disabled,
the --checkpoint-sync-url
value will be used to determine the deposit snapshot.
config-file
- Syntax
- Example
- Environment variable
--config-file=<FILE>
--config-file=/home/me/me_node/config.yaml
TEKU_CONFIG_FILE=/home/me/me_node/config.yaml
Path to the YAML configuration file. The default is none
.
data-base-path, data-path
- Syntax
- Example
- Environment variable
- Configuration file
--data-base-path=<PATH>
--data-base-path=/home/me/me_node
TEKU_DATA_BASE_PATH=/home/me/me_node
data-base-path: "/home/me/me_node"
Path to the Teku data directory. The default directory is OS-dependent:
- macOS:
~/Library/teku
- Unix/Linux:
$XDG_DATA_HOME/teku
if$XDG_DATA_HOME
is set; otherwise~/.local/share/teku
- Windows:
%localappdata%\teku
.
The default Docker image location is /root/.local/share/teku
.
data-beacon-path
- Syntax
- Example
- Environment variable
- Configuration file
--data-beacon-path=<PATH>
--data-beacon-path=/home/me/me_beacon
TEKU_DATA_BEACON_PATH=/home/me/me_beacon
data-beacon-path: "/home/me/me_beaon"
Path to the beacon node data. The default is <data-base-path>/beacon
where <data-base-path>
is specified using --data-base-path
.
data-storage-archive-frequency
- Syntax
- Example
- Environment variable
- Configuration file
--data-storage-archive-frequency=<NUMBER>
--data-storage-archive-frequency=1028
TEKU_DATA_STORAGE_ARCHIVE_FREQUENCY=1028
data-storage-archive-frequency: 1028
Set the frequency (in slots) at which to store finalized states to disk. The default is 2048.
This option is ignored if --data-storage-mode
is not set to archive
.
Specifying a larger number of slots as the archive frequency has a potentially higher overhead for retrieving finalized states since more states may need to be regenerated to get to the requested state. Specifying a lower number of slots as the frequency increases the disk space usage.
For example, --data-storage-archive-frequency=1
uses maximum disk space but has the lowest response time for retrieving a finalized state since each slot state is saved, whereas --data-storage-archive-frequency=2048
uses less disk space, but may need to regenerate the state because every 2048th slot state is saved.
data-storage-mode
- Syntax
- Example
- Environment variable
- Configuration file
--data-storage-mode=<STORAGE_MODE>
--data-storage-mode=archive
TEKU_DATA_STORAGE_MODE=archive
data-storage-mode: "archive"
Set the strategy for handling historical chain data. Valid options are:
minimal
- Stores the minimal required data to follow the chain and run validators. Finalized states and historic blocks are pruned.prune
- Stores all blocks, but finalized states are pruned.archive
- Stores all blocks and states.
The default is minimal
.
data-storage-non-canonical-blocks-enabled
- Syntax
- Example
- Environment variable
- Configuration file
--data-storage-non-canonical-blocks-enabled[=<BOOLEAN>]
--data-storage-non-canonical-blocks-enabled=true
TEKU_DATA_STORAGE_NON_CANONICAL_BLOCKS_ENABLED=true
data-storage-non-canonical-blocks-enabled: true
Specify whether to store non-canonical blocks and blob sidecars. The default is false
.
data-validator-path
- Syntax
- Example
- Environment variable
- Configuration file
--data-validator-path=<PATH>
--data-validator-path=/home/me/me_validator
TEKU_DATA_VALIDATOR_PATH=/home/me/me_validator
data-validator-path: "/home/me/me_validator"
Path to the validator client data. The default is <data-base-path>/validator
where <data-base-path>
is specified using --data-base-path
.
doppelganger-detection-enabled
- Syntax
- Example
- Environment variable
- Configuration file
--doppelganger-detection-enabled[=<BOOLEAN>]
--doppelganger-detection-enabled=true
TEKU_DOPPELGANGER_DETECTION_ENABLED=true
doppelganger-detection-enabled: true
Enables or disables doppelganger detection. The default is false
.
exit-when-no-validator-keys-enabled
- Syntax
- Example
- Environment variable
- Configuration file
--exit-when-no-validator-keys-enabled[=<BOOLEAN>]
--exit-when-no-validator-keys-enabled=true
TEKU_EXIT_WHEN_NO_VALIDATOR_KEYS_ENABLED=true
exit-when-no-validator-keys-enabled: true
If set to true
Teku won't start if validators have not been loaded, or there are no active validators. The default is false
.
If the validator client and beacon node are run separately, then add this option to the validator client side only. This option should be used on the client loading the validator keys.
ee-endpoint
- Syntax
- Example
- Environment variable
- Configuration file
--ee-endpoint=<URL>
--ee-endpoint=http://localhost:8550
TEKU_EE_ENDPOINT=http://localhost:8550
ee-endpoint: "http://localhost:8550"
URL of the execution client's Engine JSON-RPC APIs. This replaces eth1-endpoint
after The Merge.
ee-jwt-secret-file
- Syntax
- Example
- Environment variable
- Configuration file
--ee-jwt-secret-file=<FILE>
--ee-jwt-secret-file=ee-jwt-secret.hex
TEKU_EE_JWT_SECRET_FILE=ee-jwt-secret.hex
ee-jwt-secret-file: "ee-jwt-secret.hex"
Shared secret used to authenticate execution clients when using the Engine JSON-RPC API. Contents of file must be 32 hex-encoded bytes. May be a relative or absolute path. See an example of how to generate this.
eth1-deposit-contract-address
- Syntax
- Example
- Environment variable
- Configuration file
--eth1-deposit-contract-address=<ADDRESS>
--eth1-deposit-contract-address=0x77f7bED277449F51505a4C54550B074030d989bC
TEKU_ETH1_DEPOSIT_CONTRACT_ADDRESS=0x77f7bED277449F51505a4C54550B074030d989bC
eth1-deposit-contract-address: "0x77f7bED277449F51505a4C54550B074030d989bC"
The address of the deposit contract. Only required when creating a custom network.
The deposit contract address can also be defined in:
- The genesis file specified using
--initial-state
- The predefined network supplied using
--network
.
eth1-deposit-contract-max-request-size
- Syntax
- Example
- Environment variable
- Configuration file
--eth1-deposit-contract-max-request-size=<INTEGER>
--eth1-deposit-contract-max-request-size=8000
TEKU_ETH1_DEPOSIT_CONTRACT_MAX_REQUEST_SIZE=8000
eth1-deposit-contract-max-request-size: 8000
The maximum number of blocks to request deposit contract event logs for in a single request. The default is 10000.
Setting a smaller max size may help if your ETH1 node is slow at loading deposit event logs, or when receiving warnings that the ETH1 node is unavailable.
eth1-endpoint, eth1-endpoints
- Syntax
- Example
- Environment variable
- Configuration file
--eth1-endpoint=<URL>[,<URL>...]...
--eth1-endpoint=http://localhost:8545,https://mainnet.infura.io/v3/d0e21ccd0b1e4eef7784422eabc51111
TEKU_ETH1_ENDPOINT=http://localhost:8545,https://mainnet.infura.io/v3/d0e21ccd0b1e4eef7784422eabc51111
eth1-endpoint: ["http://localhost:8545","https://mainnet.infura.io/v3/d0e21ccd0b1e4eef7784422eabc51111"]
Comma-separated list of JSON-RPC URLs of execution layer (Ethereum 1.0) nodes. Each time Teku makes a call, it finds the first provider in the list that is available, on the right chain, and in sync. This option must be specified if running a validator.
If not specified (that is, you're running a beacon node only), then provide an initial state using the --initial-state
option, or start Teku from an existing database using --data-path
, which provides the initial state to work from. You do not need to provide an initial state if running a public network which has already started (for example, Mainnet or Goerli).
If using a cloud-based service such as Infura, then set the endpoint to the supplied URL. For example, https://goerli.infura.io/v3/<Project_ID>
.
After The Merge, you can't use eth1-endpoint
to specify an external execution layer provider. This option is replaced by ee-endpoint
for each beacon node.
deposit-snapshot-enabled
- Syntax
- Example
- Environment variable
- Configuration file
--deposit-snapshot-enabled[=<BOOLEAN>]
--deposit-snapshot-enabled=false
TEKU_DEPOSIT_SNAPSHOT_ENABLED=false
deposit-snapshot-enabled: false
Enables or disables using a bundled deposit contract tree snapshot and persisting the tree after finalization. The default is true
.
Normally, at sync, Teku requests all deposit logs from the execution layer up to the head. At each startup, Teku loads all deposits from the disk and replays them to recreate the merkle tree. Both operations consume peer resources and delay node availability on restart. The feature enabled by this option dramatically decreases the time of both operations by bundling deposit tree snapshots in the Teku distribution for all major networks (Mainnet, Gnosis, Goerli, and Sepolia) and persisting the current tree after finalization. Instead of replaying thousands of deposits on startup, Teku loads the bundled tree or a saved one, whichever is the latest.
If a malicious peer changes the bundled tree, Teku throws InvalidDepositEventsException
on the next deposit received
from the execution layer. The malicious peer can't follow up the chain, and so can't propose with an incorrect
deposit tree snapshot.
When this option is not set or is disabled, the --checkpoint-sync-url
value will be used if provided to find the deposit snapshot URL.
exchange-capabilities-monitoring-enabled
- Syntax
- Example
- Environment variable
- Configuration file
--exchange-capabilities-monitoring-enabled[=<BOOLEAN>]
--exchange-capabilities-monitoring-enabled=true
TEKU_EXCHANGE_CAPABILITIES_MONITORING_ENABLED=true
exchange-capabilities-monitoring-enabled: true
Enables or disables querying the execution client periodically for the Engine API methods it supports. If enabled and incompatibility is detected, a warning is raised in the logs. The default is true
.
genesis-state
- Syntax
- Example
- Environment variable
- Configuration file
--genesis-state=<FILE>
--genesis-state=/home/me/genesis.ssz
TEKU_GENESIS_STATE=/home/me/genesis.ssz
genesis-state: "/home/me/genesis.ssz"
Path or URL to an SSZ-encoded state file. The state file can be used to specify the genesis state, or a recent finalized checkpoint state from which to sync.
This option does not need to be specified if the genesis state is provided by the network specified using the --network
option. It also is not required if the Reconstruct Historical States Service is not being utilised.
If overriding the genesis state in a custom network, you must supply the genesis state file at each restart.
Infura can be used as the source of initial states with --genesis-state https://{projectid}:{secret}@eth2-beacon-mainnet.infura.io/eth/v2/debug/beacon/states/genesis
help
-h, --help
Show the help message and exit.
initial-state
- Syntax
- Example
- Environment variable
- Configuration file
--initial-state=<FILE>
--initial-state=/home/me/genesis.ssz
TEKU_INITIAL_STATE=/home/me/genesis.ssz
initial-state: "/home/me/genesis.ssz"
Path or URL to an SSZ-encoded state file. The state file can be used to specify the genesis state, or a recent finalized checkpoint state from which to sync.
This option does not need to be specified if the genesis state is provided by the network specified using the --network
option.
If overriding the initial state in a custom network, you must supply the initial state file at each restart.
ignore-weak-subjectivity-period-enabled
- Syntax
- Example
- Environment variable
- Configuration file
--ignore-weak-subjectivity-period-enabled[=<BOOLEAN>]
--ignore-weak-subjectivity-period-enabled=true
TEKU_IGNORE_WEAK_SUBJECTIVITY_PERIOD_ENABLED=true
ignore-weak-subjectivity-period-enabled: true
Ignores the weak subjectivity period verification that Teku
performs at startup.
The default is false
.
Syncing from outside the weak subjectivity period is considered unsafe.
logging
- Syntax
- Example
- Environment variable
- Configuration file
-l, --logging=<LEVEL>
--logging=DEBUG
TEKU_LOGGING=DEBUG
logging: "DEBUG"
Sets the logging verbosity. Log levels are OFF
, FATAL
, ERROR
, WARN
, INFO
, DEBUG
, TRACE
, ALL
. Default is INFO
.
log-color-enabled
- Syntax
- Example
- Environment variable
- Configuration file
--log-color-enabled[=<BOOLEAN>]
--log-color-enabled=false
TEKU_LOG_COLOR_ENABLED=false
log-color-enabled: false
Specify whether status and event log messages include a console color display code. The default is true
.
log-destination
- Syntax
- Example
- Environment variable
- Configuration file
--log-destination=<LOG_DESTINATION>
--log-destination=CONSOLE
TEKU_LOG_DESTINATION=CONSOLE
log-destination: "CONSOLE"
Specify where to output log information. Valid options are:
BOTH
CONSOLE
DEFAULT_BOTH
FILE
The default is DEFAULT_BOTH
. When using BOTH
or DEFAULT_BOTH
, system updates such as blockchain events are displayed on the console, and errors and other information are logged to a file. Specify the log file with the --log-file
command-line option.
For production systems we recommend using the CONSOLE
or FILE
options to ensure all log information is available in one place.
Use DEFAULT_BOTH
when using a custom Log4J2 configuration file. Any other option applies the custom logging changes on top of its default settings.
log-file
- Syntax
- Example
- Environment variable
- Configuration file
--log-file=<FILENAME>
--log-file=teku_2020-01-01.log
TEKU_LOG_FILE=teku_2020-01-01.log
log-file: "teku_2020-01-01.log"
Relative or absolute location, and filename of the log file.
The default directory is OS-dependent:
- macOS:
~/Library/teku/logs
- Unix/Linux:
$XDG_DATA_HOME/teku/logs
if$XDG_DATA_HOME
is set; otherwise~/.local/share/teku/logs
- Windows:
%localappdata%\teku\logs
The default Docker image location is /root/.local/share/teku/logs
.