diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c974e07cd2b..7dc2fca08023 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (x/bank) [#6](https://github.com/01builders/cosmos-sdk/pull/6) Change denom index bank migration to noOp. * (x/auth) [#7](https://github.com/01builders/cosmos-sdk/pull/7) Support legacy global AccountNumber. * (crypto/keyring) [#8](https://github.com/01builders/cosmos-sdk/pull/8) Fix error wrapping in pkg crypto/keyring. Removed `cockroachdb/errors` in favour of `errorsmod.Wrap`. +* (x/consensus) [#9](https://github.com/01builders/cosmos-sdk/pull/9) Address bug where sending `MsgUpdateParams` to `x/consensus` would overwrite `AppVersion` with zero value. Always use existing `AppVersion` param. ## [v0.50.11](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.11) - 2024-12-16 diff --git a/x/consensus/keeper/keeper.go b/x/consensus/keeper/keeper.go index b239a9ee5ee7..1a8421b8da07 100644 --- a/x/consensus/keeper/keeper.go +++ b/x/consensus/keeper/keeper.go @@ -88,6 +88,10 @@ func (k Keeper) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (* nextParams := params.Update(&consensusParams) + // NOTE: do not override the version params + // consensusParams.Version always has DefaultConsensusParams version: 0 + // AppVersion is updated by x/upgrade during migrations + nextParams.Version = params.Version if err := nextParams.ValidateBasic(); err != nil { return nil, err }