MaxAuthorities

Constant v101 → current u32

Caps the validator set size to ensure finality performance.

Current Value

32
Relevant for: validatorsdevelopers

The Big Picture

GRANDPA finality requires communication between all authorities. More authorities means more messages and slower consensus. This constant caps the set size to balance decentralization with performance. Most networks set this to a few hundred.

Why This Matters

If you're running validator infrastructure, this tells you the maximum number of peers your node might communicate with for finality. Higher values require more network bandwidth.

Example

MaxAuthorities is 32. At most 32 validators can participate in GRANDPA finality voting. If more are eligible, the top 32 by stake are selected.

Common Questions

What happens if there are more validators than MaxAuthorities?
Only the top validators (by some selection criteria like stake) are included in GRANDPA. Others still produce blocks but don't vote on finality.

From Chain Metadata

Max Authorities in use

Use Cases

  • Determine maximum possible authority set size
  • Plan validator infrastructure capacity

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

Type Information

Type
u32
Byte Size
4 bytes
Encoding
fixed
Raw Hex
0x20000000

Runtime Info

Pallet
Grandpa
First Version
v101
Latest Version
v101
Current Runtime
v393