From 3f540622abff76c0d264fb40a42ca90cb083696e Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 09:55:01 +0200 Subject: [PATCH] deps: use ibc-apps rate limiter import (backport #3227) (#3228) * deps: use ibc-apps rate limiter import (#3227) * deps: use ibc-apps rate limiter import * appease linter * appease changelogs (cherry picked from commit 8535cad94f7bce1a7927b1a9c6346cf058b3db49) # Conflicts: # .changelog/v19.0.0/dependencies/3227-bump-ibc-rate-limits.md * docs: update changelog files --------- Co-authored-by: MSalopek --- .../dependencies/3171-bump-ibc-rate-limit.md | 3 --- .../dependencies/3227-bump-ibc-rate-limits.md | 3 +++ .../state-breaking/3171-bump-ibc-rate-limit.md | 3 --- .../state-breaking/3227-bump-ibc-rate-limits.md | 3 +++ .changelog/v19.0.0/summary.md | 2 +- CHANGELOG.md | 14 +++++++------- ante/gov_vote_ante.go | 1 - app/keepers/keepers.go | 12 ++++++------ app/keepers/keys.go | 2 +- app/modules.go | 2 +- cmd/gaiad/cmd/testnet_set_local_validator.go | 3 +-- go.mod | 2 +- go.sum | 4 ++-- tests/e2e/chain.go | 3 +-- tests/e2e/query.go | 3 +-- 15 files changed, 28 insertions(+), 32 deletions(-) delete mode 100644 .changelog/v19.0.0/dependencies/3171-bump-ibc-rate-limit.md create mode 100644 .changelog/v19.0.0/dependencies/3227-bump-ibc-rate-limits.md delete mode 100644 .changelog/v19.0.0/state-breaking/3171-bump-ibc-rate-limit.md create mode 100644 .changelog/v19.0.0/state-breaking/3227-bump-ibc-rate-limits.md diff --git a/.changelog/v19.0.0/dependencies/3171-bump-ibc-rate-limit.md b/.changelog/v19.0.0/dependencies/3171-bump-ibc-rate-limit.md deleted file mode 100644 index fc811d2d55a..00000000000 --- a/.changelog/v19.0.0/dependencies/3171-bump-ibc-rate-limit.md +++ /dev/null @@ -1,3 +0,0 @@ -- Bump [ibc-rate-limiting](https://github.com/Stride-Labs/ibc-rate-limiting) to - [feat/sdk-v50](https://github.com/Stride-Labs/ibc-rate-limiting/tree/feat/sdk-v50) - ([\#3171](https://github.com/cosmos/gaia/pull/3171)) \ No newline at end of file diff --git a/.changelog/v19.0.0/dependencies/3227-bump-ibc-rate-limits.md b/.changelog/v19.0.0/dependencies/3227-bump-ibc-rate-limits.md new file mode 100644 index 00000000000..e06d0708dd4 --- /dev/null +++ b/.changelog/v19.0.0/dependencies/3227-bump-ibc-rate-limits.md @@ -0,0 +1,3 @@ +- Bump [ibc-rate-limiting](https://github.com/cosmos/ibc-apps/blob/main/modules/rate-limiting) to + [v8](https://github.com/cosmos/ibc-apps/releases/tag/modules/rate-limiting/v8.0.0) + ([\#3227](https://github.com/cosmos/gaia/pull/3227)) \ No newline at end of file diff --git a/.changelog/v19.0.0/state-breaking/3171-bump-ibc-rate-limit.md b/.changelog/v19.0.0/state-breaking/3171-bump-ibc-rate-limit.md deleted file mode 100644 index fc811d2d55a..00000000000 --- a/.changelog/v19.0.0/state-breaking/3171-bump-ibc-rate-limit.md +++ /dev/null @@ -1,3 +0,0 @@ -- Bump [ibc-rate-limiting](https://github.com/Stride-Labs/ibc-rate-limiting) to - [feat/sdk-v50](https://github.com/Stride-Labs/ibc-rate-limiting/tree/feat/sdk-v50) - ([\#3171](https://github.com/cosmos/gaia/pull/3171)) \ No newline at end of file diff --git a/.changelog/v19.0.0/state-breaking/3227-bump-ibc-rate-limits.md b/.changelog/v19.0.0/state-breaking/3227-bump-ibc-rate-limits.md new file mode 100644 index 00000000000..e06d0708dd4 --- /dev/null +++ b/.changelog/v19.0.0/state-breaking/3227-bump-ibc-rate-limits.md @@ -0,0 +1,3 @@ +- Bump [ibc-rate-limiting](https://github.com/cosmos/ibc-apps/blob/main/modules/rate-limiting) to + [v8](https://github.com/cosmos/ibc-apps/releases/tag/modules/rate-limiting/v8.0.0) + ([\#3227](https://github.com/cosmos/gaia/pull/3227)) \ No newline at end of file diff --git a/.changelog/v19.0.0/summary.md b/.changelog/v19.0.0/summary.md index 8a0c65e2fc1..0da7f0b54fd 100644 --- a/.changelog/v19.0.0/summary.md +++ b/.changelog/v19.0.0/summary.md @@ -1 +1 @@ -*July 22nd, 2024* +*July 23nd, 2024* diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d60a8be028..40ce6449026 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,16 +2,13 @@ ## v19.0.0 -*July 22nd, 2024* +*July 23nd, 2024* ### DEPENDENCIES - Bump [cometbft](https://github.com/cometbft/cometbft) to [v0.38.9](https://github.com/cometbft/cometbft/releases/tag/v0.38.9) ([\#3171](https://github.com/cosmos/gaia/pull/3171)) -- Bump [ibc-rate-limiting](https://github.com/Stride-Labs/ibc-rate-limiting) to - [feat/sdk-v50](https://github.com/Stride-Labs/ibc-rate-limiting/tree/feat/sdk-v50) - ([\#3171](https://github.com/cosmos/gaia/pull/3171)) - Bump [ibc-go](https://github.com/cosmos/ibc-go) to [v8.3.2](https://github.com/cosmos/ibc-go/releases/tag/v8.3.2) ([\#3171](https://github.com/cosmos/gaia/pull/3171)) @@ -24,6 +21,9 @@ - Bump [feemarket](https://github.com/skip-mev/feemarket) to [v1.0.4](https://github.com/skip-mev/feemarket/releases/tag/v1.0.4) ([\#3221](https://github.com/cosmos/gaia/pull/3221)) +- Bump [ibc-rate-limiting](https://github.com/cosmos/ibc-apps/blob/main/modules/rate-limiting) to + [v8](https://github.com/cosmos/ibc-apps/releases/tag/modules/rate-limiting/v8.0.0) + ([\#3227](https://github.com/cosmos/gaia/pull/3227)) ### IMPROVEMENTS @@ -35,9 +35,6 @@ - Bump [cometbft](https://github.com/cometbft/cometbft) to [v0.38.9](https://github.com/cometbft/cometbft/releases/tag/v0.38.9) ([\#3171](https://github.com/cosmos/gaia/pull/3171)) -- Bump [ibc-rate-limiting](https://github.com/Stride-Labs/ibc-rate-limiting) to - [feat/sdk-v50](https://github.com/Stride-Labs/ibc-rate-limiting/tree/feat/sdk-v50) - ([\#3171](https://github.com/cosmos/gaia/pull/3171)) - Bump [ibc-go](https://github.com/cosmos/ibc-go) to [v8.3.2](https://github.com/cosmos/ibc-go/releases/tag/v8.3.2) ([\#3171](https://github.com/cosmos/gaia/pull/3171)) @@ -50,6 +47,9 @@ - Bump [feemarket](https://github.com/skip-mev/feemarket) to [v1.0.4](https://github.com/skip-mev/feemarket/releases/tag/v1.0.4) ([\#3221](https://github.com/cosmos/gaia/pull/3221)) +- Bump [ibc-rate-limiting](https://github.com/cosmos/ibc-apps/blob/main/modules/rate-limiting) to + [v8](https://github.com/cosmos/ibc-apps/releases/tag/modules/rate-limiting/v8.0.0) + ([\#3227](https://github.com/cosmos/gaia/pull/3227)) ## Previous Versions diff --git a/ante/gov_vote_ante.go b/ante/gov_vote_ante.go index 414c13b230f..43f38f26d92 100644 --- a/ante/gov_vote_ante.go +++ b/ante/gov_vote_ante.go @@ -103,7 +103,6 @@ func (g GovVoteDecorator) ValidateVoteMsgs(ctx sdk.Context, msgs []sdk.Msg) erro // break the iteration if maxDelegationsChecked were already checked return delegationCount >= maxDelegationsChecked }) - if err != nil { return err } diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index 803d2750f5d..1bf672101a4 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -5,15 +5,15 @@ import ( "os" "strings" - ratelimit "github.com/Stride-Labs/ibc-rate-limiting/ratelimit" - ratelimitkeeper "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/keeper" - ratelimittypes "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" feemarketkeeper "github.com/skip-mev/feemarket/x/feemarket/keeper" feemarkettypes "github.com/skip-mev/feemarket/x/feemarket/types" pfmrouter "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward" pfmrouterkeeper "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/keeper" pfmroutertypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/types" + ratelimit "github.com/cosmos/ibc-apps/modules/rate-limiting/v8" + ratelimitkeeper "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/keeper" + ratelimittypes "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" ica "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts" @@ -419,9 +419,9 @@ func NewAppKeeper( // Create RateLimit keeper appKeepers.RatelimitKeeper = *ratelimitkeeper.NewKeeper( - appCodec, // BinaryCodec - appKeepers.keys[ratelimittypes.StoreKey], // StoreKey - appKeepers.GetSubspace(ratelimittypes.ModuleName), // param Subspace + appCodec, // BinaryCodec + runtime.NewKVStoreService(appKeepers.keys[ratelimittypes.StoreKey]), // StoreKey + appKeepers.GetSubspace(ratelimittypes.ModuleName), // param Subspace govAuthority, // authority appKeepers.BankKeeper, appKeepers.IBCKeeper.ChannelKeeper, // ChannelKeeper diff --git a/app/keepers/keys.go b/app/keepers/keys.go index bb6dff076b1..c4d51b3bd74 100644 --- a/app/keepers/keys.go +++ b/app/keepers/keys.go @@ -1,10 +1,10 @@ package keepers import ( - ratelimittypes "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" feemarkettypes "github.com/skip-mev/feemarket/x/feemarket/types" routertypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/types" + ratelimittypes "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" icacontrollertypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/types" icahosttypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/types" diff --git a/app/modules.go b/app/modules.go index f016e507472..98b001a51d0 100644 --- a/app/modules.go +++ b/app/modules.go @@ -1,11 +1,11 @@ package gaia import ( - ratelimittypes "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" feemarket "github.com/skip-mev/feemarket/x/feemarket" feemarkettypes "github.com/skip-mev/feemarket/x/feemarket/types" pfmroutertypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/types" + ratelimittypes "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" "github.com/cosmos/ibc-go/modules/capability" capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types" diff --git a/cmd/gaiad/cmd/testnet_set_local_validator.go b/cmd/gaiad/cmd/testnet_set_local_validator.go index b6493a77903..fc6db4f9a34 100644 --- a/cmd/gaiad/cmd/testnet_set_local_validator.go +++ b/cmd/gaiad/cmd/testnet_set_local_validator.go @@ -63,7 +63,6 @@ func init() { } func testnetUnsafeStartLocalValidatorCmd(ac appCreator) *cobra.Command { - cmd := server.StartCmd(ac.newTestingApp, gaia.DefaultNodeHome) cmd.Use = "unsafe-start-local-validator" cmd.Short = "Updates chain's application and consensus state with provided validator info and starts the node" @@ -167,7 +166,7 @@ func (a appCreator) newTestingApp( panic(err) } - //Update consensus state + // Update consensus state err = updateConsensusState(logger, appOpts, gaiaApp.CommitMultiStore().LatestVersion(), args) if err != nil { panic(err) diff --git a/go.mod b/go.mod index ff4b9feee20..22dcd114236 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,6 @@ require ( cosmossdk.io/x/tx v0.13.3 cosmossdk.io/x/upgrade v0.1.4 github.com/CosmWasm/wasmd v0.50.0 - github.com/Stride-Labs/ibc-rate-limiting v0.0.0-20240402205850-be547630b007 github.com/cometbft/cometbft v0.38.9 github.com/cometbft/cometbft-db v0.12.0 github.com/cosmos/cosmos-db v1.0.2 @@ -26,6 +25,7 @@ require ( github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/gogoproto v1.5.0 github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 v8.0.2 + github.com/cosmos/ibc-apps/modules/rate-limiting/v8 v8.0.0 github.com/cosmos/ibc-go/modules/capability v1.0.0 github.com/cosmos/ibc-go/v8 v8.3.2 github.com/cosmos/interchain-security/v5 v5.1.0 diff --git a/go.sum b/go.sum index 2fc96318e8d..3a821e263a6 100644 --- a/go.sum +++ b/go.sum @@ -258,8 +258,6 @@ github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAE github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/Stride-Labs/ibc-rate-limiting v0.0.0-20240402205850-be547630b007 h1:6BNsNF5ZI3YPnVq+oJKbtelWoEkuplUzoQH9VTxqHp0= -github.com/Stride-Labs/ibc-rate-limiting v0.0.0-20240402205850-be547630b007/go.mod h1:r2Mgt9zNLQsUWlx4OhEIzvNm+JE+4fy4h4t6xBAPv5A= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= @@ -433,6 +431,8 @@ github.com/cosmos/iavl v1.1.2 h1:zL9FK7C4L/P4IF1Dm5fIwz0WXCnn7Bp1M2FxH0ayM7Y= github.com/cosmos/iavl v1.1.2/go.mod h1:jLeUvm6bGT1YutCaL2fIar/8vGUE8cPZvh/gXEWDaDM= github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 v8.0.2 h1:dyLNlDElY6+5zW/BT/dO/3Ad9FpQblfh+9dQpYQodbA= github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 v8.0.2/go.mod h1:82hPO/tRawbuFad2gPwChvpZ0JEIoNi91LwVneAYCeM= +github.com/cosmos/ibc-apps/modules/rate-limiting/v8 v8.0.0 h1:AQO9NIAP3RFqvBCj7IqM/V1LCxmuvcvGUdu0RIEz/c0= +github.com/cosmos/ibc-apps/modules/rate-limiting/v8 v8.0.0/go.mod h1:/ZpKJSW/SKPkFS7jTqkPVn7kOHUUfRNzu+8aS7YOL8o= github.com/cosmos/ibc-go/modules/capability v1.0.0 h1:r/l++byFtn7jHYa09zlAdSeevo8ci1mVZNO9+V0xsLE= github.com/cosmos/ibc-go/modules/capability v1.0.0/go.mod h1:D81ZxzjZAe0ZO5ambnvn1qedsFQ8lOwtqicG6liLBco= github.com/cosmos/ibc-go/v8 v8.3.2 h1:8X1oHHKt2Bh9hcExWS89rntLaCKZp2EjFTUSxKlPhGI= diff --git a/tests/e2e/chain.go b/tests/e2e/chain.go index ef833729506..2eaf91a6aeb 100644 --- a/tests/e2e/chain.go +++ b/tests/e2e/chain.go @@ -4,11 +4,10 @@ import ( "fmt" "os" - ratelimittypes "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" - tmrand "github.com/cometbft/cometbft/libs/rand" dbm "github.com/cosmos/cosmos-db" + ratelimittypes "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" providertypes "github.com/cosmos/interchain-security/v5/x/ccv/provider/types" "cosmossdk.io/log" diff --git a/tests/e2e/query.go b/tests/e2e/query.go index cce992373cf..40edf553a0f 100644 --- a/tests/e2e/query.go +++ b/tests/e2e/query.go @@ -7,8 +7,7 @@ import ( "net/http" "strings" - ratelimittypes "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" - + ratelimittypes "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" icacontrollertypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/types" providertypes "github.com/cosmos/interchain-security/v5/x/ccv/provider/types"