OwnerLock

Storage Map v411 → current New

Total perpetual lock attributed to the owner hotkey for a subnet . MAP (netuid ) → LockState.

Explore chain
Queried by: subnet ownersanalytics

The Big Picture

Subnet owners build OwnerLock through auto-locked owner cut (when enabled) and direct lock_stake to their own hotkey. It is the conviction shield against challengers.

Use Cases

  • Compute whether a subnet ownership transfer would trigger
  • Track the strength of subnet ownership over time

From Chain Metadata

MAP ( netuid ) --> LockState | Total perpetual lock to the owner hotkey for a subnet.

Purpose & Usage

Purpose

Tracks the cumulative owner-side locked position that protects subnet ownership.

Common Query Patterns

  • Query OwnerLock[netuid] to read current owner conviction
  • Compare against challenger hotkeys to determine ownership outcome
Part of: Lock & ConvictionSubnet Emission Control

Query Keys

#NameTypeDescription
1
netuid
u16 netuid (u16, hashed key component)

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 OwnerLock storage
const netuid = 1;

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

Runtime Info

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