SubnetMechanism

Storage Map v233 → current

Consensus mechanism type per subnet .

Explore chain
Queried by: validatorssubnet ownersdevelopers

The Big Picture

Subnets can use different consensus mechanisms. This identifies which mechanism is active on each subnet.

Use Cases

  • Check subnet mechanism type
  • Build mechanism-aware tools
  • Research subnet configurations

From Chain Metadata

============================ ==== Subnet Parameters ===== ============================

Purpose & Usage

Purpose

Track which mechanism each subnet uses.

Common Query Patterns

  • Query by netuid

Query Keys

#NameTypeDescription
1
key1
u16 key1 (u16)

Stored Value

value (u16)

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

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

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

Runtime Info

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