InitialServingRateLimit

Constant v101 → current u64

Rate limits axon /prometheus updates.

Current Value

50
Relevant for: minersvalidatorsdevelopers

The Big Picture

Miners publish serving info (IP, port, protocol) via serve_axon and serve_prometheus. This constant limits how often they can update. It prevents spam while allowing legitimate changes like IP rotation or port updates. The rate limit balances flexibility with chain resource conservation.

Why This Matters

If you need to update your axon or prometheus endpoints, you must wait between updates. Plan IP changes and migrations around this cooldown.

Example

With ServingRateLimit of 50 blocks (~10 minutes), after calling serve_axon at block 1000, you can't update until block 1050. If your IP changes, you're offline to new connections for up to 10 minutes.

Common Questions

What if my IP changes unexpectedly?
You must wait for the rate limit. Use static IPs or services like dynamic DNS to minimize disruption. Plan for brief unavailability during transitions.
Does this apply to first-time serving setup?
No, initial setup is always allowed. The rate limit only applies to subsequent updates to existing serving info.

Use Cases

  • Serving operations
  • Rate limiting

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 InitialServingRateLimit constant
const value = await api.constants.SubtensorModule.InitialServingRateLimit();
console.log("InitialServingRateLimit:", value);
// Balance: divide by 10^9 for TAO
const tao = value / 1_000_000_000n;

Type Information

Type
u64
Byte Size
8 bytes
Encoding
fixed
Raw Hex
0x3200000000000000

Runtime Info

Pallet
SubtensorModule
First Version
v101
Latest Version
v101
Current Runtime
v411