Anchor CLI Reference

This document provides a comprehensive reference for Anchor's command-line interface, including all available commands, subcommands, and options.

Overview

The Anchor CLI has the following structure

anchor [OPTIONS] <COMMAND>

Where <COMMAND> is one of:

  • node - Run an Anchor SSV Node
  • keysplit - Split validator keys into shares
  • keygen - Generate RSA keys for operator identification

Global options:

  • --help - Display help information

Node Command

The node command starts the anchor client as a SSV operator node.

anchor node [OPTIONS]

Options

General Options

OptionDescriptionDefault
--datadir <DIR>Data directory for node files~/.lighthouse/{network}
--testnet-dir <DIR>Directory containing testnet specsNone
--network <NETWORK>Network to use (Mainnet, Holesky, Hoodi)Holesky

External APIs

OptionDescriptionDefault
--beacon-nodes <URLS>Comma-separated beacon node HTTP URLshttp://localhost:5052
--execution-rpc <URLS>Comma-separated execution node RPC URLshttp://localhost:8545
--execution-ws <URL>Execution node websocket URLws://localhost:8546
--beacon-node-tls-certs <FILES>Certificate files for beacon node connectionsNone
--execution-node-tls-certs <FILES>Certificate files for execution node connectionsNone

HTTP API

OptionDescriptionDefault
--httpEnable the HTTP API severDisabled
--http-address <ADDRESS>Listen address for HTTP APINone
--http-port <PORT>Listen port for HTTP API5062 if --http is set
--http-allow-origin <ORIGIN>Set CORS allowed originNone
--unencrypted-http-transportSafety flag to acknowledge HTTP is unencryptedRequired if --http-address is set

Metrics Options

OptionDescriptionDefault
--metricsEnable metrics serverDisabled
--metrics-address <ADDRESS>Listen address for metrics server127.0.0.1 if --metrics is set
--metrics-port <PORT>Listen port for metrics server5164 if --metrics is set

Network Options

OptionDescriptionDefault
--listen-address <ADDRESS>Network address to listen for UDP & TCP connections0.0.0.0
--port <PORT>Base port for all network connections9100
--port6 <PORT>Base port for IPv6 network connectionsSame as --port
--discovery-port <PORT>UDP port for discoverySame as --port
--discovery-port6 <PORT>UDP port for IPv6 discoverySame as --port6
--quic-port <PORT>UDP port for QUIC protocol--port + 1
--quic-port6 <PORT>UDP port for IPv6 QUIC protocol--port6 + 1
--boot-nodes <NODES>Comma-separated ENRs or Multiaddrs to bootstrap the networkNone
--enr-address <ADDRESS>IPv4 address to broadcast in the node's ENRNone
--enr-address6 <ADDRESS>IPv6 address to broadcast in the node's ENRNone
--enr-udp-port <PORT>UDP port to advertise in the node's ENRNone
--enr-tcp-port <PORT>TCP port to advertise in the node's ENRNone
--enr-quic-port <PORT>QUIC port to advertise in the node's ENRNone
--enr-udp6-port <PORT>IPv6 UDP port to advertise in the node's ENRNone
--enr-tcp6-port <PORT>IPv6 TCP port to advertise in the node's ENRNone
--enr-quic6-port <PORT>IPv6 QUIC port to advertise in the node's ENRNone
--subscribe-all-subnetsSubscribe to all subnets regardless of committee membershipDisabled

Security Options

OptionDescriptionDefault
--rsa-key-password <PASSWORD>Password to decrypt RSA keystoreNone
--disable-slashing-protectionDisable slashing protection (NOT RECOMMENDED)Disabled

Payload Building Options

OptionDescriptionDefault
--builder-proposalsUse external block buildingDisabled
--builder-boost-factor <FACTOR>Percentage multiplier for builder payload valueNone
--prefer-builder-proposalsAlways prefer builder blocks regardless of valueDisabled

Performance Options

OptionDescriptionDefault
--max-workers <COUNT>Maximum number of concurrent workersNumber of logical CPU cores
--work-queue-size <QUEUE_SIZE={}>Override size for a specific worker queueNone

Logging Options

OptionDescriptionDefault
--debug-level <LEVEL>Verbosity for terminal logsinfo
--logfile-debug-level <LEVEL>Verbosity for file logsdebug
--logfile-max-size <SIZE>Maximum size of each log file in MB20
--logfile-max-number <NUMBER>Maximum number of log files to keep5
--logfile-dir <DIR>Directory to store log filesSame as --datadir
--logfile-compressionCompress old log filesDisabled

Examples

anchor node \
  --network mainnet \
  --datadir /data/anchor \
  --beacon-nodes https://beacon1.example.com,https://beacon2.example.com \
  --execution-rpc https://execution1.example.com,https://execution2.example.com \
  --execution-ws wss://execution1.example.com \
  --listen-addresses 10.0.0.10 \
  --port 9100 \
  --http \
  --http-address 127.0.0.1 \
  --http-port 9200 \
  --unencrypted-http-transport \
  --metrics \
  --metrics-address 127.0.0.1 \
  --metrics-port 9300 \
  --rsa-key-password "your-secure-password"

Keygen Command

The keygen command generates RSA keys for SSV operator identification

anchor keygen [OPTIONS]

Options

OptionDescriptionDefault
--output-path <PATH>Directory to store generated keysCurrent Directory
--password <PASSWORD>Password to encrypt the private keyNone
--forceForce overwrite of existing key filesDisabled
--helpDisplay help information

Examples

This will create an unencrypted key.pem file containing the newly generated private key and a keys.json file with the BASE64 encoded public and private key used for registering the operator.

anchor keygen

This will create a key.pem file encrypted with the provided password and log the corresponding public key to the console. This password must be provided via --rsa-key-password when running anchor.

anchor keygen --password "your-secure-password" --output-path /path/to/keys

Anchor will look for the key.pem file inside of the directory specific by --datadir.

Keysplit Command

The keysplit command is used to split validator keys for distributed validation on the SSV network.

anchor keysplit <SUBCOMMAND> [OPTIONS]

Where <SUBCOMMAND> is one of:

  • manual - Split keys with manually provided operator data
  • onchain - Split keys using operator data from the blockchain

Both subcommands share these Options

OptionDescriptionDefault
--keystore-path <PATH>Path to validator keystore fileRequired
--password <PASSWORD>Password for the validator keystoreRequired
--owner <ADDRESS>ETH address that owns the validatorRequired
--output-path <PATH>Path for output fileRequired
--operators <IDS>Comma-separated list of operator IDs (must be 4, 7, 10, or 13)Required
--helpDisplay help information

Manual Keysplit Subcommand

anchor keysplit manual [OPTIONS]

Additional Options:

OptionDescriptionDefault
--nonce <NONCE>Nonce for the owner addressRequired
--public-keys <KEYS>Comma-separated RSA public keys for operatorsRequired

Onchain Keysplit Subcommand

anchor keysplit onchain [OPTIONS]

Additional Options:

OptionDescriptionDefault
--rpc <ENDPOINT>RPC endpoint to access L1 dataRequired
--network <NETWORK>Ethereum Network (Mainnet, Holesky, Hoodi)Required

Examples

Manual key splitting

anchor keysplit manual \
  --keystore-path /path/to/validator_keystore.json \
  --password "your_keystore_password" \
  --owner 0x123abc... \
  --operators 1,2,3,4 \
  --output-path /path/to/output.json \
  --nonce 0 \
  --public-keys key1,key2,key3,key4

Onchain key splitting

anchor keysplit onchain \
  --keystore-path /path/to/validator_keystore.json \
  --password "your_keystore_password" \
  --owner 0x123abc... \
  --operators 1,2,3,4 \
  --output-path /path/to/output.json \
  --rpc https://eth-mainnet.provider.com \
  --network Mainnet

These commands will generate a json file to be uploaded to the SSV network webapp when registering a validator.