NewAuthorities

Event v101 → current #0

Emitted when a new GRANDPA authority set becomes active.

View events on chain
Useful for: validatorsdevelopersanalytics

The Big Picture

GRANDPA is the finality gadget that makes blocks irreversible. The authorities are the validators who vote on finality. When the validator set changes (usually at session boundaries), this event announces the new set. Each authority is a public key with a voting weight.

Use Cases

  • Monitor validator set changes for finality consensus
  • Track authority rotations for network health dashboards
  • Verify your validator joined or left the authority set
  • Build tools that need to know current finality voters

How to Use This Event

  • Subscribe to track validator set composition over time
  • Index to build historical validator participation data
  • Alert when specific validators enter or leave the authority set

From Chain Metadata

New authority set has been applied.

Triggers

Preconditions

  • Session change triggered authority set rotation
  • New validators have been selected for GRANDPA

Effects

Postconditions

  • New authority set is active for finality voting
  • Old authority set is no longer valid
  • CurrentSetId incremented

Side Effects

  • All pending finality votes from old set become invalid
  • Finality may pause briefly during transition

Event Data

#NameTypeDescription
0
authority_set
Vec<(Public, u64)> VecNew set of GRANDPA authorities (public keys with voting weights)

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 });

// Subscribe to NewAuthorities events
api.query.system.events((events) => {
  events
    .filter(({ event }) =>
      event.section === stringCamelCase("Grandpa") &&
      event.method === "NewAuthorities"
    )
    .forEach(({ event }) => {
      console.log("NewAuthorities:", event.data.toHuman());
    });
});

Runtime Info

Pallet Index
4
Event Index
0
First Version
v101
Current Version
v393