Queried by: minersvalidatorsdeveloperssubnet owners
The Big Picture
Neurons can't update their Axon endpoints constantly. ServingRateLimit ensures stability - once you set an endpoint, you must wait this many blocks before changing it. Prevents endpoint spam and gives validators time to cache discovery data.
Why This Matters
Changing your server IP or port? You can only do it every ServingRateLimit blocks. Plan infrastructure changes accordingly.
Example Scenario
Query ServingRateLimit(netuid=1) returns 50 blocks (~100 seconds). After updating your Axon, you must wait 50 blocks before the next update.
Common Questions
- Why limit updates?
- Stability. Validators cache endpoint information. Too frequent changes make discovery unreliable and waste resources.
- What if I need to change urgently?
- You can't bypass the limit. Plan migrations in advance. If critical, you may need to temporarily go offline until the limit resets.
- Does this affect initial serving?
- First serve_axon works immediately. The limit applies to subsequent updates.
Use Cases
- Check how often you can update your endpoint
- Plan infrastructure changes around rate limits
- Build serving update scheduling tools
- Debug endpoint update failures
- Design subnet serving parameters
From Chain Metadata
MAP ( netuid ) --> serving_rate_limit
Purpose & Usage
Purpose
Rate limit endpoint updates - prevents spam and ensures stable discovery.
Common Query Patterns
- Query by netuid
- Plan endpoint updates
- Build serving management tools
Query Keys
| # | Name | Type | Description |
|---|---|---|---|
| 1 | netuid | u16 | netuid (u16, hashed key component) |
Stored Value
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 ServingRateLimit storage
const netuid = 1;
const result = await api.query.SubtensorModule.ServingRateLimit.getValue(netuid);
console.log("ServingRateLimit:", result);Version History
v101 block 1 Added
v123 block 720,235 Internal re-bind
v149 block 3,014,339 Internal re-bind
v166–v194 · runtime versions skipped on chain (never deployed)
v195 block 3,791,350 Internal re-bind
v278–v289 · runtime versions skipped on chain (never deployed)
v290 block 5,947,548 Internal re-bind Current
Runtime Info
View Source- Pallet
- SubtensorModule
- Storage Kind
- Map
- First Version
- v101
- Current Version
- v411