InitialAdjustmentInterval

Constant v101 → current u16

Controls adjustment frequency.

Current Value

100
Relevant for: minersdeveloperssubnet ownersanalytics

The Big Picture

Difficulty doesn't change every block - it adjusts at fixed intervals. This constant sets how often adjustments occur. Longer intervals = more stable difficulty, easier to plan for; shorter intervals = faster response to demand changes. It's a trade-off between predictability and responsiveness.

Why This Matters

If you're timing a POW registration, know when the next difficulty adjustment occurs. Right after an adjustment is a good time to register if difficulty just dropped.

Example

With AdjustmentInterval of 100 blocks (~20 minutes), difficulty is recalculated every 100 blocks. If you see registrations spiking at block 1050, difficulty won't increase until block 1100. You have a window to register at current difficulty.

Common Questions

When exactly does adjustment happen?
At blocks that are multiples of AdjustmentInterval. If interval is 100, adjustments happen at blocks 100, 200, 300, etc.
Can subnet owners change the interval?
Typically yes, via hyperparameter updates. Some subnets prefer frequent adjustments, others prefer stability.

Use Cases

  • Difficulty adjustment
  • Registration economics

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 InitialAdjustmentInterval constant
const value = api.consts[stringCamelCase("SubtensorModule")][stringCamelCase("InitialAdjustmentInterval")];
console.log("InitialAdjustmentInterval:", value.toHuman());

Type Information

Type
u16
Byte Size
2 bytes
Encoding
fixed
Raw Hex
0x6400

Runtime Info

Pallet
SubtensorModule
First Version
v101
Latest Version
v101
Current Runtime
v393