Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions modules/core/23-commitment/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) {
"ibc.core.commitment.v1.Path",
(*exported.Path)(nil),
)
registry.RegisterInterface(
"ibc.core.commitment.v1.Proof",
(*exported.Proof)(nil),
)

registry.RegisterImplementations(
(*exported.Root)(nil),
Expand All @@ -37,8 +33,4 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) {
(*exported.Path)(nil),
&MerklePath{},
)
registry.RegisterImplementations(
(*exported.Proof)(nil),
&MerkleProof{},
)
}
5 changes: 0 additions & 5 deletions modules/core/23-commitment/types/codec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ func (suite *MerkleTestSuite) TestCodecTypeRegistration() {
sdk.MsgTypeURL(&types.MerklePath{}),
true,
},
{
"success: MerkleProof",
sdk.MsgTypeURL(&types.MerkleProof{}),
true,
},
{
"type not registered on codec",
"ibc.invalid.MsgTypeURL",
Expand Down
2 changes: 0 additions & 2 deletions modules/core/23-commitment/types/merkle.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ func ApplyPrefix(prefix exported.Prefix, path MerklePath) (MerklePath, error) {
return NewMerklePath(append([]string{string(prefix.Bytes())}, path.KeyPath...)...), nil
}

var _ exported.Proof = (*MerkleProof)(nil)

// VerifyMembership verifies the membership of a merkle proof against the given root, path, and value.
// Note that the path is expected as []string{<store key of module>, <key corresponding to requested value>}.
func (proof MerkleProof) VerifyMembership(specs []*ics23.ProofSpec, root exported.Root, path exported.Path, value []byte) error {
Expand Down
14 changes: 0 additions & 14 deletions modules/core/exported/commitment.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package exported

import ics23 "github.com/cosmos/ics23/go"

// ICS 023 Types Implementation
//
// This file includes types defined under
Expand Down Expand Up @@ -30,15 +28,3 @@ type Prefix interface {
type Path interface {
Empty() bool
}

// Proof implements spec:CommitmentProof.
// Proof can prove whether the key-value pair is a part of the Root or not.
// Each proof has designated key-value pair it is able to prove.
// Proofs include key but value is provided dynamically at the verification time.
type Proof interface {
VerifyMembership([]*ics23.ProofSpec, Root, Path, []byte) error
VerifyNonMembership([]*ics23.ProofSpec, Root, Path) error
Empty() bool

ValidateBasic() error
}