# Akash: cosmos lib 0.43.0-rc2 upgrade
* Follow: https://docs.cosmos.network/v0.43/migrations/chain-upgrade-guide-043.html
* Needs careful chain upgrade. Re-read the above doc before proposing an upgrade on akash `mainnet` as there are things like `app.toml` which need to be migrated too.
## Check
* Should we add the `authz` and `feegrant` modules right now, or should they be added when there is need for them? (update the upgrade TODO in code as per this)
* Should this be done: https://github.com/ovrclk/akash/pull/1262/files#diff-8baf1eeffa817eadc2497c597353b5f53f87fea71129da7b440f6a5a7ce51376R111 OR let the node runners update their `app.toml` which anyways needs to be done as per the migration guide?
* Is there any place they were using legacy REST endpoints? If yes, they need to migrate them too as per the v0.43 upgrade guide. https://docs.cosmos.network/v0.43/migrations/rest.html
* How to generate the `client/docs/swagger-ui/swagger.yaml`?
## Tasks
* [x] Use new ibc repo: https://github.com/cosmos/ibc-go/blob/v1.0.0-rc3/docs/migrations/ibc-migration-043.md
* [x] cosmos-sdk v0.43 changelog: https://github.com/cosmos/cosmos-sdk/blob/release/v0.43.x/CHANGELOG.md
* [x] Some easy renaming changes (`Marshaler` -> `Codec` ones).
* [x] `sdkutil/broadcast.go`: Private func `PrepareFactory` had to be copied from sdk out to Akash code :(
* [x] `BaseApp.SetAppVersion()` -> `BaseApp.SetVersion()`. See: https://github.com/cosmos/cosmos-sdk/pull/8897
* [x] `AppModule` now has a new `ConsensusVersion()` func that needs to be implemented by every akash module. Returning 1 by default for akash modules.
* [x] Simulations for every module require a new arg `cdc *codec.ProtoCodec` in `simtypes.NewOperationMsg()`. Setting that to `nil` as all the messages are `LegacyMsg` which don't seem require the codec based on the implementation code.
* [x] `ibcclient.NewClientUpdateProposalHandler()` -> `ibcclient.NewClientProposalHandler`. See: https://github.com/cosmos/cosmos-sdk/pull/8673
* [x] Need to handle upgrades properly (in-place module upgrades). See: https://docs.cosmos.network/v0.43/migrations/chain-upgrade-guide-043.html#
* Most of the cosmos modules have been upgraded. ConsensusVersion > 1.
* [x] Need to correctly set `x/cert/keeper/key.go:keyAddrPrefixLen` which depended on the `sdk.AddrLen` which was fixed 20 bytes previously, but can be variable length now (20 or 32).
* See:
* https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-028-public-key-addresses.md
* https://github.com/cosmos/cosmos-sdk/issues/8041
* https://github.com/cosmos/cosmos-sdk/pull/8363
* [x] Upgrade all modules which were storing the address: audit, cert, deployment, market, provider.
* For an example of an upgrade, see the bank module keeper's migrations for v043.
* Check usages of `iter.Key()` for this.