Skip to main content

grandpa_roundState

Description#

Returns detailed information about the current GRANDPA round: the set of voters, ongoing rounds, and last finalized block. Useful for diagnosing finality stalls or verifying collator participation.

Parameters#

This method does not take parameters.

Returns#

FieldTypeDescription
setIdnumberIdentifier of the current voter set
bestobjectInformation about the best round
backgroundarrayAdditional rounds executing in the background
prevote/precommitobjectPer-round vote state
finalizedobjectLast finalized block (hash and number)

Request Example#

{
"jsonrpc": "2.0",
"method": "grandpa_roundState",
"params": [],
"id": 1
}

Response Example#

{
"jsonrpc": "2.0",
"result": {
"setId": 423,
"best": {
"round": 1264,
"prevotes": {
"currentWeight": 5120,
"missing": []
},
"precommits": {
"currentWeight": 5120,
"missing": []
}
},
"background": [],
"finalized": {
"hash": "0x0783f5b163e338d4d74a1ee39a0f631bc2dffbd8862460407f6cc97c903194e1",
"number": 9453706
}
},
"id": 1
}

Values shown correspond to the 2025-10-03 finality round; actual weights depend on the relay-chain validator set.

Code Examples#

JavaScript#

const roundState = await api.rpc.grandpa.roundState();
console.log(roundState.toHuman());

Rust#

let round = api.rpc().grandpa_round_state().await?;
println!("Current set: {}", round.set_id);
println!("Best round: {}", round.best.as_ref().map(|r| r.round).unwrap_or_default());

Usage Notes#

  • If missing lists grow or precommits.currentWeight stalls below the total weight, investigate validator participation.
  • Combine with chain_subscribeFinalizedHeads to correlate GRANDPA finality with block numbers.