Controls adjustment frequency.
Current Value
100Relevant 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 { 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 InitialAdjustmentInterval constant
const value = await api.constants.SubtensorModule.InitialAdjustmentInterval();
console.log("InitialAdjustmentInterval:", value);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
- v411