From 2dec0416a3aec29c98391de45228a4b48668768c Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Fri, 13 Oct 2023 16:21:39 +0200 Subject: [PATCH 1/3] Revert "fix(x/authz): GetAuthorizations (backport #17334) (#17527)" This reverts commit 22c28366466e64ebf0df1ce5bec8b1130523552c. --- CHANGELOG.md | 6 +----- x/authz/keeper/keeper.go | 2 +- x/authz/keeper/keeper_test.go | 21 --------------------- 3 files changed, 2 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 882d02bb8d7b..8f0d56d069bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,10 +37,6 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] -### Bug Fixes - -* (x/authz) [#17524](https://github.com/cosmos/cosmos-sdk/pull/17524) Fix an issue where the `cachedValue` of an authorization would not be correcty populated when there are multiple authorizations returned in `GetAuthorizations`. - ## [v0.46.15](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.46.14) - 2023-08-21 ### Improvements @@ -50,7 +46,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (x/genutil) [#17296](https://github.com/cosmos/cosmos-sdk/pull/17296) Add `MigrateHandler` to allow reuse migrate genesis related function. * In v0.46, v0.47 this function is additive to the `genesis migrate` command. However in v0.50+, adding custom migrations to the `genesis migrate` command is directly possible. -### Bug Fixes +## Bug Fixes * (server) [#17181](https://github.com/cosmos/cosmos-sdk/pull/17181) Fix `db_backend` lookup fallback from `config.toml`. diff --git a/x/authz/keeper/keeper.go b/x/authz/keeper/keeper.go index 0b0bf29ef8ee..c1291c95708f 100644 --- a/x/authz/keeper/keeper.go +++ b/x/authz/keeper/keeper.go @@ -233,9 +233,9 @@ func (k Keeper) GetAuthorizations(ctx sdk.Context, grantee sdk.AccAddress, grant iter := sdk.KVStorePrefixIterator(store, key) defer iter.Close() + var authorization authz.Grant var authorizations []authz.Authorization for ; iter.Valid(); iter.Next() { - var authorization authz.Grant if err := k.cdc.Unmarshal(iter.Value(), &authorization); err != nil { return nil, err } diff --git a/x/authz/keeper/keeper_test.go b/x/authz/keeper/keeper_test.go index f10119361afe..fdf8d5d08135 100644 --- a/x/authz/keeper/keeper_test.go +++ b/x/authz/keeper/keeper_test.go @@ -445,27 +445,6 @@ func (s *TestSuite) TestGetAuthorization() { } } -func (s *TestSuite) TestGetAuthorizations() { - require := s.Require() - addr1 := s.addrs[1] - addr2 := s.addrs[2] - - genAuthMulti := authz.NewGenericAuthorization(sdk.MsgTypeURL(&banktypes.MsgMultiSend{})) - genAuthSend := authz.NewGenericAuthorization(sdk.MsgTypeURL(&banktypes.MsgSend{})) - - start := s.ctx.BlockHeader().Time - expired := start.Add(time.Duration(1) * time.Second) - - s.Require().NoError(s.app.AuthzKeeper.SaveGrant(s.ctx, addr1, addr2, genAuthMulti, &expired), "creating multi send grant 1->2") - s.Require().NoError(s.app.AuthzKeeper.SaveGrant(s.ctx, addr1, addr2, genAuthSend, &expired), "creating send grant 1->2") - - authzs, err := s.app.AuthzKeeper.GetAuthorizations(s.ctx, addr1, addr2) - require.NoError(err) - require.Len(authzs, 2) - require.Equal(sdk.MsgTypeURL(&banktypes.MsgMultiSend{}), authzs[0].MsgTypeURL()) - require.Equal(sdk.MsgTypeURL(&banktypes.MsgSend{}), authzs[1].MsgTypeURL()) -} - func TestTestSuite(t *testing.T) { suite.Run(t, new(TestSuite)) } From a54a17dd01e1cc7d5fc0749f86d118e1a17a66a7 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Fri, 13 Oct 2023 16:23:47 +0200 Subject: [PATCH 2/3] chore: prepare release notes v0.46.16 --- CHANGELOG.md | 8 +++++++- RELEASE_NOTES.md | 14 ++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f0d56d069bb..362ac2bb3b42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,7 +35,13 @@ Ref: https://keepachangelog.com/en/1.0.0/ # Changelog -## [Unreleased] +## [v0.46.16](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.46.16) - 2023-10-16 + +EOL notice. This is the last release of the `v0.46.x` line. Per this version, the v0.46.x line reached its end-of-life. + +### Improvements + +* (deps) Bump cosmos/ledger-cosmos-go to v0.12.3. ## [v0.46.15](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.46.14) - 2023-08-21 diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 40f7869d8a7c..1a0de4dc6771 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,4 +1,4 @@ -# Cosmos SDK v0.46.15 Release Notes +# Cosmos SDK v0.46.16 Release Notes This patch release introduces a few bug fixes and improvements to the v0.46.x line of the Cosmos SDK. @@ -11,11 +11,13 @@ replace github.com/tendermint/tendermint => github.com/cometbft/cometbft v0.34.2 replace github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 ``` -Please see the [CHANGELOG](https://github.com/cosmos/cosmos-sdk/blob/v0.46.15/CHANGELOG.md) for an exhaustive list of changes. +Please see the [CHANGELOG](https://github.com/cosmos/cosmos-sdk/blob/v0.46.16/CHANGELOG.md) for an exhaustive list of changes. -**Full Commit History**: https://github.com/cosmos/cosmos-sdk/compare/v0.46.14...v0.46.15 +**Full Commit History**: https://github.com/cosmos/cosmos-sdk/compare/v0.46.15...v0.46.16 -## Deprecation Notice +## End-of-Life Notice -Get ready for v0.50.0 and start integrating with the next [Cosmos SDK](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.0-rc.0) release. -Once the Eden release is out, as per our [maintenance policy](https://github.com/cosmos/cosmos-sdk/blob/main/RELEASE_PROCESS.md#major-release-maintenance) we will no longer support the v0.46.x line of the Cosmos SDK, apart from critical security fixes. +`v0.46.16` is the last release of the `v0.46.x` line. Per this version, the v0.46.x line reached its end-of-life. +The SDK team maintains the [latest two major versions of the SDK](https://github.com/cosmos/cosmos-sdk/blob/main/RELEASE_PROCESS.md#major-release-maintenance). This means no features, improvements or bug fixes will be backported to the `v0.46.x` line. Per our policy, the `v0.46.x` line will receive security patches only. + +We encourage all chains to upgrade to Cosmos SDK Eden (`v0.50.0`), or the `v0.47.x` line. From 418bfb297770a0fbe45030467ad0381a19505870 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Fri, 13 Oct 2023 16:26:29 +0200 Subject: [PATCH 3/3] changelog fix --- CHANGELOG.md | 2 +- RELEASE_NOTES.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 362ac2bb3b42..00fba250a440 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,7 +52,7 @@ EOL notice. This is the last release of the `v0.46.x` line. Per this version, th * (x/genutil) [#17296](https://github.com/cosmos/cosmos-sdk/pull/17296) Add `MigrateHandler` to allow reuse migrate genesis related function. * In v0.46, v0.47 this function is additive to the `genesis migrate` command. However in v0.50+, adding custom migrations to the `genesis migrate` command is directly possible. -## Bug Fixes +### Bug Fixes * (server) [#17181](https://github.com/cosmos/cosmos-sdk/pull/17181) Fix `db_backend` lookup fallback from `config.toml`. diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 1a0de4dc6771..b895aea853fd 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,6 +1,6 @@ # Cosmos SDK v0.46.16 Release Notes -This patch release introduces a few bug fixes and improvements to the v0.46.x line of the Cosmos SDK. +This patch release introduces one dependency bump in the v0.46.x line of the Cosmos SDK. Ensure you have the following replaces in the `go.mod` of your application: