Vana Node Setup - DLP Validator Moshka

Special Thanks π : https://x.com/Keeperssd - https://medium.com/@hamzahnorsihab07 - https://service.josephtran.xyz/
Server Advisor :
βββ Contabo : https://bit.ly/contabourl
PQ : https://pq.hosting/?from=627713
Hetzner : https://hetzner.cloud/?ref=ASjlHtRt2swV
Digital Ocean : https://digitalocean.pxf.io/q465nn
Minimum hardware requirements :
1+
8 GB+
10+
Ubuntu 22.04

Update :
sudo apt update -y && sudo apt upgrade -y
sudo apt install ca-certificates zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev tmux iptables curl nvme-cli git wget make jq libleveldb-dev build-essential pkg-config ncdu tar clang bsdmainutils lsb-release libssl-dev libreadline-dev libffi-dev jq gcc screen unzip lz4 -y
1. Install Python 3.11:
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.11 python3.11-venv python3.11-dev
python3.11 --version
2. Install Poetry
curl -sSL https://install.python-poetry.org | python3 -
echo 'export PATH="$HOME/.local/bin:$PATH"' >> $HOME/.bash_profile
source $HOME/.bash_profile
poetry --version
3. Install Nodejs & Npm
# installs nvm (Node Version Manager)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
echo 'export NVM_DIR="$HOME/.nvm"' >> $HOME/.bash_profile
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' >> $HOME/.bash_profile
echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion' >> $HOME/.bash_profile
source $HOME/.bash_profile
nvm install --lts
node -v
npm -v
# Setup steps
1. Clone Vana-dlp-chatgpt git repo
git clone https://github.com/vana-com/vana-dlp-chatgpt.git
cd vana-dlp-chatgpt
2. Install dependencies
poetry install
3. Install Vana CLI
pip install vana
4. Create wallet
vanacli wallet create --wallet.name default --wallet.hotkey default
This creates two key pairs:
Coldkey: for human-managed transactions (like staking)
Hotkey: for validator-managed transactions (like submitting scores)
Follow the prompts to set a secure password. Save the mnemonic phrases securely; you'll need these to recover your wallet if needed.
Add Satori Testnet to Metamask:
Network name: Vana Moksha Testnet
RPC URL: https://rpc.satori.vana.org
Chain ID: 14800
Currency: VANA Block Explorer : https://moksha.vanascan.io
5. Export your private keys
Follow the prompts and securely save the displayed private keys
#For coldkey
vanacli wallet export_private_key
#For hotkey
vanacli wallet export_private_key
6. Import your coldkey and hotkey addresses to Metamask:
Click your account icon in MetaMask and select "Import Account"
Select "Private Key" as the import method
Paste the private key for your coldkey
Repeat the process for your hotkey
Fund both addresses with testnet VANA:
Connect your Metamask wallet
Request VANA for both your coldkey and hotkey addresses
Note: you can only use the faucet once per day. Use the testnet faucet available at https://faucet.vana.org/moksha to fund your wallets, or ask a VANA holder to send you some test VANA tokens.
Always keep your private keys and mnemonic phrases secure. Never share them with anyone.
# Creating a DLP
Generate Encryption Keys
Run the key generation script:
./keygen.sh
This script generates RSA key pairs for file encryption/decryption in the DLP.
Follow the prompts to enter your name, email, and key expiration.
The script generates four files:
public_key.asc
andpublic_key_base64.asc
(for UI)private_key.asc
andprivate_key_base64.asc
(for validators)
# Deploy DLP Smart Contracts
Clone the DLP Smart Contract repo:
cd $HOME
rm -rf vana-dlp-smart-contracts
git clone https://github.com/Josephtran102/vana-dlp-smart-contracts
cd vana-dlp-smart-contracts
Install Yarn
npm install -g yarn
yarn --version
Install dependencies:
yarn install
Edit the .env
file in the vana-dlp-smart-contracts
directory:
.env
file in the vana-dlp-smart-contracts
directory:Copy env.example
to .env
cp .env.example .env
Edit .env
nano .env

MOKSHA_RPC_URL=https://rpc.moksha.vana.org
MOKSHA_API_URL=https://api.moksha.vanascan.io/api
MOKSHA_BROWSER_URL=https://moksha.vanascan.io
Deploy contracts:
npx hardhat deploy --network moksha --tags DLPDeploy
Update the .env
file in the vana-dlp-chatgpt
directory:
.env
file in the vana-dlp-chatgpt
directory:nano ~/vana-dlp-chatgpt/.env
Paste this content and change your info:
# The network to use, currently Vana Moksha testnet
OD_CHAIN_NETWORK=moksha
OD_CHAIN_NETWORK_ENDPOINT=https://rpc.moksha.vana.org
# Optional: OpenAI API key for additional data quality check
OPENAI_API_KEY="sk-aIKhy1wmK6VfxzDYkro5pN........._CIJvZx7uZl2HjAA"
# Optional: Your own DLP smart contract address once deployed to the network, useful for local testing
DLP_MOKSHA_CONTRACT=0x657479FF1a0316c105B...........A96625b
# Optional: Your own DLP token contract address once deployed to the network, useful for local testing
DLP_TOKEN_MOKSHA_CONTRACT=0x73eB7F1c42F16A54188c294a878879Bf79c3304C
# The private key for the DLP, follow "Generate validator encryption keys" section in the README
PRIVATE_FILE_ENCRYPTION_PUBLIC_KEY_BASE64="LS0tLS1CRUdJTiB..........g=="
Get OpenAI API here: https://platform.openai.com/settings/profile?tab=api-keys
DLP_SATORI_CONTRACT=0x... (DataLiquidityPool address)
DLP_TOKEN_SATORI_CONTRACT=0x... (DataLiquidityPoolToken address)
PRIVATE_FILE_ENCRYPTION_PUBLIC_KEY_BASE64=... (content of public_key_base64.asc)
Find value of public_key_base64.asc
at: /root/vana-dlp-chatgpt/public_key_base64.asc
# Validator Setup
Ensure you're in the vana-dlp-chatgpt
directory:
vana-dlp-chatgpt
directory:cd ~
cd vana-dlp-chatgpt
Fund Validator with DLP Tokens
For DLP creators:
Import DLP token to Metamask using
<DataLiquidityPoolToken address>
Send 10 your own DLP tokens to your coldkey address and hotkey address
For non-DLP creators:
Request DLP tokens from the DLP creator
Once received, ensure they are in your coldkey address
Register as a Validator
Note that the following commands use the local chatgpt vanacli tool that supports custom dlp
commands.
Register your validator:
./vanacli dlp register_validator --stake_amount 10
./vanacli dlp approve_validator --validator_address=<your hotkey address from Metamask>
Run Validator
poetry run python -m chatgpt.nodes.validator
You can run with systemd in the background with next step.
Find path of Poetry:
echo $(which poetry)
Create service:
sudo tee /etc/systemd/system/vana.service << EOF
[Unit]
Description=Vana Validator Service
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/root/vana-dlp-chatgpt
ExecStart=/root/.local/bin/poetry run python -m chatgpt.nodes.validator
Restart=on-failure
RestartSec=10
Environment=PATH=/root/.local/bin:/usr/local/bin:/usr/bin:/bin:/root/vana-dlp-chatgpt/myenv/bin
Environment=PYTHONPATH=/root/vana-dlp-chatgpt
[Install]
WantedBy=multi-user.target
EOF
Start service
sudo systemctl daemon-reload && \
sudo systemctl enable vana.service && \
sudo systemctl start vana.service && \
sudo systemctl status vana.service
Check log:
sudo journalctl -u vana.service -f
Last updated