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
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.
The text was updated successfully, but these errors were encountered:
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?
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.
ics23/go/ops.go
Line 62 in f4deb05
if len(value) == 0
toif 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.
The text was updated successfully, but these errors were encountered: