NetworksAdded

Storage Map v101 → v411

Whether a subnet with given netuid exists.

Explore chain
Queried by: developersminersvalidatorssubnet ownersanalytics

The Big Picture

Subnets come and go. Before interacting with a subnet, you need to know if it exists. This storage is the canonical source for subnet existence - true means active, false (or missing) means dissolved or never created.

Why This Matters

Trying to register on subnet 47? First check if it exists. This prevents wasted transactions and helps you build robust applications that handle subnet lifecycle.

Example Scenario

Query NetworksAdded(netuid=1) returns true - subnet 1 exists. Query NetworksAdded(netuid=999) returns false - no such subnet. Iterate all netuids to get a list of active subnets.

Common Questions

What happens when a subnet is dissolved?
The entry becomes false. The netuid may be reused for a new subnet later.
How do I get a list of all active subnets?
Iterate NetworksAdded from 0 to TotalNetworks and collect where value is true.

Use Cases

  • Validate netuid before attempting registration
  • Enumerate all active subnets on the network
  • Build subnet discovery and listing tools
  • Check if a subnet still exists before querying its data

From Chain Metadata

MAP ( netuid ) --> network_is_added

Purpose & Usage

Purpose

Check if a subnet ID is valid and active.

Common Query Patterns

  • Check if a netuid is valid before registration
  • List all active subnets by iterating
Part of: Block EmissionTAO FlowSubnet Management

Query Keys

#NameTypeDescription
1
netuid
u16 Subnet ID

Stored Value

Whether the subnet has been added (the chain stores this as a bool)

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 NetworksAdded storage
const netuid = 1;

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

Version History

v101 block 1 Added
v120 block 315,568 Internal re-bind
v121 block 518,345 Internal re-bind
v123 block 720,235 Internal re-bind
v149 block 3,014,339 Internal re-bind
v151 block 3,157,274 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