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
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 | key1 | u16 | key1 (u16) |
Stored Value
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 ServingRateLimit storage
const key1 = 0;
const result = await api.query
[stringCamelCase("SubtensorModule")]
[stringCamelCase("ServingRateLimit")](
key1
);
console.log("ServingRateLimit:", result.toHuman());Runtime Info
View Source- Pallet
- SubtensorModule
- Storage Kind
- Map
- First Version
- v101
- Current Version
- v393