AdjustmentIntervalSet

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

Emitted when difficulty adjustment interval is changed.

View events on chain
Useful for: minersvalidatorssubnet ownersanalyticsdevelopers

The Big Picture

Registration difficulty (for PoW and burn) adjusts periodically to hit target registration rates. The adjustment interval determines how often this recalculation happens. Shorter intervals mean more responsive adjustment (faster reaction to demand changes). Longer intervals mean more stable but potentially outdated difficulty.

Why This Matters

Understanding when difficulty adjusts helps you time registration attempts. If difficulty just dropped, you have until the next adjustment to register at the new rate. If it's about to adjust after a surge of registrations, it might spike - register now or wait for the spike to subside.

Example Scenario

Subnet 4 had a 100-block adjustment interval. To make difficulty more responsive, they reduce it to 25 blocks. AdjustmentIntervalSet fires. Now difficulty recalculates every 25 blocks instead of 100 - more frequent updates mean difficulty tracks demand more closely.

Common Questions

How does the adjustment algorithm work?
It compares actual registrations in the interval to the target. Too many = increase difficulty. Too few = decrease difficulty. The adjustment tries to hit the target rate.
Does this affect existing difficulty immediately?
No, the interval is when the NEXT adjustment happens. Current difficulty stays until the interval passes and recalculation occurs.
What's a typical adjustment interval?
Varies by subnet. 100-500 blocks is common. Shorter for volatile demand, longer for stability.

Use Cases

  • Track how often registration difficulty adjusts
  • Predict difficulty trends based on interval
  • Monitor subnet registration tuning policies
  • Build difficulty prediction models

How to Use This Event

  • Track adjustment intervals for timing optimization
  • Monitor for changes affecting difficulty dynamics
  • Build difficulty prediction tools

From Chain Metadata

the adjustment interval is set for a subnet.

Triggers

Preconditions

  • Caller has admin/sudo privileges

Effects

Postconditions

  • AdjustmentInterval updated for subnet

Side Effects

  • Changes how often difficulty is recalculated

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 AdjustmentIntervalSet events
api.query.system.events((events) => {
  events
    .filter(({ event }) =>
      event.section === stringCamelCase("SubtensorModule") &&
      event.method === "AdjustmentIntervalSet"
    )
    .forEach(({ event }) => {
      console.log("AdjustmentIntervalSet:", 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
12
First Version
v101
Current Version
v393