DLP Validator

# 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:

Additional for DLP creators:

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-pip

2. Install Poetry

3. Install Nodejs & Npm

# Setup steps

1. Clone Vana-dlp-chatgpt git repo

2. Install dependencies

3. Install Vana CLI

4. Create wallet

This creates two key pairs:

  • Coldkey: for human-managed transactions (like staking)

  • Hotkey: for validator-managed transactions (like submitting scores)

triangle-exclamation

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

circle-exclamation

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.orgarrow-up-right 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:

  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:

Install Yarn

Install dependencies:

Edit the .env file in the vana-dlp-smart-contracts directory:

Copy env.example to .env

Edit .env

Deploy contracts:

Deploy contract on Moksha testnet (Recommend)

Update the .env file in the vana-dlp-chatgpt directory:

Paste this content and change your info:

Get OpenAI API here: https://platform.openai.com/settings/profile?tab=api-keysarrow-up-right

circle-info

DLP_MOKSHA_CONTRACT=0x... (DataLiquidityPool address)

DLP_TOKEN_MOKSHA_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:

Fund Validator with DLP Tokens

For DLP creators:

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

  2. Send 10 your own DLP tokens (my token is JOSE) 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:

Run Validator

You can run with systemd in the background with next step.

Find path of Poetry:

Create service:

Start service

Check log:

Last updated