Guide - Validator

To get started as a miner or validator, these are the common steps both a miner and validator have to go through.

The following guide is tailored for distributions utilizing APT as the package manager. Adjust the installation steps as per the requirements of your system.

We will utilize ~/opt directory as our preferred location in this guide.

Install PM2 (If not already installed)

cd dojo/scripts/setup/
./install_pm2.sh

Install Docker (If not already installed)

./install_docker.sh

Clone the project, set up and configure python virtual environment

# In this guide, we will utilize the ~/opt directory as our preferred location.
cd ~/opt

# Clone the project
git clone https://github.com/tensorplex-labs/dojo.git
cd dojo/

# Set up python virtual environment and pip packages
# Here we use venv for managing python versions

python3 -m venv env
source env/bin/activate
pip install -e .
# for developers, install the extras
pip install -e ".[dev]"

Requirements for running a validator

  • Openrouter API Key

  • Deploy the synthetic QA API on the same server as the validator

Pull the synthetic qa api git submodule

# pull submodules
git submodule update --init

Setup the env variables, these are marked with "# CHANGE" in dojo-synthetic-api/docker-compose.yml

Run the server

cd dojo-synthetic-api
docker compose up -d

Start Validating

Head back to dojo project and set up the .env file

Please refer to the Official Links to double check any URLs.

cd dojo

# copy .env.validator.example
cp .env.validator.example .env

# edit the .env file with vim, vi or nano
# Please select one
DOJO_API_BASE_URL="https://dojo-api-testnet.tensorplex.ai"
SYNTHETIC_API_URL="http://127.0.0.1:5003"
TOKENIZERS_PARALLELISM=true
OPENROUTER_API_KEY="sk-or-v1-<KEY>"
WANDB_API_KEY="<wandb_key>"

# Optional or if you've chosen it
TOGETHER_API_KEY=
OPENAI_API_KEY=

Start the validator

# start the validator
# Testnet
pm2 start main_validator.py \
--name dojo-validator \
--interpreter env/bin/python3 \
-- --netuid 98 \
--wallet.name coldkey \
--wallet.hotkey hotkey \
--logging.debug \
--axon.port 9603 \
--neuron.type validator \
--subtensor.network test

To start with autoupdate for validators (optional)

# Testnet
pm2 start run.sh \
--interpreter bash \
--name dojo-autoupdater \
-- --wallet.name coldkey \
--wallet.hotkey hotkey \
--logging.debug \
--subtensor.network test \
--neuron.type validator \
--axon.port 9603

Last updated