Skip to content

Commit 3f54062

Browse files
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 8535cad) # Conflicts: # .changelog/v19.0.0/dependencies/3227-bump-ibc-rate-limits.md * docs: update changelog files --------- Co-authored-by: MSalopek <[email protected]>
1 parent e4ab221 commit 3f54062

15 files changed

+28
-32
lines changed

.changelog/v19.0.0/dependencies/3171-bump-ibc-rate-limit.md

-3
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- Bump [ibc-rate-limiting](https://github.com/cosmos/ibc-apps/blob/main/modules/rate-limiting) to
2+
[v8](https://github.com/cosmos/ibc-apps/releases/tag/modules/rate-limiting/v8.0.0)
3+
([\#3227](https://github.com/cosmos/gaia/pull/3227))

.changelog/v19.0.0/state-breaking/3171-bump-ibc-rate-limit.md

-3
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- Bump [ibc-rate-limiting](https://github.com/cosmos/ibc-apps/blob/main/modules/rate-limiting) to
2+
[v8](https://github.com/cosmos/ibc-apps/releases/tag/modules/rate-limiting/v8.0.0)
3+
([\#3227](https://github.com/cosmos/gaia/pull/3227))

.changelog/v19.0.0/summary.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
*July 22nd, 2024*
1+
*July 23nd, 2024*

CHANGELOG.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,13 @@
22

33
## v19.0.0
44

5-
*July 22nd, 2024*
5+
*July 23nd, 2024*
66

77
### DEPENDENCIES
88

99
- Bump [cometbft](https://github.com/cometbft/cometbft) to
1010
[v0.38.9](https://github.com/cometbft/cometbft/releases/tag/v0.38.9)
1111
([\#3171](https://github.com/cosmos/gaia/pull/3171))
12-
- Bump [ibc-rate-limiting](https://github.com/Stride-Labs/ibc-rate-limiting) to
13-
[feat/sdk-v50](https://github.com/Stride-Labs/ibc-rate-limiting/tree/feat/sdk-v50)
14-
([\#3171](https://github.com/cosmos/gaia/pull/3171))
1512
- Bump [ibc-go](https://github.com/cosmos/ibc-go) to
1613
[v8.3.2](https://github.com/cosmos/ibc-go/releases/tag/v8.3.2)
1714
([\#3171](https://github.com/cosmos/gaia/pull/3171))
@@ -24,6 +21,9 @@
2421
- Bump [feemarket](https://github.com/skip-mev/feemarket) to
2522
[v1.0.4](https://github.com/skip-mev/feemarket/releases/tag/v1.0.4)
2623
([\#3221](https://github.com/cosmos/gaia/pull/3221))
24+
- Bump [ibc-rate-limiting](https://github.com/cosmos/ibc-apps/blob/main/modules/rate-limiting) to
25+
[v8](https://github.com/cosmos/ibc-apps/releases/tag/modules/rate-limiting/v8.0.0)
26+
([\#3227](https://github.com/cosmos/gaia/pull/3227))
2727

2828
### IMPROVEMENTS
2929

@@ -35,9 +35,6 @@
3535
- Bump [cometbft](https://github.com/cometbft/cometbft) to
3636
[v0.38.9](https://github.com/cometbft/cometbft/releases/tag/v0.38.9)
3737
([\#3171](https://github.com/cosmos/gaia/pull/3171))
38-
- Bump [ibc-rate-limiting](https://github.com/Stride-Labs/ibc-rate-limiting) to
39-
[feat/sdk-v50](https://github.com/Stride-Labs/ibc-rate-limiting/tree/feat/sdk-v50)
40-
([\#3171](https://github.com/cosmos/gaia/pull/3171))
4138
- Bump [ibc-go](https://github.com/cosmos/ibc-go) to
4239
[v8.3.2](https://github.com/cosmos/ibc-go/releases/tag/v8.3.2)
4340
([\#3171](https://github.com/cosmos/gaia/pull/3171))
@@ -50,6 +47,9 @@
5047
- Bump [feemarket](https://github.com/skip-mev/feemarket) to
5148
[v1.0.4](https://github.com/skip-mev/feemarket/releases/tag/v1.0.4)
5249
([\#3221](https://github.com/cosmos/gaia/pull/3221))
50+
- Bump [ibc-rate-limiting](https://github.com/cosmos/ibc-apps/blob/main/modules/rate-limiting) to
51+
[v8](https://github.com/cosmos/ibc-apps/releases/tag/modules/rate-limiting/v8.0.0)
52+
([\#3227](https://github.com/cosmos/gaia/pull/3227))
5353

5454
## Previous Versions
5555

ante/gov_vote_ante.go

-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ func (g GovVoteDecorator) ValidateVoteMsgs(ctx sdk.Context, msgs []sdk.Msg) erro
103103
// break the iteration if maxDelegationsChecked were already checked
104104
return delegationCount >= maxDelegationsChecked
105105
})
106-
107106
if err != nil {
108107
return err
109108
}

app/keepers/keepers.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ import (
55
"os"
66
"strings"
77

8-
ratelimit "github.com/Stride-Labs/ibc-rate-limiting/ratelimit"
9-
ratelimitkeeper "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/keeper"
10-
ratelimittypes "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types"
118
feemarketkeeper "github.com/skip-mev/feemarket/x/feemarket/keeper"
129
feemarkettypes "github.com/skip-mev/feemarket/x/feemarket/types"
1310

1411
pfmrouter "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward"
1512
pfmrouterkeeper "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/keeper"
1613
pfmroutertypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/types"
14+
ratelimit "github.com/cosmos/ibc-apps/modules/rate-limiting/v8"
15+
ratelimitkeeper "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/keeper"
16+
ratelimittypes "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types"
1717
capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper"
1818
capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types"
1919
ica "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts"
@@ -419,9 +419,9 @@ func NewAppKeeper(
419419

420420
// Create RateLimit keeper
421421
appKeepers.RatelimitKeeper = *ratelimitkeeper.NewKeeper(
422-
appCodec, // BinaryCodec
423-
appKeepers.keys[ratelimittypes.StoreKey], // StoreKey
424-
appKeepers.GetSubspace(ratelimittypes.ModuleName), // param Subspace
422+
appCodec, // BinaryCodec
423+
runtime.NewKVStoreService(appKeepers.keys[ratelimittypes.StoreKey]), // StoreKey
424+
appKeepers.GetSubspace(ratelimittypes.ModuleName), // param Subspace
425425
govAuthority, // authority
426426
appKeepers.BankKeeper,
427427
appKeepers.IBCKeeper.ChannelKeeper, // ChannelKeeper

app/keepers/keys.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package keepers
22

33
import (
4-
ratelimittypes "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types"
54
feemarkettypes "github.com/skip-mev/feemarket/x/feemarket/types"
65

76
routertypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/types"
7+
ratelimittypes "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types"
88
capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types"
99
icacontrollertypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/types"
1010
icahosttypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/types"

app/modules.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package gaia
22

33
import (
4-
ratelimittypes "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types"
54
feemarket "github.com/skip-mev/feemarket/x/feemarket"
65
feemarkettypes "github.com/skip-mev/feemarket/x/feemarket/types"
76

87
pfmroutertypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/types"
8+
ratelimittypes "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types"
99
"github.com/cosmos/ibc-go/modules/capability"
1010
capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types"
1111
icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types"

cmd/gaiad/cmd/testnet_set_local_validator.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ func init() {
6363
}
6464

6565
func testnetUnsafeStartLocalValidatorCmd(ac appCreator) *cobra.Command {
66-
6766
cmd := server.StartCmd(ac.newTestingApp, gaia.DefaultNodeHome)
6867
cmd.Use = "unsafe-start-local-validator"
6968
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(
167166
panic(err)
168167
}
169168

170-
//Update consensus state
169+
// Update consensus state
171170
err = updateConsensusState(logger, appOpts, gaiaApp.CommitMultiStore().LatestVersion(), args)
172171
if err != nil {
173172
panic(err)

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ require (
1818
cosmossdk.io/x/tx v0.13.3
1919
cosmossdk.io/x/upgrade v0.1.4
2020
github.com/CosmWasm/wasmd v0.50.0
21-
github.com/Stride-Labs/ibc-rate-limiting v0.0.0-20240402205850-be547630b007
2221
github.com/cometbft/cometbft v0.38.9
2322
github.com/cometbft/cometbft-db v0.12.0
2423
github.com/cosmos/cosmos-db v1.0.2
2524
github.com/cosmos/cosmos-sdk v0.50.8
2625
github.com/cosmos/go-bip39 v1.0.0
2726
github.com/cosmos/gogoproto v1.5.0
2827
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 v8.0.2
28+
github.com/cosmos/ibc-apps/modules/rate-limiting/v8 v8.0.0
2929
github.com/cosmos/ibc-go/modules/capability v1.0.0
3030
github.com/cosmos/ibc-go/v8 v8.3.2
3131
github.com/cosmos/interchain-security/v5 v5.1.0

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,6 @@ github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAE
258258
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
259259
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
260260
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
261-
github.com/Stride-Labs/ibc-rate-limiting v0.0.0-20240402205850-be547630b007 h1:6BNsNF5ZI3YPnVq+oJKbtelWoEkuplUzoQH9VTxqHp0=
262-
github.com/Stride-Labs/ibc-rate-limiting v0.0.0-20240402205850-be547630b007/go.mod h1:r2Mgt9zNLQsUWlx4OhEIzvNm+JE+4fy4h4t6xBAPv5A=
263261
github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw=
264262
github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE=
265263
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=
433431
github.com/cosmos/iavl v1.1.2/go.mod h1:jLeUvm6bGT1YutCaL2fIar/8vGUE8cPZvh/gXEWDaDM=
434432
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 v8.0.2 h1:dyLNlDElY6+5zW/BT/dO/3Ad9FpQblfh+9dQpYQodbA=
435433
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 v8.0.2/go.mod h1:82hPO/tRawbuFad2gPwChvpZ0JEIoNi91LwVneAYCeM=
434+
github.com/cosmos/ibc-apps/modules/rate-limiting/v8 v8.0.0 h1:AQO9NIAP3RFqvBCj7IqM/V1LCxmuvcvGUdu0RIEz/c0=
435+
github.com/cosmos/ibc-apps/modules/rate-limiting/v8 v8.0.0/go.mod h1:/ZpKJSW/SKPkFS7jTqkPVn7kOHUUfRNzu+8aS7YOL8o=
436436
github.com/cosmos/ibc-go/modules/capability v1.0.0 h1:r/l++byFtn7jHYa09zlAdSeevo8ci1mVZNO9+V0xsLE=
437437
github.com/cosmos/ibc-go/modules/capability v1.0.0/go.mod h1:D81ZxzjZAe0ZO5ambnvn1qedsFQ8lOwtqicG6liLBco=
438438
github.com/cosmos/ibc-go/v8 v8.3.2 h1:8X1oHHKt2Bh9hcExWS89rntLaCKZp2EjFTUSxKlPhGI=

tests/e2e/chain.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ import (
44
"fmt"
55
"os"
66

7-
ratelimittypes "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types"
8-
97
tmrand "github.com/cometbft/cometbft/libs/rand"
108

119
dbm "github.com/cosmos/cosmos-db"
10+
ratelimittypes "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types"
1211
providertypes "github.com/cosmos/interchain-security/v5/x/ccv/provider/types"
1312

1413
"cosmossdk.io/log"

tests/e2e/query.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ import (
77
"net/http"
88
"strings"
99

10-
ratelimittypes "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types"
11-
10+
ratelimittypes "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types"
1211
icacontrollertypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/types"
1312
providertypes "github.com/cosmos/interchain-security/v5/x/ccv/provider/types"
1413

0 commit comments

Comments
 (0)