Ensures validators remain active to keep their slots.
Current Value
5000The Big Picture
Subnet slots are valuable. This constant prevents neurons from squatting on slots without contributing. If you don't update your weights (validators) or serve responses (miners) within this window, you become eligible for pruning. The chain tracks your last activity block, and inactive neurons get lowest pruning priority.
Why This Matters
If your miner or validator goes offline, you have this many blocks to restore service before risking your slot. With 12-second blocks, calculate your maintenance window.
Example
With ActivityCutoff of 5000 blocks (~16 hours), a validator that stops setting weights becomes prunable after 5000 blocks. If a new registration occurs and slots are full, this inactive validator is first in line to be replaced.
Common Questions
- Does activity cutoff immediately prune inactive neurons?
- No, it makes them prunable. Actual pruning happens when someone new registers and the subnet is full. The neuron with lowest pruning score (often inactive) is removed.
- What counts as activity?
- For validators: setting weights. For miners: responding to queries (tracked off-chain) or having their last update block refreshed by validators rating them.
Use Cases
- Pruning logic
- Activity tracking
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 InitialActivityCutoff constant
const value = api.consts[stringCamelCase("SubtensorModule")][stringCamelCase("InitialActivityCutoff")];
console.log("InitialActivityCutoff:", value.toHuman());Type Information
- Type
- u16
- Byte Size
- 2 bytes
- Encoding
- fixed
- Raw Hex
- 0x8813
Runtime Info
- Pallet
- SubtensorModule
- First Version
- v101
- Latest Version
- v101
- Current Runtime
- v393