You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
polkadot/api has a function to retrieve a proof for storage value given corresponding key. But is there a library that allows to verify received proof against Merkle root?
Our research shows that we need proper implementation of the trie-db. We tried to use one from polkadot/common 1.8.1 but looks like it is outdated (for example, NibbledBrachNode type is missing for Trie node). The only option we see now is to port Rust implementation of the proof verification that looks very complicated but may be there is an easier way?
The text was updated successfully, but these errors were encountered:
The trie-hash is indeed very outdated, it has not kept up with the latest changes. (It has moved code locations, here is the PR with the latest code that was in common https://github.com/polkadot-js/client/pull/250/files). I'm assuming the @polkadot/trie-hash should actually be sufficient for this usage, but yes, it is seriously outdated compared to Rust master.
I cannot think of another way. I guess without porting if the trie-root can be compiled to WASM (it is certainly compatible since it is used in Substrate), it would be the best solution from a compatibility perspective.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.
polkadot/api has a function to retrieve a proof for storage value given corresponding key. But is there a library that allows to verify received proof against Merkle root?
Our research shows that we need proper implementation of the trie-db. We tried to use one from polkadot/common 1.8.1 but looks like it is outdated (for example, NibbledBrachNode type is missing for Trie node). The only option we see now is to port Rust implementation of the proof verification that looks very complicated but may be there is an easier way?
The text was updated successfully, but these errors were encountered: