From 872726c3f7e785fa32eb219eb142a224ec30242d Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 13 Dec 2022 10:53:03 +0000 Subject: [PATCH] fix(gov): Fix v3 votes migrations (backport #14214) (#14277) Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com> Co-authored-by: Julien Robert --- CHANGELOG.md | 2 ++ RELEASE_NOTES.md | 4 ++++ go.mod | 3 +-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d8fc4f606e6..916213bc7a7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,8 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### State Machine Breaking +* (x/gov) [#14214](https://github.com/cosmos/cosmos-sdk/pull/14214) Fix gov v0.46 migration to v1 votes. + * Also provide a helper function `govv046.Migrate_V0466_To_V0467` for migrating a chain already on v0.46 with versions <=v0.46.6 to the latest v0.46.7 correct state. * (x/group) [#14071](https://github.com/cosmos/cosmos-sdk/pull/14071) Don't re-tally proposal after voting period end if they have been marked as ACCEPTED or REJECTED. ### API Breaking Changes diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 86f39bdf588d..cabe154c0b82 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -6,6 +6,10 @@ Please read the release notes of [v0.46.5](https://github.com/cosmos/cosmos-sdk/ A critical vulnerability has been fixed in the group module. For safety, `v0.46.5` and `v0.46.6` are retracted, even though chains not using the group module are not affected. When using the group module, please upgrade immediately to `v0.46.7`. +An issue has been discovered in the gov module's votes migration. It does not impact proposals and votes tallying, but the gRPC queries on votes are incorrect. This issue is fixed in `v0.46.7`, however: +- if your chain is already on v0.46 using `<= v0.46.6`, a **coordinated upgrade** to v0.46.7 is required. You can use the helper function `govv046.Migrate_V046_6_To_V046_7` for migrating a chain **already on v0.46 with versions <=v0.46.6** to the latest v0.46.7 correct state. +- if your chain is on a previous version <= v0.45, then simply use v0.46.7 when upgrading to v0.46. + **NOTE**: The changes mentioned in `v0.46.3` are no longer required. The following replace directive can be removed from the chains. ```go diff --git a/go.mod b/go.mod index 9219cc509b7a..acbf0ea52160 100644 --- a/go.mod +++ b/go.mod @@ -163,8 +163,7 @@ replace ( ) retract ( - // subject to a bug in the group module, - // these versions are safe to use when not using the group module + // subject to a bug in the group module and gov module migration [v0.46.5, v0.46.6] // subject to the dragonberry vulnerability // and/or the bank coin metadata migration issue