MaxImmuneUidsPercentage

Constant v320 → current Percent

Limits immune neurons to ensure pruning .

Current Value

0x50
Relevant for: subnet ownersminersvalidators

The Big Picture

Immunity protects neurons from pruning, but too much immunity defeats its purpose. This constant caps what percentage of UIDs can be immune at once. It ensures there's always turnover potential - some neurons must be prunable to allow new participants.

Why This Matters

If you're registering on a subnet where many neurons are immune, understand that pruning only affects the non-immune portion. Competition may be fiercer among prunable neurons.

Example

With MaxImmuneUidsPercentage of 30% on a 100-UID subnet, at most 30 neurons can be immune. The other 70+ are prunable. If you're outside the top performers in the prunable group, you're at risk.

Common Questions

Who decides which UIDs are immune?
Immunity is typically automatic for new registrations (immunity period) or set by subnet parameters. Check ImmunityPeriod and subnet configuration.
What if immune percentage would exceed max?
New immunities might be rejected or oldest immunities might expire to make room. Specific behavior depends on runtime implementation.

From Chain Metadata

Maximum percentage of immune UIDs.

Use Cases

  • Immunity
  • Pruning

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 });

// Query MaxImmuneUidsPercentage constant
const value = api.consts[stringCamelCase("SubtensorModule")][stringCamelCase("MaxImmuneUidsPercentage")];
console.log("MaxImmuneUidsPercentage:", value.toHuman());

Type Information

Type
Percent
Byte Size
1 bytes
Encoding
fixed
Raw Hex
0x50

Runtime Info

Pallet
SubtensorModule
First Version
v320
Latest Version
v320
Current Runtime
v393