State

Storage Plain v101 → current

Current state of the GRANDPA authority set (Live, Paused, or PendingPause/Resume).

Explore chain
Queried by: validatorsdevelopersanalytics

The Big Picture

GRANDPA can be paused for emergencies or upgrades. This storage tells you if finality is running normally (Live), stopped (Paused), or transitioning (PendingPause/PendingResume). Most of the time it's Live - other states indicate special circumstances.

Use Cases

  • Check if the network is actively finalizing blocks
  • Monitor for finality pauses during incidents
  • Build network health dashboards
  • Verify GRANDPA status before relying on finality

From Chain Metadata

State of the current authority set.

Purpose & Usage

Purpose

Tracks whether GRANDPA finality is actively running or suspended.

Common Query Patterns

  • Single value query for current finality state

Stored Value

value (StoredState)

Default Value

0x00 (raw SCALE bytes)

Absent keys read as this value — querying a key that has never been written returns this default, not an error or empty result.

Code Examples

import { createClient, Binary } from "polkadot-api";
import { getWsProvider } from "polkadot-api/ws";
import { sub } from "@polkadot-api/descriptors"; // generated by: npx papi add sub -w wss://entrypoint-finney.opentensor.ai:443

const client = createClient(getWsProvider("wss://entrypoint-finney.opentensor.ai:443"));
const api = client.getTypedApi(sub);

// Query State storage (no keys - plain value)
const result = await api.query.Grandpa.State.getValue();
console.log("State:", result);

Runtime Info

Pallet
Grandpa
Storage Kind
Plain
First Version
v101
Current Version
v472