This guide outlines how to set up and operate a MetaHash SN73 Validator, which is responsible for:
- Tracking cross-subnet alpha deposits,
- Pricing and rewarding alpha contributions,
- Issuing SN73 token incentives to bonded miners.
- Subtensor lite node with
--pruning=2000configured - Python 3.10+ installed
- pip/venv for isolated environment
- A funded coldkey/hotkey wallet with stake registered in Subnet 73
# Clone the MetaHash repository
git clone https://github.com/fx-integral/metahash && cd metahash
# Create and activate virtual environment
python3 -m venv .venv
source .venv/bin/activate
# Install MetaHash and dependencies
pip install uv
uv pip install -e .Set the environment values for your validator identity and network:
BT_WALLET_NAME=validator-wallet
BT_HOTKEY=validator-hotkey
BT_NETWORK=finneyIf needed, create and register your validator wallet:
btcli new-coldkey --wallet.name validator-wallet
btcli new-hotkey --wallet.name validator-wallet --wallet.hotkey validator-hotkeyRegister your hotkey on Subnet 73:
btcli subnets register --wallet.name mywallet --wallet.hotkey myhotkey --netuid 73Make sure your wallet has sufficient stake to appear to operate as a validator.
pm2 start python --name metahash-validator -- neurons/validator.py --netuid 73 --subtensor.network finney --wallet.name validator-wallet --wallet.hotkey validator-hotkey --logging.debugpython neurons/validator.py --netuid 73 --subtensor.network finney --wallet.name validator-wallet --wallet.hotkey validator-hotkey --logging.debugThis validator will:
- Detect new
StakeTransferredevents (alpha deposits) - Apply finality lag to avoid chain reorg risk
- Evaluate alpha using pricing oracle and slippage
- Emit
set_weights()to reward coldkeys with SN73 incentives - Record all participation via epoch-based ledger
- Validators run
EpochValidatorNeuron, executing once per chain tempo - Events are scanned from the chain using
alpha_transfers.py - Prices are fetched via dynamic pricing interfaces
- Rewards are calculated using
rewards.py, with planck-level precision - Scores are normalized, and weights are set via
subtensor.set_weights(...)
Validators apply:
| Mechanism | Purpose |
|---|---|
| Slippage Curve | Discounts alpha based on pool depth |
| Bonding Curve | Prices SN73 rewards against alpha input |
| Finality Lag | Ensures event stability before reward distribution |
| Price Oracle | Retrieves TAO/alpha price for reward conversion |
All monetary math is computed using
decimal.Decimalwith 60-digit precision.
- Wallet sync is enforced on failure to avoid dehydration
- Rewards only emitted if valid scores exist (
E-2guard) adaptive_wait_for_head()ensures efficient epoch pacing- Coldkey addresses are masked when dumping logs
Use PM2 to view logs:
pm2 logs metahash-validatorOr run in debug mode directly:
python neurons/validator.py --logging.debugalpha_transfers.py: monitors alpha inflow eventsrewards.py: calculates SN73 reward weightsbond_utils.py: implements the bonding curvevalidator.py: main loop, score aggregation, weight emissionepoch_validator.py: orchestrates the epoch-pacing cycle
Once running, your validator:
- Accepts OTC alpha deposits from bonded coldkeys
- Measures value and liquidity-adjusted worth of alpha
- Incentivizes contributors with appropriately priced SN73 rewards
- Builds the MetaHash alpha treasury to benefit all SN73 holders
- 📁 GitHub: https://github.com/fx-integral/metahash/
- 📚 Bittensor Docs: https://docs.bittensor.com/
- 🔐 Coldkey and Hotkey Workstation Security: https://docs.learnbittensor.org/getting-started/coldkey-hotkey-security/