grandpa_roundState - Bittensor RPC Method
Get the current GRANDPA finality round state on Bittensor. Monitor consensus progress, validator voting participation, and finality health across the the decentralized machine intelligence network built around subnets, TAO staking, and validator-miner coordination network.
Returns the state of the current GRANDPA finality round on Bittensor when the endpoint exposes validator-round internals. GRANDPA (GHOST-based Recursive ANcestor Deriving Prefix Agreement) is the finality gadget used by many Substrate-based chains to provide deterministic finality, but some public endpoints do not surface grandpa_roundState and instead return a method-not-found style error.
Why Bittensor? Build on the decentralized machine intelligence network built around subnets, TAO staking, and validator-miner coordination with Yuma Consensus, subnet-based specialization, dual Substrate and EVM surfaces, and onchain incentive coordination.
When to Use This Method
grandpa_roundState is not currently exposed on Dwellir's public Bittensor RPC. If you need finality status for production monitoring, use chain_getFinalizedHead for the latest finalized block hash or chain_subscribeFinalizedHeads to stream finalized heads as they arrive.
- Finalized block tracking -- Use
chain_getFinalizedHeadto snapshot the current finalized head - Realtime finality updates -- Use
chain_subscribeFinalizedHeadswhen your service needs push-based finalized-head updates - Operational monitoring -- Prefer finalized-head health checks over validator-round internals on the shared endpoint
Response Body
ResponseCode Examples
Supported Alternatives
chain_getFinalizedHeadfor the latest finalized block hashchain_subscribeFinalizedHeadsfor streamed finalized-head updates
Supported Monitoring Patterns
Because Dwellir's public Bittensor endpoint does not expose grandpa_roundState, build finalized-head monitoring around the supported RPCs below.
1. Snapshot the latest finalized head
Use chain_getFinalizedHead when you want the current finalized block hash on demand:
async function getLatestFinalizedHead(api) {
const finalizedHead = await api.rpc.chain.getFinalizedHead();
return finalizedHead.toHex();
}2. Stream finalized heads in real time
Subscribe to finalized-head updates when your service needs push-based finality signals:
async function subscribeFinalizedHeads(api) {
return api.rpc.chain.subscribeFinalizedHeads((header) => {
console.log(`Finalized block #${header.number.toString()} (${header.hash.toHex()})`);
});
}3. Measure finalized lag against the best block
Compare the latest finalized head with the newest block header to track confirmation lag:
async function getFinalityLag(api) {
const [finalizedHash, bestHeader] = await Promise.all([
api.rpc.chain.getFinalizedHead(),
api.rpc.chain.getHeader(),
]);
const finalizedHeader = await api.rpc.chain.getHeader(finalizedHash);
return {
bestBlock: bestHeader.number.toNumber(),
finalizedBlock: finalizedHeader.number.toNumber(),
lagBlocks: bestHeader.number.toNumber() - finalizedHeader.number.toNumber(),
};
}Understanding GRANDPA Rounds
GRANDPA achieves finality through a two-phase voting protocol:
-
Prevote Phase -- Each authority broadcasts a prevote for the highest block they consider best. Once prevotes reach the
thresholdWeight(supermajority), the protocol derives the highest block that is an ancestor of all supermajority prevotes. -
Precommit Phase -- Authorities that observe a supermajority of prevotes issue precommits for the block derived in the prevote phase. When precommits reach the threshold, that block and all its ancestors are finalized.
-
Authority Sets -- The
setIdincrements each time the authority set changes (e.g., after a session rotation). A new authority set starts a new round sequence from round 1.
| Concept | Description |
|---|---|
| totalWeight | Sum of all authority weights in the current set |
| thresholdWeight | ⌊totalWeight × 2/3⌋ + 1 -- minimum for supermajority |
| Healthy round | prevotes.currentWeight >= thresholdWeight AND precommits.currentWeight >= thresholdWeight |
| Stalled round | Neither prevotes nor precommits reach threshold for an extended period |
Error Handling
Common errors and solutions:
| Error Code | Description | Solution |
|---|---|---|
| -32603 | Internal error | The node may not be running the GRANDPA protocol (e.g., light client or parachain collator) -- verify node type |
| -32601 | Method not found | GRANDPA RPC is not enabled on this node -- check the node's --rpc-methods configuration |
| -32005 | Rate limit exceeded | Reduce polling frequency or implement client-side rate limiting |
| Empty response | No round data | Node may still be syncing or the GRANDPA voter has not started -- wait for sync completion |
Related Methods
chain_getFinalizedHead-- Get the hash of the latest finalized blockchain_subscribeFinalizedHeads-- Subscribe to new finalized block headersgrandpa_proveFinality-- Get a finality proof for a specific block numberbeefy_getFinalizedHead-- Get the latest BEEFY finalized block (if BEEFY is enabled)system_health-- Check overall node health including sync and peer status
payment_queryFeeDetails
Get a detailed fee breakdown for an extrinsic on Bittensor. Analyze base fee, length fee, and adjusted weight fee components to optimize transaction costs for decentralized AI inference, subnet-specific AI models, TAO staking, and cross-subnet AI collaboration.
beefy_getFinalizedHead
Get the BEEFY finalized block hash on Bittensor. Bridge-optimized finality proofs for cross-chain communication and light client verification on the decentralized machine intelligence network built around subnets, TAO staking, and validator-miner coordination.