Skip to content

Commit d6f0494

Browse files
colin-axnermergify-bot
authored and
mergify-bot
committed
chore: update migration docs (#985)
* chore: update migration docs * Update docs/migrations/v2-to-v3.md Co-authored-by: Damian Nolan <damiannolan@gmail.com> Co-authored-by: Damian Nolan <damiannolan@gmail.com> (cherry picked from commit ef34765)
1 parent e93162c commit d6f0494

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

docs/migrations/v2-to-v3.md

+30
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,32 @@ app.UpgradeKeeper.SetUpgradeHandler("v3",
6161
The host and controller submodule params only need to be set if you integrate those submodules.
6262
For example, if a chain chooses not to integrate a controller submodule, it does not need to set the controller params.
6363
64+
### Genesis migrations
65+
66+
If the chain will adopt ICS27 and chooses to upgrade via a genesis export, then the ICS27 parameters must be set during genesis migration.
67+
68+
The migration code required may look like:
69+
70+
```go
71+
controllerGenesisState := icatypes.DefaultControllerGenesis()
72+
// overwrite parameters as desired
73+
controllerGenesisState.Params = icacontrollertypes.Params{
74+
ControllerEnabled: true,
75+
}
76+
77+
hostGenesisState := icatypes.DefaultHostGenesis()
78+
// overwrite parameters as desired
79+
hostGenesisState.Params = icahosttypes.Params{
80+
HostEnabled: true,
81+
AllowMessages: []string{"/cosmos.bank.v1beta1.MsgSend", ...],
82+
}
83+
84+
icaGenesisState := icatypes.NewGenesisState(controllerGenesisState, hostGenesisState)
85+
86+
// set new ics27 genesis state
87+
appState[icatypes.ModuleName] = clientCtx.JSONCodec.MustMarshalJSON(icaGenesisState)
88+
```
89+
6490
## IBC Apps
6591
6692
@@ -97,6 +123,10 @@ As apart of this release, the mock module now supports middleware testing. Pleas
97123
98124
Please review the [mock](../../testing/mock/ibc_module.go) and [transfer](../../modules/apps/transfer/ibc_module.go) modules as examples. Additionally, [simapp](../../testing/simapp/app.go) provides an example of how `IBCModule` types should now be added to the IBC router in favour of `AppModule`.
99125
126+
### IBC testing package
127+
128+
`TestChain`s are now created with chainID's beginning from an index of 1. Any calls to `GetChainID(0)` will now fail. Please increment all calls to `GetChainID` by 1.
129+
100130
## Relayers
101131
102132
`AppVersion` gRPC has been removed.

0 commit comments

Comments
 (0)