6.2 Running on Mainnet
Deploy C-SWON on the Bittensor mainnet (finney).
Before mainnet: complete 6.4 Local Deploy, then 6.1 Running on Testnet.
Security
- Do not expose your private keys. Keep coldkeys on secure, isolated machines.
- Use separate wallets for owner, validator, and miner roles.
- Ensure your incentive mechanism is resistant to abuse before going live.
Prerequisites
| Requirement | Version | Check |
|---|---|---|
| Python | 3.10–3.12 | python3 --version |
| bittensor | 10.x | pip show bittensor |
| TAO | enough for subnet creation + staking | btcli wallet balance |
1. Install C-SWON
git clone https://github.com/adysingh5711/C-SWON.git
cd C-SWON
python3.12 -m venv .venv && source .venv/bin/activate
pip install bittensor && pip install -e .
2. Create Wallets
btcli wallet new_coldkey --wallet.name owner
btcli wallet new_hotkey --wallet.name owner --wallet.hotkey default
btcli wallet new_coldkey --wallet.name vali
btcli wallet new_hotkey --wallet.name vali --wallet.hotkey default
btcli wallet new_coldkey --wallet.name miner
btcli wallet new_hotkey --wallet.name miner --wallet.hotkey default
3. Create Subnet
# Check current lock cost (fluctuates with demand, minimum ~100 TAO)
btcli subnet lock_cost
# Create subnet
btcli subnet create --wallet.name owner
Note the netuid. Then start emissions:
btcli subnet start --netuid <netuid> --wallet.name owner
4. Register and Stake
# Register
btcli subnet register --netuid <netuid> --wallet.name miner --wallet.hotkey default
btcli subnet register --netuid <netuid> --wallet.name vali --wallet.hotkey default
# Stake validator (needs stake weight >= 1000 for validator permit)
# Stake weight = α_stake + 0.18 × τ_stake
btcli stake add --netuid <netuid> --wallet.name vali --wallet.hotkey default
5. Configure Environment
# Mainnet with live execution:
export CSWON_MOCK_EXEC=false
export CSWON_SYNTHETIC_SALT=<your-persistent-salt>
Generate salt once:
python -c "import secrets; print(secrets.token_hex(32))"
6. Run Miner and Validator
# Miner (Terminal 1)
python neurons/miner.py \
--netuid <netuid> \
--wallet.name miner \
--wallet.hotkey default \
--axon.port 8091
# Validator (Terminal 2)
python neurons/validator.py \
--netuid <netuid> \
--wallet.name vali \
--wallet.hotkey default \
--axon.port 8092
7. Enable Emissions
btcli root register --wallet.name owner
btcli root weights --wallet.name owner
8. Monitoring
After the first tempo (~72 minutes with default tempo=360):
# Check metagraph
btcli subnet metagraph --netuid <netuid>
# Check wallet overview
btcli wallet overview --wallet.name vali
btcli wallet overview --wallet.name miner
vtrustshould begin climbing after tempo 3–5- Monitor incentive and emission columns
- Use the C-SWON audit endpoint (
http://localhost:9090/audit-flags) for scoring data
Security Considerations
- Keep coldkeys on a separate, secure machine — never on mining/validating servers
- Hotkeys can be on mining/validating servers safely
- Monitor for unusual scoring patterns via the audit flag endpoint
- Keep the codebase updated with latest security patches
- Minimum wallet balance: 500 RAO (existential deposit)
Navigation
| ← Previous | 6.1 Running on Testnet |
| → Next | 6.3 Running Locally |
| Index | Documentation Index |