MaxAllowedUidsSet

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

Emitted when maximum neurons allowed on subnet is changed.

View events on chain
Useful for: subnet ownersminersvalidatorsanalyticsdevelopers

The Big Picture

MaxAllowedUids sets the 'seating capacity' of a subnet - how many miners and validators can hold UIDs simultaneously. A larger capacity means more participants but potentially diluted rewards and harder consensus. A smaller capacity means more competition for slots and potentially higher quality (low performers get pruned). Subnet owners tune this to balance growth vs quality.

Why This Matters

If you're trying to register on a full subnet, capacity is everything. When MaxAllowedUids increases, new slots open up. When it decreases, competition intensifies (though existing neurons aren't kicked out immediately). Track this to time your registration attempts.

Example Scenario

Subnet 3 is full at 256 neurons and highly competitive. The owner wants to allow more participation, so they increase MaxAllowedUids to 512. MaxAllowedUidsSet fires with netuid 3 and max_allowed_uids 512. Now 256 new slots are available for registration - a good time to try registering if you've been waiting.

Common Questions

What happens if the max is reduced below current neuron count?
Existing neurons are safe - they won't be kicked out. But no new registrations are allowed, and as neurons leave or get pruned, the count naturally drops. The subnet gradually shrinks to the new max.
What's a typical MaxAllowedUids value?
Ranges widely: small experimental subnets might have 64-128, large established ones can have 256-1024 or more. It depends on the subnet's goals and economics.
Does more UIDs mean lower individual rewards?
Generally yes - the same emission pool is split among more participants. But more UIDs can also mean a healthier, more decentralized subnet with better coverage.

Use Cases

  • Expand subnet capacity to accommodate growing demand
  • Contract subnet to increase quality competition
  • Monitor subnet scaling decisions
  • Plan registration strategies based on capacity

How to Use This Event

  • Monitor subnets you want to join for capacity changes
  • Track capacity trends across the network
  • Alert when your subnet's capacity changes

From Chain Metadata

max allowed uids has been set for a subnetwork.

Triggers

Preconditions

  • Caller has admin/sudo privileges
  • New max is >= current neuron count
  • New max is within global limits

Effects

Postconditions

  • MaxAllowedUids updated for subnet
  • Subnet can now accept up to the new limit

Side Effects

  • Affects subnet capacity for registrations
  • May enable more registrations if increased
  • May increase competition if decreased (existing neurons safe)

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 MaxAllowedUidsSet events
api.query.system.events((events) => {
  events
    .filter(({ event }) =>
      event.section === stringCamelCase("SubtensorModule") &&
      event.method === "MaxAllowedUidsSet"
    )
    .forEach(({ event }) => {
      console.log("MaxAllowedUidsSet:", 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
9
First Version
v101
Current Version
v393