Docs
Supported ChainsAsset HubSubstrate APIConsensus Methods

grandpa_roundState - Asset Hub RPC Method

Get GRANDPA finality gadget round state on Asset Hub. Monitor consensus progress and validator voting.

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

Use Cases

  • Finality monitoring - Track consensus progress for native stablecoin transfers (USDC, USDT), DOT staking and governance, and cross-chain asset management via XCM
  • Validator analysis - Monitor prevote/precommit participation
  • Chain health checks - Detect finality delays or stalls

Request Parameters

Request

This method accepts no parameters.

Response Body

Response
setIdu64

Current authority set ID

bestRoundState

Best round state

backgroundVec<RoundState>

Background rounds

roundu64

Round number

totalWeightu64

Total validator weight

thresholdWeightu64

Weight needed for supermajority

prevotesPrevotes

Prevote information

precommitsPrecommits

Precommit information

Code Examples

Bash
curl https://api-asset-hub-polkadot.n.dwellir.com/<YOUR_API_KEY>/YOUR_API_KEY \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "grandpa_roundState",
    "params": [],
    "id": 1
  }'
JavaScript
import { ApiPromise, WsProvider } from '@polkadot/api';

const provider = new WsProvider('wss://api-asset-hub-polkadot.n.dwellir.com/YOUR_API_KEY');
const api = await ApiPromise.create({ provider });

const roundState = await api.rpc.grandpa.roundState();
console.log('Set ID:', roundState.setId.toString());
console.log('Best round:', roundState.best.round.toString());
console.log('Total weight:', roundState.best.totalWeight.toString());
console.log('Threshold:', roundState.best.thresholdWeight.toString());

await api.disconnect();
Python
import requests

url = 'https://api-asset-hub-polkadot.n.dwellir.com/<YOUR_API_KEY>/YOUR_API_KEY'
payload = {
    'jsonrpc': '2.0',
    'method': 'grandpa_roundState',
    'params': [],
    'id': 1
}

response = requests.post(url, json=payload)
result = response.json()['result']

print(f"Set ID: {result['setId']}")
print(f"Round: {result['best']['round']}")
print(f"Total weight: {result['best']['totalWeight']}")

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