Queried by: validatorsdeveloperssubnet owners
The Big Picture
Validators must evaluate a minimum number of neurons. This prevents validators from focusing on only a few favorites and ensures broader consensus participation. Sparse weight matrices would undermine the distributed evaluation system.
Why This Matters
Setting weights? You must weight at least this many neurons. Too few weights = rejected submission. Ensures validators actually evaluate the network.
Example Scenario
Query MinAllowedWeights(netuid=1) returns 100. Your set_weights call must include at least 100 UIDs. Setting weights on only 50 neurons will fail.
Common Questions
- What if there aren't enough neurons?
- If SubnetworkN < MinAllowedWeights, you weight all neurons. The minimum is capped by actual neuron count.
- Can I weight UIDs with zero weight?
- Typically yes - zero weight still counts toward the minimum. You're evaluating them as 'not worthy' rather than ignoring them.
Use Cases
- Check minimum weights required before setting
- Build weight validation in validator software
- Understand consensus participation requirements
- Debug weight rejection errors
- Design subnet weight parameters
Purpose & Usage
Purpose
Prevent sparse weight matrices - validators must evaluate at least this many neurons.
Common Query Patterns
- Query by netuid
- Validate weight submissions
- Plan weight-setting strategy
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 MinAllowedWeights storage
const key1 = 0;
const result = await api.query
[stringCamelCase("SubtensorModule")]
[stringCamelCase("MinAllowedWeights")](
key1
);
console.log("MinAllowedWeights:", result.toHuman());Runtime Info
View Source- Pallet
- SubtensorModule
- Storage Kind
- Map
- First Version
- v101
- Current Version
- v393