Validator Setup

Validators decrypt miner credentials, evaluate gradients inside a Nautilus TEE, and submit signed scores on-chain. Running a validator requires more infrastructure than a miner: an AWS EC2 instance with Nitro Enclave support, plus a staked Sui wallet.

Prerequisites

Requirement Minimum
AWS instance m5.xlarge or larger with Nitro Enclave support (e.g., c5.2xlarge)
RAM 8 GB (4 GB allocated to enclave)
Disk 50 GB
Network 50 Mbps download
Rust 1.80+
Docker For building the enclave EIF
SUI stake 10 SUI minimum (min_validator_stake)

Nitro Enclave-capable instance types: m5, m5a, m5ad, m5d, m5n, m5zn, c5, c5a, c5ad, c5d, c5n, r5, r5a, r5ad, r5b, r5d, r5n, p3, and others. Not available on free tier.

Step 1: Set Up AWS EC2

Launch an instance with Nitro Enclave support:

aws ec2 run-instances \
  --image-id ami-0c7217cdde317cfec \  # Ubuntu 22.04
  --instance-type c5.2xlarge \
  --enclave-options 'Enabled=true' \
  --key-name your-key-pair \
  --security-group-ids sg-xxxxxxxx \
  --tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=vram-validator}]'

On the instance, enable and install Nitro Enclaves tools:

sudo amazon-linux-extras enable aws-nitro-enclaves-cli
# or on Ubuntu:
sudo apt-get install aws-nitro-enclaves-cli aws-nitro-enclaves-cli-dev

sudo usermod -aG ne $USER
sudo systemctl enable nitro-enclaves-allocator.service --now

Configure enclave memory allocation in /etc/nitro_enclaves/allocator.yaml:

memory_mib: 4096   # 4 GB for the enclave
cpu_count: 2
sudo systemctl restart nitro-enclaves-allocator.service

Step 2: Install Dependencies

# Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env

# Docker (for building enclave EIF)
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER

# Sui CLI
# Download from https://github.com/MystenLabs/sui/releases
tar -xzf sui-*.tgz && cp sui ~/.cargo/bin/

Log out and back in for group membership to take effect.

Step 3: Clone and Build

git clone https://github.com/VRAM-AI/VRAM-HUB.git
cd VRAM-HUB
cargo build --workspace --release

Step 4: Build the Nautilus Enclave

./scripts/build-enclave.sh

This produces a vram-nautilus.eif file and prints PCR values:

PCR0: a1b2c3d4... (48 bytes, SHA-384 of OS image)
PCR1: e5f6g7h8... (48 bytes, SHA-384 of kernel)
PCR2: i9j0k1l2... (48 bytes, SHA-384 of application)

Save these values. You need them for on-chain registration.

Step 5: Configure Environment

cp .env.example .env

Edit .env:

# Required
VRAMHUB_WALLET_MNEMONIC="word1 word2 ... word12"

# Validator-specific
VRAMHUB_NAUTILUS_URL=http://localhost:3000
VRAMHUB_SEAL_THRESHOLD=2

# R2 (for downloading miner gradients)
VRAMHUB_R2_ACCOUNT_ID=your_cloudflare_account_id
VRAMHUB_R2_ACCESS_KEY_ID=your_r2_access_key
VRAMHUB_R2_SECRET_ACCESS_KEY=your_r2_secret_key

# Set after registering
VRAMHUB_VALIDATOR_UID=0

Step 6: Fund and Register

The validator daemon handles registration automatically on first startup. It submits register_peer on-chain using your wallet.

# Get devnet SUI
sui client faucet

# Start the validator — registers on first run
source .env
cargo run --release --bin vramhub-validator

On first run, the daemon prints your assigned uid:

[INFO] Registered as validator uid=1

Note it and add to .env:

VRAMHUB_VALIDATOR_UID=1

Then restart the validator so it reads the correct UID.

Step 7: Register the Enclave

See Registering a Nautilus Enclave for the one-time on-chain registration step.

Next: Running the Validator

See Running a Validator for the validator daemon, aggregator, and monitoring.