From 77e6a194162f548704f0b6ecd11b433c21d69e36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Colin=20Axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Tue, 15 Feb 2022 12:59:07 +0100 Subject: [PATCH 1/3] docs: update migration docs for upgrade proposal in relation to ICS27 --- docs/migrations/v2-to-v3.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/docs/migrations/v2-to-v3.md b/docs/migrations/v2-to-v3.md index 710e273a954..6f49cc03102 100644 --- a/docs/migrations/v2-to-v3.md +++ b/docs/migrations/v2-to-v3.md @@ -18,6 +18,7 @@ No genesis or in-place migrations are required when upgrading from v1 or v2 of i ## Chains + ### ICS20 The `transferkeeper.NewKeeper(...)` now takes in an ICS4Wrapper. @@ -28,6 +29,33 @@ The ICS4Wrapper should be the IBC Channel Keeper unless ICS 20 is being connecte ICS27 Interchain Accounts has been added as a supported IBC application of ibc-go. Please see the [ICS27 documentation](../app-modules/interchain-accounts/overview.md) for more information. +### Upgrade Proposal + +If the chain will adopt ICS27, it must set the appropriate params during the execution of the upgrade handler in `app.go`: +```go +app.UpgradeKeeper.SetUpgradeHandler("v3", + func(ctx sdk.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { + // set ICS27 Host submodule params + app.ICAHostKeeper.SetParams(ctx, icahosttypes.Params{ + HostEnabled: true, + AllowMessages: []string{"/cosmos.bank.v1beta1.MsgSend", ...], + }) + + // set ICS27 Controller submodule params + app.ICAControllerKeeper.SetParams(ctx, icacontrollertypes.Params{ + ControllerEnabled: true, + }) + + ... + + return app.mm.RunMigrations(ctx, app.configurator, fromVM) + }) + +``` + +The host and controller submodule params only need to be set if you integrate those submodules. +If a chain chooses not to integrate a controller submodule, it does not need to set the controller params. + ## IBC Apps From 1c0919ff0a0b99194a45ffd4e9edf52288ce569f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Tue, 15 Feb 2022 13:02:05 +0100 Subject: [PATCH 2/3] Update docs/migrations/v2-to-v3.md --- docs/migrations/v2-to-v3.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/migrations/v2-to-v3.md b/docs/migrations/v2-to-v3.md index 6f49cc03102..ac326deba27 100644 --- a/docs/migrations/v2-to-v3.md +++ b/docs/migrations/v2-to-v3.md @@ -18,7 +18,6 @@ No genesis or in-place migrations are required when upgrading from v1 or v2 of i ## Chains - ### ICS20 The `transferkeeper.NewKeeper(...)` now takes in an ICS4Wrapper. From 3f86c3d69384c1c251f8e6f3deba24e225d3f0a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Tue, 15 Feb 2022 13:02:09 +0100 Subject: [PATCH 3/3] Update docs/migrations/v2-to-v3.md --- docs/migrations/v2-to-v3.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/migrations/v2-to-v3.md b/docs/migrations/v2-to-v3.md index ac326deba27..9b7615974c0 100644 --- a/docs/migrations/v2-to-v3.md +++ b/docs/migrations/v2-to-v3.md @@ -53,7 +53,7 @@ app.UpgradeKeeper.SetUpgradeHandler("v3", ``` The host and controller submodule params only need to be set if you integrate those submodules. -If a chain chooses not to integrate a controller submodule, it does not need to set the controller params. +For example, if a chain chooses not to integrate a controller submodule, it does not need to set the controller params. ## IBC Apps