ActivityCutoff
Storage Map v101 → v490 · 1 shape changeBlocks of inactivity before pruning .
Explore chainThe Big Picture
Neurons must be active to stay registered. ActivityCutoff defines the window - if a neuron shows no activity for this many blocks, they become pruning candidates. This prevents squatting and ensures registered neurons actually contribute.
Why This Matters
Going offline? Know your deadline. If you're inactive for ActivityCutoff blocks, your pruning score suffers and you risk losing your slot to someone more active.
Example Scenario
Query ActivityCutoff(netuid=1) returns 5000 blocks (~2.7 hours). You must show some activity at least every 5000 blocks or be flagged as inactive.
Common Questions
- What counts as activity?
- Depends on neuron type. Miners: serving requests. Validators: setting weights. Check subnet-specific requirements.
- What if I'm temporarily offline?
- Brief outages are usually fine if you're back before the cutoff. Extended maintenance should be planned around this window.
- Can subnet owners change this?
- Yes, ActivityCutoff is tunable. Longer cutoff = more forgiving to inactive neurons.
Use Cases
- Check how often you need to show activity
- Plan maintenance windows around activity requirements
- Build activity monitoring and alerts
- Understand pruning risk from inactivity
- Design subnet activity parameters
From Chain Metadata
MAP ( netuid ) --> activity_cutoff
Purpose & Usage
Purpose
Control neuron activity requirements - neurons must show activity within this window.
Common Query Patterns
- Query by netuid
- Calculate activity deadlines
- Monitor activity compliance
Migration Notes
key type changed from u16 to NetUid
Update decoders: SCALE encoding is positional, so any signature change (added, removed, or type-changed fields, or storage shape changes) shifts byte offsets and existing decoders will misparse this item. Re-derive types from the new metadata.
Query Keys
| # | Name | Type | Description |
|---|---|---|---|
| 1 | netuid | NetUid u16 | netuid (NetUid, hashed key component) |
Stored Value
activity_cutoff (u16)
Default Value
Absent keys read as this value — querying a key that has never been written returns this default, not an error or empty result.
Relationships
Modified By
Related Events
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 ActivityCutoff storage
const netuid = 1;
const result = await api.query.SubtensorModule.ActivityCutoff.getValue(netuid);
console.log("ActivityCutoff:", result);On-Chain Activity
Fewer than 10K writes
#240 most written storage item
Modified by both user extrinsics and runtime hooks
As of block 9,385,000
Version History
- key :
u16→NetUid
Runtime Info
View Source- Pallet
- SubtensorModule
- Storage Kind
- Map
- First Version
- v101
- Current Version
- v490