Create a Basic Proving Trie for the Runtime (#3881)
This PR will introduce a `BasicProvingTrie` type, which makes it easy to construct and prove data in a base-16 merkle trie within the runtime. Data into the merkle trie only require that they implement `Encode` / `Decode`. A FRAME compatible `TrieError` was created and added to `DispatchError`. Expected usage is to construct the merkle trie with all data offline, and then place only the merkle root of that trie on-chain. Also offchain, a user is given a compact merkle proof of some data they want to prove exists on the blockchain. Then in the runtime, you can call `verify_single_value_proof` or `verify_proof` with the root, proof, and the keys and values you want to verify exists in the merkle trie. Closes https://github.com/paritytech/polkadot-sdk/issues/3880 Contributes to #5400 --------- Co-authored-by: Ankan <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]>
parent
778a9e41
Pipeline
#495420
waiting for manual action
with stages
in
1 hour, 5 minutes, and 3 seconds
Please register or sign in to comment