MechanismCountCurrent

Storage Map v320 → current

Current number of mechanisms active on a subnet .

Explore chain
Queried by: subnet ownersdevelopersanalytics

The Big Picture

Subnets can run multiple consensus mechanisms. This tracks how many are currently active on each subnet.

Use Cases

  • Monitor subnet mechanism configuration
  • Research multi-mechanism subnets
  • Build subnet configuration tools

From Chain Metadata

MAP ( netuid ) --> Current number of subnet mechanisms

Purpose & Usage

Purpose

Track how many consensus mechanisms are running.

Common Query Patterns

  • Query by netuid

Query Keys

#NameTypeDescription
1
key1
u16 key1 (u16)

Stored Value

value (u8)

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

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

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

Runtime Info

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