From 1fc561ec81bf3e0409132d3855968b69db79d9b5 Mon Sep 17 00:00:00 2001 From: romelukaku Date: Mon, 25 Apr 2022 10:19:22 +0700 Subject: [PATCH 01/21] add changes on : ClientState, Header, Misbehaviour, ConsensState, light client impl to migration doc --- docs/migrations/v3-to-v4.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/migrations/v3-to-v4.md b/docs/migrations/v3-to-v4.md index f933a7380f7..40b7582ffab 100644 --- a/docs/migrations/v3-to-v4.md +++ b/docs/migrations/v3-to-v4.md @@ -25,6 +25,25 @@ This is an API breaking change and as such IBC application developers will have ## IBC Light Clients +### Light client and ClientState + The `VerifyUpgradeAndUpdateState` function has been modified. The client state and consensus state return value has been removed. Light clients **must** set the updated client state and consensus state in the client store after verifying a valid client upgrade. + +The `CheckHeaderAndUpdateState` function has been split into 4 new functions: `VerifyClientMessage`, `CheckForMisbehaviour`, `UpdateState`, +`UpdateStateOnMisbehaviour` + +Light client implementations now need to manage setting of client and consensus states for these interface functions `UpdateState`, `UpdateStateOnMisbehaviour`, `VerifyUpgradeAndUpdateState`, `CheckSubstituteAndUpdateState` + +The `CheckMisbehaviourAndUpdateState` function has been removed from `ClientState` interface + +The `GetTimestampAtHeight` has been added to the `ClientState` interface + +### Header and Misbehaviour + +`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 \ No newline at end of file From 0e7bd3af6dbc35b8f490c8bb502dda0704c58686 Mon Sep 17 00:00:00 2001 From: khanh <50263489+catShaark@users.noreply.github.com> Date: Mon, 25 Apr 2022 18:54:07 +0700 Subject: [PATCH 02/21] Update docs/migrations/v3-to-v4.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> --- docs/migrations/v3-to-v4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/migrations/v3-to-v4.md b/docs/migrations/v3-to-v4.md index 40b7582ffab..efbb74e0b58 100644 --- a/docs/migrations/v3-to-v4.md +++ b/docs/migrations/v3-to-v4.md @@ -25,7 +25,7 @@ This is an API breaking change and as such IBC application developers will have ## IBC Light Clients -### Light client and ClientState +### ClientState interface changes The `VerifyUpgradeAndUpdateState` function has been modified. The client state and consensus state return value has been removed. From 7db7f72f4a0455c5c2e0b1c18f1578fc236af961 Mon Sep 17 00:00:00 2001 From: khanh <50263489+catShaark@users.noreply.github.com> Date: Mon, 25 Apr 2022 18:55:35 +0700 Subject: [PATCH 03/21] Update docs/migrations/v3-to-v4.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> --- docs/migrations/v3-to-v4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/migrations/v3-to-v4.md b/docs/migrations/v3-to-v4.md index efbb74e0b58..d40c46bf5b9 100644 --- a/docs/migrations/v3-to-v4.md +++ b/docs/migrations/v3-to-v4.md @@ -29,7 +29,7 @@ This is an API breaking change and as such IBC application developers will have The `VerifyUpgradeAndUpdateState` function has been modified. The client state and consensus state return value has been removed. -Light clients **must** set the updated client state and consensus state in the client store after verifying a valid client upgrade. +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` From 250353d923b4dd4a4f6ef62d2c13e3a2d1a6d32d Mon Sep 17 00:00:00 2001 From: khanh <50263489+catShaark@users.noreply.github.com> Date: Mon, 25 Apr 2022 18:55:47 +0700 Subject: [PATCH 04/21] Update docs/migrations/v3-to-v4.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> --- docs/migrations/v3-to-v4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/migrations/v3-to-v4.md b/docs/migrations/v3-to-v4.md index d40c46bf5b9..04e787f36c2 100644 --- a/docs/migrations/v3-to-v4.md +++ b/docs/migrations/v3-to-v4.md @@ -46,4 +46,4 @@ The `GetTimestampAtHeight` has been added to the `ClientState` interface ### ConsensusState -The `GetRoot` function has been removed from consensus state interface \ No newline at end of file +The `GetRoot` function has been removed from consensus state interface. \ No newline at end of file From 4699eb270904e6f89ecfe359948f8d31f7482d19 Mon Sep 17 00:00:00 2001 From: khanh <50263489+catShaark@users.noreply.github.com> Date: Mon, 25 Apr 2022 18:57:06 +0700 Subject: [PATCH 05/21] Update docs/migrations/v3-to-v4.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> --- docs/migrations/v3-to-v4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/migrations/v3-to-v4.md b/docs/migrations/v3-to-v4.md index 04e787f36c2..3439a4ff817 100644 --- a/docs/migrations/v3-to-v4.md +++ b/docs/migrations/v3-to-v4.md @@ -38,7 +38,7 @@ Light client implementations now need to manage setting of client and consensus The `CheckMisbehaviourAndUpdateState` function has been removed from `ClientState` interface -The `GetTimestampAtHeight` has been added to the `ClientState` interface +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 From 5b7f4475646aa6d4de9cddba6371ec0ea19534b6 Mon Sep 17 00:00:00 2001 From: khanh <50263489+catShaark@users.noreply.github.com> Date: Mon, 25 Apr 2022 18:58:51 +0700 Subject: [PATCH 06/21] Update docs/migrations/v3-to-v4.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> --- docs/migrations/v3-to-v4.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/migrations/v3-to-v4.md b/docs/migrations/v3-to-v4.md index 3439a4ff817..afb26945114 100644 --- a/docs/migrations/v3-to-v4.md +++ b/docs/migrations/v3-to-v4.md @@ -36,7 +36,8 @@ The `CheckHeaderAndUpdateState` function has been split into 4 new functions: `V Light client implementations now need to manage setting of client and consensus states for these interface functions `UpdateState`, `UpdateStateOnMisbehaviour`, `VerifyUpgradeAndUpdateState`, `CheckSubstituteAndUpdateState` -The `CheckMisbehaviourAndUpdateState` function has been removed from `ClientState` interface +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. From 4de0e298a1fb10690bdef2ffd51654720756f112 Mon Sep 17 00:00:00 2001 From: khanh <50263489+catShaark@users.noreply.github.com> Date: Mon, 25 Apr 2022 19:02:41 +0700 Subject: [PATCH 07/21] Update docs/migrations/v3-to-v4.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> --- docs/migrations/v3-to-v4.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/migrations/v3-to-v4.md b/docs/migrations/v3-to-v4.md index afb26945114..daf9729787f 100644 --- a/docs/migrations/v3-to-v4.md +++ b/docs/migrations/v3-to-v4.md @@ -34,8 +34,6 @@ Light clients **must** handle all management of client and consensus states incl The `CheckHeaderAndUpdateState` function has been split into 4 new functions: `VerifyClientMessage`, `CheckForMisbehaviour`, `UpdateState`, `UpdateStateOnMisbehaviour` -Light client implementations now need to manage setting of client and consensus states for these interface functions `UpdateState`, `UpdateStateOnMisbehaviour`, `VerifyUpgradeAndUpdateState`, `CheckSubstituteAndUpdateState` - The `CheckMisbehaviourAndUpdateState` function has been removed from `ClientState` interface. This functionality is now encapsulated by the usage of `VerifyClientMessage`, `CheckForMisbehaviour`, `UpdateStateOnMisbehaviour`, `UpdateState`. From 6c9551f05e0e05d397f43661f71bdadcce5b912e Mon Sep 17 00:00:00 2001 From: romelukaku Date: Tue, 26 Apr 2022 09:48:19 +0700 Subject: [PATCH 08/21] add more entries and more description --- docs/migrations/v3-to-v4.md | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/docs/migrations/v3-to-v4.md b/docs/migrations/v3-to-v4.md index daf9729787f..bf835790b77 100644 --- a/docs/migrations/v3-to-v4.md +++ b/docs/migrations/v3-to-v4.md @@ -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. \ No newline at end of file +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. From 8c77483bf15fd928332f1371fe684ef4ba0d8f58 Mon Sep 17 00:00:00 2001 From: khanh <50263489+catShaark@users.noreply.github.com> Date: Tue, 26 Apr 2022 13:26:54 +0700 Subject: [PATCH 09/21] Update docs/migrations/v3-to-v4.md Co-authored-by: Carlos Rodriguez --- docs/migrations/v3-to-v4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/migrations/v3-to-v4.md b/docs/migrations/v3-to-v4.md index bf835790b77..36d73a44695 100644 --- a/docs/migrations/v3-to-v4.md +++ b/docs/migrations/v3-to-v4.md @@ -25,7 +25,7 @@ This is an API breaking change and as such IBC application developers will have ## IBC Light Clients -### ClientState interface changes +### `ClientState` interface changes The `VerifyUpgradeAndUpdateState` function has been modified. The client state and consensus state return value has been removed. From 060988a4d25fdecf2e3e3f4ef122c49144f4356c Mon Sep 17 00:00:00 2001 From: khanh <50263489+catShaark@users.noreply.github.com> Date: Tue, 26 Apr 2022 13:28:22 +0700 Subject: [PATCH 10/21] Update docs/migrations/v3-to-v4.md Co-authored-by: Carlos Rodriguez --- docs/migrations/v3-to-v4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/migrations/v3-to-v4.md b/docs/migrations/v3-to-v4.md index 36d73a44695..5b785c9b1f0 100644 --- a/docs/migrations/v3-to-v4.md +++ b/docs/migrations/v3-to-v4.md @@ -33,7 +33,7 @@ Light clients **must** handle all management of client and consensus states incl The `CheckHeaderAndUpdateState` function has been split into 4 new functions: -- `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. +- `VerifyClientMessage` verifies 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. From 1c546b95595ce170212b1458f35ce78f718658d8 Mon Sep 17 00:00:00 2001 From: khanh <50263489+catShaark@users.noreply.github.com> Date: Tue, 26 Apr 2022 13:28:51 +0700 Subject: [PATCH 11/21] Update docs/migrations/v3-to-v4.md Co-authored-by: Carlos Rodriguez --- docs/migrations/v3-to-v4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/migrations/v3-to-v4.md b/docs/migrations/v3-to-v4.md index 5b785c9b1f0..60dbbfd3313 100644 --- a/docs/migrations/v3-to-v4.md +++ b/docs/migrations/v3-to-v4.md @@ -51,7 +51,7 @@ The function `GetTimestampAtHeight` has been added to the `ClientState` interfac ### ConsensusState -The `GetRoot` function has been removed from consensus state interface. +The `GetRoot` function has been removed from consensus state interface since it was not used by core IBC. ### Light client implementations From 2f890d2c7aacd9ac40a2988b01454ef2884e9a9c Mon Sep 17 00:00:00 2001 From: khanh <50263489+catShaark@users.noreply.github.com> Date: Tue, 26 Apr 2022 13:29:15 +0700 Subject: [PATCH 12/21] Update docs/migrations/v3-to-v4.md Co-authored-by: Carlos Rodriguez --- docs/migrations/v3-to-v4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/migrations/v3-to-v4.md b/docs/migrations/v3-to-v4.md index 60dbbfd3313..1fb182af534 100644 --- a/docs/migrations/v3-to-v4.md +++ b/docs/migrations/v3-to-v4.md @@ -49,7 +49,7 @@ The function `GetTimestampAtHeight` has been added to the `ClientState` interfac `exported.Header` and `exported.Misbehaviour` interface types have been merged and renamed to `ClientMessage` interface. -### ConsensusState +### `ConsensusState` The `GetRoot` function has been removed from consensus state interface since it was not used by core IBC. From fefb36393528bfcbf79b1b9ad068e21fcfa30643 Mon Sep 17 00:00:00 2001 From: khanh <50263489+catShaark@users.noreply.github.com> Date: Tue, 26 Apr 2022 13:29:27 +0700 Subject: [PATCH 13/21] Update docs/migrations/v3-to-v4.md Co-authored-by: Carlos Rodriguez --- docs/migrations/v3-to-v4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/migrations/v3-to-v4.md b/docs/migrations/v3-to-v4.md index 1fb182af534..d802d48499e 100644 --- a/docs/migrations/v3-to-v4.md +++ b/docs/migrations/v3-to-v4.md @@ -45,7 +45,7 @@ The `CheckMisbehaviourAndUpdateState` function has been removed from `ClientStat 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 +### `Header` and `Misbehaviour` `exported.Header` and `exported.Misbehaviour` interface types have been merged and renamed to `ClientMessage` interface. From 1a27799d801e2a188dc1e8f4467129aa80fc1ed3 Mon Sep 17 00:00:00 2001 From: khanh <50263489+catShaark@users.noreply.github.com> Date: Tue, 26 Apr 2022 13:29:35 +0700 Subject: [PATCH 14/21] Update docs/migrations/v3-to-v4.md Co-authored-by: Carlos Rodriguez --- docs/migrations/v3-to-v4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/migrations/v3-to-v4.md b/docs/migrations/v3-to-v4.md index d802d48499e..b650c1890b6 100644 --- a/docs/migrations/v3-to-v4.md +++ b/docs/migrations/v3-to-v4.md @@ -37,7 +37,7 @@ The `CheckHeaderAndUpdateState` function has been split into 4 new functions: - `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. +- `UpdateStateOnMisbehaviour` performs 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`. From 318a2d59ee4bf5a527a5afa3f58354d4bc42bbed Mon Sep 17 00:00:00 2001 From: khanh <50263489+catShaark@users.noreply.github.com> Date: Tue, 26 Apr 2022 13:29:44 +0700 Subject: [PATCH 15/21] Update docs/migrations/v3-to-v4.md Co-authored-by: Carlos Rodriguez --- docs/migrations/v3-to-v4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/migrations/v3-to-v4.md b/docs/migrations/v3-to-v4.md index b650c1890b6..b8e83cd07b0 100644 --- a/docs/migrations/v3-to-v4.md +++ b/docs/migrations/v3-to-v4.md @@ -35,7 +35,7 @@ The `CheckHeaderAndUpdateState` function has been split into 4 new functions: - `VerifyClientMessage` verifies 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. +- `CheckForMisbehaviour` checks for evidence of a misbehaviour in `Header` or `Misbehaviour` types. - `UpdateStateOnMisbehaviour` performs appropriate state changes on a `ClientState` given that misbehaviour has been detected and verified. From 5886fed99da6f5496803a1ae998a2de0636b5bac Mon Sep 17 00:00:00 2001 From: khanh <50263489+catShaark@users.noreply.github.com> Date: Tue, 26 Apr 2022 20:18:24 +0700 Subject: [PATCH 16/21] Update docs/migrations/v3-to-v4.md Co-authored-by: Carlos Rodriguez --- docs/migrations/v3-to-v4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/migrations/v3-to-v4.md b/docs/migrations/v3-to-v4.md index b8e83cd07b0..71ed174c07a 100644 --- a/docs/migrations/v3-to-v4.md +++ b/docs/migrations/v3-to-v4.md @@ -27,7 +27,7 @@ This is an API breaking change and as such IBC application developers will have ### `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 values 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. From ee9eb5f3e56fddb20144256f5d5201ea501f188e Mon Sep 17 00:00:00 2001 From: khanh <50263489+catShaark@users.noreply.github.com> Date: Wed, 27 Apr 2022 04:04:56 +0700 Subject: [PATCH 17/21] Update docs/migrations/v3-to-v4.md Co-authored-by: Sean King --- docs/migrations/v3-to-v4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/migrations/v3-to-v4.md b/docs/migrations/v3-to-v4.md index 71ed174c07a..4700057bd1a 100644 --- a/docs/migrations/v3-to-v4.md +++ b/docs/migrations/v3-to-v4.md @@ -27,7 +27,7 @@ This is an API breaking change and as such IBC application developers will have ### `ClientState` interface changes -The `VerifyUpgradeAndUpdateState` function has been modified. The client state and consensus state return values has been removed. +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. From 4aad399330d90b914b24eee179033b734bcb4420 Mon Sep 17 00:00:00 2001 From: khanh <50263489+catShaark@users.noreply.github.com> Date: Fri, 29 Apr 2022 19:59:32 +0700 Subject: [PATCH 18/21] Update docs/migrations/v3-to-v4.md Co-authored-by: Carlos Rodriguez --- docs/migrations/v3-to-v4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/migrations/v3-to-v4.md b/docs/migrations/v3-to-v4.md index 4700057bd1a..8ab8db60b1a 100644 --- a/docs/migrations/v3-to-v4.md +++ b/docs/migrations/v3-to-v4.md @@ -39,7 +39,7 @@ The `CheckHeaderAndUpdateState` function has been split into 4 new functions: - `UpdateStateOnMisbehaviour` performs 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`. +- `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`. From 12f6dcbecfaedf9849ba00a5a4fb09721aa0cbd9 Mon Sep 17 00:00:00 2001 From: romelukaku Date: Tue, 10 May 2022 01:11:11 +0700 Subject: [PATCH 19/21] update migration doc --- docs/migrations/v3-to-v4.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/migrations/v3-to-v4.md b/docs/migrations/v3-to-v4.md index 8ab8db60b1a..63c761c7fd9 100644 --- a/docs/migrations/v3-to-v4.md +++ b/docs/migrations/v3-to-v4.md @@ -39,7 +39,7 @@ The `CheckHeaderAndUpdateState` function has been split into 4 new functions: - `UpdateStateOnMisbehaviour` performs 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`. +- `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`. Upon successful update, `UpdateState` must return the consensus state heights at which a corresponding `ConsensusState` is added to the client store. The `CheckMisbehaviourAndUpdateState` function has been removed from `ClientState` interface. This functionality is now encapsulated by the usage of `VerifyClientMessage`, `CheckForMisbehaviour`, `UpdateStateOnMisbehaviour`, `UpdateState`. @@ -49,6 +49,8 @@ The function `GetTimestampAtHeight` has been added to the `ClientState` interfac `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. From c29da1e68eafe1884e67ae061250d180cf5cdd0d Mon Sep 17 00:00:00 2001 From: romelukaku Date: Tue, 10 May 2022 01:32:17 +0700 Subject: [PATCH 20/21] update migration doc --- docs/migrations/v3-to-v4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/migrations/v3-to-v4.md b/docs/migrations/v3-to-v4.md index 63c761c7fd9..8a34b3dd36c 100644 --- a/docs/migrations/v3-to-v4.md +++ b/docs/migrations/v3-to-v4.md @@ -39,7 +39,7 @@ The `CheckHeaderAndUpdateState` function has been split into 4 new functions: - `UpdateStateOnMisbehaviour` performs 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`. Upon successful update, `UpdateState` must return the consensus state heights at which a corresponding `ConsensusState` is added to the client store. +- `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`. Upon successful update, a list containing the updated consensus state height is returned. The `CheckMisbehaviourAndUpdateState` function has been removed from `ClientState` interface. This functionality is now encapsulated by the usage of `VerifyClientMessage`, `CheckForMisbehaviour`, `UpdateStateOnMisbehaviour`, `UpdateState`. From 9fde6ec05a02e4900f29b37aaa6eb037db4f4d13 Mon Sep 17 00:00:00 2001 From: romelukaku Date: Tue, 10 May 2022 06:26:11 +0700 Subject: [PATCH 21/21] update migration doc --- docs/migrations/v3-to-v4.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/migrations/v3-to-v4.md b/docs/migrations/v3-to-v4.md index 8a34b3dd36c..f558e25ab60 100644 --- a/docs/migrations/v3-to-v4.md +++ b/docs/migrations/v3-to-v4.md @@ -66,3 +66,5 @@ Keeper function `CheckMisbehaviourAndUpdateState` has been removed since functio ### 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`.