MinAllowedWeightSet

Event Re-added v101 → v219, v233 → v265, v273 → v277, v290 → current #19

Emitted when minimum required weights per validator is changed.

View events on chain
Useful for: validatorssubnet ownersdevelopersanalytics

The Big Picture

Validators set weights on miners to express their evaluation of miner quality. The minimum weights parameter ensures validators don't just evaluate a tiny subset of miners - they must evaluate at least N miners per weight-setting transaction. This promotes broader coverage and fairer consensus. Too low a minimum allows validators to focus on just a few miners (potentially gaming). Too high forces validators to evaluate miners they may not have fully tested.

Why This Matters

As a validator, you must set weights on at least this many miners in each set_weights call. If you try to set fewer, your transaction fails. This ensures you're evaluating a reasonable portion of the subnet, not just cherry-picking favorites.

Example Scenario

Subnet 9 has 100 miners and MinAllowedWeight was 10. The owner wants better coverage and increases it to 30. MinAllowedWeightSet fires. Now validators must evaluate at least 30 miners per weight submission. Validators running scripts that only tested 20 miners will start failing until they expand their coverage.

Common Questions

What if there are fewer miners than MinAllowedWeight?
You'd need to set weights on all available miners. The minimum can't exceed the actual miner count - it's a lower bound on coverage, not an absolute requirement.
Do I need to give non-zero weights to all minimum miners?
You need to include at least MinAllowedWeight miners in your set_weights call. The specific weights you assign (including zero) depend on your evaluation of each miner.
How does this affect consensus?
Higher minimum means more validators evaluating more miners, leading to broader consensus. This can be good for decentralization but increases validator workload. Balance depends on subnet goals.

Use Cases

  • Ensure validators evaluate enough miners for fair consensus
  • Monitor weight coverage requirements
  • Alert validators when minimum weight requirements change
  • Analyze subnet consensus quality based on weight coverage

How to Use This Event

  • Monitor minimum weight requirements before setting weights
  • Track changes to understand subnet consensus evolution
  • Alert when minimum changes require validator logic updates

From Chain Metadata

minimum allowed weight is set for a subnet.

Triggers

Effects

Postconditions

  • MinAllowedWeights updated for subnet
  • Validators must include at least this many weights in set_weights

Side Effects

  • Validators must set at least this many weights per transaction
  • Weight submissions with fewer weights are rejected

Event Data

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

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

Version History

v101 block 1 2 args
v233 block 4,920,350 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
19
First Version
v101
Current Version
v393