BlockAtRegistration

Storage Map v101 → current

Block number when a neuron registered.

Explore chain
Queried by: minersvalidatorsdevelopersanalytics

The Big Picture

This records when each neuron first registered. Combined with ImmunityPeriod, it determines if a neuron is still protected from pruning. Also useful for tenure analysis - how long have neurons been active?

Why This Matters

Are you still immune from pruning? Check (current_block - BlockAtRegistration) < ImmunityPeriod. Also shows your tenure on the subnet.

Example Scenario

Query BlockAtRegistration(netuid=1, uid=47) returns 7000000. Current block is 7005000. You registered 5000 blocks ago. If ImmunityPeriod is 7200, you're still protected.

Common Questions

What if I re-register?
If you're pruned and re-register, BlockAtRegistration updates to the new registration. You get a fresh immunity period.
Can I check other neurons' registration time?
Yes, this is public. You can see when any neuron registered and calculate their age and immunity status.

Use Cases

  • Check if you're still in immunity period
  • Calculate neuron age on a subnet
  • Build neuron tenure analytics
  • Research registration patterns over time
  • Debug immunity-related issues

Purpose & Usage

Purpose

Track registration timing for immunity - when did this neuron first appear.

Common Query Patterns

  • Query by netuid-uid
  • Calculate immunity status
  • Research neuron age
Part of: Neuron Pruning

Query Keys

#NameTypeDescription
1
key1
u16 key1 (u16)
2
key2
u16 key2 (u16)

Stored Value

Value in RAO (÷10⁹ for TAO)

RAO -> TAO (/ 10^9)

Relationships

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 BlockAtRegistration storage
const key1 = 0;
const key2 = 0;

const result = await api.query
  [stringCamelCase("SubtensorModule")]
  [stringCamelCase("BlockAtRegistration")](
  key1,
  key2
);

console.log("BlockAtRegistration:", result.toHuman());

On-Chain Activity

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

100K–1M estimated writes

#29 most written storage item

Write Source User Extrinsics

Modified via user-submitted extrinsics

As of block 7,429,232

Runtime Info

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