Queried by: validatorsdelegatorssubnet ownersdevelopersanalytics
The Big Picture
Each subnet has limited validator slots. MaxAllowedValidators caps how many neurons can hold ValidatorPermit. This creates competition - only the top stakers become validators. The rest are miners.
Why This Matters
How many validators can this subnet have? MaxAllowedValidators. The top N by stake get permits. If there are 256 neurons and 64 validator slots, top 64 validate, rest mine.
Example Scenario
Query MaxAllowedValidators(netuid=1) returns 64. Subnet 1 allows 64 validators. The 64 neurons with highest stake have ValidatorPermit = true.
Common Questions
- What if I'm just outside the top N?
- You're a miner. To become a validator, either accumulate more stake to pass someone, or wait for a current validator to lose stake/deregister.
- Can subnet owners change this?
- Yes, it's a hyperparameter. Increasing allows more validators; decreasing removes permits from the lowest-stake validators.
- Why limit validators?
- Consensus efficiency. Too many validators slow down weight processing and consensus. The limit balances decentralization with performance.
Use Cases
- Check how many validators a subnet allows
- Determine stake needed for validator permit
- Compare subnet structures
- Build validator slot availability displays
- Research subnet governance designs
Purpose & Usage
Purpose
Limit validator count - only top stakers can validate.
Common Query Patterns
- Query by netuid
- Check validator slots available
- Research subnet structure
Query Keys
| # | Name | Type | Description |
|---|---|---|---|
| 1 | key1 | u16 | key1 (u16) |
Stored Value
value (u16)
Relationships
Modified By
Related Events
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 MaxAllowedValidators storage
const key1 = 0;
const result = await api.query
[stringCamelCase("SubtensorModule")]
[stringCamelCase("MaxAllowedValidators")](
key1
);
console.log("MaxAllowedValidators:", result.toHuman());Runtime Info
View Source- Pallet
- SubtensorModule
- Storage Kind
- Map
- First Version
- v101
- Current Version
- v393