Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,14 @@ Ref: https://keepachangelog.com/en/1.0.0/
## [Unreleased]

### Features

* [\#8573](https://github.com/cosmos/ibc-go/pull/8573) Support custom address codecs in transfer, PFM, and rate limiting.
* [\#8285](https://github.com/cosmos/ibc-go/pull/8285) Packet forward middleware.
* [\#8545](https://github.com/cosmos/ibc-go/pull/8545) Support sending multiple payloads in the same packet for atomic payload execution.
* [\#8473](https://github.com/cosmos/ibc-go/pull/8473) Support sending v2 packets on v1 channel identifiers using aliasing.

### Improvements

* [\#8734](https://github.com/cosmos/ibc-go/pull/8734) Add extra validation for ProtoJSON unmarshalling in ICS-27 ICA.

### Dependencies
Expand All @@ -51,6 +53,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (light-clients/08-wasm)[\#8500](https://github.com/cosmos/ibc-go/pull/8500) Bump **github.com/prysmaticlabs/prysm/v5** to **github.com/OffchainLabs/prysm/v6@v6.0.4**

### API Breaking

* (apps) [\#8476](https://github.com/cosmos/ibc-go/pull/8476) Remove `ParamSubspace` from all `Keeper` constructors
* (light-clients/08-wasm) [\#8511](https://github.com/cosmos/ibc-go/pull/8511) Remove deprecated `Checksums` type
* (core/02-client) [\#8516](https://github.com/cosmos/ibc-go/pull/8516) Remove deprecated `SubmitMisbehaviour` message handler
Expand All @@ -61,6 +64,8 @@ Ref: https://keepachangelog.com/en/1.0.0/

### Bug Fixes

(apps/rate-limiting) [\#8767](https://github.com/cosmos/ibc-go/pull/8767) Fix string conflict in rate-limiting prefix iterator

### Testing API

* [\#8366](https://github.com/cosmos/ibc-go/pull/8366) - Replaced the deprecated `codec.ProtoMarshaler` interface with `proto.Message`.
Expand All @@ -87,7 +92,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Improvements

* (core/api) [\#8303](https://github.com/cosmos/ibc-go/pull/8303) Prefix-based routing in IBCv2 Router
- (apps/callbacks) [\#8353](https://github.com/cosmos/ibc-go/pull/8353) Add field in callbacks data for custom calldata
* (apps/callbacks) [\#8353](https://github.com/cosmos/ibc-go/pull/8353) Add field in callbacks data for custom calldata

### Bug Fixes

Expand Down
5 changes: 4 additions & 1 deletion modules/apps/rate-limiting/keeper/pending_send.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ func (k *Keeper) RemoveAllChannelPendingSendPackets(ctx sdk.Context, channelID s
adapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx))
store := prefix.NewStore(adapter, types.PendingSendPacketPrefix)

iterator := storetypes.KVStorePrefixIterator(store, []byte(channelID))
channelIDBz := make([]byte, types.PendingSendPacketChannelLength)
copy(channelIDBz, channelID)

iterator := storetypes.KVStorePrefixIterator(store, channelIDBz)
defer iterator.Close()

for ; iterator.Valid(); iterator.Next() {
Expand Down
12 changes: 6 additions & 6 deletions modules/apps/rate-limiting/keeper/pending_send_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import "fmt"
func (s *KeeperTestSuite) TestPendingSendPacketPrefix() {
// Store 5 packets across two channels
sendPackets := []string{}
for _, channelID := range []string{"channel-0", "channel-1"} {
for _, channelID := range []string{"channel-1", "channel-11"} {
for sequence := range uint64(5) {
s.chainA.GetSimApp().RateLimitKeeper.SetPendingSendPacket(s.chainA.GetContext(), channelID, sequence)
sendPackets = append(sendPackets, fmt.Sprintf("%s/%d", channelID, sequence))
}
}

// Check that they each sequence number is found
for _, channelID := range []string{"channel-0", "channel-1"} {
for _, channelID := range []string{"channel-1", "channel-11"} {
for sequence := range uint64(5) {
found := s.chainA.GetSimApp().RateLimitKeeper.CheckPacketSentDuringCurrentQuota(s.chainA.GetContext(), channelID, sequence)
s.Require().True(found, "send packet should have been found - channel %s, sequence: %d", channelID, sequence)
Expand All @@ -25,14 +25,14 @@ func (s *KeeperTestSuite) TestPendingSendPacketPrefix() {
s.Require().Equal(sendPackets, actualSendPackets, "all send packets")

// Remove 0 sequence numbers and all sequence numbers from channel-0
s.chainA.GetSimApp().RateLimitKeeper.RemovePendingSendPacket(s.chainA.GetContext(), "channel-0", 0)
s.chainA.GetSimApp().RateLimitKeeper.RemovePendingSendPacket(s.chainA.GetContext(), "channel-1", 0)
s.chainA.GetSimApp().RateLimitKeeper.RemoveAllChannelPendingSendPackets(s.chainA.GetContext(), "channel-0")
s.chainA.GetSimApp().RateLimitKeeper.RemovePendingSendPacket(s.chainA.GetContext(), "channel-11", 0)
s.chainA.GetSimApp().RateLimitKeeper.RemoveAllChannelPendingSendPackets(s.chainA.GetContext(), "channel-1")

// Check that only the remaining sequences are found
for _, channelID := range []string{"channel-0", "channel-1"} {
for _, channelID := range []string{"channel-1", "channel-11"} {
for sequence := range uint64(5) {
expected := (channelID == "channel-1") && (sequence != 0)
expected := (channelID == "channel-11") && (sequence != 0)
actual := s.chainA.GetSimApp().RateLimitKeeper.CheckPacketSentDuringCurrentQuota(s.chainA.GetContext(), channelID, sequence)
s.Require().Equal(expected, actual, "send packet after removal - channel: %s, sequence: %d", channelID, sequence)
}
Expand Down
Loading