Installation

# Prepare enviroment
Follow these steps to set up your environment, whether you’re creating a new DLP or joining an existing one as a validator.
Prerequisites
For all users:
- Git
- Python 3.11+
- Poetry
- Metamask or another EVM-compatible wallet
Additional for DLP creators:
1. Install Python 3.11:
sudo apt updatesudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppasudo apt updatesudo apt install python3.11 python3.11-venv python3.11-dev python3-pip
python3.11 --version


2. Install Poetry
curl -sSL https://install.python-poetry.org | python3 -

echo 'export PATH="$HOME/.local/bin:$PATH"' >> $HOME/.bash_profilesource $HOME/.bash_profilepoetry --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_profileecho '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' >> $HOME/.bash_profileecho '[ -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 -vnpm -v

# Setup steps
1. Clone Vana-dlp-chatgpt git repo
git clone https://github.com/vana-com/vana-dlp-chatgpt.gitcd 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)
Add Satori Testnet to Metamask:
RPC URL | https://rpc.moksha.vana.org |
---|---|
Chain ID | 14800 |
Network name | Vana Moksha Testnet |
Currency | VANA |
Block Explorer | https://moksha.vanascan.io |
5. Export your private keys
#For coldkeyvanacli wallet export_private_key

#For hotkeyvanacli 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:
- Visit https://faucet.vana.org
- 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 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 $HOMErm -rf vana-dlp-smart-contractsgit clone https://github.com/Josephtran102/vana-dlp-smart-contractscd vana-dlp-smart-contracts

Install Yarn
npm install -g yarnyarn --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:
Deploy contract on Moksha testnet (Recommend)
npx hardhat deploy --network moksha --tags DLPDeploy

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 Moksha testnetOD_CHAIN_NETWORK=mokshaOD_CHAIN_NETWORK_ENDPOINT=https://rpc.moksha.vana.org
# Optional: OpenAI API key for additional data quality checkOPENAI_API_KEY="sk-aIKhy1wmK6Vfx.............._CIJvZx7uZl2HjAA"
# Optional: Your own DLP smart contract address once deployed to the network, useful for local testingDLP_MOKSHA_CONTRACT=0x5cb.......eE04
# Optional: Your own DLP token contract address once deployed to the network, useful for local testingDLP_TOKEN_MOKSHA_CONTRACT=0x69e..........2741
# The private key for the DLP, follow "Generate validator encryption keys" section in the READMEPRIVATE_FILE_ENCRYPTION_PUBLIC_KEY_BASE64="LS0tLS1CRUdJTiB..........g=="

Get OpenAI API here: https://platform.openai.com/settings/profile?tab=api-keys
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:
- Import DLP token to Metamask using
<DataLiquidityPoolToken address>
- Send 10 your own DLP tokens (my token is JOSE) 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 ServiceAfter=network.target
[Service]Type=simpleUser=rootWorkingDirectory=/root/vana-dlp-chatgptExecStart=/root/.local/bin/poetry run python -m chatgpt.nodes.validatorRestart=on-failureRestartSec=10Environment=PATH=/root/.local/bin:/usr/local/bin:/usr/bin:/bin:/root/vana-dlp-chatgpt/myenv/binEnvironment=PYTHONPATH=/root/vana-dlp-chatgpt
[Install]WantedBy=multi-user.targetEOF

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
