- Chains
- IBC Apps
- Relayers
- IBC Light Clients
Chains
Chains will perform automatic migrations to remove existing localhost clients and to migrate the solomachine to v3 of the protobuf definition. An optional upgrade handler has been added to prune expired tendermint consensus states. It may be used during any upgrade (from v7 onwards). Add the following to the function call to the upgrade handler inapp/app.go, to perform the optional state pruning.
Light client registration
Chains must explicitly register the types of any light client modules it wishes to integrate.Tendermint registration
To register the tendermint client, modify theapp.go file to include the tendermint AppModuleBasic:
AppModuleBasic for the tendermint client.
Solo machine registration
To register the solo machine client, modify theapp.go file to include the solo machine AppModuleBasic:
AppModuleBasic for the solo machine client.
Testing package API
TheSetChannelClosed utility method in testing/endpoint.go has been updated to SetChannelState, which will take a channeltypes.State argument so that the ChannelState can be set to any of the possible channel states.
IBC Apps
- No relevant changes were made in this release.
Relayers
- No relevant changes were made in this release.
IBC Light Clients
ClientState interface changes
The VerifyUpgradeAndUpdateState function has been modified. The client state and consensus state return values have been removed.
Light clients must handle all management of client and consensus states including the setting of updated client state and consensus state in the client store.
The Initialize method is now expected to set the initial client state, consensus state and any client-specific metadata in the provided store upon client creation.
The CheckHeaderAndUpdateState method has been split into 4 new methods:
-
VerifyClientMessageverifies aClientMessage. AClientMessagecould be aHeader,Misbehaviour, or batch update. Calls toCheckForMisbehaviour,UpdateState, andUpdateStateOnMisbehaviourwill assume that the content of theClientMessagehas been verified and can be trusted. An error should be returned if theClientMessagefails to verify. -
CheckForMisbehaviourchecks for evidence of a misbehaviour inHeaderorMisbehaviourtypes. -
UpdateStateOnMisbehaviourperforms appropriate state changes on aClientStategiven that misbehaviour has been detected and verified. -
UpdateStateupdates and stores as necessary any associated information for an IBC client, such as theClientStateand correspondingConsensusState. An error is returned ifClientMessageis of typeMisbehaviour. Upon successful update, a list containing the updated consensus state height is returned.
CheckMisbehaviourAndUpdateState function has been removed from ClientState interface. This functionality is now encapsulated by the usage of VerifyClientMessage, CheckForMisbehaviour, UpdateStateOnMisbehaviour.
The function GetTimestampAtHeight has been added to the ClientState interface. It should return the timestamp for a consensus state associated with the provided height.
Prior to ibc-go/v7 the ClientState interface defined a method for each data type which was being verified in the counterparty state store.
The state verification functions for all IBC data types have been consolidated into two generic methods, VerifyMembership and VerifyNonMembership.
Both are expected to be provided with a standardised key path, exported.Path, as defined in ICS 24 host requirements. Membership verification requires callers to provide the marshalled value []byte. Delay period values should be zero for non-packet processing verification. A zero proof height is now allowed by core IBC and may be passed into VerifyMembership and VerifyNonMembership. Light clients are responsible for returning an error if a zero proof height is invalid behaviour.
See below for an example of how ibc-go now performs channel state verification.
Header and Misbehaviour
exported.Header and exported.Misbehaviour interface types have been merged and renamed to ClientMessage interface.
GetHeight function has been removed from exported.Header and thus is not included in the ClientMessage interface
ConsensusState
The GetRoot function has been removed from consensus state interface since it was not used by core IBC.
Client keeper
Keeper functionCheckMisbehaviourAndUpdateState has been removed since function UpdateClient can now handle updating ClientState on ClientMessage type which can be any Misbehaviour implementations.
SDK message
MsgSubmitMisbehaviour is deprecated since MsgUpdateClient can now submit a ClientMessage type which can be any Misbehaviour implementations.
The field header in MsgUpdateClient has been renamed to client_message.
Solomachine
The06-solomachine client implementation has been simplified in ibc-go/v7. In-place store migrations have been added to migrate solomachine clients from v2 to v3.
ClientState
The ClientState protobuf message definition has been updated to remove the deprecated bool field allow_update_after_proposal.
Header and Misbehaviour
The 06-solomachine protobuf message Header has been updated to remove the sequence field. This field was seen as redundant as the implementation can safely rely on the sequence value maintained within the ClientState.
Misbehaviour protobuf message has been updated to remove the client_id field.
SignBytes
Most notably, the SignBytes protobuf definition has been modified to replace the data_type field with a new field, path. The path field is defined as bytes and represents a serialized ICS-24 standardized key path under which the data is stored.
DataType enum and all associated data types have been removed, greatly reducing the number of message definitions and complexity in constructing the SignBytes message type. Likewise, solomachine implementations must now use the serialized path value when constructing SignatureAndData for signature verification of SignBytes data.
IBC module constants
IBC module constants have been moved from thehost package to the exported package. Any usages will need to be updated.
Upgrading to Cosmos SDK 0.47
The following should be considered as complementary to Cosmos SDK v0.47 UPGRADING.md.Protobuf
Protobuf code generation, linting and formatting have been updated to leverage theghcr.io/cosmos/proto-builder:0.11.5 docker container. IBC protobuf definitions are now packaged and published to buf.build/cosmos/ibc via CI workflows. The third_party/proto directory has been removed in favour of dependency management using buf.build.
App modules
Legacy APIs of theAppModule interface have been removed from ibc-go modules. For example, for