Get Started
Requirements
- Requires Python 3.10.
- Bittensor
Below are the prerequisites for miners. You may be able to make a miner work off lesser specs but it is not recommended.
- 2 vCPU + 8 GB memory
- Run the miner using CPU
Installation
Clone repository
Change directory
Create Virtual Environment
Activate a Virtual Environment
Disable pip cache
Install dependencies
Create a local and editable installation
Create mining/miner_secrets.json
and replace xxxx with your API key.
Create Wallets
This step creates local coldkey and hotkey pairs for your miner.
The miner will be registered to the subnet specified. This ensures that the miner can run the respective miner scripts.
Create a coldkey and hotkey for your miner wallet.
(Optional) Getting faucet tokens
Faucet is disabled on the testnet. Hence, if you don’t have sufficient faucet tokens, ask the Bittensor Discord community for faucet tokens.
Register keys
This step registers your subnet miner keys to the subnet, giving it the first slot on the subnet.
To register your miner on the testnet add the --subtensor.network test
flag.
Follow the below prompts:
Check that your keys have been registered
This step returns information about your registered keys.
Check that your miner has been registered:
To check your miner on the testnet add the --subtensor.network test
flag
The above command will display the below:
Run your Miner
Run the subnet miner:
To run your miner on the testnet add the --subtensor.network test
flag and override the netuuid flag to --netuid 116
.
You will see the below terminal output:
Get Emissions
Register to the root network using the btcli
:
To register your miner to the root network on testnet use the --subtensor.network test
flag.
Then set your weights for the subnet:
To set your weights on testnet --subtensor.network test
flag.
Stop your miner
To stop your miner, press CTRL + C in the terminal where the miner is running.
Run Multiple Miners
You may use multiple miners when testing if you pass a different port per registered miner.
You can run a second miner using the following example command:
- Read about how-to guides in the Diátaxis framework