HotkeyLock

Storage Map v411 → current New

Total non-owner lock per hotkey per subnet . DMAP (subnet , hotkey ) → LockState.

Explore chain
Queried by: validatorssubnet ownersanalytics

The Big Picture

Where Lock records individual positions, HotkeyLock is the per-validator aggregate. This is what feeds conviction-based emission distribution.

Use Cases

  • Show validators sorted by locked conviction on a subnet
  • Compute the conviction-weighted share for owner-cut allocation

From Chain Metadata

DMAP ( netuid, hotkey ) --> LockState | Total lock per hotkey per subnet.

Purpose & Usage

Purpose

Aggregates the locked alpha pointed at a hotkey on a subnet across all locking coldkeys.

Common Query Patterns

  • Look up total locked alpha for a specific (netuid, hotkey)
  • Iterate hotkey locks on a subnet to rank validators by attracted conviction
Part of: Lock & Conviction

Query Keys

#NameTypeDescription
1
netuid
u16 netuid (u16, hashed key component)
2
hotkey
AccountId hotkey (AccountId, hashed key component) (hex -> SS58)

Stored Value

LockState (LockState)

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 HotkeyLock storage
const netuid = 1;
const hotkey = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";

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

Runtime Info

View Source
Pallet
SubtensorModule
Storage Kind
Map
First Version
v411
Current Version
v411