archive_v1_call - Bittensor RPC Method
Execute a runtime API call against archived historical state on Bittensor using the new JSON-RPC v2 spec.
Executes a runtime API call against the state of a specific historical block via the new JSON-RPC v2 archive API. This allows you to invoke any runtime API function (such as Metadata_metadata, AccountNonceApi_account_nonce, or TransactionPaymentApi_query_info) using the state as it existed at a given block, without needing an active follow subscription.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
hash | string | Yes | Hex-encoded block hash identifying which historical state to query against. |
function | string | Yes | The runtime API function name (e.g. "Metadata_metadata"). |
callParameters | string | Yes | Hex-encoded SCALE-encoded call parameters. Use "0x" when the function takes no arguments. |
Response
| Field | Type | Description |
|---|---|---|
result.success | boolean | true when the runtime call executed successfully |
result.value | string | Hex-encoded SCALE output returned by the runtime API when success is true |
result.error | string | Error string returned by the runtime when success is false |
The value field is SCALE-encoded and must be decoded according to the runtime API's return type.
Code Examples
Use Cases
- Historical metadata retrieval -- Fetch the runtime metadata as it was at a past block to correctly decode storage and extrinsics from that era.
- Fee estimation on past state -- Call
TransactionPaymentApi_query_infoagainst historical state to understand fee structures at a given block. - Cross-version analytics -- Compare runtime API outputs across different blocks to track how Bittensor subnet parameters evolved over time.
Bittensor Context
On Bittensor, runtime APIs can expose subnet-specific data, neuron metadata, and staking information. By calling these APIs at historical blocks, you can reconstruct how subnet parameters, validator weights, and incentive mechanisms evolved over time -- essential for research and analytics on the decentralized AI network.
Notes
- This is part of the new JSON-RPC v2 specification. Availability depends on node configuration and the archive namespace being enabled.
- The
callParametersmust be SCALE-encoded. Use a library such as@polkadot/typesorparity-scale-codecto encode them. - On public shared RPC endpoints, this method may be disabled or rate-limited.
Related Methods
archive_v1_body-- Get the block body from the archivearchive_v1_header-- Get the block header from the archivestate_call-- Legacy runtime API call (at latest or specific block)state_callAt-- Legacy runtime API call at a specific block hashchainHead_v1_call-- Runtime call within a follow subscription