Skip to content

Commit

Permalink
docs: update migration docs for upgrade proposal in relation to ICS27 (
Browse files Browse the repository at this point in the history
…#920)

## Description

closes: #XXXX

---

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

- [ ] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md`
- [ ] Re-reviewed `Files changed` in the Github PR explorer
- [ ] Review `Codecov Report` in the comment section below once CI passes

(cherry picked from commit d31f92d)
  • Loading branch information
colin-axner authored and mergify-bot committed Feb 15, 2022
1 parent f418799 commit 3c82fdd
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions docs/migrations/v2-to-v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,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.
For example, if a chain chooses not to integrate a controller submodule, it does not need to set the controller params.
## IBC Apps
Expand Down

0 comments on commit 3c82fdd

Please sign in to comment.