NetworkRegistrationQueued

Event v432 → v440, v441 → current #141

Emitted when a subnet registration is accepted and deferred because no netuid slot is free yet.

View events on chain
Useful for: subnet ownersanalyticsdevelopers

The Big Picture

From v432 a subnet registration at the subnet limit no longer prunes an existing subnet immediately when dissolutions are already pending. It waits in a queue instead. The lock is taken at this event; the netuid arrives later, once a dissolving subnet finishes cleanup and frees its slot.

Why This Matters

An indexer that attributes every NetworkAdded to a register_network extrinsic in the same block will find no extrinsic for queued registrations, because the assignment happens in on_idle. This event is where the user action actually occurred.

Example Scenario

The subnet limit is reached and two subnets are mid-dissolution. You call register_network. Instead of NetworkAdded you get NetworkRegistrationQueued with your coldkey, hotkey and lock_amount. When one of the dissolving subnets emits NetworkDissolveCleanupCompleted, the next idle block assigns you its netuid and emits NetworkAdded.

Common Questions

Is my lock refunded if the registration sits in the queue?
Not while it waits. The cost is taken when the registration is queued, and the entry carries lock_amount and lock_id for when it is applied. Through v470 the cost is a balance lock on the coldkey. From v472 it is transferred to an escrow account for that entry (NetworkRegistrationEscrow), settlement pays exactly that amount to the subnet, and an entry whose settlement fails with anything but SubnetLimitReached is refunded in full and removed with NetworkRegistrationCancelled.
Does the queue preserve order?
Through v470, not strictly: process_network_registration_queue applies one registration per idle block and skips entries whose application fails, continuing to the next one. From v472, yes: only the head entry is attempted, and it either settles, waits (SubnetLimitReached) or is refunded and removed.

Use Cases

  • Show a pending state to someone who has paid to register a subnet
  • Explain why NetworkAdded can appear with no extrinsic in the same block
  • Track the backlog of paid-but-unassigned registrations

How to Use This Event

  • → Pair with NetworkAdded to measure time from payment to assignment
  • → Read NetworkRegistrationQueue to see the current backlog

From Chain Metadata

A network registration cost has been queued.

Triggers

Preconditions

  • Active subnet count plus DissolveCleanupQueue length has reached the subnet limit
  • DissolveCleanupQueue is longer than NetworkRegistrationQueue, so a slot is expected to free up
  • The caller paid the network lock

Effects

Postconditions

  • A NetworkRegistrationInfo record is pushed onto NetworkRegistrationQueue
  • NetworkLastLock and NetworkLastLockBlock are updated
  • No netuid is assigned yet and NetworkAdded has not fired

Side Effects

  • The registration completes later in on_idle via process_network_registration_queue
  • NetworkAdded fires at that later block, in a block with no corresponding extrinsic

Event Data

#NameTypeDescription
0
coldkey
AccountId coldkey: Account address (32 bytes, SS58-encoded) (hex -> SS58)
1
hotkey
AccountId hotkey: Account address (32 bytes, SS58-encoded) (hex -> SS58)
2
mechid
u16 mechid (u16)
3
identity
Option Option<SubnetIdentityOfV3>identity (Option)
4
lock_amount
TaoBalance lock_amount: TAO amount in RAO (÷10⁹ for TAO)
5
median_subnet_alpha_price
FixedU128 U64F64median_subnet_alpha_price: Unsigned substrate-fixed u64.64 via .bits codec (inner u128). Real value = bits / 2^64. Do NOT truncate to u64.
6
registration_block
u64 registration_block (u64) (RAO -> TAO (/ 10^9))

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);

// Subscribe to NetworkRegistrationQueued events
client.finalizedBlock$.subscribe(async (block) => {
  const events = await api.event.SubtensorModule.NetworkRegistrationQueued.get(block.hash);
  for (const evt of events) {
    console.log("NetworkRegistrationQueued:", evt.payload);
  }
});

Version History

v432 block 8,636,190 7 args
v441 block 8,765,683 7 args Current

Runtime Info

View Source
Pallet Index
7
Event Index
141
First Version
v432
Current Version
v472