ActivityCutoffSet

Event Re-added v101 → v219, v233 → v265, v273 → v277, v290 → current #15

Emitted when activity cutoff threshold is changed.

View events on chain
Useful for: minersvalidatorssubnet ownersanalyticsdevelopers

The Big Picture

Subnets need active participants - neurons that aren't contributing waste UID slots. The activity cutoff defines how long a neuron can go without activity (setting weights, producing outputs) before being pruned. This is the 'use it or lose it' rule. A shorter cutoff means stricter requirements (must be active frequently) while a longer cutoff is more forgiving (can go offline for longer periods). Subnet owners tune this based on their needs - high-frequency subnets need strict cutoffs, slower subnets can be more lenient.

Why This Matters

Activity cutoff determines how often you must 'check in' to keep your UID. If you go inactive longer than the cutoff, you can be pruned and lose your spot. Critical for planning downtime, maintenance, or understanding how often you need to participate.

Example Scenario

Subnet 7 had a 14-day activity cutoff (28800 blocks). The owner wants more active participation and reduces it to 7 days (14400 blocks). ActivityCutoffSet fires. Any neurons inactive for more than 7 days are now at risk of pruning. If you had planned a 10-day vacation, you now need to automate activity or risk losing your slot.

Common Questions

What counts as 'activity'?
Typically setting weights (validators) or having your weights updated by validators (miners). The specific activity tracked can vary by subnet. Check your subnet's documentation.
If I'm pruned for inactivity, can I re-register?
Yes, but you'll need to pay the registration cost again (burn or POW) and start fresh. Any reputation or bonds you built are lost. It's better to maintain activity than re-register.
How do I check my last activity time?
Query the LastUpdate storage for your UID. This shows the last block where you were active. Compare to current block and activity cutoff to see your remaining grace period.

Use Cases

  • Monitor inactivity threshold to avoid being pruned
  • Track subnet activity requirements
  • Plan maintenance windows around activity requirements
  • Analyze subnet health based on activity policies

How to Use This Event

  • Monitor cutoff on subnets where you operate
  • Alert when cutoff changes that affect your maintenance schedule
  • Track activity requirements across subnets

From Chain Metadata

an activity cutoff is set for a subnet.

Triggers

Preconditions

  • Caller has admin/sudo privileges
  • New cutoff is within valid range

Effects

Postconditions

  • ActivityCutoff updated for subnet
  • Inactivity pruning uses new threshold

Side Effects

  • Inactive neurons pruned after this many blocks without activity
  • May cause immediate pruning if cutoff is reduced below existing inactivity

Event Data

#NameTypeDescription
0
arg0
u16 Event field #0 (u16)
1
arg1
u16 Event field #1 (u16)

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 });

// Subscribe to ActivityCutoffSet events
api.query.system.events((events) => {
  events
    .filter(({ event }) =>
      event.section === stringCamelCase("SubtensorModule") &&
      event.method === "ActivityCutoffSet"
    )
    .forEach(({ event }) => {
      console.log("ActivityCutoffSet:", event.data.toHuman());
    });
});

Version History

v101 block 1 2 args
v233 block 4,920,350 2 args
v273 block 5,659,032 2 args
v290 block 5,947,548 2 args Current

Runtime Info

View Source
Pallet Index
7
Event Index
15
First Version
v101
Current Version
v393