Guide - Miner

Setup Subscription Key for Miners on UI to connect to Dojo Subnet for scoring

Note: URLs are different for devnet, testnet and mainnet. Devnet: Testnet: Mainnet:

  1. Activate the python virtual environment

source env/bin/activate
  1. Create your wallets and register them to our subnet

# create your wallets
btcli wallet new_coldkey

btcli wallet new_hotkey

# register your wallet to our subnet
# Devnet
btcli s register coldkey --wallet.hotkey hotkey --netuid 1 ws://

# Testnet
btcli s register coldkey --wallet.hotkey hotkey --netuid 98 test
  1. Retrieve the API Key and Subscription Key with Dojo CLI

# Start the dojo cli tool
# Upon starting the CLI it will ask if you wanna use the default path for bittensor wallets, which is `~/.bittensor/wallets/`.
# If you want to use a different path, please enter 'n' and then specify the path when prompted.

# TIP: During the whole process, you could actually use tab-completion to display the options, so you don't have to remember them all. Please TAB your way guys! 🙇‍♂️
# It should be prompting you to enter you coldkey and hotkey
# After entering the coldkey and hotkey, you should be in the command line interface for dojo, please authenticate by running the following command.
# You should see a message saying "✅ Wallet coldkey name and hotkey name set successfully."

# Afterwards, please generate an API Key with the following command.
# You should see a message saying:  "✅ All API keys: ['sk-<KEY>]". Displaying a list of your API Keys.
api_key generate

# Lastly, please generate a Subscription Key with the following command.
# You should see a message saying:  "✅ All Subscription keys: ['sk-<KEY>]". Displaying a list of your Subscription Keys.
subscription_key generate

# :rocket: You should now have all the required keys, and be able to start mining.

# Other commands available to the CLI:
# You can always run the following command to get your current keys.
api_key list
subscription_key list

# You can also delete your keys with the following command.
api_key delete
subscription_key delete
  1. Create .env file

# copy .env.miner.example
cp .env.miner.example .env

# ENV's that needs to be filled for miners:
# Please select one
DOJO_API_BASE_URL="" | "" | ""
  1. Start the miner by running the following commands:

# For Devnet
pm2 start \
--name dojo-miner \
--interpreter env/bin/python3 \
-- --netuid 1 \ coldkey \
--wallet.hotkey hotkey \
--logging.debug \
--axon.port 9602 \
--neuron.type miner \
--scoring_method "dojo" \ ws://

# For Testnet
pm2 start \
--name dojo-miner \
--interpreter env/bin/python3 \
-- --netuid 98 \ coldkey \
--wallet.hotkey hotkey \
--logging.debug \
--axon.port 9602 \
--neuron.type miner \
--scoring_method "dojo" \ test

Last updated