Hyperparameters
max_difficulty
Upper bound for the PoW registration difficulty controller; u64::MAX leaves difficulty unbounded above.
max_difficulty is the ceiling over
difficulty, the proof-of-work target
for PoW neuron registration. However hot registration demand runs, the
difficulty controller never pushes the PoW price above this value. At
u64::MAX the ceiling is effectively removed — difficulty is unbounded
above. Subnet owners tune it to cap how expensive a PoW slot can become
during registration rushes.
How it works
Storage is MaxDifficulty in pallets/subtensor/src/lib.rs, accessed via
get_max_difficulty / set_max_difficulty
(pallets/subtensor/src/utils/misc.rs). In the classic controller,
difficulty was rescaled each adjustment interval by registration pressure
against the target rate, then clamped to the
[min_difficulty, max_difficulty] band — sustained over-target demand
walked difficulty up until it hit this ceiling. The mainnet default is
u64::MAX / 4 (SubtensorInitialMaxDifficulty in runtime/src/lib.rs).
On the current runtime PoW registration is deprecated — the register
extrinsic routes to burned registration and nothing adjusts difficulty
between intervals — so this ceiling is dormant. The playground opens on a
registration-rush scenario where difficulty ratchets up until it pins
against the bold ceiling line:
This scenario starts with a registration rush (12 registrations vs a target of 2), so the controller ratchets difficulty up every interval — until it hits the bold max_difficulty ceiling and pins there. The ceiling capped how expensive a PoW slot could get during a rush. The mainnet default is u64::MAX / 4.
Difficulty after 48 intervals
1.0e10
pinned at ceiling
Odds a single nonce passes
≈ 1 in 1.0e10
hash_meets_difficulty → expect ~1.0e10 hashes per registration
Registration pressure
12 regs vs target 2
over target: difficulty ratchets up
Reading and setting
btcli sudo get --netuid N --name max_difficultyOwner-settable (the AdminUtils extrinsic sudo_set_max_difficulty accepts
the subnet owner or root, inside the admin window and subject to the owner
rate limit):
btcli sudo set --netuid N --name max_difficulty --value 4611686018427387903The value is a raw u64 difficulty, no human form.
Related
difficulty ·
min_difficulty ·
network_pow_registration_allowed ·
target_regs_per_interval ·
adjustment_interval ·
max_burn