Skip to main content

beacon CLI Command

Run a beacon chain node

Examples

Run a beacon chain node and connect to the goerli testnet

./lodestar beacon --network goerli

beacon Options

--dataDir

Lodestar root data directory

type: string

--network

Name of the Ethereum Consensus chain network to join

type: string

choices: "mainnet", "gnosis", "goerli", "ropsten", "sepolia", "holesky", "chiado", "ephemery", "dev"

default: "mainnet"

--paramsFile

Network configuration file

type: string

--terminal-total-difficulty-override

Terminal PoW block TTD override

type: string

--terminal-block-hash-override

Terminal PoW block hash override

type: string

--terminal-block-hash-epoch-override

Terminal PoW block hash override activation epoch

type: string

--checkpointSyncUrl

Server url hosting Beacon Node APIs to fetch weak subjectivity state. Fetch latest finalized by default, else set --wssCheckpoint

type: string

--checkpointState

Set a checkpoint state to start syncing from

type: string

--wssCheckpoint

Start beacon node off a state at the provided weak subjectivity checkpoint, to be supplied in <blockRoot>:<epoch> format. For example, 0x1234:100 will sync and start off from the weak subjectivity state at checkpoint of epoch 100 with block root 0x1234.

type: string

--forceCheckpointSync

Force syncing from checkpoint state even if db state is within weak subjectivity period. This helps to avoid long sync times after node has been offline for a while.

type: boolean

--private

Do not send implementation details over p2p identify protocol and in builder, execution engine and eth1 requests

type: boolean

--validatorMonitorLogs

Log validator monitor events as info. This requires metrics to be enabled.

type: boolean

--logLevel

Logging verbosity level for emitting logs to terminal

type: string

choices: "error", "warn", "info", "verbose", "debug", "trace"

default: "info"

--logFile

Path to output all logs to a persistent log file, use 'none' to disable

type: string

--logFileLevel

Logging verbosity level for emitting logs to file

type: string

choices: "error", "warn", "info", "verbose", "debug", "trace"

default: "debug"

--logFileDailyRotate

Daily rotate log files, set to an integer to limit the file count, set to 0 (zero) to disable rotation

type: number

default: 5

--rest

Enable/disable HTTP API

type: boolean

default: true

--rest.namespace

Pick namespaces to expose for HTTP API. Set to '*' to enable all namespaces

type: string[]

choices: "beacon", "config", "debug", "events", "lightclient", "lodestar", "node", "proof", "validator", "*"

default: ["beacon","config","events","node","validator","lightclient"]

--rest.cors

Configures the Access-Control-Allow-Origin CORS header for HTTP API

type: string

default: "*"

--rest.address

Set host for HTTP API

type: string

default: "127.0.0.1"

--rest.port

Set port for HTTP API

type: number

default: 9596

--rest.swaggerUI

Enable Swagger UI for API exploration at http://{address}:{port}/documentation

type: boolean

--suggestedFeeRecipient

Specify fee recipient default for collecting the EL block fees and rewards (a hex string representing 20 bytes address: ^0x[a-fA-F0-9]{40}$) in case validator fails to update for a validator index before calling produceBlock.

type: string

default: "0x0000000000000000000000000000000000000000"

--emitPayloadAttributes

Flag to SSE emit execution payloadAttributes before every slot

type: boolean

default: false

--chain.archiveBlobEpochs

Number of epochs to retain finalized blobs (minimum of MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS)

type: number

--eth1

Whether to follow the eth1 chain

type: boolean

default: true

--eth1.providerUrls

Urls to Eth1 node with enabled rpc. If not explicitly provided and execution endpoint provided via execution.urls, it will use execution.urls. Otherwise will try connecting on the specified default(s)

type: string[]

default: [ "http://localhost:8545" ]

--execution.urls

Urls to execution client engine API

type: string[]

default: [ "http://localhost:8551" ]

--execution.timeout

Timeout in milliseconds for execution engine API HTTP client

type: number

default: 12000

--execution.retries

Number of retries when calling execution engine API

type: number

default: 2

--execution.retryDelay

Delay time in milliseconds between retries when retrying calls to the execution engine API

type: number

default: 2000

--jwtSecret

File path to a shared hex-encoded jwt secret which will be used to generate and bundle HS256 encoded jwt tokens for authentication with the EL client's rpc server hosting engine apis. Secret to be exactly same as the one used by the corresponding EL client.

type: string

--jwtId

An optional identifier to be set in the id field of the claims included in jwt tokens used for authentication with EL client's rpc server hosting engine apis

type: string

--builder

Enable builder interface

type: boolean

--builder.url

Url hosting the builder API

type: string

default: "http://localhost:8661"

--builder.timeout

Timeout in milliseconds for builder API HTTP client

type: number

default: 12000

--builder.faultInspectionWindow

Window to inspect missed slots for enabling/disabling builder circuit breaker

type: number

--builder.allowedFaults

Number of missed slots allowed in the faultInspectionWindow for builder circuit

type: number

--metrics

Enable the Prometheus metrics HTTP server

type: boolean

--metrics.port

Listen TCP port for the Prometheus metrics HTTP server

type: number

default: 8008

--metrics.address

Listen address for the Prometheus metrics HTTP server

type: string

default: "127.0.0.1"

--monitoring.endpoint

Enables monitoring service for sending clients stats to the specified endpoint of a remote service (e.g. beaconcha.in)

type: string

--monitoring.interval

Interval in milliseconds between sending client stats to the remote service

type: number

default: 60000

--discv5

Enable discv5

type: boolean

default: true

--listenAddress

The IPv4 address to listen for p2p UDP and TCP connections

type: string

default: "0.0.0.0"

--port

The TCP/UDP port to listen on. The UDP port can be modified by the --discoveryPort flag.

type: number

default: 9000

--discoveryPort

The UDP port that discovery will listen on. Defaults to port

type: number

default: port

--listenAddress6

The IPv6 address to listen for p2p UDP and TCP connections

type: string

--port6

The TCP/UDP port to listen on. The UDP port can be modified by the --discoveryPort6 flag.

type: number

default: 9090

--discoveryPort6

The UDP port that discovery will listen on. Defaults to port6

type: number

default: port6

--bootnodes

Bootnodes for discv5 discovery

type: string[]

default: [ "[]" ]

--targetPeers

The target connected peers. Above this number peers will be disconnected

type: number

default: 100

--subscribeAllSubnets

Subscribe to all subnets regardless of validator count

type: boolean

default: false

--disablePeerScoring

Disable peer scoring, used for testing on devnets

type: boolean

default: false

--mdns

Enable mdns local peer discovery

type: boolean

default: false

--enr.ip

Override ENR IP entry

type: string

--enr.tcp

Override ENR TCP entry

type: number

--enr.udp

Override ENR UDP entry

type: number

--enr.ip6

Override ENR IPv6 entry

type: string

--enr.tcp6

Override ENR (IPv6-specific) TCP entry

type: number

--enr.udp6

Override ENR (IPv6-specific) UDP entry

type: number

--nat

Allow configuration of non-local addresses

type: boolean