CurrentSetId
Storage Plain v101 → currentMonotonically increasing counter for GRANDPA authority set changes.
Explore chainQueried by: validatorsdevelopersanalytics
The Big Picture
Every time the authority set changes, this counter increments. It's used to identify which set was active during any given period - essential for validating equivocation proofs which must reference the correct set.
Use Cases
- Track how many authority set changes have occurred since genesis
- Construct equivocation proofs (requires set ID)
- Correlate events with specific authority sets
From Chain Metadata
The number of changes (both in terms of keys and underlying economic responsibilities) in the "set" of Grandpa validators from genesis.
Purpose & Usage
Purpose
Uniquely identifies each authority set for equivocation proof validation.
Common Query Patterns
- Single value query
Stored Value
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 CurrentSetId storage (no keys - plain value)
const result = await api.query
[stringCamelCase("Grandpa")]
[stringCamelCase("CurrentSetId")]();
console.log("CurrentSetId:", result.toHuman());Runtime Info
- Pallet
- Grandpa
- Storage Kind
- Plain
- First Version
- v101
- Current Version
- v393