Docs

state_getReadProof - Bittensor RPC Method

Generate a Merkle read proof for storage keys at a given block on Bittensor.

Returns a Merkle proof for one or more storage keys at a given block. The proof consists of trie nodes that, together with the state root from a trusted block header, allow a verifier to confirm the values of the specified keys without trusting the RPC provider. This is essential for light clients, cross-chain bridges, and trust-minimized applications.

Parameters

ParameterTypeRequiredDescription
keysarrayYesArray of hex-encoded storage keys to generate proofs for.
blockHashstringNoHex-encoded block hash. Defaults to the best block if omitted.

Response

FieldTypeDescription
atstringBlock hash at which the proof was generated.
proofarrayArray of hex-encoded trie nodes forming the Merkle proof.

Code Examples

Use Cases

  • Trust-minimized verification -- Verify storage values off-chain using only the state root from a trusted (finalized) block header.
  • Cross-chain bridges -- Generate proofs that another chain can verify to confirm Bittensor on-chain state (e.g. account balances, subnet parameters).
  • Light clients -- Provide state proofs to light clients that verify on-chain data without storing the full state trie.
  • Audit and compliance -- Prove that specific on-chain values existed at a given block without requiring the verifier to run a full node.

Notes

  • The proof is generated against the state trie at the specified block. The verifier needs the stateRoot from that block's header.
  • Proof verification can be performed using the @polkadot/trie-hash or sp-trie libraries.
  • Requires an archive node for proofs at historical block hashes.