Skip to main content

grandpa_roundState

Returns the state of the current GRANDPA finality round on Acala. GRANDPA (GHOST-based Recursive ANcestor Deriving Prefix Agreement) is the finality gadget used by Substrate chains.

Use Cases#

  • Finality monitoring - Track consensus progress for decentralized stablecoin (aUSD), liquid DOT staking (LDOT), and cross-chain AMM DEX
  • Validator analysis - Monitor prevote/precommit participation
  • Chain health checks - Detect finality delays or stalls

Parameters#

This method takes no parameters.

Returns#

FieldTypeDescription
setIdu64Current authority set ID
bestRoundStateBest round state
backgroundVec<RoundState>Background rounds

RoundState Structure#

FieldTypeDescription
roundu64Round number
totalWeightu64Total validator weight
thresholdWeightu64Weight needed for supermajority
prevotesPrevotesPrevote information
precommitsPrecommitsPrecommit information

Code Examples#

curl https://api-acala.n.dwellir.com/YOUR_API_KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "grandpa_roundState",
"params": [],
"id": 1
}'

Understanding GRANDPA Rounds#

  1. Prevote phase - Validators vote on best block they've seen
  2. Precommit phase - Validators commit to finalize if supermajority prevoted
  3. Finalization - Block is finalized when 2/3+ weight precommits