Nillion Validator Node Installation Guide
This guide provides instructions for setting up a Nillion validator node. It covers dependency installation, binary configuration, and service management for production-grade operations.
Prerequisites
Section titled “Prerequisites”Before starting the installation, ensure your environment meets the following requirements:
- Operating System: Ubuntu 22.04 LTS or higher.
- User Permissions: Standard user with
sudoprivileges. - Hardware: 4 vCPU, 8GB RAM, 100GB+ SSD recommended.
System Preparation
Section titled “System Preparation”Update the local package index and install the necessary build tools and dependencies.
sudo apt update && \sudo apt install curl git jq build-essential gcc unzip wget lz4 -yInstall Go Environment
Section titled “Install Go Environment”Nillion requires Go version 1.21.6 or higher. If you do not have Go installed, use the following commands:
cd $HOMEVER="1.21.6"wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"sudo rm -rf /usr/local/gosudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"rm "go$VER.linux-amd64.tar.gz"
# Update environment variables[ ! -f ~/.bash_profile ] && touch ~/.bash_profileecho "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profilesource $HOME/.bash_profilemkdir -p ~/go/binNode Installation
Section titled “Node Installation”Download and Install Binary
Section titled “Download and Install Binary”Download the pre-compiled nilchaind binary and move it to your executable path.
cd $HOMEwget -O nilchaind https://explorer.dongqn.com/guidenode/nillion/nilchaindchmod +x nilchaindmv nilchaind $HOME/go/bin/nilchaind versionInitialize Node
Section titled “Initialize Node”Configure the client settings and initialize the node’s home directory. Replace YOUR_MONIKER with your desired node name.
nilchaind config set client chain-id nillion-chain-testnet-1nilchaind config set client keyring-backend testnilchaind config set client node tcp://localhost:18057
nilchaind init YOUR_MONIKER --chain-id nillion-chain-testnet-1 --home=$HOME/.nillionappNetwork Configuration
Section titled “Network Configuration”Genesis and Address Book
Section titled “Genesis and Address Book”Download the latest genesis file and address book to ensure the node can connect to the peer-to-peer network.
curl -Ls https://explorer.dongqn.com/guidenode/nillion/genesis.json > $HOME/.nillionapp/config/genesis.jsoncurl -Ls https://explorer.dongqn.com/guidenode/nillion/addrbook.json > $HOME/.nillionapp/config/addrbook.jsonSeed and Gas Configuration
Section titled “Seed and Gas Configuration”Set the network seeds and define the minimum gas price to prevent transaction rejection.
# Set SeedsSEEDS="3f472746f46493309650e5a033076689996c8881@nillion-testnet.rpc.kjnodes.com:18059"sed -i.bak -e "s/^seeds *=.*/seeds = \"${SEEDS}\"/" $HOME/.nillionapp/config/config.toml
# Set Minimum Gas Pricesed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0unil\"|" $HOME/.nillionapp/config/app.tomlPruning Optimization (Optional)
Section titled “Pruning Optimization (Optional)”To reduce disk usage, configure custom pruning to keep only recent state entries.
sed -i \ -e 's|^pruning *=.*|pruning = "custom"|' \ -e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \ -e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' \ -e 's|^pruning-interval *=.*|pruning-interval = "19"|' \ $HOME/.nillionapp/config/app.tomlService Management
Section titled “Service Management”Create Systemd Service
Section titled “Create Systemd Service”Create a systemd unit file to manage the node process in the background with automatic restarts.
sudo tee /etc/systemd/system/nillion.service > /dev/null <<EOF[Unit]Description=Nillion NodeAfter=network.target
[Service]User=$USERType=simpleExecStart=$(which nilchaind) start --home $HOME/.nillionappRestart=on-failureLimitNOFILE=65535
[Install]WantedBy=multi-user.targetEOFStart the Node
Section titled “Start the Node”Reload the systemd daemon and enable the service.
sudo systemctl daemon-reloadsudo systemctl enable nillionsudo systemctl restart nillionTo monitor the node logs in real-time, use:
sudo journalctl -u nillion -f -o catWallet Operations
Section titled “Wallet Operations”Create a New Wallet
Section titled “Create a New Wallet”Generate a new keypair for your validator. Safeguard your mnemonic seed phrase.
nilchaind keys add YOUR_WALLET_NAMENote: If you need to restore an existing wallet, append the
--recoverflag to the command above.
Verify Synchronization
Section titled “Verify Synchronization”Before performing on-chain transactions, ensure your node is fully synced with the network.
nilchaind status --node tcp://127.0.0.1:18057 2>&1 | jq .SyncInfo.catching_upIf the output is false, your node is synced. You can then check your balance:
nilchaind q bank balances $(nilchaind keys show YOUR_WALLET_NAME -a)