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
netuid
u16 netuid (u16, hashed key component)

Stored Value

Current (u8)

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

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

Runtime Info

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