diff --git a/app/test/qgb_rpc_test.go b/app/test/qgb_rpc_test.go index f3b822de1d..6ec7b47592 100644 --- a/app/test/qgb_rpc_test.go +++ b/app/test/qgb_rpc_test.go @@ -54,6 +54,16 @@ func TestBlobstreamRPCQueries(t *testing.T) { return err }, }, + { + name: "earliest attestation nonce", + req: func() error { + _, err := queryClient.EarliestAttestationNonce( + context.Background(), + &types.QueryEarliestAttestationNonceRequest{}, + ) + return err + }, + }, { name: "data commitment range for height", req: func() error { diff --git a/proto/celestia/qgb/v1/query.proto b/proto/celestia/qgb/v1/query.proto index bfb19047c5..83cc445136 100644 --- a/proto/celestia/qgb/v1/query.proto +++ b/proto/celestia/qgb/v1/query.proto @@ -30,6 +30,11 @@ service Query { returns (QueryLatestAttestationNonceResponse) { option (google.api.http).get = "/qgb/v1/attestations/nonce/latest"; } + // EarliestAttestationNonce queries the earliest attestation nonce. + rpc EarliestAttestationNonce(QueryEarliestAttestationNonceRequest) + returns (QueryEarliestAttestationNonceResponse) { + option (google.api.http).get = "/qgb/v1/attestations/nonce/earliest"; + } // LatestValsetRequestBeforeNonce Queries latest Valset request before nonce. // And, even if the current nonce is a valset, it will return the previous // one. @@ -92,6 +97,11 @@ message QueryLatestAttestationNonceRequest {} // QueryLatestAttestationNonceResponse latest attestation nonce response message QueryLatestAttestationNonceResponse { uint64 nonce = 1; } +// QueryEarliestAttestationNonceRequest earliest attestation nonce request +message QueryEarliestAttestationNonceRequest {} +// QueryEarliestAttestationNonceResponse earliest attestation nonce response +message QueryEarliestAttestationNonceResponse { uint64 nonce = 1; } + // QueryLatestValsetRequestBeforeNonceRequest latest Valset request before // universal nonce request message QueryLatestValsetRequestBeforeNonceRequest { uint64 nonce = 1; } diff --git a/x/blobstream/keeper/query_general.go b/x/blobstream/keeper/query_general.go index f035153f07..a4546fe33f 100644 --- a/x/blobstream/keeper/query_general.go +++ b/x/blobstream/keeper/query_general.go @@ -17,6 +17,16 @@ func (k Keeper) LatestUnbondingHeight( }, nil } +// EarliestAttestationNonce queries the earliest attestation nonce. +func (k Keeper) EarliestAttestationNonce( + c context.Context, + _ *types.QueryEarliestAttestationNonceRequest, +) (*types.QueryEarliestAttestationNonceResponse, error) { + return &types.QueryEarliestAttestationNonceResponse{ + Nonce: k.GetEarliestAvailableAttestationNonce(sdk.UnwrapSDKContext(c)), + }, nil +} + func (k Keeper) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { params := k.GetParams(sdk.UnwrapSDKContext(c)) return &types.QueryParamsResponse{ diff --git a/x/blobstream/types/query.pb.go b/x/blobstream/types/query.pb.go index 3917870f41..eb235ff5af 100644 --- a/x/blobstream/types/query.pb.go +++ b/x/blobstream/types/query.pb.go @@ -290,6 +290,88 @@ func (m *QueryLatestAttestationNonceResponse) GetNonce() uint64 { return 0 } +// QueryEarliestAttestationNonceRequest earliest attestation nonce request +type QueryEarliestAttestationNonceRequest struct { +} + +func (m *QueryEarliestAttestationNonceRequest) Reset() { *m = QueryEarliestAttestationNonceRequest{} } +func (m *QueryEarliestAttestationNonceRequest) String() string { return proto.CompactTextString(m) } +func (*QueryEarliestAttestationNonceRequest) ProtoMessage() {} +func (*QueryEarliestAttestationNonceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c8535c57355a2b91, []int{6} +} +func (m *QueryEarliestAttestationNonceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryEarliestAttestationNonceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryEarliestAttestationNonceRequest.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 *QueryEarliestAttestationNonceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryEarliestAttestationNonceRequest.Merge(m, src) +} +func (m *QueryEarliestAttestationNonceRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryEarliestAttestationNonceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryEarliestAttestationNonceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryEarliestAttestationNonceRequest proto.InternalMessageInfo + +// QueryEarliestAttestationNonceResponse earliest attestation nonce response +type QueryEarliestAttestationNonceResponse struct { + Nonce uint64 `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"` +} + +func (m *QueryEarliestAttestationNonceResponse) Reset() { *m = QueryEarliestAttestationNonceResponse{} } +func (m *QueryEarliestAttestationNonceResponse) String() string { return proto.CompactTextString(m) } +func (*QueryEarliestAttestationNonceResponse) ProtoMessage() {} +func (*QueryEarliestAttestationNonceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c8535c57355a2b91, []int{7} +} +func (m *QueryEarliestAttestationNonceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryEarliestAttestationNonceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryEarliestAttestationNonceResponse.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 *QueryEarliestAttestationNonceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryEarliestAttestationNonceResponse.Merge(m, src) +} +func (m *QueryEarliestAttestationNonceResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryEarliestAttestationNonceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryEarliestAttestationNonceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryEarliestAttestationNonceResponse proto.InternalMessageInfo + +func (m *QueryEarliestAttestationNonceResponse) GetNonce() uint64 { + if m != nil { + return m.Nonce + } + return 0 +} + // QueryLatestValsetRequestBeforeNonceRequest latest Valset request before // universal nonce request type QueryLatestValsetRequestBeforeNonceRequest struct { @@ -304,7 +386,7 @@ func (m *QueryLatestValsetRequestBeforeNonceRequest) String() string { } func (*QueryLatestValsetRequestBeforeNonceRequest) ProtoMessage() {} func (*QueryLatestValsetRequestBeforeNonceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c8535c57355a2b91, []int{6} + return fileDescriptor_c8535c57355a2b91, []int{8} } func (m *QueryLatestValsetRequestBeforeNonceRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -354,7 +436,7 @@ func (m *QueryLatestValsetRequestBeforeNonceResponse) String() string { } func (*QueryLatestValsetRequestBeforeNonceResponse) ProtoMessage() {} func (*QueryLatestValsetRequestBeforeNonceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c8535c57355a2b91, []int{7} + return fileDescriptor_c8535c57355a2b91, []int{9} } func (m *QueryLatestValsetRequestBeforeNonceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -398,7 +480,7 @@ func (m *QueryLatestUnbondingHeightRequest) Reset() { *m = QueryLatestUn func (m *QueryLatestUnbondingHeightRequest) String() string { return proto.CompactTextString(m) } func (*QueryLatestUnbondingHeightRequest) ProtoMessage() {} func (*QueryLatestUnbondingHeightRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c8535c57355a2b91, []int{8} + return fileDescriptor_c8535c57355a2b91, []int{10} } func (m *QueryLatestUnbondingHeightRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -436,7 +518,7 @@ func (m *QueryLatestUnbondingHeightResponse) Reset() { *m = QueryLatestU func (m *QueryLatestUnbondingHeightResponse) String() string { return proto.CompactTextString(m) } func (*QueryLatestUnbondingHeightResponse) ProtoMessage() {} func (*QueryLatestUnbondingHeightResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c8535c57355a2b91, []int{9} + return fileDescriptor_c8535c57355a2b91, []int{11} } func (m *QueryLatestUnbondingHeightResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -480,7 +562,7 @@ func (m *QueryLatestDataCommitmentRequest) Reset() { *m = QueryLatestDat func (m *QueryLatestDataCommitmentRequest) String() string { return proto.CompactTextString(m) } func (*QueryLatestDataCommitmentRequest) ProtoMessage() {} func (*QueryLatestDataCommitmentRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c8535c57355a2b91, []int{10} + return fileDescriptor_c8535c57355a2b91, []int{12} } func (m *QueryLatestDataCommitmentRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -518,7 +600,7 @@ func (m *QueryLatestDataCommitmentResponse) Reset() { *m = QueryLatestDa func (m *QueryLatestDataCommitmentResponse) String() string { return proto.CompactTextString(m) } func (*QueryLatestDataCommitmentResponse) ProtoMessage() {} func (*QueryLatestDataCommitmentResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c8535c57355a2b91, []int{11} + return fileDescriptor_c8535c57355a2b91, []int{13} } func (m *QueryLatestDataCommitmentResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -565,7 +647,7 @@ func (m *QueryDataCommitmentRangeForHeightRequest) Reset() { func (m *QueryDataCommitmentRangeForHeightRequest) String() string { return proto.CompactTextString(m) } func (*QueryDataCommitmentRangeForHeightRequest) ProtoMessage() {} func (*QueryDataCommitmentRangeForHeightRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c8535c57355a2b91, []int{12} + return fileDescriptor_c8535c57355a2b91, []int{14} } func (m *QueryDataCommitmentRangeForHeightRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -614,7 +696,7 @@ func (m *QueryDataCommitmentRangeForHeightResponse) String() string { } func (*QueryDataCommitmentRangeForHeightResponse) ProtoMessage() {} func (*QueryDataCommitmentRangeForHeightResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c8535c57355a2b91, []int{13} + return fileDescriptor_c8535c57355a2b91, []int{15} } func (m *QueryDataCommitmentRangeForHeightResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -659,7 +741,7 @@ func (m *QueryEVMAddressRequest) Reset() { *m = QueryEVMAddressRequest{} func (m *QueryEVMAddressRequest) String() string { return proto.CompactTextString(m) } func (*QueryEVMAddressRequest) ProtoMessage() {} func (*QueryEVMAddressRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c8535c57355a2b91, []int{14} + return fileDescriptor_c8535c57355a2b91, []int{16} } func (m *QueryEVMAddressRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -704,7 +786,7 @@ func (m *QueryEVMAddressResponse) Reset() { *m = QueryEVMAddressResponse func (m *QueryEVMAddressResponse) String() string { return proto.CompactTextString(m) } func (*QueryEVMAddressResponse) ProtoMessage() {} func (*QueryEVMAddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c8535c57355a2b91, []int{15} + return fileDescriptor_c8535c57355a2b91, []int{17} } func (m *QueryEVMAddressResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -747,6 +829,8 @@ func init() { proto.RegisterType((*QueryAttestationRequestByNonceResponse)(nil), "celestia.qgb.v1.QueryAttestationRequestByNonceResponse") proto.RegisterType((*QueryLatestAttestationNonceRequest)(nil), "celestia.qgb.v1.QueryLatestAttestationNonceRequest") proto.RegisterType((*QueryLatestAttestationNonceResponse)(nil), "celestia.qgb.v1.QueryLatestAttestationNonceResponse") + proto.RegisterType((*QueryEarliestAttestationNonceRequest)(nil), "celestia.qgb.v1.QueryEarliestAttestationNonceRequest") + proto.RegisterType((*QueryEarliestAttestationNonceResponse)(nil), "celestia.qgb.v1.QueryEarliestAttestationNonceResponse") proto.RegisterType((*QueryLatestValsetRequestBeforeNonceRequest)(nil), "celestia.qgb.v1.QueryLatestValsetRequestBeforeNonceRequest") proto.RegisterType((*QueryLatestValsetRequestBeforeNonceResponse)(nil), "celestia.qgb.v1.QueryLatestValsetRequestBeforeNonceResponse") proto.RegisterType((*QueryLatestUnbondingHeightRequest)(nil), "celestia.qgb.v1.QueryLatestUnbondingHeightRequest") @@ -762,61 +846,64 @@ func init() { func init() { proto.RegisterFile("celestia/qgb/v1/query.proto", fileDescriptor_c8535c57355a2b91) } var fileDescriptor_c8535c57355a2b91 = []byte{ - // 855 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xcf, 0x4f, 0x33, 0x45, - 0x18, 0xc7, 0xbb, 0xe6, 0x7d, 0x9b, 0xf8, 0x90, 0xbc, 0x2f, 0x4c, 0x4b, 0x91, 0x05, 0x17, 0xd8, - 0xf2, 0x53, 0x64, 0x27, 0x14, 0xc5, 0x08, 0x78, 0xa0, 0x8a, 0xc1, 0x04, 0x15, 0x9b, 0xc8, 0xc1, - 0x83, 0x64, 0xb6, 0x1d, 0x96, 0x8d, 0xdd, 0x9d, 0x76, 0x77, 0xdb, 0xd8, 0xa8, 0x17, 0xff, 0x02, - 0x13, 0x8f, 0x9e, 0xbd, 0x7a, 0xf2, 0xa4, 0x47, 0x2f, 0x84, 0x13, 0x89, 0x17, 0x4f, 0xc6, 0x80, - 0x7f, 0x88, 0xe9, 0xec, 0x4c, 0xd9, 0x76, 0xb7, 0xdb, 0x96, 0x78, 0xdb, 0x99, 0x79, 0xbe, 0xdf, - 0xe7, 0xf3, 0x0c, 0xec, 0xb7, 0x0b, 0x0b, 0x55, 0x5a, 0xa7, 0x7e, 0x60, 0x13, 0xdc, 0xb4, 0x4c, - 0xdc, 0xde, 0xc5, 0xcd, 0x16, 0xf5, 0x3a, 0x46, 0xc3, 0x63, 0x01, 0x43, 0x2f, 0xe5, 0xa1, 0xd1, - 0xb4, 0x4c, 0xa3, 0xbd, 0xab, 0xbe, 0x3e, 0x58, 0x6d, 0x51, 0x97, 0xfa, 0xb6, 0x1f, 0xd6, 0xab, - 0x31, 0xb3, 0xa0, 0xd3, 0xa0, 0xf2, 0x70, 0xd1, 0x62, 0xcc, 0xaa, 0x53, 0x4c, 0x1a, 0x36, 0x26, - 0xae, 0xcb, 0x02, 0x12, 0xd8, 0xcc, 0x95, 0xa7, 0x79, 0x8b, 0x59,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 0xc3, 0xb0, - 0xd7, 0xd5, 0xe1, 0x30, 0x10, 0xd1, 0xcf, 0x0a, 0xe4, 0x93, 0xf2, 0x1b, 0xed, 0xa6, 0x5d, 0x57, - 0xe2, 0xef, 0x81, 0x5a, 0x9a, 0x44, 0x22, 0x68, 0xd7, 0x39, 0xed, 0x32, 0xd2, 0x86, 0xd1, 0x8a, - 0x7f, 0xec, 0x6f, 0x01, 0x1e, 0x53, 0x0f, 0x6d, 0x24, 0x77, 0x8a, 0xc5, 0xab, 0xba, 0x39, 0xba, - 0x50, 0x80, 0x2c, 0x70, 0x90, 0x59, 0x94, 0x93, 0x20, 0x91, 0x38, 0x2d, 0x9f, 0xdf, 0xdc, 0x6b, - 0xca, 0xdd, 0xbd, 0xa6, 0xfc, 0x73, 0xaf, 0x29, 0x3f, 0x3c, 0x68, 0x99, 0xbb, 0x07, 0x2d, 0xf3, - 0xd7, 0x83, 0x96, 0xf9, 0x62, 0xdf, 0xb2, 0x83, 0xeb, 0x96, 0x69, 0x54, 0x99, 0x83, 0x65, 0x2b, - 0xe6, 0x59, 0xbd, 0xe7, 0x1d, 0xd2, 0x68, 0xe0, 0xaf, 0xb1, 0x59, 0x67, 0xa6, 0x1f, 0x78, 0x94, - 0x38, 0xe1, 0x77, 0xa5, 0x99, 0xe5, 0x5f, 0x3f, 0x7b, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x1d, - 0x22, 0x0e, 0x84, 0xc4, 0x0a, 0x00, 0x00, + // 910 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xcf, 0x8f, 0xdb, 0x44, + 0x14, 0xc7, 0x63, 0xd4, 0x46, 0xe2, 0x45, 0xea, 0x8f, 0x49, 0x9a, 0xed, 0xba, 0xc5, 0xbb, 0x75, + 0xb2, 0xe9, 0x96, 0x65, 0x3d, 0xda, 0x2c, 0x5d, 0x44, 0x5b, 0x0e, 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c, 0x30, 0x5f, 0x1c, 0x4c, 0xea, 0xb0, 0x70, 0x72, 0xf4, 0xb3, 0x06, 0x95, 0xb4, 0x8b, + 0x07, 0xed, 0xe5, 0xbd, 0xae, 0xd4, 0x8b, 0x4c, 0x6f, 0xae, 0x52, 0x22, 0x69, 0x1b, 0x9c, 0x76, + 0x13, 0x19, 0x59, 0xb4, 0xf2, 0x8b, 0xfc, 0x16, 0xe0, 0xcc, 0xae, 0xd1, 0xed, 0x8c, 0x6f, 0x29, + 0x79, 0x2f, 0xe8, 0xdb, 0x8b, 0x13, 0x25, 0xc8, 0x0d, 0x0e, 0x72, 0x0d, 0x95, 0x15, 0x48, 0xec, + 0x1e, 0x68, 0x3d, 0x79, 0x7e, 0x62, 0x68, 0x2f, 0x4f, 0x0c, 0xed, 0x9f, 0x13, 0x43, 0xfb, 0xe1, + 0xd4, 0x28, 0xbc, 0x3c, 0x35, 0x0a, 0x7f, 0x9d, 0x1a, 0x85, 0x2f, 0x0e, 0x1c, 0x37, 0x3a, 0x1e, + 0xda, 0x56, 0x87, 0x79, 0x58, 0xb5, 0x62, 0x81, 0x33, 0x7d, 0xde, 0x25, 0xfd, 0x3e, 0xfe, 0x1a, + 0xdb, 0x3d, 0x66, 0x87, 0x51, 0x40, 0x89, 0x27, 0xfe, 0x77, 0xdb, 0x45, 0xfe, 0xef, 0x70, 0xff, + 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x42, 0x6c, 0x12, 0x89, 0xe4, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -838,6 +925,8 @@ type QueryClient interface { AttestationRequestByNonce(ctx context.Context, in *QueryAttestationRequestByNonceRequest, opts ...grpc.CallOption) (*QueryAttestationRequestByNonceResponse, error) // LatestAttestationNonce queries latest attestation nonce. LatestAttestationNonce(ctx context.Context, in *QueryLatestAttestationNonceRequest, opts ...grpc.CallOption) (*QueryLatestAttestationNonceResponse, error) + // EarliestAttestationNonce queries the earliest attestation nonce. + EarliestAttestationNonce(ctx context.Context, in *QueryEarliestAttestationNonceRequest, opts ...grpc.CallOption) (*QueryEarliestAttestationNonceResponse, error) // LatestValsetRequestBeforeNonce Queries latest Valset request before nonce. // And, even if the current nonce is a valset, it will return the previous // one. @@ -891,6 +980,15 @@ func (c *queryClient) LatestAttestationNonce(ctx context.Context, in *QueryLates return out, nil } +func (c *queryClient) EarliestAttestationNonce(ctx context.Context, in *QueryEarliestAttestationNonceRequest, opts ...grpc.CallOption) (*QueryEarliestAttestationNonceResponse, error) { + out := new(QueryEarliestAttestationNonceResponse) + err := c.cc.Invoke(ctx, "/celestia.qgb.v1.Query/EarliestAttestationNonce", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) LatestValsetRequestBeforeNonce(ctx context.Context, in *QueryLatestValsetRequestBeforeNonceRequest, opts ...grpc.CallOption) (*QueryLatestValsetRequestBeforeNonceResponse, error) { out := new(QueryLatestValsetRequestBeforeNonceResponse) err := c.cc.Invoke(ctx, "/celestia.qgb.v1.Query/LatestValsetRequestBeforeNonce", in, out, opts...) @@ -945,6 +1043,8 @@ type QueryServer interface { AttestationRequestByNonce(context.Context, *QueryAttestationRequestByNonceRequest) (*QueryAttestationRequestByNonceResponse, error) // LatestAttestationNonce queries latest attestation nonce. LatestAttestationNonce(context.Context, *QueryLatestAttestationNonceRequest) (*QueryLatestAttestationNonceResponse, error) + // EarliestAttestationNonce queries the earliest attestation nonce. + EarliestAttestationNonce(context.Context, *QueryEarliestAttestationNonceRequest) (*QueryEarliestAttestationNonceResponse, error) // LatestValsetRequestBeforeNonce Queries latest Valset request before nonce. // And, even if the current nonce is a valset, it will return the previous // one. @@ -976,6 +1076,9 @@ func (*UnimplementedQueryServer) AttestationRequestByNonce(ctx context.Context, func (*UnimplementedQueryServer) LatestAttestationNonce(ctx context.Context, req *QueryLatestAttestationNonceRequest) (*QueryLatestAttestationNonceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method LatestAttestationNonce not implemented") } +func (*UnimplementedQueryServer) EarliestAttestationNonce(ctx context.Context, req *QueryEarliestAttestationNonceRequest) (*QueryEarliestAttestationNonceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EarliestAttestationNonce not implemented") +} func (*UnimplementedQueryServer) LatestValsetRequestBeforeNonce(ctx context.Context, req *QueryLatestValsetRequestBeforeNonceRequest) (*QueryLatestValsetRequestBeforeNonceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method LatestValsetRequestBeforeNonce not implemented") } @@ -1050,6 +1153,24 @@ func _Query_LatestAttestationNonce_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _Query_EarliestAttestationNonce_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryEarliestAttestationNonceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).EarliestAttestationNonce(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/celestia.qgb.v1.Query/EarliestAttestationNonce", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).EarliestAttestationNonce(ctx, req.(*QueryEarliestAttestationNonceRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_LatestValsetRequestBeforeNonce_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryLatestValsetRequestBeforeNonceRequest) if err := dec(in); err != nil { @@ -1156,6 +1277,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "LatestAttestationNonce", Handler: _Query_LatestAttestationNonce_Handler, }, + { + MethodName: "EarliestAttestationNonce", + Handler: _Query_EarliestAttestationNonce_Handler, + }, { MethodName: "LatestValsetRequestBeforeNonce", Handler: _Query_LatestValsetRequestBeforeNonce_Handler, @@ -1351,6 +1476,57 @@ func (m *QueryLatestAttestationNonceResponse) MarshalToSizedBuffer(dAtA []byte) return len(dAtA) - i, nil } +func (m *QueryEarliestAttestationNonceRequest) 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 *QueryEarliestAttestationNonceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryEarliestAttestationNonceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryEarliestAttestationNonceResponse) 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 *QueryEarliestAttestationNonceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryEarliestAttestationNonceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Nonce != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Nonce)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *QueryLatestValsetRequestBeforeNonceRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1723,6 +1899,27 @@ func (m *QueryLatestAttestationNonceResponse) Size() (n int) { return n } +func (m *QueryEarliestAttestationNonceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryEarliestAttestationNonceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Nonce != 0 { + n += 1 + sovQuery(uint64(m.Nonce)) + } + return n +} + func (m *QueryLatestValsetRequestBeforeNonceRequest) Size() (n int) { if m == nil { return 0 @@ -2255,6 +2452,125 @@ func (m *QueryLatestAttestationNonceResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryEarliestAttestationNonceRequest) 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: QueryEarliestAttestationNonceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryEarliestAttestationNonceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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 *QueryEarliestAttestationNonceResponse) 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: QueryEarliestAttestationNonceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryEarliestAttestationNonceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + m.Nonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 *QueryLatestValsetRequestBeforeNonceRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/blobstream/types/query.pb.gw.go b/x/blobstream/types/query.pb.gw.go index c7da4ad3a6..21c27b2546 100644 --- a/x/blobstream/types/query.pb.gw.go +++ b/x/blobstream/types/query.pb.gw.go @@ -123,6 +123,24 @@ func local_request_Query_LatestAttestationNonce_0(ctx context.Context, marshaler } +func request_Query_EarliestAttestationNonce_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryEarliestAttestationNonceRequest + var metadata runtime.ServerMetadata + + msg, err := client.EarliestAttestationNonce(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_EarliestAttestationNonce_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryEarliestAttestationNonceRequest + var metadata runtime.ServerMetadata + + msg, err := server.EarliestAttestationNonce(ctx, &protoReq) + return msg, metadata, err + +} + func request_Query_LatestValsetRequestBeforeNonce_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryLatestValsetRequestBeforeNonceRequest var metadata runtime.ServerMetadata @@ -360,6 +378,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_EarliestAttestationNonce_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_EarliestAttestationNonce_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_EarliestAttestationNonce_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_LatestValsetRequestBeforeNonce_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -576,6 +617,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_EarliestAttestationNonce_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_EarliestAttestationNonce_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_EarliestAttestationNonce_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_LatestValsetRequestBeforeNonce_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -686,6 +747,8 @@ var ( pattern_Query_LatestAttestationNonce_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"qgb", "v1", "attestations", "nonce", "latest"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_EarliestAttestationNonce_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"qgb", "v1", "attestations", "nonce", "earliest"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_LatestValsetRequestBeforeNonce_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"qgb", "v1", "valset", "request", "before", "nonce"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_LatestUnbondingHeight_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"qgb", "v1", "unbonding"}, "", runtime.AssumeColonVerbOpt(false))) @@ -704,6 +767,8 @@ var ( forward_Query_LatestAttestationNonce_0 = runtime.ForwardResponseMessage + forward_Query_EarliestAttestationNonce_0 = runtime.ForwardResponseMessage + forward_Query_LatestValsetRequestBeforeNonce_0 = runtime.ForwardResponseMessage forward_Query_LatestUnbondingHeight_0 = runtime.ForwardResponseMessage