The Big Picture
Each subnet has MaxAllowedUids slots. SubnetworkN tells you how many are filled. When SubnetworkN = MaxAllowedUids, the subnet is full and new registrations must prune existing neurons. Lower SubnetworkN means available slots for easy registration.
Why This Matters
Want to register on a subnet? If SubnetworkN < MaxAllowedUids, there's room and registration is straightforward. If equal, you'll need to beat someone's pruning score to get in.
Example Scenario
Query SubnetworkN(netuid=1) returns 240. MaxAllowedUids is 256. The subnet has 16 open slots - you can register without pruning anyone. At 256/256, it's full competition.
Common Questions
- What's a typical utilization rate?
- Popular subnets are often 100% full. Newer or less popular subnets may have open slots. Full subnets indicate high demand and competition.
- Does higher N mean a better subnet?
- More neurons indicates interest, but quality matters more than quantity. Check emission rates and performance metrics too.
- Can this exceed MaxAllowedUids?
- No, SubnetworkN is capped at MaxAllowedUids. That's the maximum capacity.
Use Cases
- Check if subnet has room for new registrations
- Calculate subnet utilization percentage
- Compare competition levels across subnets
- Build capacity dashboards
- Track subnet growth over time
Purpose & Usage
Purpose
Track subnet utilization and remaining capacity - how many of the available slots are filled.
Common Query Patterns
- Query by netuid
- Check if subnet has capacity for registration
- Calculate utilization rate with MaxAllowedUids
Query Keys
| # | Name | Type | Description |
|---|---|---|---|
| 1 | key1 → netuid | u16 | Subnet ID |
Stored Value
Number of registered neurons
Relationships
Modified By
Related Events
Code Examples
import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";
const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });
// Query SubnetworkN storage
const key1 = 0;
const result = await api.query
[stringCamelCase("SubtensorModule")]
[stringCamelCase("SubnetworkN")](
key1
);
console.log("SubnetworkN:", result.toHuman());On-Chain Activity
100K–1M estimated writes
#40 most written storage item
Modified by both user extrinsics and runtime hooks
As of block 7,429,232
Runtime Info
View Source- Pallet
- SubtensorModule
- Storage Kind
- Map
- First Version
- v101
- Current Version
- v393