NetworkRegistrationQueue

Storage Plain v432 → current

Subnet registrations that have been paid for but not yet assigned a netuid .

Explore chain
Queried by: subnet ownersanalyticsdevelopers

The Big Picture

Registration and netuid assignment became separate steps at v432. This queue is the gap between them, and its length is compared against DissolveCleanupQueue to decide whether a new registration waits or prunes an existing subnet.

Why This Matters

The cost is taken when the registration is queued, not when the netuid is assigned. The user-facing moment is NetworkRegistrationQueued; NetworkAdded is the runtime finishing the job later.

Example Scenario

Two subnets are mid-dissolution and the subnet limit is reached. A register_network call lands in this queue and emits NetworkRegistrationQueued. When one dissolution emits NetworkDissolveCleanupCompleted, the next idle block pops this entry and emits NetworkAdded.

Use Cases

  • Track time from paying the network lock to receiving a netuid
  • Surface pending registrations in a dashboard

From Chain Metadata

ITEM ( network_registration_queue ) Network registrations waiting to be executed.

Purpose & Usage

Purpose

Holds NetworkRegistrationInfo records for registrations accepted while no netuid slot was free, so they can be applied later once a dissolving subnet finishes cleanup.

Common Query Patterns

  • Show a pending registration to the coldkey that paid for it
  • Measure the backlog of registrations waiting on slots
  • Explain a NetworkAdded that has no extrinsic in its block

Notes

  • First appears at runtime v432, from block 8636190.
  • Each entry carries coldkey, hotkey, mechid, identity, lock_amount, median_subnet_alpha_price, registration_block and lock_id.
  • process_network_registration_queue applies at most one entry per idle block, and skips an entry whose application fails rather than stopping the queue.
  • From v472 only the head entry is attempted, once per idle call: it settles, waits on SubnetLimitReached, or is refunded and removed with NetworkRegistrationCancelled. New entries are backed by NetworkRegistrationEscrow, keyed by lock_id, and the entry encoding is unchanged.

Stored Value

network_registration_queue (Vec<NetworkRegistrationInfo>)

Default Value

0x00 (raw SCALE bytes)

Absent keys read as this value — querying a key that has never been written returns this default, not an error or empty result.

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 NetworkRegistrationQueue storage (no keys - plain value)
const result = await api.query.SubtensorModule.NetworkRegistrationQueue.getValue();
console.log("NetworkRegistrationQueue:", result);

On-Chain Activity

Write Frequency
●●○○○○ Minimal <10K est. writes

Fewer than 10K writes

#328 most written storage item

Write Source Calls + Hooks

Modified by both user extrinsics and runtime hooks

As of block 9,385,000

Runtime Info

View Source
Pallet
SubtensorModule
Storage Kind
Plain
First Version
v432
Current Version
v490