The validator is streaming binary outcomes events to miners. The events can come directly from external APIs or be LLM generated. Every time an event settles, the validator will score the miners which submitted a prediction for that given event.
The main computational prerequisite is related to storage. Validators are now storing the entire time-series of a miner's predictions for a given event, cf. the scoring doc.
It is essential that validators do not wipe out their local database and persist the data. We automatically implement a discard functionality for data which is more than 1 month old.
There are two auto-update scripts in the repo: auto_update and update_script.
IMPORTANT
Before attempting to register on mainnet, we strongly recommend that you run a validator on the testnet. For that matter ensure you add the appropriate testnet flags.
--netuid 155 --subtensor.network test
| Environment | Netuid |
|---|---|
| Mainnet | 6 |
| Testnet | 155 |
DANGER
- Do not expose your private keys.
- Only use your testnet wallet.
- Do not reuse the password of your mainnet wallet.
- Requires at least Python 3.10.
- Requires at least SQLite 3.37.
Below are the computational prerequisites for validators.
- Validators are recommended to have at least 16GB of RAM and 2CPUs. We expect daily requirements to be lower but this would provide sufficient margin.
As we optimize the fetching and processing of events these requirements may evolve.
First clone this repo by running git clone . Then to run a validator:
Clone repository
git clone https://github.com/amedeo-gigaver/infinite_games.gitChange directory
cd infinite_gamesCreate Virtual Environment
python -m venv venvActivate a Virtual Environment
source venv/bin/activateInstall dependencies
pip install -r requirements.txtThe venv should be active whenever the neurons are run.
This step creates local coldkey and hotkey pairs for your validator.
The validator will be registered to the subnet specified. This ensures that the validator can run the respective validator scripts.
Create a coldkey and hotkey for your validator wallet.
btcli wallet new_coldkey --wallet.name validator
btcli wallet new_hotkey --wallet.name validator --wallet.hotkey defaultFaucet is disabled on the testnet. Hence, if you don't have sufficient faucet tokens, ask the Bittensor Discord community for faucet tokens. Go to the help-forum on the Discord and post your request in the "Requests for Testnet TAO" thread.
This step registers your subnet validator keys to the subnet.
btcli subnet register --wallet.name validator --wallet.hotkey defaultTo register your validator on the testnet add the --subtensor.network test flag.
Follow the below prompts:
>> Enter netuid (0): # Enter the appropriate netuid for your environment
Your balance is: # Your wallet balance will be shown
The cost to register by recycle is τ0.000000001 # Current registration costs
>> Do you want to continue? [y/n] (n): # Enter y to continue
>> Enter password to unlock key: # Enter your wallet password
>> Recycle τ0.000000001 to register on subnet:8? [y/n]: # Enter y to register
📡 Checking Balance...
Balance:
τ5.000000000 ➡ τ4.999999999
✅ RegisteredThis step returns information about your registered keys.
Check that your validator key has been registered:
btcli wallet overview --wallet.name validatorTo check your validator on the testnet add the --subtensor.network test flag
The above command will display the below:
Subnet: 6 # or 155 on testnet
COLDKEY HOTKEY UID ACTIVE STAKE(τ) RANK TRUST CONSENSUS INCENTIVE DIVIDENDS EMISSION(ρ) VTRUST VPERMIT UPDATED AXON HOTKEY_SS58
validator default 197 True 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0 0.00000 56 none 5GKkQKmDLfsKaumnkD479RBoD5CsbN2yRbMpY88J8YeC5DT4
1 1 1 τ0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 ρ0 0.00000
Wallet balance: τ0.000999999The following options are available to set the environment on start.
If wrong options / combinations are provided, the validator will error and a message displayed.
--netuid
Provide the subnet UID.
Possible values:
- 6 for mainnet
- 155 for testnet
--subtensor.network
Provide the subtensor network to connect to.
Typical values:
- finney for mainnet
- test for testnet
- local for local node
- could be omitted for additional configs
--ifgames.env
Provide the InfiniteGames environment.
Only required when subtensor network is not finney or test.
Possible values:
- prod when running on mainnet
- test when running on testnet
--wallet.name
Provide the name of your wallet.
--wallet.hotkey
Provide the wallet's hotkey.
Run the following command inside the infinite_games directory:
python neurons/validator.py --netuid 155 --subtensor.network test --wallet.name validator --wallet.hotkey defaultExample when ifgames.env required
python neurons/validator.py --netuid 155 --subtensor.network local --ifgames.env test --wallet.name validator --wallet.hotkey defaultInstall and run pm2 commands to keep your validator online at all times.
sudo apt update
sudo apt install npm
sudo npm install pm2 -gConfirm pm2 is installed and running correctly
pm2 lsCommand to run the validator:
pm2 start neurons/validator.py --interpreter python3 --name validator -- --netuid 155 --subtensor.network test --wallet.name validator --wallet.hotkey hotkeyYou can monitor the status and logs using these commands:
pm2 status
pm2 logs 0Useful PM2 Commands
The following Commands will be useful for management:
pm2 list # lists all pm2 processes
pm2 logs <pid> # replace pid with your process ID to view logs
pm2 restart <pid> # restart this pic
pm2 stop <pid> # stops your pid
pm2 del <pid> # deletes your pid
pm2 describe <pid> # prints out metadata on the processRegister to the root network using the btcli:
btcli root registerTo register your validator to the root network on testnet use the --subtensor.network test flag.
Then set your weights for the subnet:
btcli root weightsTo set your weights on testnet --subtensor.network test flag.
To stop your validator, press CTRL + C in the terminal where the validator is running.