ActivityCutoff

Storage Map v101 → current

Blocks of inactivity before pruning .

Explore chain
Queried by: minersvalidatorssubnet ownersdevelopers

The 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

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

Query Keys

#NameTypeDescription
1
key1
u16 key1 (u16)

Stored Value

value (u16)

Relationships

Modified By

Related Events

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 ActivityCutoff storage
const key1 = 0;

const result = await api.query
  [stringCamelCase("SubtensorModule")]
  [stringCamelCase("ActivityCutoff")](
  key1
);

console.log("ActivityCutoff:", result.toHuman());

Runtime Info

View Source
Pallet
SubtensorModule
Storage Kind
Map
First Version
v101
Current Version
v393