Vana Node Setup - DLP Validator Satori

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 :

CPURAMDiskUbuntu

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:

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:

Note: you can only use the faucet once per day. Use the testnet faucet available at https://faucet.vana.org 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
  1. This script generates RSA key pairs for file encryption/decryption in the DLP.

  2. Follow the prompts to enter your name, email, and key expiration.

  3. The script generates four files:

    • public_key.asc and public_key_base64.asc (for UI)

    • private_key.asc and private_key_base64.asc (for validators)

# Deploy DLP Smart Contracts

Clone the DLP Smart Contract repo:

cd $HOME
git clone https://github.com/vana-com/vana-dlp-smart-contracts.git
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:

Copy env.example to .env

cp .env.example .env

Edit .env

nano .env

Deploy contracts:

npx hardhat deploy --network satori --tags DLPDeploy

Verify contract

npx hardhat verify --network satori <DataLiquidityPool address>
npx hardhat verify --network satori <DataLiquidityPoolToken address> "<DLP_TOKEN_NAME>" <DLP_TOKEN_SYMBOL> <OWNER_ADDRESS>

Configure the DLP contract (DataLiquidityPool):

  • Visit https://satori.vanascan.io/address/YOUR_DLP_POOL_CONTRACT_ADDRESS

  • Go to "Write proxy" tab

  • Connect your cold wallet which you imported at previous step

  • Call updateFileRewardDelay and set it to 0

  • Call addRewardsForContributors with 1000000000000000000000000 (1 million tokens)

Update the .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 Satori testnet
OD_CHAIN_NETWORK=satori
OD_CHAIN_NETWORK_ENDPOINT=https://rpc.satori.vana.org

# Optional: OpenAI API key for additional data quality check
OPENAI_API_KEY="YOUR_OPENAI_API_KEY"

# Optional: Your own DLP smart contract address once deployed to the network, useful for local testing

DLP_SATORI_CONTRACT="0x......YOUR_DLP_CONTRACT_POOL"
# Optional: Your own DLP token contract address once deployed to the network, useful for local testing

DLP_TOKEN_SATORI_CONTRACT="0x.....YOUR_DLP_TOKEN_CONTRACT"

# The private key for the DLP, follow "Generate validator encryption keys" section in the README
PRIVATE_FILE_ENCRYPTION_PUBLIC_KEY_BASE64="LS0B...........................E9DSy0tLS0tCg=="

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:

cd ~
cd vana-dlp-chatgpt

Fund Validator with DLP Tokens

For DLP creators:

  1. Import DLP token to Metamask using <DataLiquidityPoolToken address>

  2. Send 10 your own DLP tokens to your coldkey address and hotkey address

For non-DLP creators:

  1. Request DLP tokens from the DLP creator

  2. 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