Use Cases

Mining on Bittensor

18min

Vast internal guide to test subnets inside the Opentensor image

This tutorial shows how to use the Bittensor testnet to create a subnet and run your incentive mechanism on it.

1. Install Bittensor subnet template

cd into your project directory and clone the bittensor-subnet-template repo:

Bash


Next, cd into bittensor-subnet-template repo directory:

Bash


Install the bittensor-subnet-template package:

Bash


2. Create wallets

Create wallets for subnet owner, subnet validator and for subnet miner.

Follow all of these steps:

Bash


Create a coldkey and hotkey for your miner wallet:

Bash


and

Bash


Create a coldkey and hotkey for your validator wallet:

Bash


and

Bash


3. Get the price of subnet creation

Creating subnets on the testnet is competitive. The cost is determined by the rate at which new subnets are being registered onto the chain.

Bash


The above command will show:

Bash


4 Go to the Bittensor discord channel and ask them for test Taos

Here is the link to the discord channel for Bittensor.

4.5 Transfer test Taos to your miner wallet

Use the following command to list all your wallets:

Text


You will get an output like this:

Text


Then transfer 0.001 Taos to your miner and validator wallet.

Transfer to miner wallet

Text


Make sure the --dest key is the same as your wallet key that you get from the btcli w list command.

Transfer to validator wallet

Repeat this step for the validator wallet as well.

Text


6. Register keys

This step registers your subnet validator and subnet miner keys to the subnet, giving them the first two slots on the subnet.

Register your miner key to the subnet:

Bash


Follow the below prompts:

Bash


Next, register your validator key to the subnet:

Bash


Follow the prompts:

Bash


7. Check that your keys have been registered

This step returns information about your registered keys.

Check that your miner has been registered:

Bash


The above command will display the below:

Bash


8. Run subnet miner and subnet validator

Run the subnet miner:

Bash


You will see the below terminal output:

Bash