From 97b73510725a7b6c1e4e2813263904823bff34b6 Mon Sep 17 00:00:00 2001 From: Damian Nolan Date: Wed, 5 Mar 2025 13:08:48 +0100 Subject: [PATCH 1/2] fix: do not overwrite app version with zero value --- x/consensus/keeper/keeper.go | 4 ++++ 1 file changed, 4 insertions(+) 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 } From 9e7c32c060c3ac04cda9ec192645f736f4d909e7 Mon Sep 17 00:00:00 2001 From: Damian Nolan Date: Wed, 5 Mar 2025 13:55:55 +0100 Subject: [PATCH 2/2] chore: add changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) 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