-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement calculate_non_existence_root
in Rust
#50
Comments
Can you please be more explicit? I know that we generate these roots in test code and verify them properly. There is likely a specific usage you have in mind that the library does not cover, so please document the code you are trying to write and what api it needs. (and enough code so I can comment if there is an alternate approach) |
@ethanfrey
However I cannot seem to implement verify non membership as in ibc-go since I would need to calculate the root of the non_existence proof. Currently the Here is the go code I am referring to - https://github.com/cosmos/ibc-go/blob/74182d8d45bca3504ed0190e9cdedb1a8ba45973/modules/core/23-commitment/types/merkle.go#L132. If there is a simple way to solve this please let me know! Thanks in advance! |
ics 23 go library implementation - https://github.com/confio/ics23/blob/5a0206f31ac5ccb40757e98a3c86e7beff95793b/go/proof.go#L48 |
Thank you for the explanation. I can look more in depth on Monday but a quick response is that a non existence proof contains 1 or 2 existence proof (1 if it is on the edge of the tree). Both of those have the same root. You could look at the contents of the non existence proof and return the root of left or right, whichever exists (neither existing means empty tree, which we do not support and consider invalid, so it can error) |
Happy for a PR if you add a test case or two |
calculate_non_existence_root
in Rust
No description provided.
The text was updated successfully, but these errors were encountered: