This constant was removed in v326

This constant is no longer available in the current runtime. Existed from v101 to v326. Shown here for historical reference.

InitialMaxWeightsLimit

Constant Removed v101 → v326 (removed) u16

Limits weight matrix density for efficiency.

Current Value

1000
Relevant for: validatorssubnet ownersdevelopers

The Big Picture

While MinAllowedWeights ensures validators evaluate enough miners, this constant caps how many they can evaluate. This isn't about fairness but efficiency - processing very large weight vectors consumes chain resources. The limit balances comprehensive evaluation against computational overhead.

Why This Matters

If your subnet has 4096 miners but MaxWeightsLimit is 1024, validators can only score the top 1024 performers. Miners outside the top evaluated group receive no emissions.

Example

With MaxWeightsLimit of 512 on a subnet with 1000 miners, your validator code should evaluate all miners but only submit weights for the top 512. The chain rejects calls with more than 512 weight entries.

Common Questions

Should validators always set the maximum weights?
Not necessarily. Set weights for miners you've actually evaluated. Padding with zeros or random weights wastes resources and distorts emissions.
What if I need to evaluate more miners than the limit?
Evaluate all, then submit weights for only the top performers up to the limit. Or advocate for the subnet owner to increase the limit.

Use Cases

  • Weight validation
  • set_weights call

Value History

VersionBlockChangeValue
v101#1Added1000
v334#6,811,690Removed1000

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 InitialMaxWeightsLimit constant
const value = api.consts[stringCamelCase("SubtensorModule")][stringCamelCase("InitialMaxWeightsLimit")];
console.log("InitialMaxWeightsLimit:", value.toHuman());

Type Information

Type
u16
Byte Size
2 bytes
Encoding
fixed
Raw Hex
0xe803

Runtime Info

Pallet
SubtensorModule
First Version
v101
Latest Version
v326
Removed In
v326