From 2e7efad7b9659ec3864d6808ddba7371c10f2173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Colin=20Axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Tue, 14 Dec 2021 17:24:33 +0100 Subject: [PATCH 1/2] remove proof spec from ClientState interface --- modules/core/exported/client.go | 2 -- modules/light-clients/06-solomachine/types/client_state.go | 7 ------- modules/light-clients/09-localhost/types/client_state.go | 7 ------- 3 files changed, 16 deletions(-) diff --git a/modules/core/exported/client.go b/modules/core/exported/client.go index de4cbe48c8a..4dce203bea4 100644 --- a/modules/core/exported/client.go +++ b/modules/core/exported/client.go @@ -1,7 +1,6 @@ package exported import ( - ics23 "github.com/confio/ics23/go" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" proto "github.com/gogo/protobuf/proto" @@ -44,7 +43,6 @@ type ClientState interface { ClientType() string GetLatestHeight() Height Validate() error - GetProofSpecs() []*ics23.ProofSpec // Initialization function // Clients must validate the initial consensus state, and may store any client-specific metadata diff --git a/modules/light-clients/06-solomachine/types/client_state.go b/modules/light-clients/06-solomachine/types/client_state.go index 2ce6eee512e..c99d4f08f64 100644 --- a/modules/light-clients/06-solomachine/types/client_state.go +++ b/modules/light-clients/06-solomachine/types/client_state.go @@ -3,8 +3,6 @@ package types import ( "reflect" - ics23 "github.com/confio/ics23/go" - "github.com/cosmos/cosmos-sdk/codec" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -52,11 +50,6 @@ func (cs ClientState) Status(_ sdk.Context, _ sdk.KVStore, _ codec.BinaryCodec) return exported.Active } -// GetProofSpecs returns nil proof specs since client state verification uses signatures. -func (cs ClientState) GetProofSpecs() []*ics23.ProofSpec { - return nil -} - // Validate performs basic validation of the client state fields. func (cs ClientState) Validate() error { if cs.Sequence == 0 { diff --git a/modules/light-clients/09-localhost/types/client_state.go b/modules/light-clients/09-localhost/types/client_state.go index ab0f7207fdf..b817f7764eb 100644 --- a/modules/light-clients/09-localhost/types/client_state.go +++ b/modules/light-clients/09-localhost/types/client_state.go @@ -6,8 +6,6 @@ import ( "reflect" "strings" - ics23 "github.com/confio/ics23/go" - "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -60,11 +58,6 @@ func (cs ClientState) Validate() error { return nil } -// GetProofSpecs returns nil since localhost does not have to verify proofs -func (cs ClientState) GetProofSpecs() []*ics23.ProofSpec { - return nil -} - // ZeroCustomFields returns the same client state since there are no custom fields in localhost func (cs ClientState) ZeroCustomFields() exported.ClientState { return &cs From e02e96aa54e71e3a5d85cc03f07bffdc84b8324d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Colin=20Axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Tue, 14 Dec 2021 17:34:55 +0100 Subject: [PATCH 2/2] add changelog and migration doc note --- CHANGELOG.md | 1 + docs/migrations/v2-to-v3.md | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f83dc781f2..eb9f13fd013 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### API Breaking +* (core) [\#629](https://github.com/cosmos/ibc-go/pull/629) Removes the GetProofSpecs from the ClientState interface. This function was previously unused by core IBC. * (transfer) [\#517](https://github.com/cosmos/ibc-go/pull/517) Separates the ICS 26 callback functions from `AppModule` into a new type `IBCModule` for ICS 20 transfer. * (modules/core/02-client) [\#536](https://github.com/cosmos/ibc-go/pull/536) GetSelfConsensusState return type changed from bool to error. diff --git a/docs/migrations/v2-to-v3.md b/docs/migrations/v2-to-v3.md index f3fad769d08..d1350bd1163 100644 --- a/docs/migrations/v2-to-v3.md +++ b/docs/migrations/v2-to-v3.md @@ -38,4 +38,5 @@ Please review the [mock](../../testing/mock/ibc_module.go) and [transfer](../../ ## IBC Light Clients -- No relevant changes were made in this release. +The `GetProofSpecs` function has been removed from the `ClientState` interface. This function was previously unused by core IBC. Light clients which don't use this function may remove it. +