A Bittensor subnet for MASA's Subnet 42.
- A registered hotkey on subnet 165 on the test network, or 42 on finney (mainnet)
- Docker and Docker Compose installed
- Your coldkey and hotkey mnemonics
- Clone and configure:
git clone https://github.com/masa-finance/subnet-42.git
cd subnet-42
cp .env.example .env
- Edit
.env
with your keys:
# Your coldkey mnemonic
COLDKEY_MNEMONIC="your coldkey mnemonic here"
# Your hotkey mnemonic (must be already registered on subnet 165)
HOTKEY_MNEMONIC="your hotkey mnemonic here"
- Run as a validator or miner:
# Run as a validator
docker compose --profile validator up
# Run as a miner
docker compose --profile miner up
The containers will automatically pull the latest images from Docker Hub.
Required environment variables in .env
:
COLDKEY_MNEMONIC # Your coldkey mnemonic
HOTKEY_MNEMONIC # Your hotkey mnemonic (must be registered on subnet 165)
ROLE # Either "validator" or "miner"
Optional environment variables in .env
:
NETUID=165 # Subnet ID (default: 165)
SUBTENSOR_NETWORK=test # Network (default: test)
VALIDATOR_PORT=8092 # Port for validator API (default: 8092)
MINER_PORT=8091 # Port for miner API (default: 8091)
View logs:
# All logs
docker compose logs -f
# Specific service logs
docker compose logs subnet42 -f # Main service
docker compose logs tee-worker -f # TEE worker (miner only)
To verify your node is running correctly:
- Check if your hotkey is registered:
btcli s metagraph --netuid 165 --network test
- Check the logs:
docker compose logs subnet42 -f
You should see:
- Successful connection to the test network
- Your hotkey being loaded
- For validators: Connection attempts to miners (note: on testnet, many miners may be offline which is normal)
- For miners: TEE worker initialization and connection to validators
- Pull latest images:
docker compose pull
- Clean start:
# Stop and remove everything
docker compose down -v
# Start fresh as validator
docker compose --profile validator up
# Or start fresh as miner
docker compose --profile miner up
- Common issues:
- Ensure your hotkey is registered on subnet 165 (glagolitic_yu) on the test network
- Check logs for any initialization errors
- Verify your mnemonics are correct
- For validators: Connection errors to miners on testnet are normal as many may be offline
- For miners: Ensure TEE worker is running and accessible