StakingOperationRateLimiter

Storage Map v290 → current

Rate limiting markers for staking operations.

Explore chain
Queried by: developers

The Big Picture

Staking operations between specific accounts are rate-limited. This marker indicates recent operations for rate limit enforcement.

Use Cases

  • Debug rate limit issues
  • Monitor staking operation frequency

From Chain Metadata

DMAP ( hot, cold, netuid ) --> rate limits for staking operations Value contains just a marker: we use this map as a set.

Purpose & Usage

Purpose

Track staking operations for rate limiting enforcement.

Common Query Patterns

  • Query by (hotkey, coldkey, netuid)

Query Keys

#NameTypeDescription
1
key1
AccountId key1 (AccountId) (hex -> SS58)
2
key2
AccountId key2 (AccountId) (hex -> SS58)
3
key3
u16 key3 (u16)

Stored Value

value (bool)

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 StakingOperationRateLimiter storage
const key1 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const key2 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const key3 = 0;

const result = await api.query
  [stringCamelCase("SubtensorModule")]
  [stringCamelCase("StakingOperationRateLimiter")](
  key1,
  key2,
  key3
);

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

Runtime Info

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