MechanismCountCurrent
Storage Map v320 → currentCurrent number of mechanisms active on a subnet .
Explore chainQueried 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
| # | Name | Type | Description |
|---|---|---|---|
| 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