Docs

archive_v1_header - Bittensor RPC Method

Fetch a block header by hash from the archive RPC on Bittensor using the new JSON-RPC v2 spec.

Returns the header of a block identified by its hash via the new JSON-RPC v2 archive API. The header contains the parent hash, block number, state root, extrinsics root, and digest (which includes consensus-related log items such as BABE slot info and GRANDPA authority changes). This is a lightweight way to inspect block metadata without fetching the full body.

Parameters

ParameterTypeRequiredDescription
hashstringYesHex-encoded block hash to retrieve the header for.

Response

FieldTypeDescription
resultstring | nullHex-encoded SCALE-encoded Substrate header for the requested block. null if the block hash cannot be resolved.

The returned header includes the parent hash, block number, state root, extrinsics root, and digest logs once decoded with the matching runtime types.

Code Examples

Use Cases

  • Chain traversal -- Walk the chain backwards by following parentHash links from header to header.
  • Light client verification -- Verify block headers and state roots without downloading the full block body.
  • Indexer metadata -- Extract block numbers, timestamps (from digest), and state roots for indexed block records.

Notes

  • This method is part of the new JSON-RPC v2 specification and may not be enabled on all Bittensor nodes.
  • The header is significantly smaller than a full block, making it ideal for lightweight monitoring.
  • On public shared RPC endpoints the archive namespace may be disabled or rate-limited.