From 7074ad486e6c5f01cd5a09df0386b5ebce4beba1 Mon Sep 17 00:00:00 2001 From: Sean King Date: Wed, 10 Aug 2022 16:52:02 +0200 Subject: [PATCH 1/2] refactor: panic on ZeroCustomFields for solo machine implementation --- modules/light-clients/06-solomachine/client_state.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/light-clients/06-solomachine/client_state.go b/modules/light-clients/06-solomachine/client_state.go index 5f094ab0c00..a3a65695513 100644 --- a/modules/light-clients/06-solomachine/client_state.go +++ b/modules/light-clients/06-solomachine/client_state.go @@ -75,11 +75,9 @@ func (cs ClientState) Validate() error { return cs.ConsensusState.ValidateBasic() } -// ZeroCustomFields returns solomachine client state with client-specific field FrozenSequence zeroed out +// ZeroCustomFields is not implemented for solo machine func (cs ClientState) ZeroCustomFields() exported.ClientState { - return NewClientState( - cs.Sequence, cs.ConsensusState, - ) + panic("ZeroCustomFields is not implemented as the solo machine implementation does not support upgrades.") } // Initialize will check that initial consensus state is equal to the latest consensus state of the initial client. From f4f6323905cc13727f37345556d3b3ebfcda618e Mon Sep 17 00:00:00 2001 From: Sean King Date: Thu, 11 Aug 2022 11:35:30 +0200 Subject: [PATCH 2/2] chore: changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fac686557b..276cf23f5a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -111,6 +111,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (modules/core/02-client) [\#1741](https://github.com/cosmos/ibc-go/pull/1741) Emitting a new `upgrade_chain` event upon setting upgrade consensus state. * (client) [\#724](https://github.com/cosmos/ibc-go/pull/724) `IsRevisionFormat` and `IsClientIDFormat` have been updated to disallow newlines before the dash used to separate the chainID and revision number, and the client type and client sequence. * (02-client/cli) [\#897](https://github.com/cosmos/ibc-go/pull/897) Remove `GetClientID()` from `Misbehaviour` interface. Submit client misbehaviour cli command requires an explicit client id now. +* (06-solomachine) [\#1972](https://github.com/cosmos/ibc-go/pull/1972) Solo machine implementation of `ZeroCustomFields` fn now panics as the fn is only used for upgrades which solo machine does not support. ### Features