diff --git a/grpc-server.go b/grpc-server.go index 7d98bf7b..db4814a6 100644 --- a/grpc-server.go +++ b/grpc-server.go @@ -555,8 +555,69 @@ func (multi *MultiEpoch) Get(ser old_faithful_grpc.OldFaithful_GetServer) error }); err != nil { return status.Errorf(codes.Internal, "request %d; failed to send version response: %v", id, err) } + case *old_faithful_grpc.GetRequest_BlockTime: + params := req.GetBlockTime() + resp, err := multi.GetBlockTime(ctx, params) + if err != nil { + gerr, ok := status.FromError(err) + if ok { + err := ser.Send(&old_faithful_grpc.GetResponse{ + Id: id, + Response: &old_faithful_grpc.GetResponse_Error{ + Error: &old_faithful_grpc.GetResponseError{ + Code: func() old_faithful_grpc.GetResponseErrorCode { + switch gerr.Code() { + case codes.NotFound: + return old_faithful_grpc.GetResponseErrorCode_NOT_FOUND + } + return old_faithful_grpc.GetResponseErrorCode_INTERNAL + }(), + Message: gerr.Message(), + }, + }, + }) + if err != nil { + return status.Errorf(codes.Internal, "request %d; failed to send blocktime error response: %v", id, err) + } + continue + } + return status.Errorf(codes.Internal, "request %d; failed to get blocktime: %v", id, err) + } + if err := ser.Send(&old_faithful_grpc.GetResponse{ + Id: id, + Response: &old_faithful_grpc.GetResponse_BlockTime{BlockTime: resp}, + }); err != nil { + return status.Errorf(codes.Internal, "request %d; failed to send blocktime response: %v", id, err) + } default: return status.Errorf(codes.InvalidArgument, "unknown request type %T", req.Request) } } } + +func (multi *MultiEpoch) GetBlockTime(ctx context.Context, params *old_faithful_grpc.BlockTimeRequest) (*old_faithful_grpc.BlockTimeResponse, error) { + slot := params.Slot + epochNumber := CalcEpochForSlot(slot) + epochHandler, err := multi.GetEpoch(epochNumber) + if err != nil { + return nil, status.Errorf(codes.NotFound, "Epoch %d is not available", epochNumber) + } + + block, _, err := epochHandler.GetBlock(WithSubrapghPrefetch(ctx, false), slot) + if err != nil { + if errors.Is(err, compactindexsized.ErrNotFound) { + return nil, status.Errorf(codes.NotFound, "Slot %d was skipped, or missing in long-term storage", slot) + } else { + return nil, status.Errorf(codes.Internal, "Failed to get block: %v", err) + } + } + + blocktime := uint64(block.Meta.Blocktime) + if blocktime == 0 { + return nil, status.Errorf(codes.NotFound, "Blocktime for slot %d is not available", slot) + } + + return &old_faithful_grpc.BlockTimeResponse{ + BlockTime: uint64(blocktime), + }, nil +} diff --git a/old-faithful-proto/old-faithful-grpc/old-faithful.pb.go b/old-faithful-proto/old-faithful-grpc/old-faithful.pb.go index f82ad7bc..058d0e26 100644 --- a/old-faithful-proto/old-faithful-grpc/old-faithful.pb.go +++ b/old-faithful-proto/old-faithful-grpc/old-faithful.pb.go @@ -151,6 +151,100 @@ func (x *VersionResponse) GetVersion() string { return "" } +type BlockTimeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` +} + +func (x *BlockTimeRequest) Reset() { + *x = BlockTimeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_old_faithful_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlockTimeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockTimeRequest) ProtoMessage() {} + +func (x *BlockTimeRequest) ProtoReflect() protoreflect.Message { + mi := &file_old_faithful_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlockTimeRequest.ProtoReflect.Descriptor instead. +func (*BlockTimeRequest) Descriptor() ([]byte, []int) { + return file_old_faithful_proto_rawDescGZIP(), []int{2} +} + +func (x *BlockTimeRequest) GetSlot() uint64 { + if x != nil { + return x.Slot + } + return 0 +} + +type BlockTimeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockTime uint64 `protobuf:"varint,1,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` +} + +func (x *BlockTimeResponse) Reset() { + *x = BlockTimeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_old_faithful_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlockTimeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockTimeResponse) ProtoMessage() {} + +func (x *BlockTimeResponse) ProtoReflect() protoreflect.Message { + mi := &file_old_faithful_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlockTimeResponse.ProtoReflect.Descriptor instead. +func (*BlockTimeResponse) Descriptor() ([]byte, []int) { + return file_old_faithful_proto_rawDescGZIP(), []int{3} +} + +func (x *BlockTimeResponse) GetBlockTime() uint64 { + if x != nil { + return x.BlockTime + } + return 0 +} + type BlockRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -162,7 +256,7 @@ type BlockRequest struct { func (x *BlockRequest) Reset() { *x = BlockRequest{} if protoimpl.UnsafeEnabled { - mi := &file_old_faithful_proto_msgTypes[2] + mi := &file_old_faithful_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -175,7 +269,7 @@ func (x *BlockRequest) String() string { func (*BlockRequest) ProtoMessage() {} func (x *BlockRequest) ProtoReflect() protoreflect.Message { - mi := &file_old_faithful_proto_msgTypes[2] + mi := &file_old_faithful_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -188,7 +282,7 @@ func (x *BlockRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use BlockRequest.ProtoReflect.Descriptor instead. func (*BlockRequest) Descriptor() ([]byte, []int) { - return file_old_faithful_proto_rawDescGZIP(), []int{2} + return file_old_faithful_proto_rawDescGZIP(), []int{4} } func (x *BlockRequest) GetSlot() uint64 { @@ -216,7 +310,7 @@ type BlockResponse struct { func (x *BlockResponse) Reset() { *x = BlockResponse{} if protoimpl.UnsafeEnabled { - mi := &file_old_faithful_proto_msgTypes[3] + mi := &file_old_faithful_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -229,7 +323,7 @@ func (x *BlockResponse) String() string { func (*BlockResponse) ProtoMessage() {} func (x *BlockResponse) ProtoReflect() protoreflect.Message { - mi := &file_old_faithful_proto_msgTypes[3] + mi := &file_old_faithful_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -242,7 +336,7 @@ func (x *BlockResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use BlockResponse.ProtoReflect.Descriptor instead. func (*BlockResponse) Descriptor() ([]byte, []int) { - return file_old_faithful_proto_rawDescGZIP(), []int{3} + return file_old_faithful_proto_rawDescGZIP(), []int{5} } func (x *BlockResponse) GetPreviousBlockhash() []byte { @@ -312,7 +406,7 @@ type TransactionRequest struct { func (x *TransactionRequest) Reset() { *x = TransactionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_old_faithful_proto_msgTypes[4] + mi := &file_old_faithful_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -325,7 +419,7 @@ func (x *TransactionRequest) String() string { func (*TransactionRequest) ProtoMessage() {} func (x *TransactionRequest) ProtoReflect() protoreflect.Message { - mi := &file_old_faithful_proto_msgTypes[4] + mi := &file_old_faithful_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -338,7 +432,7 @@ func (x *TransactionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use TransactionRequest.ProtoReflect.Descriptor instead. func (*TransactionRequest) Descriptor() ([]byte, []int) { - return file_old_faithful_proto_rawDescGZIP(), []int{4} + return file_old_faithful_proto_rawDescGZIP(), []int{6} } func (x *TransactionRequest) GetSignature() []byte { @@ -362,7 +456,7 @@ type TransactionResponse struct { func (x *TransactionResponse) Reset() { *x = TransactionResponse{} if protoimpl.UnsafeEnabled { - mi := &file_old_faithful_proto_msgTypes[5] + mi := &file_old_faithful_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -375,7 +469,7 @@ func (x *TransactionResponse) String() string { func (*TransactionResponse) ProtoMessage() {} func (x *TransactionResponse) ProtoReflect() protoreflect.Message { - mi := &file_old_faithful_proto_msgTypes[5] + mi := &file_old_faithful_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -388,7 +482,7 @@ func (x *TransactionResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use TransactionResponse.ProtoReflect.Descriptor instead. func (*TransactionResponse) Descriptor() ([]byte, []int) { - return file_old_faithful_proto_rawDescGZIP(), []int{5} + return file_old_faithful_proto_rawDescGZIP(), []int{7} } func (x *TransactionResponse) GetTransaction() *Transaction { @@ -432,7 +526,7 @@ type Transaction struct { func (x *Transaction) Reset() { *x = Transaction{} if protoimpl.UnsafeEnabled { - mi := &file_old_faithful_proto_msgTypes[6] + mi := &file_old_faithful_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -445,7 +539,7 @@ func (x *Transaction) String() string { func (*Transaction) ProtoMessage() {} func (x *Transaction) ProtoReflect() protoreflect.Message { - mi := &file_old_faithful_proto_msgTypes[6] + mi := &file_old_faithful_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -458,7 +552,7 @@ func (x *Transaction) ProtoReflect() protoreflect.Message { // Deprecated: Use Transaction.ProtoReflect.Descriptor instead. func (*Transaction) Descriptor() ([]byte, []int) { - return file_old_faithful_proto_rawDescGZIP(), []int{6} + return file_old_faithful_proto_rawDescGZIP(), []int{8} } func (x *Transaction) GetTransaction() []byte { @@ -491,6 +585,7 @@ type GetRequest struct { // Types that are assignable to Request: // // *GetRequest_Version + // *GetRequest_BlockTime // *GetRequest_Block // *GetRequest_Transaction Request isGetRequest_Request `protobuf_oneof:"request"` @@ -499,7 +594,7 @@ type GetRequest struct { func (x *GetRequest) Reset() { *x = GetRequest{} if protoimpl.UnsafeEnabled { - mi := &file_old_faithful_proto_msgTypes[7] + mi := &file_old_faithful_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -512,7 +607,7 @@ func (x *GetRequest) String() string { func (*GetRequest) ProtoMessage() {} func (x *GetRequest) ProtoReflect() protoreflect.Message { - mi := &file_old_faithful_proto_msgTypes[7] + mi := &file_old_faithful_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -525,7 +620,7 @@ func (x *GetRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetRequest.ProtoReflect.Descriptor instead. func (*GetRequest) Descriptor() ([]byte, []int) { - return file_old_faithful_proto_rawDescGZIP(), []int{7} + return file_old_faithful_proto_rawDescGZIP(), []int{9} } func (x *GetRequest) GetId() uint64 { @@ -549,6 +644,13 @@ func (x *GetRequest) GetVersion() *VersionRequest { return nil } +func (x *GetRequest) GetBlockTime() *BlockTimeRequest { + if x, ok := x.GetRequest().(*GetRequest_BlockTime); ok { + return x.BlockTime + } + return nil +} + func (x *GetRequest) GetBlock() *BlockRequest { if x, ok := x.GetRequest().(*GetRequest_Block); ok { return x.Block @@ -571,6 +673,10 @@ type GetRequest_Version struct { Version *VersionRequest `protobuf:"bytes,2,opt,name=version,proto3,oneof"` } +type GetRequest_BlockTime struct { + BlockTime *BlockTimeRequest `protobuf:"bytes,5,opt,name=block_time,json=blockTime,proto3,oneof"` +} + type GetRequest_Block struct { Block *BlockRequest `protobuf:"bytes,3,opt,name=block,proto3,oneof"` } @@ -581,6 +687,8 @@ type GetRequest_Transaction struct { func (*GetRequest_Version) isGetRequest_Request() {} +func (*GetRequest_BlockTime) isGetRequest_Request() {} + func (*GetRequest_Block) isGetRequest_Request() {} func (*GetRequest_Transaction) isGetRequest_Request() {} @@ -595,6 +703,7 @@ type GetResponse struct { // // *GetResponse_Error // *GetResponse_Version + // *GetResponse_BlockTime // *GetResponse_Block // *GetResponse_Transaction Response isGetResponse_Response `protobuf_oneof:"response"` @@ -603,7 +712,7 @@ type GetResponse struct { func (x *GetResponse) Reset() { *x = GetResponse{} if protoimpl.UnsafeEnabled { - mi := &file_old_faithful_proto_msgTypes[8] + mi := &file_old_faithful_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -616,7 +725,7 @@ func (x *GetResponse) String() string { func (*GetResponse) ProtoMessage() {} func (x *GetResponse) ProtoReflect() protoreflect.Message { - mi := &file_old_faithful_proto_msgTypes[8] + mi := &file_old_faithful_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -629,7 +738,7 @@ func (x *GetResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetResponse.ProtoReflect.Descriptor instead. func (*GetResponse) Descriptor() ([]byte, []int) { - return file_old_faithful_proto_rawDescGZIP(), []int{8} + return file_old_faithful_proto_rawDescGZIP(), []int{10} } func (x *GetResponse) GetId() uint64 { @@ -660,6 +769,13 @@ func (x *GetResponse) GetVersion() *VersionResponse { return nil } +func (x *GetResponse) GetBlockTime() *BlockTimeResponse { + if x, ok := x.GetResponse().(*GetResponse_BlockTime); ok { + return x.BlockTime + } + return nil +} + func (x *GetResponse) GetBlock() *BlockResponse { if x, ok := x.GetResponse().(*GetResponse_Block); ok { return x.Block @@ -686,6 +802,10 @@ type GetResponse_Version struct { Version *VersionResponse `protobuf:"bytes,3,opt,name=version,proto3,oneof"` } +type GetResponse_BlockTime struct { + BlockTime *BlockTimeResponse `protobuf:"bytes,6,opt,name=block_time,json=blockTime,proto3,oneof"` +} + type GetResponse_Block struct { Block *BlockResponse `protobuf:"bytes,4,opt,name=block,proto3,oneof"` } @@ -698,6 +818,8 @@ func (*GetResponse_Error) isGetResponse_Response() {} func (*GetResponse_Version) isGetResponse_Response() {} +func (*GetResponse_BlockTime) isGetResponse_Response() {} + func (*GetResponse_Block) isGetResponse_Response() {} func (*GetResponse_Transaction) isGetResponse_Response() {} @@ -714,7 +836,7 @@ type GetResponseError struct { func (x *GetResponseError) Reset() { *x = GetResponseError{} if protoimpl.UnsafeEnabled { - mi := &file_old_faithful_proto_msgTypes[9] + mi := &file_old_faithful_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -727,7 +849,7 @@ func (x *GetResponseError) String() string { func (*GetResponseError) ProtoMessage() {} func (x *GetResponseError) ProtoReflect() protoreflect.Message { - mi := &file_old_faithful_proto_msgTypes[9] + mi := &file_old_faithful_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -740,7 +862,7 @@ func (x *GetResponseError) ProtoReflect() protoreflect.Message { // Deprecated: Use GetResponseError.ProtoReflect.Descriptor instead. func (*GetResponseError) Descriptor() ([]byte, []int) { - return file_old_faithful_proto_rawDescGZIP(), []int{9} + return file_old_faithful_proto_rawDescGZIP(), []int{11} } func (x *GetResponseError) GetCode() GetResponseErrorCode { @@ -766,113 +888,132 @@ var file_old_faithful_proto_rawDesc = []byte{ 0x65, 0x73, 0x74, 0x22, 0x2b, 0x0a, 0x0f, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x22, 0x22, 0x0a, 0x0c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, - 0x73, 0x6c, 0x6f, 0x74, 0x22, 0xab, 0x02, 0x0a, 0x0d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, - 0x75, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x11, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x68, 0x61, - 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x68, - 0x61, 0x73, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x6c, - 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x53, 0x6c, 0x6f, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x18, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x77, 0x61, - 0x72, 0x64, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, - 0x64, 0x73, 0x22, 0x32, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xa9, 0x01, 0x0a, 0x13, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, - 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, - 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, - 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x1d, - 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, - 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x05, - 0x69, 0x6e, 0x64, 0x65, 0x78, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x22, 0x68, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x19, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x88, - 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0xd8, 0x01, 0x0a, - 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x37, 0x0a, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x4f, - 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, - 0x6c, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, - 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x43, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x4f, + 0x22, 0x26, 0x0a, 0x10, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x22, 0x32, 0x0a, 0x11, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x22, 0x0a, 0x0c, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, + 0x22, 0xab, 0x02, 0x0a, 0x0d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, + 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x68, 0x61, 0x73, + 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x68, 0x61, 0x73, 0x68, 0x12, + 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x6c, 0x6f, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, + 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, - 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0x0a, 0x07, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x94, 0x02, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, - 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x38, - 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, - 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, - 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x44, 0x0a, 0x0b, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x63, - 0x0a, 0x10, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x12, 0x35, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x21, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x47, - 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, - 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x2a, 0x33, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x49, - 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x54, - 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x32, 0xac, 0x02, 0x0a, 0x0b, 0x4f, 0x6c, 0x64, - 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x12, 0x47, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, - 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, - 0x6c, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x41, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x19, 0x2e, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x22, 0x32, + 0x0a, 0x12, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x22, 0xa9, 0x01, 0x0a, 0x13, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x0b, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x18, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x68, + 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, + 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x6d, + 0x65, 0x74, 0x61, 0x12, 0x19, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x04, 0x48, 0x00, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x88, 0x01, 0x01, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x98, 0x02, 0x0a, 0x0a, 0x47, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x37, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, + 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x3e, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, + 0x75, 0x6c, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x31, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x05, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x12, 0x43, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, + 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x22, 0xd5, 0x02, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, + 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x38, 0x0a, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x4f, 0x6c, + 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, + 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, + 0x75, 0x6c, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x48, 0x00, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x44, 0x0a, 0x0b, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, + 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x48, 0x00, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x63, 0x0a, 0x10, 0x47, + 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, + 0x35, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, + 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, + 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x2a, 0x33, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x54, 0x45, + 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, + 0x55, 0x4e, 0x44, 0x10, 0x01, 0x32, 0xfb, 0x02, 0x0a, 0x0b, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, + 0x74, 0x68, 0x66, 0x75, 0x6c, 0x12, 0x47, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, + 0x6c, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1c, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, + 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1d, + 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, - 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, - 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, - 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x03, 0x47, 0x65, 0x74, - 0x12, 0x17, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x47, - 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x4f, 0x6c, 0x64, 0x46, - 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x42, 0x4e, 0x5a, 0x4c, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x70, 0x63, 0x70, 0x6f, 0x6f, 0x6c, 0x2f, 0x79, 0x65, - 0x6c, 0x6c, 0x6f, 0x77, 0x73, 0x74, 0x6f, 0x6e, 0x65, 0x2d, 0x66, 0x61, 0x69, 0x74, 0x68, 0x66, - 0x75, 0x6c, 0x2f, 0x6f, 0x6c, 0x64, 0x2d, 0x66, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2d, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x6f, 0x6c, 0x64, 0x5f, 0x66, 0x61, 0x69, 0x74, 0x68, 0x66, - 0x75, 0x6c, 0x5f, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, + 0x08, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x19, 0x2e, 0x4f, 0x6c, 0x64, 0x46, + 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, + 0x75, 0x6c, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x53, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x1f, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, + 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, + 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x17, 0x2e, 0x4f, + 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, + 0x66, 0x75, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, + 0x01, 0x30, 0x01, 0x42, 0x4e, 0x5a, 0x4c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x72, 0x70, 0x63, 0x70, 0x6f, 0x6f, 0x6c, 0x2f, 0x79, 0x65, 0x6c, 0x6c, 0x6f, 0x77, + 0x73, 0x74, 0x6f, 0x6e, 0x65, 0x2d, 0x66, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2f, 0x6f, + 0x6c, 0x64, 0x2d, 0x66, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2d, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x3b, 0x6f, 0x6c, 0x64, 0x5f, 0x66, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x5f, 0x67, + 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -888,44 +1029,50 @@ func file_old_faithful_proto_rawDescGZIP() []byte { } var file_old_faithful_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_old_faithful_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_old_faithful_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_old_faithful_proto_goTypes = []any{ (GetResponseErrorCode)(0), // 0: OldFaithful.GetResponseErrorCode (*VersionRequest)(nil), // 1: OldFaithful.VersionRequest (*VersionResponse)(nil), // 2: OldFaithful.VersionResponse - (*BlockRequest)(nil), // 3: OldFaithful.BlockRequest - (*BlockResponse)(nil), // 4: OldFaithful.BlockResponse - (*TransactionRequest)(nil), // 5: OldFaithful.TransactionRequest - (*TransactionResponse)(nil), // 6: OldFaithful.TransactionResponse - (*Transaction)(nil), // 7: OldFaithful.Transaction - (*GetRequest)(nil), // 8: OldFaithful.GetRequest - (*GetResponse)(nil), // 9: OldFaithful.GetResponse - (*GetResponseError)(nil), // 10: OldFaithful.GetResponseError + (*BlockTimeRequest)(nil), // 3: OldFaithful.BlockTimeRequest + (*BlockTimeResponse)(nil), // 4: OldFaithful.BlockTimeResponse + (*BlockRequest)(nil), // 5: OldFaithful.BlockRequest + (*BlockResponse)(nil), // 6: OldFaithful.BlockResponse + (*TransactionRequest)(nil), // 7: OldFaithful.TransactionRequest + (*TransactionResponse)(nil), // 8: OldFaithful.TransactionResponse + (*Transaction)(nil), // 9: OldFaithful.Transaction + (*GetRequest)(nil), // 10: OldFaithful.GetRequest + (*GetResponse)(nil), // 11: OldFaithful.GetResponse + (*GetResponseError)(nil), // 12: OldFaithful.GetResponseError } var file_old_faithful_proto_depIdxs = []int32{ - 7, // 0: OldFaithful.BlockResponse.transactions:type_name -> OldFaithful.Transaction - 7, // 1: OldFaithful.TransactionResponse.transaction:type_name -> OldFaithful.Transaction + 9, // 0: OldFaithful.BlockResponse.transactions:type_name -> OldFaithful.Transaction + 9, // 1: OldFaithful.TransactionResponse.transaction:type_name -> OldFaithful.Transaction 1, // 2: OldFaithful.GetRequest.version:type_name -> OldFaithful.VersionRequest - 3, // 3: OldFaithful.GetRequest.block:type_name -> OldFaithful.BlockRequest - 5, // 4: OldFaithful.GetRequest.transaction:type_name -> OldFaithful.TransactionRequest - 10, // 5: OldFaithful.GetResponse.error:type_name -> OldFaithful.GetResponseError - 2, // 6: OldFaithful.GetResponse.version:type_name -> OldFaithful.VersionResponse - 4, // 7: OldFaithful.GetResponse.block:type_name -> OldFaithful.BlockResponse - 6, // 8: OldFaithful.GetResponse.transaction:type_name -> OldFaithful.TransactionResponse - 0, // 9: OldFaithful.GetResponseError.code:type_name -> OldFaithful.GetResponseErrorCode - 1, // 10: OldFaithful.OldFaithful.GetVersion:input_type -> OldFaithful.VersionRequest - 3, // 11: OldFaithful.OldFaithful.GetBlock:input_type -> OldFaithful.BlockRequest - 5, // 12: OldFaithful.OldFaithful.GetTransaction:input_type -> OldFaithful.TransactionRequest - 8, // 13: OldFaithful.OldFaithful.Get:input_type -> OldFaithful.GetRequest - 2, // 14: OldFaithful.OldFaithful.GetVersion:output_type -> OldFaithful.VersionResponse - 4, // 15: OldFaithful.OldFaithful.GetBlock:output_type -> OldFaithful.BlockResponse - 6, // 16: OldFaithful.OldFaithful.GetTransaction:output_type -> OldFaithful.TransactionResponse - 9, // 17: OldFaithful.OldFaithful.Get:output_type -> OldFaithful.GetResponse - 14, // [14:18] is the sub-list for method output_type - 10, // [10:14] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 3, // 3: OldFaithful.GetRequest.block_time:type_name -> OldFaithful.BlockTimeRequest + 5, // 4: OldFaithful.GetRequest.block:type_name -> OldFaithful.BlockRequest + 7, // 5: OldFaithful.GetRequest.transaction:type_name -> OldFaithful.TransactionRequest + 12, // 6: OldFaithful.GetResponse.error:type_name -> OldFaithful.GetResponseError + 2, // 7: OldFaithful.GetResponse.version:type_name -> OldFaithful.VersionResponse + 4, // 8: OldFaithful.GetResponse.block_time:type_name -> OldFaithful.BlockTimeResponse + 6, // 9: OldFaithful.GetResponse.block:type_name -> OldFaithful.BlockResponse + 8, // 10: OldFaithful.GetResponse.transaction:type_name -> OldFaithful.TransactionResponse + 0, // 11: OldFaithful.GetResponseError.code:type_name -> OldFaithful.GetResponseErrorCode + 1, // 12: OldFaithful.OldFaithful.GetVersion:input_type -> OldFaithful.VersionRequest + 3, // 13: OldFaithful.OldFaithful.GetBlockTime:input_type -> OldFaithful.BlockTimeRequest + 5, // 14: OldFaithful.OldFaithful.GetBlock:input_type -> OldFaithful.BlockRequest + 7, // 15: OldFaithful.OldFaithful.GetTransaction:input_type -> OldFaithful.TransactionRequest + 10, // 16: OldFaithful.OldFaithful.Get:input_type -> OldFaithful.GetRequest + 2, // 17: OldFaithful.OldFaithful.GetVersion:output_type -> OldFaithful.VersionResponse + 4, // 18: OldFaithful.OldFaithful.GetBlockTime:output_type -> OldFaithful.BlockTimeResponse + 6, // 19: OldFaithful.OldFaithful.GetBlock:output_type -> OldFaithful.BlockResponse + 8, // 20: OldFaithful.OldFaithful.GetTransaction:output_type -> OldFaithful.TransactionResponse + 11, // 21: OldFaithful.OldFaithful.Get:output_type -> OldFaithful.GetResponse + 17, // [17:22] is the sub-list for method output_type + 12, // [12:17] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name } func init() { file_old_faithful_proto_init() } @@ -959,7 +1106,7 @@ func file_old_faithful_proto_init() { } } file_old_faithful_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BlockRequest); i { + switch v := v.(*BlockTimeRequest); i { case 0: return &v.state case 1: @@ -971,7 +1118,7 @@ func file_old_faithful_proto_init() { } } file_old_faithful_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*BlockResponse); i { + switch v := v.(*BlockTimeResponse); i { case 0: return &v.state case 1: @@ -983,7 +1130,7 @@ func file_old_faithful_proto_init() { } } file_old_faithful_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*TransactionRequest); i { + switch v := v.(*BlockRequest); i { case 0: return &v.state case 1: @@ -995,7 +1142,7 @@ func file_old_faithful_proto_init() { } } file_old_faithful_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*TransactionResponse); i { + switch v := v.(*BlockResponse); i { case 0: return &v.state case 1: @@ -1007,7 +1154,7 @@ func file_old_faithful_proto_init() { } } file_old_faithful_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Transaction); i { + switch v := v.(*TransactionRequest); i { case 0: return &v.state case 1: @@ -1019,7 +1166,7 @@ func file_old_faithful_proto_init() { } } file_old_faithful_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetRequest); i { + switch v := v.(*TransactionResponse); i { case 0: return &v.state case 1: @@ -1031,7 +1178,7 @@ func file_old_faithful_proto_init() { } } file_old_faithful_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetResponse); i { + switch v := v.(*Transaction); i { case 0: return &v.state case 1: @@ -1043,6 +1190,30 @@ func file_old_faithful_proto_init() { } } file_old_faithful_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*GetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_old_faithful_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*GetResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_old_faithful_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*GetResponseError); i { case 0: return &v.state @@ -1055,16 +1226,18 @@ func file_old_faithful_proto_init() { } } } - file_old_faithful_proto_msgTypes[5].OneofWrappers = []any{} - file_old_faithful_proto_msgTypes[6].OneofWrappers = []any{} - file_old_faithful_proto_msgTypes[7].OneofWrappers = []any{ + file_old_faithful_proto_msgTypes[7].OneofWrappers = []any{} + file_old_faithful_proto_msgTypes[8].OneofWrappers = []any{} + file_old_faithful_proto_msgTypes[9].OneofWrappers = []any{ (*GetRequest_Version)(nil), + (*GetRequest_BlockTime)(nil), (*GetRequest_Block)(nil), (*GetRequest_Transaction)(nil), } - file_old_faithful_proto_msgTypes[8].OneofWrappers = []any{ + file_old_faithful_proto_msgTypes[10].OneofWrappers = []any{ (*GetResponse_Error)(nil), (*GetResponse_Version)(nil), + (*GetResponse_BlockTime)(nil), (*GetResponse_Block)(nil), (*GetResponse_Transaction)(nil), } @@ -1074,7 +1247,7 @@ func file_old_faithful_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_old_faithful_proto_rawDesc, NumEnums: 1, - NumMessages: 10, + NumMessages: 12, NumExtensions: 0, NumServices: 1, }, diff --git a/old-faithful-proto/old-faithful-grpc/old-faithful_grpc.pb.go b/old-faithful-proto/old-faithful-grpc/old-faithful_grpc.pb.go index 9dd448db..3176a1dc 100644 --- a/old-faithful-proto/old-faithful-grpc/old-faithful_grpc.pb.go +++ b/old-faithful-proto/old-faithful-grpc/old-faithful_grpc.pb.go @@ -20,6 +20,7 @@ const _ = grpc.SupportPackageIsVersion8 const ( OldFaithful_GetVersion_FullMethodName = "/OldFaithful.OldFaithful/GetVersion" + OldFaithful_GetBlockTime_FullMethodName = "/OldFaithful.OldFaithful/GetBlockTime" OldFaithful_GetBlock_FullMethodName = "/OldFaithful.OldFaithful/GetBlock" OldFaithful_GetTransaction_FullMethodName = "/OldFaithful.OldFaithful/GetTransaction" OldFaithful_Get_FullMethodName = "/OldFaithful.OldFaithful/Get" @@ -30,6 +31,7 @@ const ( // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type OldFaithfulClient interface { GetVersion(ctx context.Context, in *VersionRequest, opts ...grpc.CallOption) (*VersionResponse, error) + GetBlockTime(ctx context.Context, in *BlockTimeRequest, opts ...grpc.CallOption) (*BlockTimeResponse, error) GetBlock(ctx context.Context, in *BlockRequest, opts ...grpc.CallOption) (*BlockResponse, error) GetTransaction(ctx context.Context, in *TransactionRequest, opts ...grpc.CallOption) (*TransactionResponse, error) Get(ctx context.Context, opts ...grpc.CallOption) (OldFaithful_GetClient, error) @@ -53,6 +55,16 @@ func (c *oldFaithfulClient) GetVersion(ctx context.Context, in *VersionRequest, return out, nil } +func (c *oldFaithfulClient) GetBlockTime(ctx context.Context, in *BlockTimeRequest, opts ...grpc.CallOption) (*BlockTimeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(BlockTimeResponse) + err := c.cc.Invoke(ctx, OldFaithful_GetBlockTime_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *oldFaithfulClient) GetBlock(ctx context.Context, in *BlockRequest, opts ...grpc.CallOption) (*BlockResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(BlockResponse) @@ -110,6 +122,7 @@ func (x *oldFaithfulGetClient) Recv() (*GetResponse, error) { // for forward compatibility type OldFaithfulServer interface { GetVersion(context.Context, *VersionRequest) (*VersionResponse, error) + GetBlockTime(context.Context, *BlockTimeRequest) (*BlockTimeResponse, error) GetBlock(context.Context, *BlockRequest) (*BlockResponse, error) GetTransaction(context.Context, *TransactionRequest) (*TransactionResponse, error) Get(OldFaithful_GetServer) error @@ -123,6 +136,9 @@ type UnimplementedOldFaithfulServer struct { func (UnimplementedOldFaithfulServer) GetVersion(context.Context, *VersionRequest) (*VersionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetVersion not implemented") } +func (UnimplementedOldFaithfulServer) GetBlockTime(context.Context, *BlockTimeRequest) (*BlockTimeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBlockTime not implemented") +} func (UnimplementedOldFaithfulServer) GetBlock(context.Context, *BlockRequest) (*BlockResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetBlock not implemented") } @@ -163,6 +179,24 @@ func _OldFaithful_GetVersion_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _OldFaithful_GetBlockTime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BlockTimeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OldFaithfulServer).GetBlockTime(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OldFaithful_GetBlockTime_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OldFaithfulServer).GetBlockTime(ctx, req.(*BlockTimeRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _OldFaithful_GetBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(BlockRequest) if err := dec(in); err != nil { @@ -236,6 +270,10 @@ var OldFaithful_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetVersion", Handler: _OldFaithful_GetVersion_Handler, }, + { + MethodName: "GetBlockTime", + Handler: _OldFaithful_GetBlockTime_Handler, + }, { MethodName: "GetBlock", Handler: _OldFaithful_GetBlock_Handler, diff --git a/old-faithful-proto/proto/old-faithful.proto b/old-faithful-proto/proto/old-faithful.proto index f089a4d8..c79f98e3 100644 --- a/old-faithful-proto/proto/old-faithful.proto +++ b/old-faithful-proto/proto/old-faithful.proto @@ -6,6 +6,7 @@ option go_package = "github.com/rpcpool/yellowstone-faithful/old-faithful-proto; service OldFaithful { rpc GetVersion(VersionRequest) returns (VersionResponse); + rpc GetBlockTime(BlockTimeRequest) returns (BlockTimeResponse); rpc GetBlock(BlockRequest) returns (BlockResponse); rpc GetTransaction(TransactionRequest) returns (TransactionResponse); @@ -18,6 +19,14 @@ message VersionResponse { string version = 1; } +message BlockTimeRequest { + uint64 slot = 1; +} + +message BlockTimeResponse { + uint64 block_time = 1; +} + message BlockRequest { uint64 slot = 1; } @@ -54,6 +63,7 @@ message GetRequest { uint64 id = 1; oneof request { VersionRequest version = 2; + BlockTimeRequest block_time = 5; BlockRequest block = 3; TransactionRequest transaction = 4; } @@ -64,6 +74,7 @@ message GetResponse { oneof response { GetResponseError error = 2; VersionResponse version = 3; + BlockTimeResponse block_time = 6; BlockResponse block = 4; TransactionResponse transaction = 5; }