HotkeyRoot

Storage Map v437 → current

DMap ( netuid , hotkey ) --> root_hotkey | first hotkey in this subnet 's

Explore chain

From Chain Metadata

DMap ( netuid, hotkey ) --> root_hotkey | first hotkey in this subnet's swap lineage. Absent means the hotkey is its own root (never swapped into, or never recorded). Ban/score against the root, not a single SS58.

Purpose & Usage

Purpose

swap lineage. Absent means the hotkey is its own root (never swapped

Common Query Patterns

  • Query by key
  • Iterate all entries

Query Keys

#NameTypeDescription
1
key1
NetUid key1 (NetUid)
2
key2
AccountId key2 (AccountId) (hex -> SS58)

Stored Value

value (AccountId)

hex -> SS58

Default Value

None (absent keys return no value)

Optional storage: querying a key that has never been written returns no value (None) — do not assume a zero default.

Code Examples

// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// before running — the snippet compiles, but will fail at runtime as-is.
// ----------------------------------------------------------------------
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 HotkeyRoot storage
const key1 = undefined as any /* NetUid — replace with real value */;
const key2 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";

const result = await api.query.SubtensorModule.HotkeyRoot.getValue(key1, key2);
console.log("HotkeyRoot:", result);

On-Chain Activity

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

Fewer than 10K writes

#232 most written storage item

Write Source User Extrinsics

Modified via user-submitted extrinsics

As of block 9,385,000

Runtime Info

View Source
Pallet
SubtensorModule
Storage Kind
Map
First Version
v437
Current Version
v490