Guide - Miner

Note: URLs are different for devnet, testnet and mainnet, always check the Official Links!

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


Getting Started

Important

This setup guide uses specific tools to ensure a smooth installation process:

Please ensure these prerequisites are installed on your system before proceeding with the installation steps, these are needed by both validators and miners.

  1. Clone the project,

# 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/
  1. Install PM2, one way is through fnm

# for linux, a convenience script is available
./scripts/setup/install_pm2.sh

# for mac/linux (if you do not trust the bash script)
curl -fsSL https://fnm.vercel.app/install | bash
# for windows, choose 1 of the following,
# based on https://github.com/Schniz/fnm?#manually
cargo install fnm
choco install fnm
scoop install fnm
winget install Schniz.fnm

# run any post-install shell setup scripts
# based on https://github.com/Schniz/fnm?#shell-setup

# assuming we are using zsh
echo 'eval "$(fnm env --use-on-cd --shell zsh)"' >> ~/.zshrc
# you can tell what shell you're using by running:
echo $0

# verify fnm installation
fnm --version

# get npm & node, and verify npm installation
fnm install lst/iron && npm --version

# install pm2 and verify installation
npm install -g pm2 && pm2 --version
  1. Install Docker & Docker Compose

For Docker installation, see https://docs.docker.com/engine/install/ for instructions

For Docker Compose installation, see https://docs.docker.com/compose/install/linux for instructions

  1. Create your wallets if they aren't created yet

  1. Get some TAO and ensure you have enough TAO to cover the registration cost

Note

the "RECYCLE" column represents the subnet registration cost

  1. Register to our subnet


Mining

There are currently 2 options when mining, where Option 1 is to connect to our centralized backend, and Option 2 is to self-host the full-stack worker platform application.

Option 1: Centralised Method

  1. Create .env file with the following values first.

  1. Run the CLI to retrieve API Key and Subscription Key, see Dojo CLI for usage.

  1. Complete the .env file with the variables below:

  1. Start the miner by running the following commands:

Option 2: Decentralised Method

  1. Create .env file with the following values first.

  1. Start the worker api which will be connected to the CLI later.

  1. Run the CLI to retrieve API Key and Subscription Key, see Dojo CLI for usage.

  1. Grab the API key and add it to your .env file

  1. Now, run the full miner service.

Last updated