Skip to content

Consider removing CommitmentProof type #393

Description

@colin-axner

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions