diff --git a/CHANGELOG.md b/CHANGELOG.md index d8b53a49135d..17fa1447aefb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -122,6 +122,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Improvements +* [\#10768](https://github.com/cosmos/cosmos-sdk/pull/10768) Added extra logging for tracking in-place store migrations * [\#10262](https://github.com/cosmos/cosmos-sdk/pull/10262) Remove unnecessary logging in `x/feegrant` simulation. * [\#10327](https://github.com/cosmos/cosmos-sdk/pull/10327) Add null guard for possible nil `Amount` in tx fee `Coins` * [\#10339](https://github.com/cosmos/cosmos-sdk/pull/10339) Improve performance of `removeZeroCoins` by only allocating memory when necessary diff --git a/types/module/configurator.go b/types/module/configurator.go index 3f19e9d27330..07c3b50942cc 100644 --- a/types/module/configurator.go +++ b/types/module/configurator.go @@ -1,6 +1,8 @@ package module import ( + "fmt" + "github.com/gogo/protobuf/grpc" "github.com/cosmos/cosmos-sdk/codec" @@ -103,6 +105,7 @@ func (c configurator) runModuleMigrations(ctx sdk.Context, moduleName string, fr if !found { return sdkerrors.Wrapf(sdkerrors.ErrNotFound, "no migration found for module %s from version %d to version %d", moduleName, i, i+1) } + ctx.Logger().Info(fmt.Sprintf("migrating module %s from version %d to version %d", moduleName, i, i+1)) err := migrateFn(ctx) if err != nil { diff --git a/types/module/module.go b/types/module/module.go index 65ba49082aef..ac13bb5b5df2 100644 --- a/types/module/module.go +++ b/types/module/module.go @@ -447,6 +447,7 @@ func (m Manager) RunMigrations(ctx sdk.Context, cfg Configurator, fromVM Version return nil, err } } else { +<<<<<<< HEAD cfgtor, ok := cfg.(configurator) if !ok { // Currently, the only implementator of Configurator (the interface) @@ -455,6 +456,10 @@ func (m Manager) RunMigrations(ctx sdk.Context, cfg Configurator, fromVM Version } moduleValUpdates := module.InitGenesis(ctx, cfgtor.cdc, module.DefaultGenesis(cfgtor.cdc)) +======= + ctx.Logger().Info(fmt.Sprintf("adding a new module: %s", moduleName)) + moduleValUpdates := module.InitGenesis(ctx, c.cdc, module.DefaultGenesis(c.cdc)) +>>>>>>> 8b74157c5 (feat: extra logging in in-place store migrations (#10768)) // The module manager assumes only one module will update the // validator set, and that it will not be by a new module. if len(moduleValUpdates) > 0 {