MinDifficultySet

Event Re-added v101 → v127, v133 → v219, v233 → v247, v252 → v265, v273 → v277, v290 → current #33

Emitted when minimum POW difficulty is changed.

View events on chain
Useful for: minersvalidatorssubnet ownersanalyticsdevelopers

The Big Picture

PoW difficulty fluctuates with registration demand, but there's a floor - it can't go below MinDifficulty. This ensures there's always some computational cost to register via PoW, even during low-demand periods. Subnet owners set this to prevent trivially easy registration.

Why This Matters

MinDifficulty is the easiest PoW registration can get. Even if nobody else is registering, you'll still need to solve puzzles at this difficulty. Understanding the floor helps you estimate minimum GPU time/electricity costs for PoW registration.

Example Scenario

Subnet 4 had MinDifficulty of 10,000. To prevent trivially cheap PoW spam, they raise it to 50,000. MinDifficultySet fires. Even during quiet times, PoW registration requires meaningful computation - no more instant registrations.

Common Questions

How does MinDifficulty relate to registration time?
Higher MinDifficulty means longer expected solve time even in best conditions. Difficulty roughly correlates with computational work required.
Can MinDifficulty be zero for instant registration?
Technically possible but very rare. Zero difficulty would mean no meaningful PoW - you'd find a solution immediately. Most subnets want some barrier.
Should I wait for difficulty to hit minimum?
If you're patient and low-demand periods occur, yes. But on popular subnets, difficulty rarely hits the floor. Evaluate based on the specific subnet's patterns.

Use Cases

  • Track minimum PoW registration costs
  • Plan GPU resource allocation with difficulty floor
  • Monitor subnet PoW economics
  • Build registration planning tools

How to Use This Event

  • Track minimum difficulty as best-case PoW cost
  • Monitor floor changes affecting registration strategy
  • Build PoW planning tools with bound awareness

From Chain Metadata

setting min difficulty on a network.

Triggers

Preconditions

  • Caller has admin/sudo privileges

Effects

Postconditions

  • MinDifficulty updated for subnet

Side Effects

  • Sets floor for POW difficulty

Event Data

#NameTypeDescription
0
arg0
u16 Event field #0 (u16)
1
arg1
u64 Event field #1 (u64)

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 MinDifficultySet events
api.query.system.events((events) => {
  events
    .filter(({ event }) =>
      event.section === stringCamelCase("SubtensorModule") &&
      event.method === "MinDifficultySet"
    )
    .forEach(({ event }) => {
      console.log("MinDifficultySet:", event.data.toHuman());
    });
});

Version History

v101 block 1 2 args
v133 block 1,404,224 2 args
v233 block 4,920,350 2 args
v252 block 5,163,656 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
33
First Version
v101
Current Version
v393