LastRateLimitedBlock
Storage Map v273 → currentBlock of last rate-limited operation by key type.
Explore chainQueried by: developers
The Big Picture
Many operations are rate-limited. This storage tracks the last block for each rate-limited operation type, enabling the chain to enforce cooldowns.
Use Cases
- Check rate limit status
- Debug rate limit errors
- Build rate-aware tooling
From Chain Metadata
============================ ==== Rate Limiting ===== ============================ MAP ( RateLimitKey ) --> Block number in which the last rate limited operation occured
Purpose & Usage
Purpose
General rate limiting tracking for various operations.
Common Query Patterns
- Query by rate limit key
Query Keys
| # | Name | Type | Description |
|---|---|---|---|
| 1 | RateLimitKey | RateLimitKey | RateLimitKey (RateLimitKey, hashed key component) |
Stored Value
Block (u64)
RAO -> TAO (/ 10^9)
Default Value
0 0x0000000000000000
Absent keys read as this value — querying a key that has never been written returns this default, not an error or empty result.
Code Examples
// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// before running — the snippet compiles, but will fail at runtime as-is.
// ----------------------------------------------------------------------
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 LastRateLimitedBlock storage
const RateLimitKey = undefined as any /* RateLimitKey — replace with real value */;
const result = await api.query.SubtensorModule.LastRateLimitedBlock.getValue(RateLimitKey);
console.log("LastRateLimitedBlock:", result);On-Chain Activity
Write Frequency
●●●●○○ Medium 100K–1M est. writes
100K to 1M writes
#187 most written storage item
Write Source Calls + Hooks
Modified by both user extrinsics and runtime hooks
As of block 9,385,000
Runtime Info
View Source- Pallet
- SubtensorModule
- Storage Kind
- Map
- First Version
- v273
- Current Version
- v490