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

Consider removing CommitmentProof type #393

Open
colin-axner opened this issue Oct 21, 2024 · 0 comments
Open

Consider removing CommitmentProof type #393

colin-axner opened this issue Oct 21, 2024 · 0 comments

Comments

@colin-axner
Copy link
Contributor

We have CommitmentProof which stores one of:

  • ExistenceProof
  • NonExistenceProof
  • BatchProof
  • CompressedBatchProof

In #389 BatchProof and CompressedBatchProof would be removed.
The ics23.VerifyMembership and ics23.VerifyNonMembership are as follows:

func VerifyMembership(spec *ProofSpec, root CommitmentRoot, proof *CommitmentProof, key []byte, value []byte) bool

func VerifyNonMembership(spec *ProofSpec, root CommitmentRoot, proof *CommitmentProof, key []byte) bool

Only ExistenceProof is valid for VerifyMembership and NonExistenceProof is only valid for VerifyNonMembership. These functions are ultimately proof.Verify(...)

CommitmentProof usage could be removed by treating ExistenceProof and NonExistenceProof as two distinct types, no overlapping api/interface. This would require some downstream changes to iavl, sdk, ibc-go. The main substantial change I can imagine is if any api's are along the lines of QueryProof where a commitment proof is construct of either an existence proof or non existence proof

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

1 participant