Install and first run

How to get the xlh command, set up your own chain, and start, check and stop a node.

On this page
  1. The one command
  2. Windows 10 or 11
  3. macOS
  4. Linux (x86-64)
  5. First run: your own chain
  6. Following an existing chain
  7. Day to day
  8. Back up the node's keys
  9. Remove

The one command#

xlh does everything. xlh doctor checks your computer at any point and tells you in plain words what is missing.

Windows 10 or 11#

  1. Install Node.js 22: winget install OpenJS.NodeJS.LTS.
  2. Install WSL 2 with Ubuntu 22.04 (PowerShell as administrator): wsl --install -d Ubuntu-22.04, restart, open "Ubuntu 22.04" once and create a user. The verifier is a Linux program, and the node starts it through a WSL distribution with exactly that name.
  3. Install the program. Packaged installers are available when the public network opens. For now, from a copy of the source: npm ci --prefix shielded-core, npm ci --prefix privacy-research, and use node packaging\cli\xlh.mjs wherever the docs say xlh.
  4. Get the verifier. Build it inside Ubuntu (needs Rust 1.97.1 there) with bash packaging/verify-only/build.sh, then tell xlh where it is with xlh verifier install --from /home/<you>/lathen-verify-only-v4/target/release/lathen-verify-v4. A path starting with / means "inside Ubuntu".
  5. Run xlh doctor.

macOS#

  1. brew install node@22 coreutils.
  2. Install the program from a copy of the source, as on Windows step 3.
  3. Build the verifier from source. It needs Rust 1.97.1: bash packaging/verify-only/build.sh, then xlh verifier install --from ~/lathen-verify-only-v4/target/release/lathen-verify-v4.
  4. xlh doctor.

On a Mac the data folder is ~/Library/Application Support/Lathen, but proof programs are kept in ~/.lathen/bin, because the node refuses a program path that contains a space.

Linux (x86-64)#

  1. Install Node.js 22. timeout is already part of coreutils.
  2. Install the program from a copy of the source, as on Windows step 3.
  3. Verifier: build with bash packaging/verify-only/build.sh (Rust 1.97.1; the result needs glibc 2.34 or newer), then xlh verifier install --from <file>.
  4. xlh doctor.

First run: your own chain#

xlh init --new-chain
xlh doctor
xlh node start
xlh node status

init creates a data folder for your user account (Windows %LOCALAPPDATA%\Lathen, macOS ~/Library/Application Support/Lathen, Linux ~/.local/share/lathen; --home <folder> or XLH_HOME changes it). It refuses a folder inside a git repository so keys cannot be published by accident. It creates the chain's first block description (genesis.json), the block producer's key and a node identity. Running it again changes nothing.

Following an existing chain#

xlh init --genesis <that chain's genesis.json> --peer-port <port of its block producer on this computer>
xlh node start

The block producer runs on the same computer. Following a remote one with xlh node start --seed <host:port> is available when the public network opens.

Day to day#

CommandWhat it does
xlh node statusIs it running, at which block, private or public
xlh node logsThe last lines the node wrote
xlh node stopStop everything xlh started from this data folder
xlh node start --with-marketAlso start the market data service and its web page

The node runs in the background and does not start again after a reboot; run xlh node start again.

Back up the node's keys#

WhatFileIf you lose itIf someone else gets it
Block producer key (only if you created a chain)chain/proposer/signing-key.json, not encryptedYour chain can never get another blockThey can produce blocks for your chain
Genesischain/genesis.json (public)A wallet backup is useless without itNothing
Node identityidentity/node-identity.jsonThe node gets a new identity; the node does not use it yet

Copy the block producer key somewhere safe and offline. For wallet backups see Create and back up a wallet.

Remove#

xlh node stop, uninstall the program, and delete the data folder only after you have the backups. Deleting the data folder deletes the keys.

Lathen documentation.