specborn documentation contents ↓

CLI reference #

This page documents every command and flag of the executables built from the source this guide was checked against (status). It is checked mechanically: scripts/docs/check.sh builds the binaries, captures the help text of each command and command group, and fails if a help block here differs from it, if a flag or subcommand in the help is not documented here, or if one documented here does not exist.

Conventions: DIR is a directory, FILE a file, N a decimal number, 0xHEX a 0x-prefixed hexadecimal string of the stated length. Flags take their value as the next argument (--datadir /var/lib/specborn, not --datadir=…). Flags may come in any order. A flag given twice keeps the last value, except where a command says otherwise (validator keys import refuses a repeated flag; --bootnodes of specborn run, and --pubkey and --pubkeys-file of validator slashing-protection, add up).

The commands on this page:

CommandWhat it doesSection
specborn runfollow a chain (the node)specborn run
specborn validator keys import, listimport and list EIP-2335 validator keystoresspecborn validator keys
specborn validator slashing-protection import, export, registerthe EIP-3076 slashing-protection databasespecborn validator slashing-protection
specborn checkpoint-syncstart the consensus layer from an operator-supplied finalized stateCheckpoint-sync options
specborn el-syncdownload the execution state of an operator-supplied finalized anchor by snap, verified against its state root; with --follow, then execute forwardspecborn el-sync
specborn-evmrun state tests through specborn's EVM, with traces, for differential fuzzingspecborn-evm

Only specborn run --validator-keys signs anything: the validator duties and block proposals of its keys, and only on local devnets so far. Do not use real validator keys with it (Validators).

specborn #

The node: execution and consensus layer in one process.

specborn 0.0.2-dev — a combined Ethereum execution + consensus client in Lean 4

USAGE:
  specborn --version
  specborn --help
  specborn run --datadir DIR --network DIR --el-genesis FILE
               (--bootnodes ENR[,ENR...] | --peers FILE) [--discovery-port N]
               [--max-peers N] [--max-el-peers N]
               [--rpc-port N | --no-rpc] [--rpc-allow-unprotected-txs] [--rpc-default-tip WEI]
               [--run-for-ms N] [--aggregates] [--no-ptc] [--keep-history] [--verbose]
               [--el-peers FILE] [--no-pool]
               [--validator-keys [--validator-password-file FILE]
                [--doppelganger-epochs N | --doppelganger-opt-out] [--allow-time-jump]
                [--fee-recipient 0xADDRESS] [--graffiti TEXT]]
               [--beacon-api [--beacon-api-port N]]
  specborn checkpoint-sync --network DIR --anchor-state FILE --anchor-block FILE
                           (--peers FILE | --bootnodes FILE) [--ws-checkpoint ROOT:EPOCH] ...
               (start from an operator-supplied finalized state; no default
               provider; `specborn checkpoint-sync --help`)
  specborn validator keys import --datadir DIR --keystores DIR --password-file FILE
                                 [--no-store-password]
  specborn validator keys list --datadir DIR
  specborn validator slashing-protection import|export --datadir DIR --file FILE ...
  specborn validator slashing-protection register --datadir DIR --pubkey 0xHEX ...
               (EIP-3076 interchange; `specborn validator slashing-protection --help`)
  specborn el-sync --datadir DIR --network DIR --el-genesis FILE --anchor-state FILE
               --anchor-block FILE (--el-peers FILE | --el-bootnodes FILE) [--follow (--peers FILE | --bootnodes FILE)]
               [--pivot-move-every N] [--pivot-depth N] [--request-gap-ms N] [--response-bytes N]
               [--no-advance] [--run-for-ms N] [--verbose]
  specborn el-sync --resume-pivot 0xHASH --follow --datadir DIR --network DIR --el-genesis FILE
               --anchor-state FILE --anchor-block FILE (--peers FILE | --bootnodes FILE) [--no-advance]
               [--run-for-ms N] [--verbose]

run:
  --datadir DIR      the node's store (created if absent; a store of another
                     chain is refused). A restart replays the store and
                     continues from there.
  --network DIR      config.yaml (mainnet preset), genesis.ssz (the beacon
                     genesis state) and genesis.json (the execution genesis
                     configuration and allocation)
  --el-genesis FILE  the execution genesis block, RLP; checked against
                     genesis.json (state root) and the beacon state (hash)
  --bootnodes ENRS   discv5 bootnode records (enr:..., comma-separated):
                     consensus nodes (an eth2 entry with a fork digest of
                     this chain) and execution nodes (an eth entry) found
                     from them are dialed; records with an eth entry are
                     also walked with discv4 (execution peers); no list of
                     nodes is preferred or excluded
  --discovery-port N the discv5 UDP port (default 0: an ephemeral port;
                     the node's record carries no address)
  --peers FILE       consensus peers, one per line (optional with --bootnodes):
                       cl <label> <ipv4> <tcp port> <libp2p peer id (base58)>
  --max-peers N      consensus connections (default 16)
  --max-el-peers N   execution (eth) connections (default 4)
  --rpc-port N       JSON-RPC on 127.0.0.1:N (default 8545); transactions
                     sent with eth_sendRawTransaction are announced to the
                     eth peers (NewPooledTransactionHashes) and served
                     (PooledTransactions), through the transaction pool
                     unless --no-pool
  --no-rpc           no JSON-RPC server (and no eth sessions, unless the
                     transaction pool runs: then with the discovered and
                     --el-peers execution peers)
  --rpc-allow-unprotected-txs  accept legacy transactions without EIP-155
  --rpc-default-tip WEI        the gas price oracle's default tip
  --run-for-ms N     stop after N ms (default: run until killed)
  --aggregates       also follow beacon_aggregate_and_proof (fork-choice votes)
  --no-ptc           do not follow payload_attestation_message (Gloas PTC
                     votes, followed by default: the fork choice's FULL /
                     EMPTY decision reads them)
  --keep-history     keep every stored block and envelope (default: once a
                     snapshot of the finalized block is written, the items
                     before it are deleted except the newest 8192, kept to
                     serve the recent history by range and root after a
                     restart; a restart starts from the snapshot and
                     replays only the items after it)
  --verbose          print protocol events to stderr
  --el-peers FILE    execution peers dialed in addition to those discovery
                     finds, one per line:
                       el <label> <ipv4> <tcp port> <node public key, 128 hex digits>
  --no-pool          no transaction pool: the eth sessions announce and serve
                     only the transactions submitted over JSON-RPC (default:
                     a pool on every eth session, discovered and --el-peers:
                     transactions are received over eth/69-71 and JSON-RPC,
                     validated against the head state, announced and served;
                     eth_sendRawTransaction answers with the pool's verdict;
                     txpool_status)
  --validator-keys   before syncing, decrypt every keystore imported into
                     DIR/validators (see `validator keys`) into memory; the node
                     refuses to start if any keystore fails (each failure is
                     named) or if none is imported. Decrypted keys are never
                     written. With keys, the node performs the validator
                     duties: attestations, aggregation, sync committee
                     messages and contributions, Gloas PTC votes, and block
                     proposals (Fulu blocks, Gloas self-built blocks and
                     their payloads, built in-process; no relay, no external
                     builder). Blocks and attestations are signed only through
                     the slashing protection database of DIR (every key must be
                     imported or registered there first: `validator
                     slashing-protection`), every message only while the
                     node's head is VALID.
  --validator-password-file FILE
                     the password for imported keystores that have no stored
                     password (imported with --no-store-password); read once,
                     may be a pipe, e.g. <(pass show validators)
  --doppelganger-epochs N
                     doppelganger protection (default 2): sign nothing for N
                     full epochs after the start while watching the network for
                     attestations by these keys; on detection, stop and exit
                     (exit code 3). 0 is refused without --doppelganger-opt-out.
  --doppelganger-opt-out
                     disable doppelganger protection (logged as a warning)
  --fee-recipient 0xADDRESS
                     the execution address that receives the fees of the
                     node's blocks (default: the zero address)
  --graffiti TEXT    the graffiti of the node's blocks (at most 32 bytes of
                     UTF-8, zero-padded; default: 32 zero bytes)
  --allow-time-jump  sign even when a message is more than 6 h after the newest
                     signature in the slashing protection database (phase0
                     best practice 4b; refused by default)
  --beacon-api       serve a read-only subset of the standard beacon node API
                     (node, config, headers, blocks, states, validators,
                     committees, duties, events) on 127.0.0.1 only; no
                     endpoint changes the node or submits anything
  --beacon-api-port N
                     its port (default 5052); needs --beacon-api

Data availability (Gloas): the node samples the columns of its custody groups
for max(SAMPLES_PER_SLOT, CUSTODY_REQUIREMENT) groups of its node id (fresh
key per start), from data_column_sidecar gossip, range sync and by-root
requests; an envelope whose bid commits to blobs is imported only once every
sampled column is kept and verified (KZG), never unchecked.

Chains: a Gloas genesis, or a Fulu genesis crossing into Gloas at
GLOAS_FORK_EPOCH (every Fulu payload executed by the shipped Prague/Osaka/BPO
block processing, every Gloas payload by the shipped Amsterdam one).

el-sync (piece elsync): download the execution state of the operator's
finalized anchor (the same --anchor-state / --anchor-block as checkpoint-sync;
the pivot is the anchor's execution block, its header checked against the
block hash in the anchor state) over snap/1 or snap/2 from the execution peers
in --el-peers (lines: el <label> <ipv4> <tcp port> <public key, 128 hex>) or
discovered (discv4) from the enode:// bootnodes in --el-bootnodes,
every answer verified against the pivot state root before it is stored in
--datadir; at the end the stored state's root is checked against the pivot.
Nothing else is contacted. With --follow the node runs as checkpoint-sync
from the same anchor from the start (consensus peers from --peers or
discovered from --bootnodes, no backfill) while the state downloads: the
pivot moves with the payloads the node imports (snap/2: once the newest is
--pivot-move-every (32) + --pivot-depth (64) blocks above the pivot, the
block access lists of the blocks passed are verified and applied and the
download continues at the block --pivot-depth below the newest, but never
above the finalized execution block: with the head far beyond finality the
pivot waits there and moves again when finality advances); once the
state is complete and its root checked, the state is moved by the verified
block access lists of the blocks from the last pivot up to the finalized
execution block (finalized_block_bid.parent_block_hash; never above it; not
executed), and the in-process engine starts there: every payload above it is
executed (shipped Amsterdam block processing) and moves from NOT_VALIDATED to
VALID or INVALID (docs/pieces/elsync.md). --no-advance: no such move; every
payload above the pivot is executed. --request-gap-ms (default 0) spaces snap
requests (a test knob); --response-bytes (default 524288) is the soft limit
asked for. --resume-pivot 0xHASH (with --follow): no download; --datadir holds
the checked state of execution block HASH left by a stopped run (its
ELSYNC DONE pivot line); the consensus node runs from the anchor, and once
it has imported that block's payload and the 255 before it (linked by parent
hash), the engine starts there on the stored state (every node and code is
checked against its hash when read).
validator keys (EIP-2335 keystores, version 4; scrypt or pbkdf2, aes-128-ctr):
  import  decrypts every keystore*.json in --keystores DIR in memory with the
          password in --password-file FILE (checks the password and that the
          pubkey matches the secret key), then copies the keystore and the
          password file into DIR/validators/{keystores,secrets}/0x<pubkey>
          (mode 0600, directories 0700). Decrypted keys are never written.
          --no-store-password: do not copy the password file; give it at
          every start instead (run --validator-password-file FILE).
  list    prints the pubkeys of the imported keystores (no decryption).
  Keys and passwords are only read from files, never from the command line;
  group- or world-readable key and password files get a warning.

Status: pre-alpha; see docs/pieces/node.md.

specborn and specborn --help print this text and exit 0. specborn --version prints specborn 0.0.2-dev and exits 0 (a development version string; identify a build by its commit, see Installation). Any other first argument prints the text to standard error and exits 2.

specborn run #

Follow a chain whose genesis is Fulu or Gloas: find consensus and execution peers (discv5 and discv4 from the bootnode records you give, and/or the peers files you give), range-sync, follow the head over gossip, validate every block and execute every payload in-process, store accepted items in the data directory, answer JSON-RPC on 127.0.0.1 (unless --no-rpc), keep a transaction pool (unless --no-pool), and, with --validator-keys, perform the validator duties and block proposals of its keys. Runs until killed, until --run-for-ms has elapsed, or until doppelganger protection detects another instance of its keys.

Inputs:

FlagRequiredMeaning
--datadir DIRyesthe node's store; created if absent; a store of another chain is refused; a restart resumes from it (Data directory). The validator keystores and the slashing-protection database live here too
--network DIRyesthe network's config.yaml (with PRESET_BASE: mainnet and every key the node needs), genesis.ssz (the beacon genesis state, SSZ) and genesis.json (the execution genesis configuration and allocation)
--el-genesis FILEyesthe execution genesis block, RLP-encoded. Untrusted: its state root is checked against genesis.json's allocation and its hash against the beacon genesis state; on a mismatch the node does not start

Peers and discovery (Networking); at least one of --bootnodes and --peers is required:

FlagDefaultMeaning
--bootnodes ENRSnonediscv5 node records (enr:…), comma-separated, on the command line (not a file; checkpoint-sync takes a file instead). The flag may be repeated: the records add up. Consensus nodes of this chain (an eth2 entry with one of its fork digests) and execution nodes (an eth entry) found from them are dialed; records with an eth entry and a UDP port are also walked with discv4
--discovery-port N0the UDP port of discv5 (0 to 65535; 0: a port the system chooses). The node's own record carries no IP address, so it is not advertised as reachable
--peers FILEnoneconsensus peers, one per line cl <label> <ipv4> <tcp port> <peer id> (the peers file)
--el-peers FILEnoneexecution peers dialed in addition to those discovery finds, one per line el <label> <ipv4> <tcp port> <node public key, 128 hex digits> (execution peers)
--max-peers N16at most N consensus connections
--max-el-peers N4at most N execution (eth) connections to peers found by discovery; the peers of --el-peers are dialed in addition and do not count toward N (Run.dialEl counts only its own connections)

JSON-RPC and transaction pool (JSON-RPC):

FlagDefaultMeaning
--rpc-port N8545serve JSON-RPC on 127.0.0.1:N (1 to 65535). The address is always 127.0.0.1; only the port can be chosen. If the port is taken, the node does not start (exit 1)
--no-rpcoffno JSON-RPC server. Without the server and without the pool, the node opens no eth sessions
--rpc-allow-unprotected-txsoffaccept legacy transactions without EIP-155 replay protection in eth_sendRawTransaction (refused by default)
--rpc-default-tip WEI1000000the priority fee (in wei) that a block without transactions contributes to the gas-price oracle's samples (eth_gasPrice, eth_maxPriorityFeePerGas take the 60th percentile of the latest 20 blocks' samples)
--no-pooloffno transaction pool: the eth sessions announce and serve only the transactions submitted over JSON-RPC. By default the pool runs whenever the node has eth sessions (a JSON-RPC server or --el-peers): transactions received over eth/69 to eth/71 and over JSON-RPC are validated against the head state, announced and served; eth_sendRawTransaction answers with the pool's verdict; txpool_status reports its counts

Behaviour:

FlagDefaultMeaning
--run-for-ms Nnonestop after N milliseconds and exit 0 (default: run until killed)
--aggregatesoffalso subscribe to beacon_aggregate_and_proof, feeding aggregate votes into the fork choice (without it the fork choice sees the votes included in blocks and the proposer boost)
--no-ptcoffdo not subscribe to payload_attestation_message (Gloas payload-timeliness votes, followed by default because the fork choice's FULL/EMPTY decision reads them)
--keep-historyoffkeep every stored item (default: after a snapshot of the finalized block is written, the items before it are deleted except the newest 8,192, kept to serve recent history by range and root after a restart)
--verboseoffprint every protocol event to standard error (Logging)

Validator duties (Validators; not for real keys):

FlagDefaultMeaning
--validator-keysoffbefore anything else starts, decrypt every keystore imported into DIR/validators/ (see validator keys) into memory and print each public key. Fail-closed: if any keystore fails (unreadable, malformed, wrong or missing password, public key that does not match its secret key or its file name) every failing file is named and the node does not start (exit 1); with no imported keystore it does not start either. Decrypted keys are never written. Then the slashing-protection database of DIR is opened; every key must be imported or registered there (validator slashing-protection), or the node does not start (exit 1). With keys, the node performs the attester-side duties: attestations, aggregation, sync-committee messages and contributions, and Gloas payload-timeliness (PTC) votes, and block proposals when one of its validators is the slot's proposer (payload built in-process from the node's own transaction pool, no external builder or relay; Gloas: self-built). Attestations and blocks, the slashable messages, are signed only through the slashing-protection database (Lead decision D-32, as EIP-3076 defines it). The other duty messages go through the signer's gates (clock, VALID head, doppelganger, time jump); the proposer runs the same time-jump check before its first signature, the RANDAO reveal, so a refused slot signs nothing (Lead decision D-34, Time-jump gate). Nothing is signed unless its head is VALID
--validator-password-file FILEnonethe password for imported keystores that have no stored password (imported with --no-store-password); a stored password wins where there is one. Read once, at most 4096 bytes, may be a pipe (for example <(pass show validators)). Only with --validator-keys
--doppelganger-epochs N2doppelganger protection: sign nothing for N full epochs after the start while watching the network for attestations by these keys; on detection, stop all duties and exit with code 3. Only with --validator-keys. 0 is refused at start ("needs the explicit --doppelganger-opt-out"), and this flag cannot be combined with the opt-out, so the way to turn the protection off is --doppelganger-opt-out alone
--doppelganger-opt-outoffturn doppelganger protection off (a warning is printed at start). Only with --validator-keys; excludes --doppelganger-epochs
--allow-time-jumpoffsign even when a message is more than 6 hours after the newest signature in the slashing-protection database (refused by default; phase0 validator guide, protection best practice 4b). Applies to duty messages and, before the RANDAO reveal, to block proposals (D-34). Only with --validator-keys
--fee-recipient 0xADDRESSzero addressthe 20-byte execution address that receives the priority fees of the blocks this node proposes (40 hex digits, with or without 0x; anything else is a usage error, exit 2). Has an effect only with --validator-keys; without it the flag is accepted and ignored. With the default, the fees of proposed blocks go to the zero address, so set it (Fee recipient and graffiti)
--graffiti TEXTemptythe graffiti of proposed blocks: at most 32 bytes of UTF-8, zero-padded (longer text is a usage error, exit 2). Has an effect only with --validator-keys; without it the flag is accepted and ignored

Beacon API (Beacon API):

FlagDefaultMeaning
--beacon-apioffserve a read-only subset of the standard beacon node API on 127.0.0.1 only; no endpoint changes the node or submits anything
--beacon-api-port N5052its port (1 to 65535); only with --beacon-api. If the port is taken, the node does not start (exit 1)

run --help is not supported: it prints unknown or incomplete option: --help followed by the text above, and exits 2.

Exit status:

specborn run and specborn el-sync read their flags with the same parser (parseRun in Main.lean), so a flag that only the other command uses is accepted and has no effect: for example specborn run --follow or --anchor-state FILE changes nothing, and specborn el-sync --validator-keys loads no keys and signs nothing.

With --validator-keys the node prints, before its first chain: line (public keys are public data):

validator keys: 2 keystore(s) decrypted into memory in 153 ms (decrypted keys are never written)
validator keys: 0x996323af…33ea
validator keys: 0xa1584dfe…501f

(full 96-digit keys in the real output; captured with the repository's test keystores, see Validators).

specborn validator #

Two command groups that manage validator material in the data directory. They read and write files only; they open no network connection, and none of them signs anything.

CommandRequired flagsDoes
validator keys import--datadir DIR --keystores DIR --password-file FILE (optional --no-store-password)decrypts and checks every keystore of a directory, then copies it into DIR/validators/
validator keys list--datadir DIRprints the public keys of the imported keystores, without decrypting
validator slashing-protection import--datadir DIR --file FILEmerges an EIP-3076 interchange file into the database in DIR/validator/slashing-protection/
validator slashing-protection export--datadir DIR --file FILE (optional --pubkey 0xHEX, repeatable)writes the database as an EIP-3076 interchange file
validator slashing-protection register--datadir DIR --pubkey 0xHEX (repeatable)registers keys that have never signed on this chain

Mind the two directory names: keystores go to validators/ (plural), the slashing-protection database to validator/slashing-protection/ (singular). Each group has its own help text and section below. specborn validator with anything else prints the specborn usage on standard error and exits 2.

specborn checkpoint-sync #

Start the consensus layer from a finalized state and block that you supply (no default provider): --network DIR --anchor-state FILE --anchor-block FILE and one of --peers FILE / --bootnodes FILE; optionally your weak-subjectivity checkpoint --ws-checkpoint ROOT:EPOCH, and further options. It has its own help text, specborn checkpoint-sync --help (exit 0), reproduced with every option in Checkpoint-sync options. Missing inputs print that help on standard error and exit 2; a runtime error exits 1. It has no validator, JSON-RPC or beacon-API options: it follows the consensus chain only (Checkpoint sync).

specborn el-sync #

Download the execution-layer state of the operator's finalized anchor over snap (snap/1 or snap/2) from execution peers, verifying every answer against the pivot's state root before it is stored, and check the root of the whole stored state at the end (piece elsync; design and evidence in docs/pieces/elsync.md). Pre-alpha: it is the route by which the node reaches a live chain's state (Sepolia) without executing its history; it is not yet part of specborn run.

Inputs (all required except as stated):

FlagMeaning
--datadir DIRthe download store and the node store (DIR/nodes); created if absent
--network DIRas run: config.yaml and genesis.json (the execution fork times and chain id)
--el-genesis FILEas run: the execution genesis block, RLP
--anchor-state FILE, --anchor-block FILEthe operator's finalized BeaconState and its SignedBeaconBlock, SSZ, as checkpoint-sync; the pivot is the anchor's execution block, its header checked against the block hash in the anchor state
--el-peers FILEexecution peers, one per line el <label> <ipv4> <tcp port> <node public key, 128 hex digits>; this or --el-bootnodes (or --resume-pivot) is required
--el-bootnodes FILEenode:// records, one per line, walked with discv4 to find execution peers; a node whose record names another fork id (EIP-2124) is dropped, and the eth Status handshake checks the chain again for every peer

Following the chain while the state downloads:

FlagDefaultMeaning
--followoffrun the consensus node as checkpoint-sync from the same anchor (no backfill) while the state downloads; the pivot moves with the payloads it imports; once the state is complete and its root checked, the state is moved by the verified block access lists (EIP-7928) of the blocks from the last pivot up to the finalized execution block (never above it; those blocks are not executed and never reported VALID, Lead ruling D-36), and the in-process engine executes every payload above it. Until finality passes the engine's start block, its VALID answers mark nothing VALID: the node stays optimistic (status line start_final=false(start=N); Lead decision D-44) until a line ELFOLLOW D-44: finality has passed the engine's start block … marks the switch. The anchor must be Gloas: with a Fulu anchor --follow (and --resume-pivot) is refused before anything starts (exit 1), because the guards that keep unexecuted blocks from being reported VALID run on the Gloas import paths only
--peers FILEnonewith --follow: consensus peers, as checkpoint-sync
--bootnodes FILEnonewith --follow: one file of consensus bootnode records, as checkpoint-sync (unlike run, a file; given twice it is refused)
--no-advanceoffno move by access lists: every payload above the pivot is executed
--resume-pivot 0xHASHnonewith --follow: no download; --datadir holds the checked state of execution block HASH left by a stopped run (its ELSYNC DONE pivot line); the engine starts there once the consensus node has imported that block's payload and the 255 before it

Download tuning:

FlagDefaultMeaning
--pivot-move-every N32snap/2: move the pivot once the newest imported payload is N + --pivot-depth blocks above it (at least 1)
--pivot-depth N64snap/2: the pivot moves to the block N below the newest imported payload, never above the finalized execution block
--request-gap-ms N0milliseconds between snap requests (a test knob)
--response-bytes N524288the soft response limit asked for (1024 to 2097152)
--run-for-ms Nnonestop after N milliseconds
--verboseoffprotocol events on standard error, and one line per block moved by access lists

Nothing else is contacted: only the peers given or discovered from the records given. Exit status: without --follow, 0 when the download is complete and its root check passed, 1 otherwise (stopped early, a failed check, a runtime error); with --follow, as the consensus node's run (0 when --run-for-ms elapsed, 1 on a runtime error); 2 on a usage error (a missing required flag, a value that is not a number or out of range, --resume-pivot that is not a 32-byte hex hash, --bootnodes given twice).

specborn validator keys #

EIP-2335 keystores (version 4; scrypt or PBKDF2-SHA256, AES-128-CTR, the format of the staking deposit tools). There is no separate help text: specborn validator keys with --help, with no arguments, or with any argument it does not accept prints these two lines on standard error and exits 2:

usage: specborn validator keys import --datadir DIR --keystores DIR --password-file FILE [--no-store-password]
       specborn validator keys list --datadir DIR

specborn validator keys import #

FlagRequiredMeaning
--datadir DIRyesthe node's data directory; the keystores are copied to DIR/validators/keystores/0x<pubkey>.json and the password to DIR/validators/secrets/0x<pubkey> (files mode 0600, directories 0700)
--keystores DIRyesa directory of keystores: every regular file named keystore*.json is imported (the names the deposit tools write; deposit_data-*.json is not a keystore and is ignored)
--password-file FILEyesthe one password of all these keystores, read from a file (at most 4096 bytes; a trailing newline is removed by the EIP-2335 password processing, which also drops other control characters and applies Unicode NFKD)
--no-store-passwordnodo not copy the password file; the password must then be given at every node start, with the password-file option of specborn run

Each flag that takes a value may be given once (repeating it is a usage error). What happens, in order:

  1. Every keystore is decrypted in memory with the password (up to four at a time, within a 1 GiB scrypt memory budget), and checked: the password's checksum, the secret key's range, and that the keystore's public key is the secret key's. Keystores whose KDF parameters exceed fixed bounds (for example scrypt r above 32 or p above 16, more than 512 MiB of scrypt memory, PBKDF2 above 2^22 iterations) or whose JSON exceeds 64 KiB are refused before any work. Parameters far below the EIP-2335 defaults (devnet tools use them) are accepted with a warning.
  2. Only a keystore that passed is copied. An identical keystore that is already imported is reported already imported; a different keystore for the same public key is refused. A wrong password imports nothing and creates no directory.
  3. The decrypted secret keys are never written, printed or sent anywhere.

A keystore or password file readable by its group or by others gets a warning (use chmod 600). Output: one line per keystore (0x<pubkey>: imported (path m/12381/3600/…)), then imported N, already present N, failed N. Exit status: 0 if no file failed, 1 if any did (each failure named on standard error), 2 on a usage error.

specborn validator keys list #

specborn validator keys list --datadir DIR (exactly this form) prints 0x<pubkey> path <EIP-2334 path> for every keystore in DIR/validators/keystores/, without decrypting anything, then N keystore(s) in DIR/validators/keystores. A keystore file that cannot be read or parsed is named on standard error with its reason, the others are still listed, and the exit status is 1. A data directory without imported keystores (or one that does not exist) lists 0 keystore(s) and exits 0. Text taken from a keystore (its path) is printed with control and direction-changing characters escaped, so a keystore cannot send terminal escape sequences.

specborn validator slashing-protection #

The slashing-protection database (Validators): EIP-3076 interchange format version 5. specborn validator slashing-protection, with no arguments or --help, prints this text and exits 0:

specborn validator slashing-protection — EIP-3076 interchange (version 5)

USAGE:
  specborn validator slashing-protection import --datadir DIR --file FILE
                                                [--genesis-validators-root 0xHEX]
  specborn validator slashing-protection export --datadir DIR --file FILE
                                                [--minimal] [--pubkey 0xHEX]...
  specborn validator slashing-protection register --datadir DIR
                                                (--pubkey 0xHEX | --pubkeys-file FILE)...
                                                [--genesis-validators-root 0xHEX]

The database is DIR/validator/slashing-protection. Stop the validator client
first (the database is locked while it runs). Keys that are neither imported
nor registered are never signed for.

import   merge an interchange file (complete or minimal) into the database;
         the file's genesis_validators_root must be the database's; every
         key of the file is registered. Creating a new database needs
         --genesis-validators-root.
export   write the database (or the given keys) to FILE (must not exist);
         --minimal writes the minimal form (one block and one attestation
         per key, without signing roots).
register register keys that have NEVER signed on this chain (new
         validators) with an empty history. A key that signed under another
         client must be imported (its EIP-3076 export), not registered.
         --pubkeys-file: one 0x-prefixed public key per line.

Every subcommand takes the database's lock (IDX.lock) for its whole run, so it fails while another process of the same data directory holds the database. Nothing here reads a secret key or a password; public keys and roots are public data. Exit status: 0 on success, 1 on a runtime error (the reason on standard error), 2 on a usage error (an unknown option, a missing required flag, a malformed 0x value).

specborn validator slashing-protection import #

FlagRequiredMeaning
--datadir DIRyesthe data directory; the database is DIR/validator/slashing-protection/
--file FILEyesan EIP-3076 version 5 interchange file, complete or minimal, as other clients export it; at most 512 MiB (a larger file is refused from its size, without reading it)
--genesis-validators-root 0xHEXonly for a new databasethe chain's genesis_validators_root (0x + 64 hex digits). An existing database already has one, and the file's must equal it

The file is decoded completely before the database is touched, and then merged all or nothing in one durable commit. A file of another chain (different genesis_validators_root) or of another format version is refused. Every key in the file becomes registered (it may be signed for later, subject to its imported history). Output: imported N entries (M validators) into DIR/validator/slashing-protection.

specborn validator slashing-protection export #

FlagRequiredMeaning
--datadir DIRyesthe data directory (the database must exist)
--file FILEyeswhere to write the interchange file. It must not exist (an existing file is never overwritten); it is written as FILE.tmp, synced, and renamed
--minimalnowrite the minimal form: one block and one attestation per key, without signing roots
--pubkey 0xHEXno, repeatableexport only these keys (0x + 96 hex digits); default: every key

A registered key with no signed messages is exported with empty signed_blocks and signed_attestations (allowed by EIP-3076). Output: exported N validators to FILE.

specborn validator slashing-protection register #

FlagRequiredMeaning
--datadir DIRyesthe data directory
--pubkey 0xHEXat least one key, by either flag; both repeatablea public key (0x + 96 hex digits)
--pubkeys-file FILEa file with one 0x public key per line (blank lines and surrounding spaces ignored; at most 2^20 keys)
--genesis-validators-root 0xHEXonly for a new databaseas for import

Registers keys that have never signed a message on this chain (new validators): each gets an empty history, in one durable commit. Keys that are already registered keep their history. The database refuses to sign for any key that is neither imported nor registered, so a key moved from another client is not signed for until its history has been imported. Registering a key that signed under another client, instead of importing that client's export, gives up the protection against what it signed there; the command prints a note saying so every time. Output: registered N new keys in DIR/validator/slashing-protection (M were already registered or imported).

specborn-evm #

Runs Ethereum state tests (the JSON format of the execution-spec-tests state_tests and of go-ethereum's evm statetest) through specborn's EVM and prints go-ethereum-style JSON traces and the post-state roots, for differential fuzzing (specborn-evm for fuzzers). specborn-evm --help prints this text and exits 0:

usage: specborn-evm [--json|--trace] [--nomemory] [--noreturndata] [--nostack] statetest [--statetest.fork F] [--statetest.index N] [file ...]
  with no file: batch mode, one path per line on stdin
  supported forks: Cancun, Prague, Osaka, BPO1-BPO5, Amsterdam (shipped specborn EVM);
                   Byzantium, ConstantinopleFix/Petersburg, Istanbul, Berlin, London, Paris/Merge, Shanghai
                   (tool-only EVM, tested but not proved)
FlagMeaning
--json, --traceprint the per-operation trace (one JSON line per operation) on standard error
--nomemoryomit memory from the trace lines (printed otherwise)
--noreturndataomit returnData (it is omitted by default)
--nostackprint empty stacks
--statetest.fork Frun only the post entries of fork F (for example Osaka)
--statetest.index Nrun only the N-th entry of each selected fork's list

The command word is statetest; the files follow it. With no file, it reads one path per line from standard input (batch mode, as goevmlab's batch drivers use). Flags may appear anywhere on the line. It also accepts the go-ethereum spellings goevmlab's geth adapter passes (trace.format, trace.nomemory, trace.noreturndata, trace.nostack, written with two leading dashes, booleans as =true/=false) and a specborn-only statetest.notxbytes; the help text does not list these (docs/pieces/evmfuzz/HANDOFF.md §2). Exit status: 0 for any run with valid arguments (a failing test is a result, reported in the output), 2 for a usage error.

Checkpoint-sync options #

specborn checkpoint-sync --help prints this text and exits 0 (Checkpoint sync explains the procedure):

specborn checkpoint-sync — start the consensus layer from an operator-supplied finalized state

USAGE:
  specborn checkpoint-sync --network DIR --anchor-state FILE --anchor-block FILE (--peers FILE | --bootnodes FILE)
                           [--ws-checkpoint ROOT:EPOCH] [--datadir DIR] [--no-backfill] [--no-ptc] [--aggregates]
                           [--el-genesis FILE | --el-state FILE] [--safe-slots-to-import-optimistically N] [--max-optimistic-backlog N]
                           [--run-for-ms N] [--verbose]

  --network DIR          config.yaml (mainnet preset) and genesis.json (execution fork times)
  --anchor-state FILE    a finalized BeaconState (SSZ, Fulu or Gloas), from a source the operator trusts
  --anchor-block FILE    its SignedBeaconBlock (SSZ); the block's state_root must be the state's root
  --ws-checkpoint R:E    the operator's weak-subjectivity checkpoint (block root 0x…, epoch)
  --peers FILE           consensus peers, one per line: cl <label> <ipv4> <tcp port> <peer id>
  --bootnodes FILE       discv5 bootnode records (enr:…, e.g. the network's bootstrap_nodes.yaml): consensus
                         peers of this chain are discovered from them at start (bounded walk, at most 60 s)
  --discovery-port N     UDP port of the discovery walk (default: any free port)
  --datadir DIR          store imported and backfilled blocks, envelopes and columns here
  --no-backfill          do not backfill below the anchor
  --no-ptc               do not follow payload_attestation_message (Gloas PTC votes)
  --aggregates           also follow beacon_aggregate_and_proof (fork-choice votes)
  --el-genesis FILE      the execution genesis block (RLP; state from genesis.json's alloc): the in-process
                         engine catches up by executing every payload from it once backfill has reached it
                         (a chain that is Gloas, or Fulu, from genesis); answers move NOT_VALIDATED payloads
                         to VALID
  --el-state FILE        an execution state at some block H at or below the anchor's payload (headers and
                         accounts, the format the node persists in --datadir): checked at start (parent-hash
                         chain of headers ending at H, the state root recomputed and equal to H's, the
                         network's chain id); the engine executes every payload above H (Fulu anchors).
                         With --datadir the node persists the state of its finalized execution block and,
                         restarted with the same anchor, resumes from it
  --safe-slots-to-import-optimistically N
                         bellatrix/optimistic-sync.md §Fork Choice Poisoning (default 128). Accepted and
                         recorded, but it changes nothing on this node: the rule guards the import of a
                         merge block, and a Fulu or Gloas chain has none (the pinned spec build deprecates
                         it from Capella on)
  --max-optimistic-backlog N
                         keep at most N record entries (payload statuses) of NOT_VALIDATED blocks the fork
                         choice no longer holds (default 8192); older ones are dropped, oldest first, so the
                         record stays bounded when no execution layer answers (D-23)
  --run-for-ms N         stop after N ms

There is no default anchor source: the files are the operator's choice. The
anchor is trusted as the operator's input; the weak-subjectivity checkpoint is
checked against it and against the synced chain. The execution layer has no
state at the anchor: every payload is imported optimistically (NOT_VALIDATED)
and the node takes no validator duty on an optimistic head, until the execution
catch-up (--el-genesis, --el-state, or the state persisted in --datadir) has
executed the payload's chain.
FlagRequiredMeaning
--network DIRyesconfig.yaml (mainnet preset) and the execution genesis.json (fork times, blob schedule); no genesis.ssz needed
--anchor-state FILEyesthe finalized BeaconState (SSZ, Fulu or Gloas) you obtained and verified (obtaining an anchor)
--anchor-block FILEyesits SignedBeaconBlock (SSZ); its state_root must be the state's root
--peers FILEone of these twoconsensus peers, as for specborn run
--bootnodes FILEone of these twodiscv5 records (enr:… lines) to discover consensus peers from (a walk of at most 60 s at start)
--ws-checkpoint ROOT:EPOCHnoyour weak-subjectivity checkpoint (0x + 64 hex digits, a colon, a decimal epoch); checked against the finalized chain; a conflict stops the node
--discovery-port Nnothe UDP port of the discovery walk (default: any free port; 0 to 65535)
--datadir DIRnostore imported and backfilled blocks, envelopes and columns (without it nothing is written). A restart with the same anchor does not replay them; with a Fulu execution catch-up the directory also keeps the state of the finalized execution block (el-state.rlp), and a restart with the same anchor resumes the catch-up from it (Data directory)
--no-backfillnodo not backfill below the anchor (the weak-subjectivity checkpoint may then stay unconfirmed)
--no-ptcnodo not follow payload_attestation_message (Gloas)
--aggregatesnoalso follow beacon_aggregate_and_proof
--el-genesis FILEnothe execution genesis block (RLP): turns on the execution catch-up for a chain that is Gloas, or Fulu, from genesis
--el-state FILEnoan execution state at a block at or below the anchor's payload (the el-state.rlp a node with --datadir writes, or any other source): checked at start (header chain, the state root recomputed from every account and slot, the network's chain id), then every payload above that block is executed (Fulu anchors). With --datadir and neither option, a restart resumes from the state persisted there
--safe-slots-to-import-optimistically Nnoaccepted and recorded, no effect on Fulu or Gloas chains (default 128)
--max-optimistic-backlog Nnoat most N payload statuses of NOT_VALIDATED blocks the fork choice no longer holds are kept (default 8192)
--run-for-ms Nnostop after N milliseconds
--verbosenoprint protocol events to standard error

Note: --verbose appears only in the usage line of the help text, and --discovery-port only in its option list; both are accepted. Unlike specborn run, --bootnodes here names a file of records (one enr: record per line, as in a network's bootstrap_nodes.yaml), and given twice it keeps the last file.

Exit status: 0 when --run-for-ms elapsed (or after --help); 1 on a runtime error (the message, prefixed specborn checkpoint-sync: , on standard error: for example an anchor that fails a check, a conflicting weak-subjectivity checkpoint, or a data directory of another anchor); 2 on a usage error (the help follows on standard error).