Skip to content
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

Supporting existence proofs for empty values #134

Open
Manav-Aggarwal opened this issue Jan 18, 2023 · 3 comments
Open

Supporting existence proofs for empty values #134

Manav-Aggarwal opened this issue Jan 18, 2023 · 3 comments

Comments

@Manav-Aggarwal
Copy link

if len(value) == 0 {
throws an error for both when value is nil and when value is an empty array. In my opinion, having an empty array should be okay but currently, it throws an error in that case. I think changing the check if len(value) == 0 to if value == nil would make more sense. This method is used in Verify here which is used in VerifyMembership currently. This check currently seems to break commutability between GetMembershipProof (https://github.com/celestiaorg/iavl/blob/7c04bc4b0490e40097016f170a485e6449070f21/proof_ics23.go#L15) and VerifyMembership.

At the very least, I think the library should maintain consistency between generation and verification. In other words, if there’s no error thrown when generating an existence proof for an empty array, verifying that same proof should also not throw an error.

@zavgorodnii
Copy link

This bug makes it very hard for Neutron's interchain queries module to do its job properly. Are there any specific plans on fixing this proof/verification inconsistency?

@crodriguezvega
Copy link
Contributor

Thank you for the feedback, @zavgorodnii. We are going to pick the discussion about this issue from where we left off last year and try to find and implement a fix as soon as possible.

@zavgorodnii
Copy link

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants