MaxAllowedValidatorsSet

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

Emitted when maximum validators allowed is changed.

View events on chain
Useful for: validatorssubnet ownersanalyticsdevelopers

The Big Picture

Subnets can limit how many validators participate - not just total neurons, but specifically how many can have validator permits. This affects consensus (more validators = more decentralized but slower). Changes to this limit affect who can validate and validator competition dynamics.

Why This Matters

If you want to validate on a subnet, you need a validator permit. The max validators limit determines how many permits exist. A lower limit means more competition for permits. A higher limit means more opportunity but potentially more diluted rewards.

Example Scenario

Subnet 3 had 64 max validators. To improve decentralization, they increase to 128. MaxAllowedValidatorsSet fires. 64 new validator permit slots open up. If you were waiting for a spot, now's your chance - reduced competition for permits.

Common Questions

What happens if max validators decreases?
Existing validators are typically safe (grandfathered). But new permits aren't issued and natural attrition shrinks the set toward the new limit.
Is max validators the same as max UIDs?
No. MaxAllowedUids is total neurons (miners + validators). MaxAllowedValidators specifically limits how many have validator permits. A subnet could have 256 UIDs but only 64 validators.
How do I become a validator when slots are limited?
You need enough stake to rank in the top MaxAllowedValidators neurons. Below that threshold, you're a miner. Add more stake or wait for validators to leave.

Use Cases

  • Track validator capacity limits on subnets
  • Plan validator participation based on availability
  • Monitor subnet validator policy changes
  • Build validator opportunity tracking tools

How to Use This Event

  • Monitor validator limits on target subnets
  • Track changes affecting validator competition
  • Build validator slot availability tracking

From Chain Metadata

setting the max number of allowed validators on a subnet.

Triggers

Preconditions

  • Caller has admin/sudo privileges

Effects

Postconditions

  • MaxAllowedValidators updated

Side Effects

  • May affect validator permit distribution

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

Version History

v101 block 1 2 args
v133 block 1,404,224 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
27
First Version
v101
Current Version
v393