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
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#
- Install Node.js 22:
winget install OpenJS.NodeJS.LTS. - 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. - 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 usenode packaging\cli\xlh.mjswherever the docs sayxlh. - Get the verifier. Build it inside Ubuntu (needs Rust 1.97.1 there) with
bash packaging/verify-only/build.sh, then tellxlhwhere it is withxlh verifier install --from /home/<you>/lathen-verify-only-v4/target/release/lathen-verify-v4. A path starting with/means "inside Ubuntu". - Run
xlh doctor.
macOS#
brew install node@22 coreutils.- Install the program from a copy of the source, as on Windows step 3.
- Build the verifier from source. It needs Rust 1.97.1:
bash packaging/verify-only/build.sh, thenxlh verifier install --from ~/lathen-verify-only-v4/target/release/lathen-verify-v4. 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)#
- Install Node.js 22.
timeoutis already part of coreutils. - Install the program from a copy of the source, as on Windows step 3.
- Verifier: build with
bash packaging/verify-only/build.sh(Rust 1.97.1; the result needs glibc 2.34 or newer), thenxlh verifier install --from <file>. xlh doctor.
First run: your own chain#
xlh init --new-chain
xlh doctor
xlh node start
xlh node statusinit 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 startThe 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#
| Command | What it does |
|---|---|
xlh node status | Is it running, at which block, private or public |
xlh node logs | The last lines the node wrote |
xlh node stop | Stop everything xlh started from this data folder |
xlh node start --with-market | Also 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#
| What | File | If you lose it | If someone else gets it |
|---|---|---|---|
| Block producer key (only if you created a chain) | chain/proposer/signing-key.json, not encrypted | Your chain can never get another block | They can produce blocks for your chain |
| Genesis | chain/genesis.json (public) | A wallet backup is useless without it | Nothing |
| Node identity | identity/node-identity.json | The 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.