Skip to content

Commit

Permalink
add more entries and more description
Browse files Browse the repository at this point in the history
  • Loading branch information
catShaark committed Apr 26, 2022
1 parent 4de0e29 commit 6c9551f
Showing 1 changed file with 27 additions and 9 deletions.
36 changes: 27 additions & 9 deletions docs/migrations/v3-to-v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,49 @@ No genesis or in-place migrations required when upgrading from v1 or v2 of ibc-g

## Chains

### IS04 - Channel
### IS04 - Channel

The `WriteAcknowledgement` API now takes the `exported.Acknowledgement` type instead of passing in the acknowledgement byte array directly.
This is an API breaking change and as such IBC application developers will have to update any calls to `WriteAcknowledgement`.
The `WriteAcknowledgement` API now takes the `exported.Acknowledgement` type instead of passing in the acknowledgement byte array directly.
This is an API breaking change and as such IBC application developers will have to update any calls to `WriteAcknowledgement`.

## IBC Light Clients

### ClientState interface changes

The `VerifyUpgradeAndUpdateState` function has been modified. The client state and consensus state return value has been removed.
The `VerifyUpgradeAndUpdateState` function has been modified. The client state and consensus state return value has 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 `CheckHeaderAndUpdateState` function has been split into 4 new functions: `VerifyClientMessage`, `CheckForMisbehaviour`, `UpdateState`,
`UpdateStateOnMisbehaviour`
The `CheckHeaderAndUpdateState` function has been split into 4 new functions:

The `CheckMisbehaviourAndUpdateState` function has been removed from `ClientState` interface. This functionality is now encapsulated by the usage of `VerifyClientMessage`, `CheckForMisbehaviour`, `UpdateStateOnMisbehaviour`, `UpdateState`.
- `VerifyClientMessage` : verify a `ClientMessage`. A ClientMessage could be a Header, Misbehaviour, or batch update. Calls to `CheckForMisbehaviour`, `UpdateState`, and `UpdateStateOnMisbehaviour` will assume that the content of the `ClientMessage` has been verified and can be trusted. An error should be returned if the `ClientMessage` fails to verify.

- `CheckForMisbehaviour` : checks for evidence of a misbehaviour in Header or Misbehaviour type.

- `UpdateStateOnMisbehaviour` : perform appropriate state changes on a `ClientState` given that misbehaviour has been detected and verified.

- `UpdateState` : updates and stores as necessary any associated information for an IBC client, such as the `ClientState` and corresponding `ConsensusState`. An error is returned if `ClientMessage` is of type `Misbehaviour`.

The `CheckMisbehaviourAndUpdateState` function has been removed from `ClientState` interface. This functionality is now encapsulated by the usage of `VerifyClientMessage`, `CheckForMisbehaviour`, `UpdateStateOnMisbehaviour`, `UpdateState`.

The function `GetTimestampAtHeight` has been added to the `ClientState` interface. It should return the timestamp for a consensus state associated with the provided height.

### Header and Misbehaviour

`exported.Header` and `exported.Misbehaviour` interface types have been merged and renamed to `ClientMessage` interface
`exported.Header` and `exported.Misbehaviour` interface types have been merged and renamed to `ClientMessage` interface.

### ConsensusState

The `GetRoot` function has been removed from consensus state interface.
The `GetRoot` function has been removed from consensus state interface.

### Light client implementations

09-localhost light client implementation has been removed because it is currently non-functional.

### Client Keeper

Keeper function `CheckMisbehaviourAndUpdateState` 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.

0 comments on commit 6c9551f

Please sign in to comment.