diff --git a/CHANGELOG.md b/CHANGELOG.md index 5298e31779f..bf81427cac3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (testing) [\#6070](https://github.com/cosmos/ibc-go/pull/6070) Remove `AssertEventsLegacy` function. * (core) [\#6138](https://github.com/cosmos/ibc-go/pull/6138) Remove `Router` reference from IBC core keeper and use instead the router on the existing `PortKeeper` reference. * (core/04-channel) [\#6023](https://github.com/cosmos/ibc-go/pull/6023) Remove emission of non-hexlified event attributes `packet_data` and `packet_ack`. +* (core) [\#6320](https://github.com/cosmos/ibc-go/pull/6320) Remove unnecessary `Proof` interface from `exported` package. ### State Machine Breaking diff --git a/docs/docs/05-migrations/13-v8-to-v9.md b/docs/docs/05-migrations/13-v8-to-v9.md index b3e03747167..afbf6a0e98c 100644 --- a/docs/docs/05-migrations/13-v8-to-v9.md +++ b/docs/docs/05-migrations/13-v8-to-v9.md @@ -28,6 +28,7 @@ There are four sections based on the four potential user groups of this document The `exported.ChannelI` and `exported.CounterpartyChannelI` interfaces have been removed. Please use the concrete types. The `exported.ConnectionI` and `exported.CounterpartyConnectionI` interfaces have been removed. Please use the concrete types. +The `exported.Proof` interface has been removed. Please use the `MerkleProof` concrete type. The functions `GetState()`, `GetOrdering()`, `GetCounterparty()`, `GetConnectionHops()`, `GetVersion()` of the `Channel` type have been removed. The functions `GetPortID()`, `GetChannelID()` of the `CounterpartyChannel` type have been removed. diff --git a/modules/core/23-commitment/types/codec.go b/modules/core/23-commitment/types/codec.go index c08d7519389..a73b6407202 100644 --- a/modules/core/23-commitment/types/codec.go +++ b/modules/core/23-commitment/types/codec.go @@ -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), @@ -37,8 +33,4 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { (*exported.Path)(nil), &MerklePath{}, ) - registry.RegisterImplementations( - (*exported.Proof)(nil), - &MerkleProof{}, - ) } diff --git a/modules/core/23-commitment/types/codec_test.go b/modules/core/23-commitment/types/codec_test.go index 88dc430b997..accf20b5ee2 100644 --- a/modules/core/23-commitment/types/codec_test.go +++ b/modules/core/23-commitment/types/codec_test.go @@ -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", diff --git a/modules/core/23-commitment/types/merkle.go b/modules/core/23-commitment/types/merkle.go index 668311f8271..0242f74e012 100644 --- a/modules/core/23-commitment/types/merkle.go +++ b/modules/core/23-commitment/types/merkle.go @@ -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{, }. func (proof MerkleProof) VerifyMembership(specs []*ics23.ProofSpec, root exported.Root, path exported.Path, value []byte) error { diff --git a/modules/core/exported/commitment.go b/modules/core/exported/commitment.go index 7886b4d323a..4a8cb5083ae 100644 --- a/modules/core/exported/commitment.go +++ b/modules/core/exported/commitment.go @@ -1,7 +1,5 @@ package exported -import ics23 "github.com/cosmos/ics23/go" - // ICS 023 Types Implementation // // This file includes types defined under @@ -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 -}