SubnetNotExists

Error Re-added v233 → v315, v320 → v326, v334 → v377, v385 → current 7.75

The specified subnet (netuid ) doesn't exist.

Encountered by: minersvalidatorsstakersdevelopers

Why This Error Exists

Every subnet operation requires a valid netuid. Subnets can be created, dissolved, or pruned over time, so the set of valid netuids changes. This error is a safety check that prevents operations on non-existent subnets. Always verify the subnet exists before attempting operations.

Deep Dive

SubnetNotExists and NetworkDoesNotExist are often used interchangeably. NetworksAdded(netuid) is the authoritative source - it returns true only for active subnets. Dissolved subnets have NetworksAdded return false even if they existed previously. TotalNetworks gives you the count but not which specific netuids are valid.

Debugging Example

You call add_stake(netuid=99, hotkey=5Xyz..., amount=10 TAO). Error: SubnetNotExists. Query NetworksAdded(99) - returns false. Subnet 99 doesn't exist. Query TotalNetworks - returns 45. Iterate NetworksAdded(0)...NetworksAdded(50) to find valid netuids.

Prevention Tips

  • Always verify NetworksAdded(netuid) returns true before operations
  • Keep a cached list of valid subnets, updated periodically
  • Double-check netuid parameters - common typos like 18 vs 81 cause this

From Chain Metadata

Trying to perform action on non-existent subnet.

What This Means

The specified subnet (netuid) doesn't exist.

Common Causes

  • Typo in netuid
  • Subnet was dissolved
  • Using wrong network (mainnet vs testnet)

How to Fix

  • Check SubtensorModule.NetworksAdded for valid netuids
  • Verify you're on the correct network

Storage to Check

Thrown By

Version History

v233 block 4,920,350 Added
v320 block 6,523,566 Re-added
v334 block 6,811,690 Re-added
v385 block 7,782,670 Re-added Current

Runtime Info

Pallet Index
7
Error Index
75
Error Code
7.75
Runtime Version
v393