Skip to content

dev CLI Command


Quickly bootstrap a beacon node and multiple validators. Use for development and testing


Examples

Start a single beacon node with 8 interop validators

./lodestar dev --genesisValidators 8 --reset


dev Options

--dataDir

description: Lodestar root data directory

type: string


--network

description: Name of the Ethereum Consensus chain network to join

type: string

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

default: "mainnet"


--paramsFile

description: Network configuration file

type: string


--terminal-total-difficulty-override

description: Terminal PoW block TTD override

type: string


--terminal-block-hash-override

description: Terminal PoW block hash override

type: string


--terminal-block-hash-epoch-override

description: Terminal PoW block hash override activation epoch

type: string


--checkpointSyncUrl

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

type: string


--checkpointState

description: Set a checkpoint state to start syncing from

type: string


--wssCheckpoint

description: Start beacon node off a state at the provided weak subjectivity checkpoint, to be supplied in : 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

description: 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

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

type: boolean


--validatorMonitorLogs

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

type: boolean


--logLevel

description: Logging verbosity level for emitting logs to terminal

type: string

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

default: "info"


--logFile

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

type: string


--logFileLevel

description: Logging verbosity level for emitting logs to file

type: string

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

default: "debug"


--logFileDailyRotate

description: 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

description: Enable/disable HTTP API

type: boolean

default: true


--rest.namespace

description: 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

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

type: string

default: "*"


--rest.address

description: Set host for HTTP API

type: string

default: "127.0.0.1"


--rest.port

description: Set port for HTTP API

type: number

default: 9596


--rest.swaggerUI

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

type: boolean

default: true


--suggestedFeeRecipient

description: 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}$). It would be possible (WIP) to override this per validator key using config or key manager API. Only used post merge.

type: string

default: "0x0000000000000000000000000000000000000000"


--emitPayloadAttributes

description: Flag to SSE emit execution payloadAttributes before every slot

type: boolean

default: false


--chain.archiveBlobEpochs

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

type: number


--eth1

description: Whether to follow the eth1 chain

type: boolean


--eth1.providerUrls

description: 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

description: Urls to execution client engine API

type: string[]

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


--execution.timeout

description: Timeout in milliseconds for execution engine API HTTP client

type: number

default: 12000


--execution.retries

description: Number of retries when calling execution engine API

type: number

default: 2


--execution.retryDelay

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

type: number

default: 2000


--jwtSecret

description: 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

description: 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

description: An alias for --builder.selection maxprofit for the builder flow, ignored if --builder.selection is explicitly provided

type: boolean


--builder.url

description: Url hosting the builder API

type: string

default: "http://localhost:8661"


--builder.timeout

description: Timeout in milliseconds for builder API HTTP client

type: number

default: 12000


--builder.faultInspectionWindow

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

type: number


--builder.allowedFaults

description: Number of missed slots allowed in the faultInspectionWindow for builder circuit

type: number


--metrics

description: Enable the Prometheus metrics HTTP server

type: boolean

default: false


--metrics.port

description: Listen TCP port for the Prometheus metrics HTTP server

type: number

default: 5064


--metrics.address

description: Listen address for the Prometheus metrics HTTP server

type: string

default: "127.0.0.1"


--monitoring.endpoint

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

type: string


--monitoring.interval

description: Interval in milliseconds between sending client stats to the remote service

type: number

default: 60000


--discv5

description: Enable discv5

type: boolean

default: true


--listenAddress

description: The IPv4 address to listen for p2p UDP and TCP connections

type: string

default: "0.0.0.0"


--port

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

type: number

default: 9000


--discoveryPort

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

type: number

default: port


--listenAddress6

description: The IPv6 address to listen for p2p UDP and TCP connections

type: string


--port6

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

type: number

default: 9090


--discoveryPort6

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

type: number

default: port6


--bootnodes

description: Bootnodes for discv5 discovery

type: string[]

default: [ "[]" ]


--targetPeers

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

type: number

default: 50


--deterministicLongLivedAttnets

description: Use deterministic subnet selection for long-lived subnet subscriptions

type: boolean

default: true


--subscribeAllSubnets

description: Subscribe to all subnets regardless of validator count

type: boolean

default: false


--disablePeerScoring

description: Disable peer scoring, used for testing on devnets

type: boolean

default: false


--mdns

description: Enable mdns local peer discovery

type: boolean

default: false


--enr.ip

description: Override ENR IP entry

type: string


--enr.tcp

description: Override ENR TCP entry

type: number


--enr.udp

description: Override ENR UDP entry

type: number


--enr.ip6

description: Override ENR IPv6 entry

type: string


--enr.tcp6

description: Override ENR (IPv6-specific) TCP entry

type: number


--enr.udp6

description: Override ENR (IPv6-specific) UDP entry

type: number


--nat

description: Allow configuration of non-local addresses

type: boolean


--keymanager

description: Enable key manager API server

type: boolean


--keymanager.authEnabled

description: Enable token bearer authentication for key manager API server

type: boolean

default: true


--keymanager.port

description: Set port for key manager API

type: number

default: 5062


--keymanager.address

description: Set host for key manager API

type: string

default: "127.0.0.1"


--keymanager.cors

description: Configures the Access-Control-Allow-Origin CORS header for key manager API

type: string

default: "*"


--beaconNodes

description: Addresses to connect to BeaconNode

type: string[]

default: [ "http://127.0.0.1:9596" ]


--force

description: Open validators even if there's a lockfile. Use with caution

type: boolean


--graffiti

description: Specify your custom graffiti to be included in blocks (plain UTF8 text, 32 characters max)

type: string


--proposerSettingsFile

description: A yaml file to specify detailed default and per validator public key customized proposer configs. PS: This feature and its format is in alpha and subject to change

type: string


--strictFeeRecipientCheck

description: Enable strict checking of the validator's feeRecipient with the one returned by engine

type: boolean


--defaultGasLimit

description: Suggested gas limit to the engine/builder for building execution payloads. Only used post merge.

type: number

default: 30000000


--builder.selection

description: Builder block selection strategy maxprofit, builderalways, builderonly, executionalways, or executiononly

type: string

default: "executiononly"


--builder.boostFactor

description: Percentage multiplier the block producing beacon node must apply to boost (>100) or dampen (<100) builder block value for selection against execution block. The multiplier is ignored if --builder.selection is set to anything other than maxprofit

type: string

default: "100"


--useProduceBlockV3

description: Enable/disable usage of produceBlockV3 for block production, is auto enabled on deneb+ blocks

type: boolean


--broadcastValidation

description: Validations to be run by beacon node for the signed block prior to publishing

type: string

default: "gossip"


--blindedLocal

description: Request fetching local block in blinded format for produceBlockV3

type: boolean

default: false


--importKeystores

description: Path(s) to a directory or single file path to validator keystores, i.e. Launchpad validators

type: string[]

default: [ "./keystores/*.json" ]


--importKeystoresPassword

description: Path to a file with password to decrypt all keystores from importKeystores option

type: string

default: "./password.txt"


--doppelgangerProtection

description: Enables Doppelganger protection

type: boolean


--externalSigner.url

description: URL to connect to an external signing server

type: string


--externalSigner.pubkeys

description: List of validator public keys used by an external signer. May also provide a single string of comma-separated public keys

type: string[]


--externalSigner.fetch

description: Fetch the list of public keys to validate from an external signer. Cannot be used in combination with --externalSigner.pubkeys

type: boolean


--distributed

description: Enables specific features required to run as part of a distributed validator cluster

type: boolean


--genesisEth1Hash

description: If present it will create genesis with this eth1 hash.

type: string


--genesisValidators

description: If present it will create genesis with interop validators and start chain.

type: number

default: 8


--startValidators

description: Start interop validators in inclusive range with notation '0..7'

type: string


--genesisTime

description: genesis_time to initialize interop genesis state

type: number

default: now


--reset

description: To delete chain and validator directories

type: boolean


--dumpTestnetFiles

description: Dump testnet files and exit

type: string