From 6d4ab2707aa706520ca225fff07daf2e2c81d830 Mon Sep 17 00:00:00 2001 From: Damian Nolan Date: Fri, 3 Feb 2023 12:22:27 +0100 Subject: [PATCH 1/7] adding migration doc info for sdk v0.47 --- docs/migrations/v6-to-v7.md | 64 ++++++++++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/docs/migrations/v6-to-v7.md b/docs/migrations/v6-to-v7.md index 26953fc751d..b41630f7d5b 100644 --- a/docs/migrations/v6-to-v7.md +++ b/docs/migrations/v6-to-v7.md @@ -290,4 +290,66 @@ import ( - host.RouterKey + ibcexported.RouterKey -``` \ No newline at end of file +``` + +## Upgrading to Cosmos SDK 0.47 + +The following should be considered as complementary to [Cosmos SDK v0.47 UPGRADING.md](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc2/UPGRADING.md). + +### Protobuf + +Protobuf code generation, linting and formatting has been updated to leverage the `ghcr.io/cosmos/proto-builder:0.11.5` docker container. IBC protobuf definitions are now packaged and published to [buf.build/cosmos/ibc](https://buf.build/cosmos/ibc) via CI workflows. The `third_party/proto` directory has been removed in favour of dependency management using [buf.build](https://docs.buf.build/introduction). + +### App Modules + +The return values of `RandomizedParams` and `ProposalContents` have been updated. + +```diff +// ProposalContents doesn't return any content functions for governance proposals. +- func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalContent { ++ func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalMsg { + return nil +} + +// RandomizedParams creates randomized ibc-transfer param changes for the simulator. +-func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange { ++func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.LegacyParamChange { + return simulation.ParamChanges(r) +} +``` + +Legacy APIs of the `AppModule` interface have been removed from ibc-go modules. + +```diff +- // Route implements the AppModule interface +- func (am AppModule) Route() sdk.Route { +- return sdk.Route{} +- } +- +- // QuerierRoute implements the AppModule interface +- func (AppModule) QuerierRoute() string { +- return types.QuerierRoute +- } +- +- // LegacyQuerierHandler implements the AppModule interface +- func (am AppModule) LegacyQuerierHandler(*codec.LegacyAmino) sdk.Querier { +- return nil +- } +``` + +### Imports + +Imports for ics23 have been updated as the repository have been migrated from confio to cosmos. + +```diff +- ics23 "github.com/confio/ics23/go" ++ ics23 "github.com/cosmos/ics23/go" +``` + +Imports for gogoproto have been updated. + +```diff +- "github.com/gogo/protobuf/proto" ++ "github.com/cosmos/gogoproto/proto" +``` + From 1afe8bc19c77c7700f026f3e294e0ff31af76a90 Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Date: Mon, 6 Feb 2023 11:01:01 +0100 Subject: [PATCH 2/7] code alignment --- docs/migrations/v6-to-v7.md | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/docs/migrations/v6-to-v7.md b/docs/migrations/v6-to-v7.md index b41630f7d5b..06478731f3a 100644 --- a/docs/migrations/v6-to-v7.md +++ b/docs/migrations/v6-to-v7.md @@ -298,9 +298,9 @@ The following should be considered as complementary to [Cosmos SDK v0.47 UPGRADI ### Protobuf -Protobuf code generation, linting and formatting has been updated to leverage the `ghcr.io/cosmos/proto-builder:0.11.5` docker container. IBC protobuf definitions are now packaged and published to [buf.build/cosmos/ibc](https://buf.build/cosmos/ibc) via CI workflows. The `third_party/proto` directory has been removed in favour of dependency management using [buf.build](https://docs.buf.build/introduction). +Protobuf code generation, linting and formatting have been updated to leverage the `ghcr.io/cosmos/proto-builder:0.11.5` docker container. IBC protobuf definitions are now packaged and published to [buf.build/cosmos/ibc](https://buf.build/cosmos/ibc) via CI workflows. The `third_party/proto` directory has been removed in favour of dependency management using [buf.build](https://docs.buf.build/introduction). -### App Modules +### App modules The return values of `RandomizedParams` and `ProposalContents` have been updated. @@ -308,32 +308,32 @@ The return values of `RandomizedParams` and `ProposalContents` have been updated // ProposalContents doesn't return any content functions for governance proposals. - func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalContent { + func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalMsg { - return nil + return nil } // RandomizedParams creates randomized ibc-transfer param changes for the simulator. --func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange { -+func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.LegacyParamChange { - return simulation.ParamChanges(r) +- func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange { ++ func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.LegacyParamChange { + return simulation.ParamChanges(r) } ``` -Legacy APIs of the `AppModule` interface have been removed from ibc-go modules. +Legacy APIs of the `AppModule` interface have been removed from ibc-go modules. For example, for ```diff - // Route implements the AppModule interface - func (am AppModule) Route() sdk.Route { -- return sdk.Route{} +- return sdk.Route{} - } - - // QuerierRoute implements the AppModule interface - func (AppModule) QuerierRoute() string { -- return types.QuerierRoute +- return types.QuerierRoute - } - - // LegacyQuerierHandler implements the AppModule interface - func (am AppModule) LegacyQuerierHandler(*codec.LegacyAmino) sdk.Querier { -- return nil +- return nil - } ``` @@ -342,14 +342,21 @@ Legacy APIs of the `AppModule` interface have been removed from ibc-go modules. Imports for ics23 have been updated as the repository have been migrated from confio to cosmos. ```diff -- ics23 "github.com/confio/ics23/go" -+ ics23 "github.com/cosmos/ics23/go" +import ( + // ... +- ics23 "github.com/confio/ics23/go" ++ ics23 "github.com/cosmos/ics23/go" + // ... +) ``` Imports for gogoproto have been updated. ```diff -- "github.com/gogo/protobuf/proto" -+ "github.com/cosmos/gogoproto/proto" +import ( + // ... +- "github.com/gogo/protobuf/proto" ++ "github.com/cosmos/gogoproto/proto" + // ... +) ``` - From 1a3d2360784d3066955d7025b762a38c8d303a2f Mon Sep 17 00:00:00 2001 From: crodriguezvega Date: Fri, 10 Feb 2023 08:39:44 +0100 Subject: [PATCH 3/7] title formatting --- docs/migrations/v6-to-v7.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/migrations/v6-to-v7.md b/docs/migrations/v6-to-v7.md index 06478731f3a..f9086a48372 100644 --- a/docs/migrations/v6-to-v7.md +++ b/docs/migrations/v6-to-v7.md @@ -168,11 +168,11 @@ if err := clientState.VerifyMembership( The `GetRoot` function has been removed from consensus state interface since it was not used by core IBC. -### Client Keeper +### 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 +### SDK message `MsgSubmitMisbehaviour` is deprecated since `MsgUpdateClient` can now submit a `ClientMessage` type which can be any `Misbehaviour` implementations. From 411afea2200c3f3c2de865bf5759d5ed2d9551c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Colin=20Axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Wed, 15 Feb 2023 12:50:23 +0100 Subject: [PATCH 4/7] chore: preemptively apply changes from #3149 --- docs/migrations/v6-to-v7.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/docs/migrations/v6-to-v7.md b/docs/migrations/v6-to-v7.md index f9086a48372..ab885f1cac0 100644 --- a/docs/migrations/v6-to-v7.md +++ b/docs/migrations/v6-to-v7.md @@ -302,7 +302,7 @@ Protobuf code generation, linting and formatting have been updated to leverage t ### App modules -The return values of `RandomizedParams` and `ProposalContents` have been updated. +The return value of `ProposalContents` have been updated. ```diff // ProposalContents doesn't return any content functions for governance proposals. @@ -310,12 +310,6 @@ The return values of `RandomizedParams` and `ProposalContents` have been updated + func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalMsg { return nil } - -// RandomizedParams creates randomized ibc-transfer param changes for the simulator. -- func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange { -+ func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.LegacyParamChange { - return simulation.ParamChanges(r) -} ``` Legacy APIs of the `AppModule` interface have been removed from ibc-go modules. For example, for From 06d11da2b816c31fb989dce8bdd215e543d9ea84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Colin=20Axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Wed, 15 Feb 2023 13:27:58 +0100 Subject: [PATCH 5/7] chore: apply changes from #3150 --- docs/migrations/v6-to-v7.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/migrations/v6-to-v7.md b/docs/migrations/v6-to-v7.md index ab885f1cac0..cb2adbf46b7 100644 --- a/docs/migrations/v6-to-v7.md +++ b/docs/migrations/v6-to-v7.md @@ -302,14 +302,13 @@ Protobuf code generation, linting and formatting have been updated to leverage t ### App modules -The return value of `ProposalContents` have been updated. +`ProposalContents` has been removed as it is deprecated by the SDK and was non-functional. ```diff // ProposalContents doesn't return any content functions for governance proposals. - func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalContent { -+ func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalMsg { - return nil -} +- return nil +- } ``` Legacy APIs of the `AppModule` interface have been removed from ibc-go modules. For example, for From 18d91ed33ca6ca61545b04d2a353a87eae837d82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Colin=20Axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Wed, 15 Feb 2023 13:28:40 +0100 Subject: [PATCH 6/7] chore: formatting --- docs/migrations/v6-to-v7.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/migrations/v6-to-v7.md b/docs/migrations/v6-to-v7.md index cb2adbf46b7..310594f0284 100644 --- a/docs/migrations/v6-to-v7.md +++ b/docs/migrations/v6-to-v7.md @@ -305,7 +305,7 @@ Protobuf code generation, linting and formatting have been updated to leverage t `ProposalContents` has been removed as it is deprecated by the SDK and was non-functional. ```diff -// ProposalContents doesn't return any content functions for governance proposals. +- // ProposalContents doesn't return any content functions for governance proposals. - func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalContent { - return nil - } From 25e6654104015654ddedac6d8777ba31b6f28832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Colin=20Axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Wed, 15 Feb 2023 13:29:56 +0100 Subject: [PATCH 7/7] chore: combine proposal contents removal into existing section --- docs/migrations/v6-to-v7.md | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/docs/migrations/v6-to-v7.md b/docs/migrations/v6-to-v7.md index 310594f0284..2778057deb0 100644 --- a/docs/migrations/v6-to-v7.md +++ b/docs/migrations/v6-to-v7.md @@ -302,15 +302,6 @@ Protobuf code generation, linting and formatting have been updated to leverage t ### App modules -`ProposalContents` has been removed as it is deprecated by the SDK and was non-functional. - -```diff -- // ProposalContents doesn't return any content functions for governance proposals. -- func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalContent { -- return nil -- } -``` - Legacy APIs of the `AppModule` interface have been removed from ibc-go modules. For example, for ```diff @@ -328,6 +319,11 @@ Legacy APIs of the `AppModule` interface have been removed from ibc-go modules. - func (am AppModule) LegacyQuerierHandler(*codec.LegacyAmino) sdk.Querier { - return nil - } +- +- // ProposalContents doesn't return any content functions for governance proposals. +- func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalContent { +- return nil +- } ``` ### Imports