From 206ba32e60b355a660aba24100b6669feccd8ab7 Mon Sep 17 00:00:00 2001 From: Luis Carvalho Date: Wed, 11 Sep 2024 17:31:32 +0100 Subject: [PATCH] feat: endpoint to query open skyway attestations --- proto/palomachain/paloma/skyway/query.proto | 15 + x/skyway/keeper/attestation.go | 51 ++ x/skyway/keeper/grpc_query.go | 14 + x/skyway/keeper/grpc_query_test.go | 169 +++++ x/skyway/types/query.pb.go | 716 +++++++++++++++++--- x/skyway/types/query.pb.gw.go | 119 ++++ 6 files changed, 971 insertions(+), 113 deletions(-) diff --git a/proto/palomachain/paloma/skyway/query.proto b/proto/palomachain/paloma/skyway/query.proto index 8ba9c1f1..e1af9c69 100644 --- a/proto/palomachain/paloma/skyway/query.proto +++ b/proto/palomachain/paloma/skyway/query.proto @@ -116,6 +116,12 @@ service Query { option (google.api.http).get = "/palomachain/paloma/skyway/pending-batch-for-gas-estimation/{chain_reference_id}"; } + + rpc GetUnobservedBlocksByAddr(QueryUnobservedBlocksByAddrRequest) + returns (QueryUnobservedBlocksByAddrResponse) { + option (google.api.http).get = + "/palomachain/paloma/skyway/unobserved-blocks-by-addr/{chain_reference_id}"; + } } message QueryParamsRequest {} @@ -249,3 +255,12 @@ message QueryLastPendingBatchForGasEstimationRequest { message QueryLastPendingBatchForGasEstimationResponse { repeated OutgoingTxBatch batch = 1 [ (gogoproto.nullable) = false ]; } + +message QueryUnobservedBlocksByAddrRequest { + string chain_reference_id = 1; + string address = 2; +} + +message QueryUnobservedBlocksByAddrResponse { + repeated uint64 blocks = 1; +} diff --git a/x/skyway/keeper/attestation.go b/x/skyway/keeper/attestation.go index ff93e87e..3cf5582f 100644 --- a/x/skyway/keeper/attestation.go +++ b/x/skyway/keeper/attestation.go @@ -3,6 +3,7 @@ package keeper import ( "context" "fmt" + "slices" "sort" "strconv" @@ -568,3 +569,53 @@ func (k Keeper) setLatestCompassID( store := k.GetStore(ctx, chainReferenceID) store.Set(types.LatestCompassIDKey, []byte(compassID)) } + +// UnobservedBlocksByAddr returns the blocks with reported events that +// are still unobserved and are not yet voted by `valAddr` +func (k Keeper) UnobservedBlocksByAddr( + ctx context.Context, + chainReferenceID string, + valAddr string, +) ([]uint64, error) { + lastCompassID := k.GetLatestCompassID(ctx, chainReferenceID) + + var err error + var blocks []uint64 + + iterErr := k.IterateAttestations(ctx, chainReferenceID, false, func(_ []byte, att types.Attestation) bool { + if att.Observed { + return false + } + + if slices.Contains(att.Votes, valAddr) { + return false + } + + var claim types.EthereumClaim + claim, err = k.UnpackAttestationClaim(&att) + if err != nil { + return true + } + + // Only include claims from current compass deployment + if lastCompassID != "" && claim.GetCompassID() != lastCompassID { + return false + } + + blocks = append(blocks, claim.GetEthBlockHeight()) + + return false + }) + if err != nil { + return nil, err + } + + if iterErr != nil { + return nil, iterErr + } + + // Return the blocks in ascending order + slices.Sort(blocks) + + return blocks, nil +} diff --git a/x/skyway/keeper/grpc_query.go b/x/skyway/keeper/grpc_query.go index 04686402..af99ec2b 100644 --- a/x/skyway/keeper/grpc_query.go +++ b/x/skyway/keeper/grpc_query.go @@ -428,3 +428,17 @@ func (k Keeper) LastPendingBatchForGasEstimation(ctx context.Context, req *types return &types.QueryLastPendingBatchForGasEstimationResponse{Batch: nil}, nil } + +func (k Keeper) GetUnobservedBlocksByAddr( + ctx context.Context, + req *types.QueryUnobservedBlocksByAddrRequest, +) (*types.QueryUnobservedBlocksByAddrResponse, error) { + blocks, err := k.UnobservedBlocksByAddr(ctx, req.ChainReferenceId, req.Address) + if err != nil { + return nil, err + } + + return &types.QueryUnobservedBlocksByAddrResponse{ + Blocks: blocks, + }, nil +} diff --git a/x/skyway/keeper/grpc_query_test.go b/x/skyway/keeper/grpc_query_test.go index b9682d5f..0244da73 100644 --- a/x/skyway/keeper/grpc_query_test.go +++ b/x/skyway/keeper/grpc_query_test.go @@ -2,12 +2,16 @@ package keeper import ( "bytes" + "context" "math/big" "testing" "time" "cosmossdk.io/math" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" + sdktypes "github.com/cosmos/cosmos-sdk/types" + "github.com/ethereum/go-ethereum/common" "github.com/palomachain/paloma/x/skyway/types" vtypes "github.com/palomachain/paloma/x/valset/types" "github.com/stretchr/testify/assert" @@ -538,3 +542,168 @@ func TestQueryPendingSendToRemote(t *testing.T) { assert.Equal(t, &expectedRes, response, "json is equal") } + +func TestGetUnobservedBlocksByAddr(t *testing.T) { + chainReferenceID := "test-chain" + address := common.BytesToAddress(bytes.Repeat([]byte{0x1}, 20)).String() + + tests := []struct { + name string + setup func(context.Context, Keeper) + expected []uint64 + }{ + { + name: "three unobserved messages for current compass", + setup: func(ctx context.Context, k Keeper) { + sdkCtx := sdktypes.UnwrapSDKContext(ctx) + + for i := 0; i < 3; i++ { + msg := types.MsgLightNodeSaleClaim{ + SkywayNonce: uint64(i + 1), + EthBlockHeight: uint64(i + 1), + } + claim, err := codectypes.NewAnyWithValue(&msg) + require.NoError(t, err) + + hash, err := msg.ClaimHash() + require.NoError(t, err) + + att := &types.Attestation{ + Observed: false, + Votes: []string{}, + Height: uint64(sdkCtx.BlockHeight()), + Claim: claim, + } + + k.SetAttestation(ctx, chainReferenceID, uint64(i+1), hash, att) + } + }, + expected: []uint64{1, 2, 3}, + }, + { + name: "three observed messages for current compass", + setup: func(ctx context.Context, k Keeper) { + sdkCtx := sdktypes.UnwrapSDKContext(ctx) + + for i := 0; i < 3; i++ { + msg := types.MsgLightNodeSaleClaim{ + SkywayNonce: uint64(i + 1), + EthBlockHeight: uint64(i + 1), + } + claim, err := codectypes.NewAnyWithValue(&msg) + require.NoError(t, err) + + hash, err := msg.ClaimHash() + require.NoError(t, err) + + att := &types.Attestation{ + Observed: true, + Votes: []string{}, + Height: uint64(sdkCtx.BlockHeight()), + Claim: claim, + } + + k.SetAttestation(ctx, chainReferenceID, uint64(i+1), hash, att) + } + }, + expected: nil, + }, + { + name: "unobserved message already signed by validator", + setup: func(ctx context.Context, k Keeper) { + sdkCtx := sdktypes.UnwrapSDKContext(ctx) + + for i := 0; i < 3; i++ { + msg := types.MsgLightNodeSaleClaim{ + SkywayNonce: uint64(i + 1), + EthBlockHeight: uint64(i + 1), + } + claim, err := codectypes.NewAnyWithValue(&msg) + require.NoError(t, err) + + hash, err := msg.ClaimHash() + require.NoError(t, err) + + att := &types.Attestation{ + Observed: true, + Votes: []string{address}, + Height: uint64(sdkCtx.BlockHeight()), + Claim: claim, + } + + k.SetAttestation(ctx, chainReferenceID, uint64(i+1), hash, att) + } + }, + expected: nil, + }, + { + name: "unobserved messages for current and porevious compass", + setup: func(ctx context.Context, k Keeper) { + sdkCtx := sdktypes.UnwrapSDKContext(ctx) + + k.setLatestCompassID(ctx, chainReferenceID, "2") + + msg := types.MsgLightNodeSaleClaim{ + SkywayNonce: 2, + EthBlockHeight: 2, + CompassId: "1", + } + claim, err := codectypes.NewAnyWithValue(&msg) + require.NoError(t, err) + + hash, err := msg.ClaimHash() + require.NoError(t, err) + + att := &types.Attestation{ + Observed: false, + Votes: []string{}, + Height: uint64(sdkCtx.BlockHeight()), + Claim: claim, + } + + k.SetAttestation(ctx, chainReferenceID, 2, hash, att) + + msg = types.MsgLightNodeSaleClaim{ + SkywayNonce: 1, + EthBlockHeight: 1, + CompassId: "2", + } + claim, err = codectypes.NewAnyWithValue(&msg) + require.NoError(t, err) + + hash, err = msg.ClaimHash() + require.NoError(t, err) + + att = &types.Attestation{ + Observed: false, + Votes: []string{}, + Height: uint64(sdkCtx.BlockHeight()), + Claim: claim, + } + + k.SetAttestation(ctx, chainReferenceID, 1, hash, att) + }, + expected: []uint64{1}, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + input := CreateTestEnv(t) + + k := input.SkywayKeeper + ctx := input.Context + + tt.setup(ctx, k) + + req := &types.QueryUnobservedBlocksByAddrRequest{ + ChainReferenceId: chainReferenceID, + Address: address, + } + + res, err := k.GetUnobservedBlocksByAddr(ctx, req) + require.NoError(t, err) + require.Equal(t, tt.expected, res.Blocks) + }) + } +} diff --git a/x/skyway/types/query.pb.go b/x/skyway/types/query.pb.go index a3766693..afc60b91 100644 --- a/x/skyway/types/query.pb.go +++ b/x/skyway/types/query.pb.go @@ -1532,6 +1532,102 @@ func (m *QueryLastPendingBatchForGasEstimationResponse) GetBatch() []OutgoingTxB return nil } +type QueryUnobservedBlocksByAddrRequest struct { + ChainReferenceId string `protobuf:"bytes,1,opt,name=chain_reference_id,json=chainReferenceId,proto3" json:"chain_reference_id,omitempty"` + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *QueryUnobservedBlocksByAddrRequest) Reset() { *m = QueryUnobservedBlocksByAddrRequest{} } +func (m *QueryUnobservedBlocksByAddrRequest) String() string { return proto.CompactTextString(m) } +func (*QueryUnobservedBlocksByAddrRequest) ProtoMessage() {} +func (*QueryUnobservedBlocksByAddrRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_933fccfef6a08c1d, []int{30} +} +func (m *QueryUnobservedBlocksByAddrRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryUnobservedBlocksByAddrRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryUnobservedBlocksByAddrRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryUnobservedBlocksByAddrRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryUnobservedBlocksByAddrRequest.Merge(m, src) +} +func (m *QueryUnobservedBlocksByAddrRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryUnobservedBlocksByAddrRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryUnobservedBlocksByAddrRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryUnobservedBlocksByAddrRequest proto.InternalMessageInfo + +func (m *QueryUnobservedBlocksByAddrRequest) GetChainReferenceId() string { + if m != nil { + return m.ChainReferenceId + } + return "" +} + +func (m *QueryUnobservedBlocksByAddrRequest) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +type QueryUnobservedBlocksByAddrResponse struct { + Blocks []uint64 `protobuf:"varint,1,rep,packed,name=blocks,proto3" json:"blocks,omitempty"` +} + +func (m *QueryUnobservedBlocksByAddrResponse) Reset() { *m = QueryUnobservedBlocksByAddrResponse{} } +func (m *QueryUnobservedBlocksByAddrResponse) String() string { return proto.CompactTextString(m) } +func (*QueryUnobservedBlocksByAddrResponse) ProtoMessage() {} +func (*QueryUnobservedBlocksByAddrResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_933fccfef6a08c1d, []int{31} +} +func (m *QueryUnobservedBlocksByAddrResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryUnobservedBlocksByAddrResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryUnobservedBlocksByAddrResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryUnobservedBlocksByAddrResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryUnobservedBlocksByAddrResponse.Merge(m, src) +} +func (m *QueryUnobservedBlocksByAddrResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryUnobservedBlocksByAddrResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryUnobservedBlocksByAddrResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryUnobservedBlocksByAddrResponse proto.InternalMessageInfo + +func (m *QueryUnobservedBlocksByAddrResponse) GetBlocks() []uint64 { + if m != nil { + return m.Blocks + } + return nil +} + func init() { proto.RegisterType((*QueryParamsRequest)(nil), "palomachain.paloma.skyway.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "palomachain.paloma.skyway.QueryParamsResponse") @@ -1564,6 +1660,8 @@ func init() { proto.RegisterType((*QueryLightNodeSaleContractsResponse)(nil), "palomachain.paloma.skyway.QueryLightNodeSaleContractsResponse") proto.RegisterType((*QueryLastPendingBatchForGasEstimationRequest)(nil), "palomachain.paloma.skyway.QueryLastPendingBatchForGasEstimationRequest") proto.RegisterType((*QueryLastPendingBatchForGasEstimationResponse)(nil), "palomachain.paloma.skyway.QueryLastPendingBatchForGasEstimationResponse") + proto.RegisterType((*QueryUnobservedBlocksByAddrRequest)(nil), "palomachain.paloma.skyway.QueryUnobservedBlocksByAddrRequest") + proto.RegisterType((*QueryUnobservedBlocksByAddrResponse)(nil), "palomachain.paloma.skyway.QueryUnobservedBlocksByAddrResponse") } func init() { @@ -1571,119 +1669,124 @@ func init() { } var fileDescriptor_933fccfef6a08c1d = []byte{ - // 1785 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0xdd, 0x6f, 0xd4, 0xc6, - 0x16, 0x8f, 0x43, 0xbe, 0x98, 0x04, 0xc8, 0x1d, 0xa2, 0x90, 0x98, 0x4b, 0x08, 0xe6, 0x33, 0x21, - 0x5e, 0x93, 0x04, 0xee, 0x85, 0x7b, 0x73, 0xe1, 0x66, 0xf3, 0xb1, 0x97, 0x90, 0x0b, 0xe9, 0x26, - 0x45, 0x55, 0x55, 0xd5, 0xf2, 0xae, 0x27, 0x8e, 0x1b, 0xaf, 0x67, 0xf1, 0xcc, 0x42, 0x56, 0x88, - 0x97, 0xfe, 0x01, 0x6d, 0x45, 0x5f, 0xfa, 0xd6, 0xe7, 0x4a, 0x15, 0x55, 0xff, 0x84, 0xf6, 0x89, - 0xbe, 0x21, 0x55, 0xad, 0x78, 0x42, 0x15, 0xf4, 0xb9, 0x7d, 0x47, 0xaa, 0x54, 0x79, 0x3c, 0xf6, - 0xda, 0xc4, 0x5f, 0xd9, 0xf0, 0xd0, 0xa7, 0xdd, 0x19, 0xcf, 0x39, 0xe7, 0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 0x43, 0x11, 0x4d, 0x0e, 0x2f, 0xe7, 0x42, - 0xf2, 0xc6, 0x0b, 0x02, 0xf1, 0xca, 0x1e, 0xad, 0x38, 0xf2, 0x69, 0x86, 0xfc, 0x22, 0x9c, 0xc8, - 0x44, 0xee, 0xab, 0x7b, 0xf8, 0x9d, 0x00, 0x06, 0xc2, 0xe5, 0x36, 0x9c, 0xcd, 0x0a, 0x1d, 0x23, - 0x36, 0xc5, 0xcb, 0x7b, 0x33, 0xe2, 0x70, 0x97, 0x19, 0xdc, 0xff, 0xc2, 0xeb, 0x29, 0x70, 0x59, - 0xd9, 0x2f, 0x53, 0x2c, 0x33, 0xed, 0x10, 0x9f, 0x41, 0x2e, 0x87, 0xb0, 0x1e, 0xcc, 0xe6, 0x10, - 0xa3, 0x4e, 0xb3, 0x39, 0xc4, 0x49, 0xce, 0x5c, 0x1c, 0x18, 0x74, 0x97, 0x03, 0x23, 0x13, 0xcf, - 0xe1, 0x7b, 0x01, 0x1c, 0x29, 0x21, 0x1a, 0x16, 0x72, 0xd9, 0x34, 0x62, 0x04, 0x6d, 0x36, 0x8d, - 0x38, 0xad, 0x28, 0x2d, 0x32, 0x1a, 0xd7, 0xe1, 0x9c, 0x92, 0xeb, 0x05, 0x7a, 0xc2, 0x56, 0xfe, - 0x5a, 0x00, 0x83, 0x25, 0x44, 0x23, 0x42, 0x30, 0xbb, 0x40, 0x8a, 0x0c, 0xcf, 0x4e, 0xfd, 0x58, - 0x99, 0x29, 0xcd, 0x30, 0x02, 0x53, 0x70, 0x32, 0x77, 0x2e, 0x11, 0xf8, 0xb3, 0x00, 0x86, 0x4b, - 0x88, 0xc6, 0x89, 0xc8, 0xcc, 0xa9, 0x8f, 0x31, 0xca, 0x3e, 0x75, 0x52, 0xa4, 0xa6, 0xb4, 0xc2, - 0x08, 0x2c, 0xc2, 0x62, 0x5a, 0xa1, 0xc7, 0x2b, 0x21, 0x57, 0xc9, 0xba, 0x3c, 0x1c, 0xe6, 0x42, - 0x79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0x7f, 0x35, 0xd6, 0xf1, 0xfe, 0x54, 0x48, 0xa9, - 0xc6, 0x44, 0xdd, 0x89, 0x7c, 0xa6, 0xaa, 0xf4, 0xb0, 0x75, 0x9e, 0xfd, 0x33, 0x00, 0x00, 0xff, - 0xff, 0x5a, 0xc2, 0xef, 0xeb, 0xf1, 0x1c, 0x00, 0x00, + // 1868 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0xcd, 0x6f, 0x14, 0xc9, + 0x15, 0x77, 0x1b, 0x7f, 0x51, 0x36, 0xe0, 0x14, 0x96, 0xb1, 0x27, 0xb1, 0x31, 0xcd, 0xa7, 0x8d, + 0x7b, 0x1a, 0xdb, 0x90, 0x40, 0x62, 0x20, 0x1e, 0x7f, 0x4c, 0x6c, 0x1c, 0x30, 0x63, 0x83, 0xa2, + 0x28, 0x4a, 0xab, 0x67, 0xba, 0xdc, 0xee, 0xb8, 0xa7, 0x6b, 0xe8, 0xea, 0x01, 0x8f, 0x10, 0x97, + 0xfc, 0x01, 0x49, 0x44, 0x2e, 0x39, 0x25, 0xe7, 0x48, 0xab, 0x5d, 0xed, 0x9f, 0xb0, 0x7b, 0x62, + 0x6f, 0x48, 0xab, 0x5d, 0x71, 0x42, 0x2b, 0xd8, 0xeb, 0xee, 0xde, 0x91, 0x56, 0x5a, 0x75, 0xf5, + 0xeb, 0x9e, 0x6e, 0xdc, 0x1f, 0xe3, 0x31, 0x87, 0x3d, 0xd9, 0x55, 0x5d, 0xef, 0xbd, 0xdf, 0xaf, + 0xea, 0x55, 0xd5, 0xfb, 0xd5, 0xa0, 0xf3, 0x35, 0xd5, 0xa4, 0x55, 0xb5, 0xb2, 0xa3, 0x1a, 0x96, + 0xec, 0xfd, 0x2f, 0xb3, 0xdd, 0xc6, 0x13, 0xb5, 0x21, 0x3f, 0xaa, 0x13, 0xbb, 0x91, 0xaf, 0xd9, + 0xd4, 0xa1, 0x78, 0x34, 0x34, 0x2c, 0xef, 0xfd, 0x9f, 0xf7, 0x86, 0xe5, 0x86, 0x74, 0xaa, 0x53, + 0x3e, 0x4a, 0x76, 0xff, 0xf3, 0x0c, 0x72, 0xbf, 0xd2, 0x29, 0xd5, 0x4d, 0x22, 0xab, 0x35, 0x43, + 0x56, 0x2d, 0x8b, 0x3a, 0xaa, 0x63, 0x50, 0x8b, 0xc1, 0xd7, 0x5f, 0xc2, 0x57, 0xde, 0x2a, 0xd7, + 0xb7, 0x65, 0x52, 0xad, 0x39, 0x10, 0x2b, 0x77, 0x39, 0x19, 0x92, 0xea, 0x38, 0x84, 0x79, 0xae, + 0x60, 0x70, 0x0a, 0xfe, 0xb2, 0xea, 0x54, 0x76, 0x60, 0xd8, 0x54, 0xca, 0x30, 0xdb, 0xd0, 0x74, + 0xa2, 0x38, 0xea, 0x1e, 0x8c, 0xbd, 0x96, 0x3d, 0xd6, 0x56, 0x2d, 0xb6, 0x4d, 0x6c, 0xc5, 0x34, + 0xaa, 0x86, 0x03, 0x66, 0x17, 0x93, 0xcd, 0x74, 0x62, 0x11, 0x66, 0xf8, 0xe4, 0xaf, 0x27, 0x0f, + 0x34, 0x0d, 0x7d, 0xc7, 0x51, 0x2c, 0xaa, 0x11, 0x85, 0xa9, 0x26, 0x51, 0x2a, 0xd4, 0x72, 0x6c, + 0xb5, 0xe2, 0x87, 0x38, 0x97, 0x6c, 0x59, 0x65, 0xba, 0xef, 0xff, 0x42, 0xf2, 0xa8, 0x9a, 0x6a, + 0xab, 0x55, 0x96, 0xed, 0xad, 0x46, 0xa9, 0x99, 0x3d, 0xc1, 0x4e, 0xa3, 0x46, 0xc0, 0x99, 0x38, + 0x84, 0xf0, 0x7d, 0x37, 0x5f, 0x36, 0x78, 0x84, 0x12, 0x79, 0x54, 0x27, 0xcc, 0x11, 0x1f, 0xa2, + 0x93, 0x91, 0x5e, 0x56, 0xa3, 0x16, 0x23, 0xf8, 0x36, 0xea, 0xf1, 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x76, 0xba, 0xca, 0x14, + 0xef, 0x73, 0xda, 0x77, 0xf0, 0x6a, 0x0a, 0xed, 0x7a, 0xe0, 0xc2, 0xab, 0x0c, 0x59, 0x53, 0xf6, + 0xc4, 0xf0, 0x2d, 0xac, 0xbc, 0x78, 0x33, 0x2e, 0xbc, 0x7c, 0x33, 0x2e, 0x7c, 0xf3, 0x66, 0x5c, + 0xf8, 0xd7, 0xdb, 0xf1, 0x8e, 0x97, 0x6f, 0xc7, 0x3b, 0x5e, 0xbd, 0x1d, 0xef, 0xf8, 0xf3, 0x74, + 0xe8, 0x19, 0x21, 0x26, 0xdc, 0x5e, 0xe4, 0x37, 0xc4, 0x72, 0x0f, 0xcf, 0xeb, 0xb9, 0x9f, 0x02, + 0x00, 0x00, 0xff, 0xff, 0xdf, 0x88, 0x94, 0x7b, 0x8e, 0x1e, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1715,6 +1818,7 @@ type QueryClient interface { GetBridgeTransferLimits(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*QueryBridgeTransferLimitsResponse, error) GetLightNodeSaleContracts(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*QueryLightNodeSaleContractsResponse, error) LastPendingBatchForGasEstimation(ctx context.Context, in *QueryLastPendingBatchForGasEstimationRequest, opts ...grpc.CallOption) (*QueryLastPendingBatchForGasEstimationResponse, error) + GetUnobservedBlocksByAddr(ctx context.Context, in *QueryUnobservedBlocksByAddrRequest, opts ...grpc.CallOption) (*QueryUnobservedBlocksByAddrResponse, error) } type queryClient struct { @@ -1878,6 +1982,15 @@ func (c *queryClient) LastPendingBatchForGasEstimation(ctx context.Context, in * return out, nil } +func (c *queryClient) GetUnobservedBlocksByAddr(ctx context.Context, in *QueryUnobservedBlocksByAddrRequest, opts ...grpc.CallOption) (*QueryUnobservedBlocksByAddrResponse, error) { + out := new(QueryUnobservedBlocksByAddrResponse) + err := c.cc.Invoke(ctx, "/palomachain.paloma.skyway.Query/GetUnobservedBlocksByAddr", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) @@ -1897,6 +2010,7 @@ type QueryServer interface { GetBridgeTransferLimits(context.Context, *emptypb.Empty) (*QueryBridgeTransferLimitsResponse, error) GetLightNodeSaleContracts(context.Context, *emptypb.Empty) (*QueryLightNodeSaleContractsResponse, error) LastPendingBatchForGasEstimation(context.Context, *QueryLastPendingBatchForGasEstimationRequest) (*QueryLastPendingBatchForGasEstimationResponse, error) + GetUnobservedBlocksByAddr(context.Context, *QueryUnobservedBlocksByAddrRequest) (*QueryUnobservedBlocksByAddrResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1954,6 +2068,9 @@ func (*UnimplementedQueryServer) GetLightNodeSaleContracts(ctx context.Context, func (*UnimplementedQueryServer) LastPendingBatchForGasEstimation(ctx context.Context, req *QueryLastPendingBatchForGasEstimationRequest) (*QueryLastPendingBatchForGasEstimationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method LastPendingBatchForGasEstimation not implemented") } +func (*UnimplementedQueryServer) GetUnobservedBlocksByAddr(ctx context.Context, req *QueryUnobservedBlocksByAddrRequest) (*QueryUnobservedBlocksByAddrResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetUnobservedBlocksByAddr not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -2265,6 +2382,24 @@ func _Query_LastPendingBatchForGasEstimation_Handler(srv interface{}, ctx contex return interceptor(ctx, in, info, handler) } +func _Query_GetUnobservedBlocksByAddr_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryUnobservedBlocksByAddrRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetUnobservedBlocksByAddr(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/palomachain.paloma.skyway.Query/GetUnobservedBlocksByAddr", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetUnobservedBlocksByAddr(ctx, req.(*QueryUnobservedBlocksByAddrRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "palomachain.paloma.skyway.Query", HandlerType: (*QueryServer)(nil), @@ -2337,6 +2472,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "LastPendingBatchForGasEstimation", Handler: _Query_LastPendingBatchForGasEstimation_Handler, }, + { + MethodName: "GetUnobservedBlocksByAddr", + Handler: _Query_GetUnobservedBlocksByAddr_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "palomachain/paloma/skyway/query.proto", @@ -3435,6 +3574,84 @@ func (m *QueryLastPendingBatchForGasEstimationResponse) MarshalToSizedBuffer(dAt return len(dAtA) - i, nil } +func (m *QueryUnobservedBlocksByAddrRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryUnobservedBlocksByAddrRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryUnobservedBlocksByAddrRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x12 + } + if len(m.ChainReferenceId) > 0 { + i -= len(m.ChainReferenceId) + copy(dAtA[i:], m.ChainReferenceId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ChainReferenceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryUnobservedBlocksByAddrResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryUnobservedBlocksByAddrResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryUnobservedBlocksByAddrResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Blocks) > 0 { + dAtA6 := make([]byte, len(m.Blocks)*10) + var j5 int + for _, num := range m.Blocks { + for num >= 1<<7 { + dAtA6[j5] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j5++ + } + dAtA6[j5] = uint8(num) + j5++ + } + i -= j5 + copy(dAtA[i:], dAtA6[:j5]) + i = encodeVarintQuery(dAtA, i, uint64(j5)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -3908,6 +4125,39 @@ func (m *QueryLastPendingBatchForGasEstimationResponse) Size() (n int) { return n } +func (m *QueryUnobservedBlocksByAddrRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ChainReferenceId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryUnobservedBlocksByAddrResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Blocks) > 0 { + l = 0 + for _, e := range m.Blocks { + l += sovQuery(uint64(e)) + } + n += 1 + sovQuery(uint64(l)) + l + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -6783,6 +7033,246 @@ func (m *QueryLastPendingBatchForGasEstimationResponse) Unmarshal(dAtA []byte) e } return nil } +func (m *QueryUnobservedBlocksByAddrRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryUnobservedBlocksByAddrRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryUnobservedBlocksByAddrRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainReferenceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChainReferenceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryUnobservedBlocksByAddrResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryUnobservedBlocksByAddrResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryUnobservedBlocksByAddrResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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.Blocks = append(m.Blocks, 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.Blocks) == 0 { + m.Blocks = 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.Blocks = append(m.Blocks, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Blocks", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/skyway/types/query.pb.gw.go b/x/skyway/types/query.pb.gw.go index 5ddfee76..34a4deba 100644 --- a/x/skyway/types/query.pb.gw.go +++ b/x/skyway/types/query.pb.gw.go @@ -844,6 +844,78 @@ func local_request_Query_LastPendingBatchForGasEstimation_0(ctx context.Context, } +var ( + filter_Query_GetUnobservedBlocksByAddr_0 = &utilities.DoubleArray{Encoding: map[string]int{"chain_reference_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Query_GetUnobservedBlocksByAddr_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryUnobservedBlocksByAddrRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["chain_reference_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chain_reference_id") + } + + protoReq.ChainReferenceId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chain_reference_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_GetUnobservedBlocksByAddr_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetUnobservedBlocksByAddr(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_GetUnobservedBlocksByAddr_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryUnobservedBlocksByAddrRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["chain_reference_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chain_reference_id") + } + + protoReq.ChainReferenceId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chain_reference_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_GetUnobservedBlocksByAddr_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetUnobservedBlocksByAddr(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -1241,6 +1313,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_GetUnobservedBlocksByAddr_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_GetUnobservedBlocksByAddr_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_GetUnobservedBlocksByAddr_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1622,6 +1717,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_GetUnobservedBlocksByAddr_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_GetUnobservedBlocksByAddr_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_GetUnobservedBlocksByAddr_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1659,6 +1774,8 @@ var ( pattern_Query_GetLightNodeSaleContracts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"palomachain", "paloma", "skyway", "light-node-sale-contracts"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_LastPendingBatchForGasEstimation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"palomachain", "paloma", "skyway", "pending-batch-for-gas-estimation", "chain_reference_id"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_GetUnobservedBlocksByAddr_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"palomachain", "paloma", "skyway", "unobserved-blocks-by-addr", "chain_reference_id"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -1695,4 +1812,6 @@ var ( forward_Query_GetLightNodeSaleContracts_0 = runtime.ForwardResponseMessage forward_Query_LastPendingBatchForGasEstimation_0 = runtime.ForwardResponseMessage + + forward_Query_GetUnobservedBlocksByAddr_0 = runtime.ForwardResponseMessage )