Current Value
1The Big Picture
When a subnet is full and new validators want to join, the network must decide which existing validators can be replaced. This constant sets how many of the lowest-performing validators are considered for replacement. A larger value means more validators are 'at risk' each epoch, increasing competition. Smaller values provide more stability for existing validators.
Why This Matters
As a validator, this tells you how competitive your position is. If ValidatorPruneLen is 10 and you're in the bottom 10 performers, you're at risk of being replaced when new validators register.
Example
With ValidatorPruneLen of 5 on a subnet with 64 validators, only the bottom 5 are eligible for pruning. If you're ranked 6th from bottom or higher, you're safe from immediate replacement even if the subnet is full.
Common Questions
- How is validator performance measured?
- By pruning score, which factors in stake, activity, and consensus participation. Low stake + low activity = low score = prunable.
- Can subnet owners adjust this?
- Yes, subnet hyperparameters include prune length. Competitive subnets might use larger values; stable subnets might use smaller values.
Use Cases
- Pruning algorithm
- Validator selection
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 InitialValidatorPruneLen constant
const value = api.consts[stringCamelCase("SubtensorModule")][stringCamelCase("InitialValidatorPruneLen")];
console.log("InitialValidatorPruneLen:", value.toHuman());
// Convert RAO to TAO if this is a balance value
const taoValue = value.toBigInt() / BigInt(1e9);
console.log("TAO:", taoValue.toString());Type Information
- Type
- u64
- Byte Size
- 8 bytes
- Encoding
- fixed
- Raw Hex
- 0x0100000000000000
Runtime Info
- Pallet
- SubtensorModule
- First Version
- v101
- Latest Version
- v101
- Current Runtime
- v393