SubnetworkN

Storage Map v101 → v411

Number of registered neurons on a subnet .

Explore chain
Queried by: minersvalidatorssubnet ownersanalyticsdevelopers

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

From Chain Metadata

MAP ( netuid ) --> subnetwork_n (Number of UIDs in the network).

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

#NameTypeDescription
1
netuid
u16 Subnet ID

Stored Value

Number of registered neurons (UIDs in use) on this subnet

Relationships

Code Examples

import { createClient, Binary } from "polkadot-api";
import { getWsProvider } from "polkadot-api/ws";
import { sub } from "@polkadot-api/descriptors"; // generated by: npx papi add sub -w wss://entrypoint-finney.opentensor.ai:443

const client = createClient(getWsProvider("wss://entrypoint-finney.opentensor.ai:443"));
const api = client.getTypedApi(sub);

// Query SubnetworkN storage
const netuid = 1;

const result = await api.query.SubtensorModule.SubnetworkN.getValue(netuid);
console.log("SubnetworkN:", result);

On-Chain Activity

Write Frequency
●●●●○○ Medium 100K–1M est. writes

100K–1M estimated writes

#40 most written storage item

Write Source Calls + Hooks

Modified by both user extrinsics and runtime hooks

As of block 7,429,232

Version History

v101 block 1 Added
v123 block 720,235 Internal re-bind
v149 block 3,014,339 Internal re-bind
v166–v194 · runtime versions skipped on chain (never deployed)
v195 block 3,791,350 Internal re-bind
v278–v289 · runtime versions skipped on chain (never deployed)
v290 block 5,947,548 Internal re-bind Current

Runtime Info

View Source
Pallet
SubtensorModule
Storage Kind
Map
First Version
v101
Current Version
v411