Network validation is thus open to participants who have registered a uid on any subnetwork and who have enough TAO staked on their hotkey to be considered a top 128 validator.
Attaching TAO on your validator can be achieved in two ways.
1# Stake funds to your hotkey account within the bittensor incentive mechanism. 2btcli stake 3 --wallet.name YOUR_WALLET_NAME 4 --wallet.hotkey YOUR_HOTKEY_NAME
1# Nominate your hotkey as a delegate, making it available for delegated stake. 2btcli nominate 3 --wallet.name YOUR_WALLET_NAME 4 --wallet.hotkey YOUR_HOTKEY_NAME 5 6# To delegate funds to the hotkey of a delegate (your own or others) 7btcli delegate 8 --delegate_ss58key DELEGATE_SS58KEY
After attaining enough TAO for a validator permit we recommend running Bittensor's core validator. You can run and install the core validator from source.
1$ git clone https://github.com/opentensor/bittensor.git 2$ python3 -m pip install -e bittensor/ 3$ tree bittensor 4 bittensor/ 5 neurons/ # Miners and Validators across all subnetworks. 6 text_prompting/ # Miners and Validators for the text_prompting subnetwork. 7 validators/ # Validators. 8 core/ # The root folder for the core validator. 9 neuron.py # Core validator miner main script. 10 requirements.txt # Core validator requirements. 11 README.md # Core validator instructions. 12 ...
When running, specify the --netuid 1
parameter to select the appropriate subnetwork for your validator, e.g. Subnetwork 1.
1python3 ~/.bittensor/bittensor/neurons/text_prompting/validators/core/neuron.py 2 --netuid 1 3 --wallet.name YOUR_WALLET_NAME 4 --wallet.hotkey YOUR_HOTKEY_NAME 5 --logging.trace
It is recommended that you run validator using a process manager such as PM2.
1sudo apt-get install npm 2npm install pm2 3pm2 start <path to validator.py> 4 --name my_validator 5 --interpreter python3 6 -- ... your args i.e. --wallet.name ...
Only the largest 128 validators, in terms of stake, on any particular subnetwork are considered to have validator permit
. Validators with permit are considered active within Bittensor's mining mechanism, Yuma Consensus, can validate the network, and get dividends
.
The amount can be pulled from the metagraph based on your uid.
1import bittensor as bt 2subnet = bt.metagraph(1) 3wallet = bt.wallet( name = 'my_wallet_name', hotkey = 'my_validator_hotkey_name' ) 4my_uid = subnet.hotkeys.index( wallet.hotkey.ss58_address ) 5print ('validator permit', subnet.validator_permit[ my_uid ])
The amount of TAO required depends on how the other largest 128 wallets distribute TAO across themselves. You can calculate the minimum using bt.metagraph
:
1import bittensor as bt 2subnet = bt.metagraph(1) 3stake_requirement = subnet.S.sort()[0][-128:] 4print ('validator permit requirement', stake_requirement)