Validator Setup Guide

Step-by-step guide to setting up a Realm validator node. This guide assumes you have hardware meeting the requirements.

Prerequisites

Before starting, ensure you have:
  • Hardware meeting minimum requirements
  • 100,000 RLM for staking
  • Ubuntu 22.04 LTS installed
  • NVIDIA GPU with CUDA support

1. Install Dependencies

bash
# Install dependencies (Ubuntu 22.04)
sudo apt update
sudo apt install -y build-essential cmake git curl
# Install CUDA (if not already installed)
wget https://developer.download.nvidia.com/compute/cuda/12.3.0/local_installers/cuda_12.3.0_545.23.06_linux.run
sudo sh cuda_12.3.0_545.23.06_linux.run
# Verify CUDA
nvidia-smi
nvcc --version

2. Build Validator

bash
# Clone the repository
git clone https://github.com/realm-exchange/chain.git
cd chain
# Build with GPU support
cmake --preset=release
make -C build/release -j$(nproc)
# Verify build
./build/release/realm-validator --version

3. Generate Validator Keys

bash
# Generate validator keypair
realm-validator keygen --output /etc/realm/validator.key
# This creates:
# - /etc/realm/validator.key (secret key - KEEP SAFE!)
# - /etc/realm/validator.pub (public key)
# Back up the secret key securely!
# If lost, you cannot recover your validator identity
# Set permissions
sudo chown realm:realm /etc/realm/validator.key
sudo chmod 600 /etc/realm/validator.key

Backup Your Keys!

Your validator secret key is your identity. If lost, you cannot recover your validator or access staked funds. Store multiple encrypted backups.

4. Configure Validator

Create the configuration file:

/etc/realm/validator.yamlyaml
# /etc/realm/validator.yaml
# Network identity
validator:
name: "my-validator"
# P2P configuration
network:
listen_addr: "0.0.0.0:9091"
external_addr: "YOUR_PUBLIC_IP:9091"
seeds:
- "seed1.realm.software:9091"
- "seed2.realm.software:9091"
- "seed3.realm.software:9091"
# gRPC API
api:
listen_addr: "0.0.0.0:9090"
# Storage
storage:
data_dir: "/var/lib/realm"
# GPU
gpu:
device_id: 0
batch_size: 8192
# Consensus
consensus:
block_time_ms: 25
max_block_size: 1048576

Key configuration options:

  • external_addr — Your public IP and port
  • seeds — Initial peers to connect to
  • gpu.device_id — GPU to use (0 for first GPU)
  • gpu.batch_size — Signatures per batch (8192 optimal)

5. Setup Systemd Service

/etc/systemd/system/realm-validator.serviceini
# /etc/systemd/system/realm-validator.service
[Unit]
Description=Realm Validator Node
After=network.target
[Service]
Type=simple
User=realm
Group=realm
ExecStart=/usr/local/bin/realm-validator --config /etc/realm/validator.yaml
Restart=always
RestartSec=5
LimitNOFILE=65535
# Environment
Environment="CUDA_VISIBLE_DEVICES=0"
[Install]
WantedBy=multi-user.target

6. Start Validator

bash
# Create user and directories
sudo useradd -r -s /bin/false realm
sudo mkdir -p /var/lib/realm /etc/realm
sudo chown realm:realm /var/lib/realm
# Copy binary and config
sudo cp build/release/realm-validator /usr/local/bin/
sudo cp config/validator.yaml /etc/realm/
# Install systemd service
sudo cp deploy/systemd/realm-validator.service /etc/systemd/system/
sudo systemctl daemon-reload
# Start validator
sudo systemctl enable realm-validator
sudo systemctl start realm-validator
# Check status
sudo systemctl status realm-validator
sudo journalctl -u realm-validator -f

7. Verify Operation

Check that your validator is syncing:

bash
# Check sync status
curl http://localhost:9090/v1/chain/info
# Should show:
# - Block height increasing
# - Connected peers > 0
# - Syncing: true (initially) → false (when caught up)
# Check logs
sudo journalctl -u realm-validator -f

8. Stake RLM

Once synced, stake RLM to activate your validator. See the Staking Guide for details.

typescript
# Using the SDK
const stake = await client.stake({
amount: 100000, // 100,000 RLM
validatorAddress: 'YOUR_VALIDATOR_ADDRESS',
});

9. Setup Monitoring

We recommend setting up Prometheus + Grafana for monitoring:

  • CPU/GPU utilization
  • Memory usage
  • Block height and sync status
  • Peer connections
  • Signature verification rate

Grafana Dashboard

Import our pre-built dashboard from deploy/grafana/realm-dashboard.json.

Next Steps