Docs

chainHead_v1_body - Bittensor RPC Method

Retrieve a block body within an active chain head follow subscription on Bittensor using the new JSON-RPC v2 spec.

Retrieves the block body (list of extrinsics) for a block that is part of an active chainHead_v1_follow subscription. The block must have been reported by the follow subscription -- you cannot query arbitrary historical blocks. This method is part of the new JSON-RPC v2 chain head specification designed for efficient real-time chain tracking.

Parameters

ParameterTypeRequiredDescription
followSubscriptionstringYesThe subscription ID returned by chainHead_v1_follow.
hashstringYesHex-encoded block hash. Must be a block reported by the follow subscription.

Response

The direct RPC response returns a MethodResponse object:

FieldTypeDescription
result.result"started" or "limitReached""started" includes an operationId; "limitReached" means the node refused to start another operation
result.operationIdstringOperation ID used to correlate follow-up events when the response is "started"

Once started, the follow subscription emits operationBodyDone with the block body payload.

Code Examples

Use Cases

  • Real-time indexing -- Fetch block bodies as new blocks arrive to index Bittensor extrinsics in real-time.
  • Transaction monitoring -- Inspect the extrinsics in each new block to detect specific transactions (transfers, subnet registrations, staking operations).
  • Block explorer backends -- Serve block body data to users as new blocks are produced.

Notes

  • Requires an active chainHead_v1_follow subscription. The block hash must be pinned (reported) by that subscription.
  • This method is experimental and may not be enabled on public shared RPC endpoints.
  • Use chainHead_v1_stopOperation to cancel an in-progress body fetch.