From 760d15a3a55397678abe311b7f65203b2e8437d6 Mon Sep 17 00:00:00 2001 From: Damian Nolan Date: Tue, 7 Sep 2021 12:36:53 +0200 Subject: [PATCH] packet acknowledgment filtering (#375) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * adding packet commitments to QueryPacketAcknowledgementsRequest for filtering * adding testcase for filtered packet ack query * adding changelog entry for packet ack filtering * updating packet sequences type to repeated uint64 * updating to query specific packet acks outside bounds of paginated req * updating changelog field naming, removing redundant pagination in query test * continue in favour of returning an error on query PacketAcknowledgements * updating to return empty array of acks if none of the provided commitments are found Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> --- CHANGELOG.md | 6 +- docs/ibc/proto-docs.md | 1 + modules/core/04-channel/keeper/grpc_query.go | 22 ++ .../core/04-channel/keeper/grpc_query_test.go | 27 ++ modules/core/04-channel/types/query.pb.go | 370 ++++++++++++------ proto/ibc/core/channel/v1/query.proto | 2 + 6 files changed, 297 insertions(+), 131 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3715e1cda1..226f63967b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,11 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (24-host) [#\344](https://github.com/cosmos/ibc-go/pull/344) Increase port identifier limit to 128 characters. +### Improvements +* [\#373](https://github.com/cosmos/ibc-go/pull/375) Added optional field `PacketCommitmentSequences` to `QueryPacketAcknowledgementsRequest` to provide filtering of packet acknowledgements + +### Features +* [\#372](https://github.com/cosmos/ibc-go/pull/372) New CLI command `query ibc client status ` to get the current activity status of a client ## [v1.0.0](https://github.com/cosmos/ibc-go/releases/tag/v1.0.0) - 2021-08-10 @@ -102,7 +107,6 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Features * [\#198](https://github.com/cosmos/ibc-go/pull/198) New CLI command `query ibc-transfer escrow-address ` to get the escrow address for a channel; can be used to then query balance of escrowed tokens -* [\#372](https://github.com/cosmos/ibc-go/pull/372) New CLI command `query ibc client status ` to get the current activity status of a client ### Client Breaking Changes diff --git a/docs/ibc/proto-docs.md b/docs/ibc/proto-docs.md index cae068cf68c..9b43455b154 100644 --- a/docs/ibc/proto-docs.md +++ b/docs/ibc/proto-docs.md @@ -1166,6 +1166,7 @@ Query/QueryPacketCommitments RPC method | `port_id` | [string](#string) | | port unique identifier | | `channel_id` | [string](#string) | | channel unique identifier | | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination request | +| `packet_commitment_sequences` | [uint64](#uint64) | repeated | list of packet sequences | diff --git a/modules/core/04-channel/keeper/grpc_query.go b/modules/core/04-channel/keeper/grpc_query.go index 5f2155919aa..150d839b5f8 100644 --- a/modules/core/04-channel/keeper/grpc_query.go +++ b/modules/core/04-channel/keeper/grpc_query.go @@ -327,6 +327,27 @@ func (q Keeper) PacketAcknowledgements(c context.Context, req *types.QueryPacket acks := []*types.PacketState{} store := prefix.NewStore(ctx.KVStore(q.storeKey), []byte(host.PacketAcknowledgementPrefixPath(req.PortId, req.ChannelId))) + // if a list of packet sequences is provided then query for each specific ack and return a list <= len(req.PacketCommitmentSequences) + // otherwise, maintain previous behaviour and perform paginated query + for _, seq := range req.PacketCommitmentSequences { + acknowledgementBz, found := q.GetPacketAcknowledgement(ctx, req.PortId, req.ChannelId, seq) + if !found || len(acknowledgementBz) == 0 { + continue + } + + ack := types.NewPacketState(req.PortId, req.ChannelId, seq, acknowledgementBz) + acks = append(acks, &ack) + } + + if len(req.PacketCommitmentSequences) > 0 { + selfHeight := clienttypes.GetSelfHeight(ctx) + return &types.QueryPacketAcknowledgementsResponse{ + Acknowledgements: acks, + Pagination: nil, + Height: selfHeight, + }, nil + } + pageRes, err := query.Paginate(store, req.Pagination, func(key, value []byte) error { keySplit := strings.Split(string(key), "/") @@ -337,6 +358,7 @@ func (q Keeper) PacketAcknowledgements(c context.Context, req *types.QueryPacket ack := types.NewPacketState(req.PortId, req.ChannelId, sequence, value) acks = append(acks, &ack) + return nil }) diff --git a/modules/core/04-channel/keeper/grpc_query_test.go b/modules/core/04-channel/keeper/grpc_query_test.go index 88e3a717005..d803ae8b135 100644 --- a/modules/core/04-channel/keeper/grpc_query_test.go +++ b/modules/core/04-channel/keeper/grpc_query_test.go @@ -1025,6 +1025,33 @@ func (suite *KeeperTestSuite) TestQueryPacketAcknowledgements() { }, true, }, + { + "success, filtered res", + func() { + path := ibctesting.NewPath(suite.chainA, suite.chainB) + suite.coordinator.Setup(path) + + var commitments []uint64 + + for i := uint64(0); i < 100; i++ { + ack := types.NewPacketState(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, i, []byte(fmt.Sprintf("hash_%d", i))) + suite.chainA.App.GetIBCKeeper().ChannelKeeper.SetPacketAcknowledgement(suite.chainA.GetContext(), ack.PortId, ack.ChannelId, ack.Sequence, ack.Data) + + if i < 10 { // populate the store with 100 and query for 10 specific acks + expAcknowledgements = append(expAcknowledgements, &ack) + commitments = append(commitments, ack.Sequence) + } + } + + req = &types.QueryPacketAcknowledgementsRequest{ + PortId: path.EndpointA.ChannelConfig.PortID, + ChannelId: path.EndpointA.ChannelID, + PacketCommitmentSequences: commitments, + Pagination: nil, + } + }, + true, + }, { "success", func() { diff --git a/modules/core/04-channel/types/query.pb.go b/modules/core/04-channel/types/query.pb.go index a5e23569526..281e790ba6b 100644 --- a/modules/core/04-channel/types/query.pb.go +++ b/modules/core/04-channel/types/query.pb.go @@ -1184,6 +1184,8 @@ type QueryPacketAcknowledgementsRequest struct { ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` // pagination request Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` + // list of packet sequences + PacketCommitmentSequences []uint64 `protobuf:"varint,4,rep,packed,name=packet_commitment_sequences,json=packetCommitmentSequences,proto3" json:"packet_commitment_sequences,omitempty"` } func (m *QueryPacketAcknowledgementsRequest) Reset() { *m = QueryPacketAcknowledgementsRequest{} } @@ -1240,6 +1242,13 @@ func (m *QueryPacketAcknowledgementsRequest) GetPagination() *query.PageRequest return nil } +func (m *QueryPacketAcknowledgementsRequest) GetPacketCommitmentSequences() []uint64 { + if m != nil { + return m.PacketCommitmentSequences + } + return nil +} + // QueryPacketAcknowledgemetsResponse is the request type for the // Query/QueryPacketAcknowledgements RPC method type QueryPacketAcknowledgementsResponse struct { @@ -1699,100 +1708,100 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v1/query.proto", fileDescriptor_1034a1e9abc4cca1) } var fileDescriptor_1034a1e9abc4cca1 = []byte{ - // 1481 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x59, 0xdf, 0x6f, 0x14, 0x55, - 0x14, 0xee, 0xdd, 0x16, 0x68, 0x0f, 0xc8, 0x8f, 0xdb, 0x16, 0xca, 0x50, 0xb6, 0x65, 0x8d, 0x52, - 0x48, 0x98, 0x4b, 0x0b, 0x56, 0x62, 0x94, 0x84, 0x36, 0x11, 0x6a, 0x04, 0xca, 0x20, 0x11, 0x48, - 0x74, 0x9d, 0x9d, 0xbd, 0x6c, 0x27, 0xed, 0xce, 0x0c, 0x3b, 0xb3, 0x0b, 0xa4, 0xae, 0x31, 0x3e, - 0x20, 0x89, 0x2f, 0x46, 0x1e, 0x4c, 0x7c, 0x31, 0x31, 0xbe, 0xf0, 0xe0, 0x83, 0x7f, 0x81, 0xaf, - 0xbc, 0x49, 0x82, 0x0f, 0x26, 0x24, 0x68, 0xa8, 0x09, 0xbe, 0xfa, 0xe2, 0xb3, 0x99, 0xfb, 0x63, - 0x76, 0x66, 0x77, 0x66, 0xba, 0xdb, 0xed, 0x26, 0x8d, 0x6f, 0x33, 0x77, 0xee, 0x39, 0xf7, 0xfb, - 0xbe, 0x73, 0xcf, 0xe9, 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0x95, 0x20, 0xfe, 0x15, - 0xc1, 0x2b, 0x91, 0x81, 0x00, 0xab, 0xeb, 0xa1, 0x8b, 0xce, 0x2a, 0x0a, 0x69, 0x7b, 0xbf, 0x60, - 0xf2, 0x11, 0x63, 0xf2, 0x21, 0xbe, 0xd6, 0x3d, 0x93, 0x0a, 0x77, 0x1d, 0x89, 0xd3, 0x1a, 0x82, - 0xd1, 0xd8, 0x06, 0x34, 0x2d, 0x35, 0xd3, 0xc6, 0x8f, 0xb4, 0xd4, 0x4c, 0x1d, 0x1e, 0x72, 0x37, - 0x18, 0xd3, 0xab, 0xf8, 0x4a, 0xf7, 0x4c, 0x75, 0x63, 0x39, 0xc2, 0xf2, 0x25, 0x82, 0xfd, 0xf1, - 0x6d, 0x36, 0xee, 0x14, 0x6e, 0x70, 0x2f, 0xcf, 0x74, 0x6e, 0x28, 0x88, 0xde, 0x64, 0x44, 0x3f, - 0xc0, 0xda, 0xa6, 0x10, 0x8d, 0xd2, 0xb9, 0x9f, 0x81, 0x7d, 0x2d, 0xed, 0x6b, 0x5a, 0xde, 0x25, - 0x35, 0xe1, 0x69, 0x79, 0x97, 0xd8, 0x1f, 0x6f, 0x52, 0x79, 0x8d, 0x2b, 0x2d, 0x29, 0x8d, 0x7d, - 0x9d, 0x54, 0x03, 0x40, 0x79, 0x47, 0x50, 0xfe, 0x07, 0xc1, 0xee, 0x68, 0x13, 0x8b, 0x49, 0x3b, - 0x8c, 0x42, 0x6d, 0xb7, 0x72, 0xb2, 0x7d, 0x03, 0xc1, 0xff, 0x53, 0x46, 0xbf, 0x86, 0xbd, 0xde, - 0xb0, 0x8f, 0x74, 0xf1, 0x11, 0xda, 0xfe, 0x8d, 0xc7, 0xbf, 0x21, 0x18, 0x8e, 0xe9, 0x72, 0x71, - 0x4a, 0x1b, 0x90, 0xdc, 0x70, 0x2b, 0x6f, 0x74, 0x68, 0x25, 0x24, 0x58, 0x64, 0x12, 0xbc, 0x87, - 0x2f, 0x74, 0x21, 0x41, 0xa4, 0x17, 0x9f, 0x5b, 0x7c, 0xfc, 0x22, 0x8b, 0x9e, 0xbc, 0xc8, 0xa2, - 0x3f, 0x5f, 0x64, 0xd1, 0xd7, 0x6b, 0xd9, 0xbe, 0x27, 0x6b, 0xd9, 0xbe, 0xdf, 0xd7, 0xb2, 0x7d, - 0x37, 0x67, 0x4b, 0xa6, 0xb7, 0x54, 0x2d, 0xa8, 0x86, 0x5d, 0x26, 0xe2, 0x1f, 0x7b, 0x66, 0xc1, - 0x38, 0x51, 0xb2, 0x49, 0xd9, 0x2e, 0x56, 0x57, 0xa8, 0xcb, 0xcf, 0x3f, 0x79, 0xfa, 0x84, 0x84, - 0xe0, 0xdd, 0x73, 0xa8, 0x5b, 0xd8, 0xce, 0x7e, 0x81, 0x3d, 0xf5, 0x5f, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x90, 0x44, 0xdb, 0xbc, 0x65, 0x1c, 0x00, 0x00, + // 1486 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x59, 0xcf, 0x6f, 0xd4, 0x46, + 0x14, 0xce, 0x6c, 0x16, 0x48, 0x1e, 0x94, 0x1f, 0x93, 0x04, 0x82, 0x09, 0x9b, 0xb0, 0x55, 0x4b, + 0x40, 0xc2, 0x43, 0x02, 0x4d, 0x51, 0xd5, 0x22, 0x91, 0x48, 0x85, 0x54, 0x05, 0x82, 0x29, 0x2a, + 0x20, 0xb5, 0x5b, 0xaf, 0x77, 0xd8, 0x58, 0xc9, 0xda, 0x66, 0xed, 0x5d, 0x40, 0xe9, 0x56, 0x55, + 0x0f, 0x14, 0xa9, 0x97, 0xaa, 0x1c, 0x2a, 0xf5, 0x52, 0xa9, 0x37, 0x0e, 0x3d, 0xf4, 0x2f, 0xe8, + 0x95, 0x5b, 0x91, 0xe8, 0xa1, 0x12, 0x12, 0xad, 0x08, 0x12, 0xbd, 0xf6, 0xd2, 0x73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0xf5, 0x86, 0x7d, 0xa4, 0x8b, 0x8f, 0xd0, 0xf6, 0x6f, 0x3c, 0xfe, 0x1d, + 0xc1, 0x50, 0x4c, 0x97, 0x8b, 0x53, 0xda, 0x80, 0xe4, 0x86, 0x5b, 0x79, 0xab, 0x43, 0x2b, 0x21, + 0xc1, 0x02, 0x93, 0xe0, 0x03, 0x7c, 0xa1, 0x0b, 0x09, 0x22, 0xbd, 0xf8, 0xec, 0xc2, 0xe3, 0x17, + 0x39, 0xf4, 0xe4, 0x45, 0x0e, 0xfd, 0xf5, 0x22, 0x87, 0xbe, 0x5d, 0xcd, 0xf5, 0x3d, 0x59, 0xcd, + 0xf5, 0xfd, 0xb1, 0x9a, 0xeb, 0xbb, 0x39, 0x53, 0x36, 0xbd, 0xc5, 0x5a, 0x51, 0x35, 0xec, 0x0a, + 0x11, 0xff, 0x18, 0x34, 0x8b, 0xc6, 0x89, 0xb2, 0x4d, 0x2a, 0x76, 0xa9, 0xb6, 0x4c, 0x5d, 0x7e, + 0xfe, 0xc9, 0xd3, 0x27, 0x24, 0x04, 0xef, 0x9e, 0x43, 0xdd, 0xe2, 0x76, 0xf6, 0x0b, 0xee, 0xa9, + 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x53, 0x37, 0x2a, 0x8c, 0xa5, 0x1c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -3226,6 +3235,24 @@ func (m *QueryPacketAcknowledgementsRequest) MarshalToSizedBuffer(dAtA []byte) ( _ = i var l int _ = l + if len(m.PacketCommitmentSequences) > 0 { + dAtA20 := make([]byte, len(m.PacketCommitmentSequences)*10) + var j19 int + for _, num := range m.PacketCommitmentSequences { + for num >= 1<<7 { + dAtA20[j19] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j19++ + } + dAtA20[j19] = uint8(num) + j19++ + } + i -= j19 + copy(dAtA[i:], dAtA20[:j19]) + i = encodeVarintQuery(dAtA, i, uint64(j19)) + i-- + dAtA[i] = 0x22 + } if m.Pagination != nil { { size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) @@ -3335,20 +3362,20 @@ func (m *QueryUnreceivedPacketsRequest) MarshalToSizedBuffer(dAtA []byte) (int, var l int _ = l if len(m.PacketCommitmentSequences) > 0 { - dAtA23 := make([]byte, len(m.PacketCommitmentSequences)*10) - var j22 int + dAtA25 := make([]byte, len(m.PacketCommitmentSequences)*10) + var j24 int for _, num := range m.PacketCommitmentSequences { for num >= 1<<7 { - dAtA23[j22] = uint8(uint64(num)&0x7f | 0x80) + dAtA25[j24] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j22++ + j24++ } - dAtA23[j22] = uint8(num) - j22++ + dAtA25[j24] = uint8(num) + j24++ } - i -= j22 - copy(dAtA[i:], dAtA23[:j22]) - i = encodeVarintQuery(dAtA, i, uint64(j22)) + i -= j24 + copy(dAtA[i:], dAtA25[:j24]) + i = encodeVarintQuery(dAtA, i, uint64(j24)) i-- dAtA[i] = 0x1a } @@ -3400,20 +3427,20 @@ func (m *QueryUnreceivedPacketsResponse) MarshalToSizedBuffer(dAtA []byte) (int, i-- dAtA[i] = 0x12 if len(m.Sequences) > 0 { - dAtA26 := make([]byte, len(m.Sequences)*10) - var j25 int + dAtA28 := make([]byte, len(m.Sequences)*10) + var j27 int for _, num := range m.Sequences { for num >= 1<<7 { - dAtA26[j25] = uint8(uint64(num)&0x7f | 0x80) + dAtA28[j27] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j25++ + j27++ } - dAtA26[j25] = uint8(num) - j25++ + dAtA28[j27] = uint8(num) + j27++ } - i -= j25 - copy(dAtA[i:], dAtA26[:j25]) - i = encodeVarintQuery(dAtA, i, uint64(j25)) + i -= j27 + copy(dAtA[i:], dAtA28[:j27]) + i = encodeVarintQuery(dAtA, i, uint64(j27)) i-- dAtA[i] = 0xa } @@ -3441,20 +3468,20 @@ func (m *QueryUnreceivedAcksRequest) MarshalToSizedBuffer(dAtA []byte) (int, err var l int _ = l if len(m.PacketAckSequences) > 0 { - dAtA28 := make([]byte, len(m.PacketAckSequences)*10) - var j27 int + dAtA30 := make([]byte, len(m.PacketAckSequences)*10) + var j29 int for _, num := range m.PacketAckSequences { for num >= 1<<7 { - dAtA28[j27] = uint8(uint64(num)&0x7f | 0x80) + dAtA30[j29] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j27++ + j29++ } - dAtA28[j27] = uint8(num) - j27++ + dAtA30[j29] = uint8(num) + j29++ } - i -= j27 - copy(dAtA[i:], dAtA28[:j27]) - i = encodeVarintQuery(dAtA, i, uint64(j27)) + i -= j29 + copy(dAtA[i:], dAtA30[:j29]) + i = encodeVarintQuery(dAtA, i, uint64(j29)) i-- dAtA[i] = 0x1a } @@ -3506,20 +3533,20 @@ func (m *QueryUnreceivedAcksResponse) MarshalToSizedBuffer(dAtA []byte) (int, er i-- dAtA[i] = 0x12 if len(m.Sequences) > 0 { - dAtA31 := make([]byte, len(m.Sequences)*10) - var j30 int + dAtA33 := make([]byte, len(m.Sequences)*10) + var j32 int for _, num := range m.Sequences { for num >= 1<<7 { - dAtA31[j30] = uint8(uint64(num)&0x7f | 0x80) + dAtA33[j32] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j30++ + j32++ } - dAtA31[j30] = uint8(num) - j30++ + dAtA33[j32] = uint8(num) + j32++ } - i -= j30 - copy(dAtA[i:], dAtA31[:j30]) - i = encodeVarintQuery(dAtA, i, uint64(j30)) + i -= j32 + copy(dAtA[i:], dAtA33[:j32]) + i = encodeVarintQuery(dAtA, i, uint64(j32)) i-- dAtA[i] = 0xa } @@ -3985,6 +4012,13 @@ func (m *QueryPacketAcknowledgementsRequest) Size() (n int) { l = m.Pagination.Size() n += 1 + l + sovQuery(uint64(l)) } + if len(m.PacketCommitmentSequences) > 0 { + l = 0 + for _, e := range m.PacketCommitmentSequences { + l += sovQuery(uint64(e)) + } + n += 1 + sovQuery(uint64(l)) + l + } return n } @@ -6785,6 +6819,82 @@ func (m *QueryPacketAcknowledgementsRequest) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.PacketCommitmentSequences = append(m.PacketCommitmentSequences, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.PacketCommitmentSequences) == 0 { + m.PacketCommitmentSequences = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.PacketCommitmentSequences = append(m.PacketCommitmentSequences, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field PacketCommitmentSequences", wireType) + } default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) diff --git a/proto/ibc/core/channel/v1/query.proto b/proto/ibc/core/channel/v1/query.proto index 194fe86777f..9690e24edfc 100644 --- a/proto/ibc/core/channel/v1/query.proto +++ b/proto/ibc/core/channel/v1/query.proto @@ -301,6 +301,8 @@ message QueryPacketAcknowledgementsRequest { string channel_id = 2; // pagination request cosmos.base.query.v1beta1.PageRequest pagination = 3; + // list of packet sequences + repeated uint64 packet_commitment_sequences = 4; } // QueryPacketAcknowledgemetsResponse is the request type for the