state_getChildReadProof - Bittensor RPC Method
Generate a Merkle read proof for child storage keys at a given block on Bittensor.
Returns a Merkle proof for one or more keys in a child storage trie at a given block. The proof can be used to verify the values of those keys without trusting the RPC provider -- the verifier only needs the state root from a trusted block header. This is the child-trie equivalent of state_getReadProof.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
childStorageKey | string | Yes | Hex-encoded key identifying the child trie root. |
keys | array | Yes | Array of hex-encoded storage keys within the child trie to prove. |
blockHash | string | No | Hex-encoded block hash. Defaults to the best block if omitted. |
Response
| Field | Type | Description |
|---|---|---|
at | string | Block hash at which the proof was generated. |
proof | array | Array of hex-encoded trie nodes forming the Merkle proof. |
Code Examples
Use Cases
- Trust-minimized verification -- Verify child storage values off-chain using only the state root from a trusted block header, without trusting the RPC provider.
- Bridge proofs -- Generate proofs for cross-chain bridges that need to verify Bittensor child storage state on another chain.
- Light client support -- Provide state proofs to light clients that do not store the full state trie.
Notes
- Child trie usage is runtime-specific. Not all Bittensor pallets use child storage, so this method may return empty proofs for many queries.
- Replace the example parameters with actual child storage keys from the runtime you are querying.
- Requires an archive node for historical block hashes.
Related Methods
state_getReadProof-- Generate Merkle proofs for main-trie storage keyschildstate_getStorage-- Read child storage values (without proofs)childstate_getStorageEntries-- Batch read child storage valuesstate_getStorage-- Read main-trie storage values