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
This method accepts no parameters.
Response Body
Current authority set ID
Best round state
Background rounds
Round number
Total validator weight
Weight needed for supermajority
Prevote information
Precommit information
Code Examples
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
}'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();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
- Prevote phase - Validators vote on best block they've seen
- Precommit phase - Validators commit to finalize if supermajority prevoted
- Finalization - Block is finalized when 2/3+ weight precommits
Related Methods
chain_subscribeFinalizedHeads- Subscribe to finalized blockschain_getFinalizedHead- Get current finalized hashbeefy_getFinalizedHead- BEEFY finality (if enabled)