Guides difficulty adjustment to maintain steady registration rate.
Current Value
2The Big Picture
Difficulty adjustment aims to maintain a target registration rate - not too fast (spam), not too slow (stagnation). This constant sets that target. If actual registrations exceed target, difficulty rises; if below, difficulty falls. It's like Bitcoin's difficulty targeting 10-minute blocks, but for neuron registrations.
Why This Matters
This tells you the expected registration pace. If the network is hitting target, difficulty is stable. If registrations far exceed target, expect difficulty to rise soon.
Example
With TargetRegistrationsPerInterval of 2 and interval of 100 blocks, the network aims for ~2 registrations per 100 blocks (~20 minutes). If 10 register in one interval, difficulty will increase significantly to bring the rate back down.
Common Questions
- Is this per subnet or network-wide?
- Per subnet. Each subnet has its own target and difficulty, reflecting different demand levels.
- What happens if no one registers?
- Difficulty drops toward MinDifficulty, making registration easier until demand returns to target.
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 InitialTargetRegistrationsPerInterval constant
const value = api.consts[stringCamelCase("SubtensorModule")][stringCamelCase("InitialTargetRegistrationsPerInterval")];
console.log("InitialTargetRegistrationsPerInterval:", value.toHuman());Type Information
- Type
- u16
- Byte Size
- 2 bytes
- Encoding
- fixed
- Raw Hex
- 0x0200
Runtime Info
- Pallet
- SubtensorModule
- First Version
- v101
- Latest Version
- v101
- Current Runtime
- v393