From 33189114f6125dd3bebc9544829c89697ec41cd1 Mon Sep 17 00:00:00 2001 From: anjor Date: Tue, 22 Oct 2024 13:02:26 +0100 Subject: [PATCH 01/11] stream blocks --- old-faithful-proto/proto/old-faithful.proto | 33 +++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/old-faithful-proto/proto/old-faithful.proto b/old-faithful-proto/proto/old-faithful.proto index 1c636ab9..b5797eb3 100644 --- a/old-faithful-proto/proto/old-faithful.proto +++ b/old-faithful-proto/proto/old-faithful.proto @@ -11,6 +11,8 @@ service OldFaithful { rpc GetTransaction(TransactionRequest) returns (TransactionResponse); rpc Get(stream GetRequest) returns (stream GetResponse); + + rpc StreamBlocks(StreamBlocksRequest) returns (stream StreamBlocksResponse); } message VersionRequest {} @@ -90,3 +92,34 @@ message GetResponseError { GetResponseErrorCode code = 1; string message = 2; } + + +message StreamBlocksRequest { + uint64 start_slot = 1; + optional uint64 end_slot = 2; // If not specified, continues indefinitely + optional StreamBlocksFilter filter = 3; +} + +message StreamBlocksFilter { + repeated string account_include = 1; // Filter blocks/txns mentioning these accounts + optional bool include_transactions = 2; // Include full transaction details + optional bool include_accounts = 3; // Include account updates +} + +message StreamBlocksResponse { + oneof response { + StreamBlocksError error = 1; + BlockResponse block = 2; + } +} + +message StreamBlocksError { + StreamBlocksErrorCode code = 1; + string message = 2; +} + +enum StreamBlocksErrorCode { + INTERNAL = 0; + INVALID_SLOT_RANGE = 1; + SLOT_NOT_FOUND = 2; +} From 5d9a2c6c19f6214f389d3bf0ad998318445cc404 Mon Sep 17 00:00:00 2001 From: anjor Date: Wed, 30 Oct 2024 09:14:53 +0000 Subject: [PATCH 02/11] generated code --- Makefile | 10 + .../old-faithful-grpc/old-faithful.pb.go | 939 +++++++++++------- .../old-faithful-grpc/old-faithful_grpc.pb.go | 112 ++- old-faithful-proto/proto/old-faithful.proto | 12 +- 4 files changed, 643 insertions(+), 430 deletions(-) diff --git a/Makefile b/Makefile index ec229f44..9464df0e 100644 --- a/Makefile +++ b/Makefile @@ -86,3 +86,13 @@ gen-old-faithful-proto: install-protoc --go-grpc_out=paths=source_relative:$$(pwd)/old-faithful-proto/old-faithful-grpc \ -I=$$(pwd)/old-faithful-proto/proto/ \ $$(pwd)/old-faithful-proto/proto/old-faithful.proto +gen-old-faithful-proto-system: + @mkdir -p $$(pwd)/old-faithful-proto/old-faithful-grpc + @echo "Generating golang protobuf for old-faithful..." + # the proto file is in old-faithful-proto/proto ; generate go code in old-faithful-proto/faithful-grpc + protoc \ + --experimental_allow_proto3_optional \ + --go_out=paths=source_relative:$$(pwd)/old-faithful-proto/old-faithful-grpc \ + --go-grpc_out=paths=source_relative:$$(pwd)/old-faithful-proto/old-faithful-grpc \ + -I=$$(pwd)/old-faithful-proto/proto/ \ + $$(pwd)/old-faithful-proto/proto/old-faithful.proto 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 6bb1ede0..d17b1b87 100644 --- a/old-faithful-proto/old-faithful-grpc/old-faithful.pb.go +++ b/old-faithful-proto/old-faithful-grpc/old-faithful.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v5.27.1 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: old-faithful.proto package old_faithful_grpc @@ -23,19 +23,19 @@ const ( type GetResponseErrorCode int32 const ( - GetResponseErrorCode_INTERNAL GetResponseErrorCode = 0 - GetResponseErrorCode_NOT_FOUND GetResponseErrorCode = 1 + GetResponseErrorCode_GET_RESPONSE_INTERNAL GetResponseErrorCode = 0 + GetResponseErrorCode_GET_RESPONSE_NOT_FOUND GetResponseErrorCode = 1 ) // Enum value maps for GetResponseErrorCode. var ( GetResponseErrorCode_name = map[int32]string{ - 0: "INTERNAL", - 1: "NOT_FOUND", + 0: "GET_RESPONSE_INTERNAL", + 1: "GET_RESPONSE_NOT_FOUND", } GetResponseErrorCode_value = map[string]int32{ - "INTERNAL": 0, - "NOT_FOUND": 1, + "GET_RESPONSE_INTERNAL": 0, + "GET_RESPONSE_NOT_FOUND": 1, } ) @@ -66,6 +66,55 @@ func (GetResponseErrorCode) EnumDescriptor() ([]byte, []int) { return file_old_faithful_proto_rawDescGZIP(), []int{0} } +type StreamBlocksErrorCode int32 + +const ( + StreamBlocksErrorCode_STREAM_BLOCKS_INTERNAL StreamBlocksErrorCode = 0 + StreamBlocksErrorCode_STREAM_BLOCKS_INVALID_SLOT_RANGE StreamBlocksErrorCode = 1 + StreamBlocksErrorCode_STREAM_BLOCKS_SLOT_NOT_FOUND StreamBlocksErrorCode = 2 +) + +// Enum value maps for StreamBlocksErrorCode. +var ( + StreamBlocksErrorCode_name = map[int32]string{ + 0: "STREAM_BLOCKS_INTERNAL", + 1: "STREAM_BLOCKS_INVALID_SLOT_RANGE", + 2: "STREAM_BLOCKS_SLOT_NOT_FOUND", + } + StreamBlocksErrorCode_value = map[string]int32{ + "STREAM_BLOCKS_INTERNAL": 0, + "STREAM_BLOCKS_INVALID_SLOT_RANGE": 1, + "STREAM_BLOCKS_SLOT_NOT_FOUND": 2, + } +) + +func (x StreamBlocksErrorCode) Enum() *StreamBlocksErrorCode { + p := new(StreamBlocksErrorCode) + *p = x + return p +} + +func (x StreamBlocksErrorCode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (StreamBlocksErrorCode) Descriptor() protoreflect.EnumDescriptor { + return file_old_faithful_proto_enumTypes[1].Descriptor() +} + +func (StreamBlocksErrorCode) Type() protoreflect.EnumType { + return &file_old_faithful_proto_enumTypes[1] +} + +func (x StreamBlocksErrorCode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use StreamBlocksErrorCode.Descriptor instead. +func (StreamBlocksErrorCode) EnumDescriptor() ([]byte, []int) { + return file_old_faithful_proto_rawDescGZIP(), []int{1} +} + type VersionRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -74,11 +123,9 @@ type VersionRequest struct { func (x *VersionRequest) Reset() { *x = VersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_old_faithful_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_old_faithful_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VersionRequest) String() string { @@ -89,7 +136,7 @@ func (*VersionRequest) ProtoMessage() {} func (x *VersionRequest) ProtoReflect() protoreflect.Message { mi := &file_old_faithful_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -114,11 +161,9 @@ type VersionResponse struct { func (x *VersionResponse) Reset() { *x = VersionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_old_faithful_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_old_faithful_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VersionResponse) String() string { @@ -129,7 +174,7 @@ func (*VersionResponse) ProtoMessage() {} func (x *VersionResponse) ProtoReflect() protoreflect.Message { mi := &file_old_faithful_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -161,11 +206,9 @@ type BlockRequest struct { func (x *BlockRequest) Reset() { *x = BlockRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_old_faithful_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_old_faithful_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BlockRequest) String() string { @@ -176,7 +219,7 @@ func (*BlockRequest) ProtoMessage() {} func (x *BlockRequest) ProtoReflect() protoreflect.Message { mi := &file_old_faithful_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -211,15 +254,14 @@ type BlockResponse struct { BlockHeight uint64 `protobuf:"varint,6,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` Transactions []*Transaction `protobuf:"bytes,7,rep,name=transactions,proto3" json:"transactions,omitempty"` Rewards []byte `protobuf:"bytes,8,opt,name=rewards,proto3" json:"rewards,omitempty"` // protobuf or bincode (or empty) + NumPartitions *uint64 `protobuf:"varint,9,opt,name=num_partitions,json=numPartitions,proto3,oneof" json:"num_partitions,omitempty"` } func (x *BlockResponse) Reset() { *x = BlockResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_old_faithful_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_old_faithful_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BlockResponse) String() string { @@ -230,7 +272,7 @@ func (*BlockResponse) ProtoMessage() {} func (x *BlockResponse) ProtoReflect() protoreflect.Message { mi := &file_old_faithful_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -301,6 +343,13 @@ func (x *BlockResponse) GetRewards() []byte { return nil } +func (x *BlockResponse) GetNumPartitions() uint64 { + if x != nil && x.NumPartitions != nil { + return *x.NumPartitions + } + return 0 +} + type BlockTimeRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -311,11 +360,9 @@ type BlockTimeRequest struct { func (x *BlockTimeRequest) Reset() { *x = BlockTimeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_old_faithful_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_old_faithful_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BlockTimeRequest) String() string { @@ -326,7 +373,7 @@ func (*BlockTimeRequest) ProtoMessage() {} func (x *BlockTimeRequest) ProtoReflect() protoreflect.Message { mi := &file_old_faithful_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -358,11 +405,9 @@ type BlockTimeResponse struct { func (x *BlockTimeResponse) Reset() { *x = BlockTimeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_old_faithful_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_old_faithful_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BlockTimeResponse) String() string { @@ -373,7 +418,7 @@ func (*BlockTimeResponse) ProtoMessage() {} func (x *BlockTimeResponse) ProtoReflect() protoreflect.Message { mi := &file_old_faithful_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -405,11 +450,9 @@ type TransactionRequest struct { func (x *TransactionRequest) Reset() { *x = TransactionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_old_faithful_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_old_faithful_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionRequest) String() string { @@ -420,7 +463,7 @@ func (*TransactionRequest) ProtoMessage() {} func (x *TransactionRequest) ProtoReflect() protoreflect.Message { mi := &file_old_faithful_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -455,11 +498,9 @@ type TransactionResponse struct { func (x *TransactionResponse) Reset() { *x = TransactionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_old_faithful_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_old_faithful_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionResponse) String() string { @@ -470,7 +511,7 @@ func (*TransactionResponse) ProtoMessage() {} func (x *TransactionResponse) ProtoReflect() protoreflect.Message { mi := &file_old_faithful_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -525,11 +566,9 @@ type Transaction struct { func (x *Transaction) Reset() { *x = Transaction{} - if protoimpl.UnsafeEnabled { - mi := &file_old_faithful_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_old_faithful_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Transaction) String() string { @@ -540,7 +579,7 @@ func (*Transaction) ProtoMessage() {} func (x *Transaction) ProtoReflect() protoreflect.Message { mi := &file_old_faithful_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -593,11 +632,9 @@ type GetRequest struct { func (x *GetRequest) Reset() { *x = GetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_old_faithful_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_old_faithful_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRequest) String() string { @@ -608,7 +645,7 @@ func (*GetRequest) ProtoMessage() {} func (x *GetRequest) ProtoReflect() protoreflect.Message { mi := &file_old_faithful_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -711,11 +748,9 @@ type GetResponse struct { func (x *GetResponse) Reset() { *x = GetResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_old_faithful_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_old_faithful_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetResponse) String() string { @@ -726,7 +761,7 @@ func (*GetResponse) ProtoMessage() {} func (x *GetResponse) ProtoReflect() protoreflect.Message { mi := &file_old_faithful_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -835,11 +870,9 @@ type GetResponseError struct { func (x *GetResponseError) Reset() { *x = GetResponseError{} - if protoimpl.UnsafeEnabled { - mi := &file_old_faithful_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_old_faithful_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetResponseError) String() string { @@ -850,7 +883,7 @@ func (*GetResponseError) ProtoMessage() {} func (x *GetResponseError) ProtoReflect() protoreflect.Message { mi := &file_old_faithful_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -869,7 +902,7 @@ func (x *GetResponseError) GetCode() GetResponseErrorCode { if x != nil { return x.Code } - return GetResponseErrorCode_INTERNAL + return GetResponseErrorCode_GET_RESPONSE_INTERNAL } func (x *GetResponseError) GetMessage() string { @@ -879,6 +912,244 @@ func (x *GetResponseError) GetMessage() string { return "" } +type StreamBlocksRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + StartSlot uint64 `protobuf:"varint,1,opt,name=start_slot,json=startSlot,proto3" json:"start_slot,omitempty"` + EndSlot *uint64 `protobuf:"varint,2,opt,name=end_slot,json=endSlot,proto3,oneof" json:"end_slot,omitempty"` // If not specified, continues indefinitely + Filter *StreamBlocksFilter `protobuf:"bytes,3,opt,name=filter,proto3,oneof" json:"filter,omitempty"` +} + +func (x *StreamBlocksRequest) Reset() { + *x = StreamBlocksRequest{} + mi := &file_old_faithful_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StreamBlocksRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamBlocksRequest) ProtoMessage() {} + +func (x *StreamBlocksRequest) ProtoReflect() protoreflect.Message { + mi := &file_old_faithful_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamBlocksRequest.ProtoReflect.Descriptor instead. +func (*StreamBlocksRequest) Descriptor() ([]byte, []int) { + return file_old_faithful_proto_rawDescGZIP(), []int{12} +} + +func (x *StreamBlocksRequest) GetStartSlot() uint64 { + if x != nil { + return x.StartSlot + } + return 0 +} + +func (x *StreamBlocksRequest) GetEndSlot() uint64 { + if x != nil && x.EndSlot != nil { + return *x.EndSlot + } + return 0 +} + +func (x *StreamBlocksRequest) GetFilter() *StreamBlocksFilter { + if x != nil { + return x.Filter + } + return nil +} + +type StreamBlocksFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccountInclude []string `protobuf:"bytes,1,rep,name=account_include,json=accountInclude,proto3" json:"account_include,omitempty"` // Filter blocks/txns mentioning these accounts +} + +func (x *StreamBlocksFilter) Reset() { + *x = StreamBlocksFilter{} + mi := &file_old_faithful_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StreamBlocksFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamBlocksFilter) ProtoMessage() {} + +func (x *StreamBlocksFilter) ProtoReflect() protoreflect.Message { + mi := &file_old_faithful_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamBlocksFilter.ProtoReflect.Descriptor instead. +func (*StreamBlocksFilter) Descriptor() ([]byte, []int) { + return file_old_faithful_proto_rawDescGZIP(), []int{13} +} + +func (x *StreamBlocksFilter) GetAccountInclude() []string { + if x != nil { + return x.AccountInclude + } + return nil +} + +type StreamBlocksResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Response: + // + // *StreamBlocksResponse_Error + // *StreamBlocksResponse_Block + Response isStreamBlocksResponse_Response `protobuf_oneof:"response"` +} + +func (x *StreamBlocksResponse) Reset() { + *x = StreamBlocksResponse{} + mi := &file_old_faithful_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StreamBlocksResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamBlocksResponse) ProtoMessage() {} + +func (x *StreamBlocksResponse) ProtoReflect() protoreflect.Message { + mi := &file_old_faithful_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamBlocksResponse.ProtoReflect.Descriptor instead. +func (*StreamBlocksResponse) Descriptor() ([]byte, []int) { + return file_old_faithful_proto_rawDescGZIP(), []int{14} +} + +func (m *StreamBlocksResponse) GetResponse() isStreamBlocksResponse_Response { + if m != nil { + return m.Response + } + return nil +} + +func (x *StreamBlocksResponse) GetError() *StreamBlocksError { + if x, ok := x.GetResponse().(*StreamBlocksResponse_Error); ok { + return x.Error + } + return nil +} + +func (x *StreamBlocksResponse) GetBlock() *BlockResponse { + if x, ok := x.GetResponse().(*StreamBlocksResponse_Block); ok { + return x.Block + } + return nil +} + +type isStreamBlocksResponse_Response interface { + isStreamBlocksResponse_Response() +} + +type StreamBlocksResponse_Error struct { + Error *StreamBlocksError `protobuf:"bytes,1,opt,name=error,proto3,oneof"` +} + +type StreamBlocksResponse_Block struct { + Block *BlockResponse `protobuf:"bytes,2,opt,name=block,proto3,oneof"` +} + +func (*StreamBlocksResponse_Error) isStreamBlocksResponse_Response() {} + +func (*StreamBlocksResponse_Block) isStreamBlocksResponse_Response() {} + +type StreamBlocksError struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code StreamBlocksErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=OldFaithful.StreamBlocksErrorCode" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *StreamBlocksError) Reset() { + *x = StreamBlocksError{} + mi := &file_old_faithful_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StreamBlocksError) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamBlocksError) ProtoMessage() {} + +func (x *StreamBlocksError) ProtoReflect() protoreflect.Message { + mi := &file_old_faithful_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamBlocksError.ProtoReflect.Descriptor instead. +func (*StreamBlocksError) Descriptor() ([]byte, []int) { + return file_old_faithful_proto_rawDescGZIP(), []int{15} +} + +func (x *StreamBlocksError) GetCode() StreamBlocksErrorCode { + if x != nil { + return x.Code + } + return StreamBlocksErrorCode_STREAM_BLOCKS_INTERNAL +} + +func (x *StreamBlocksError) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + var File_old_faithful_proto protoreflect.FileDescriptor var file_old_faithful_proto_rawDesc = []byte{ @@ -890,7 +1161,7 @@ var file_old_faithful_proto_rawDesc = []byte{ 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, 0x6c, 0x6f, 0x74, 0x22, 0xea, 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, @@ -909,111 +1180,160 @@ var file_old_faithful_proto_rawDesc = []byte{ 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, 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, 0x03, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 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, + 0x64, 0x73, 0x12, 0x2a, 0x0a, 0x0e, 0x6e, 0x75, 0x6d, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x0d, 0x6e, 0x75, + 0x6d, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x88, 0x01, 0x01, 0x42, 0x11, + 0x0a, 0x0f, 0x5f, 0x6e, 0x75, 0x6d, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 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, 0x03, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 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, 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, 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, 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, 0x54, 0x69, 0x6d, 0x65, 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, + 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, - 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, + 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, 0x22, + 0xaa, 0x01, 0x0a, 0x13, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x53, 0x6c, 0x6f, 0x74, 0x12, 0x1e, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x73, 0x6c, + 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x53, + 0x6c, 0x6f, 0x74, 0x88, 0x01, 0x01, 0x12, 0x3c, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, + 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x73, 0x6c, 0x6f, + 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x3d, 0x0a, 0x12, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, + 0x63, 0x6c, 0x75, 0x64, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x14, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, + 0x6c, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x32, 0x0a, 0x05, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 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, + 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x65, 0x0a, 0x11, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x12, 0x36, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x22, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 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, 0x4d, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x47, + 0x45, 0x54, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x45, + 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x47, 0x45, 0x54, 0x5f, 0x52, 0x45, + 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, + 0x10, 0x01, 0x2a, 0x7b, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x53, + 0x54, 0x52, 0x45, 0x41, 0x4d, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x53, 0x5f, 0x49, 0x4e, 0x54, + 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x24, 0x0a, 0x20, 0x53, 0x54, 0x52, 0x45, 0x41, + 0x4d, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x53, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, + 0x5f, 0x53, 0x4c, 0x4f, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x01, 0x12, 0x20, 0x0a, + 0x1c, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x53, 0x5f, 0x53, + 0x4c, 0x4f, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x02, 0x32, + 0xd2, 0x03, 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, 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, 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, 0x54, 0x69, + 0x6d, 0x65, 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, 0x12, 0x55, 0x0a, + 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x20, 0x2e, + 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x21, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 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 ( @@ -1028,51 +1348,62 @@ func file_old_faithful_proto_rawDescGZIP() []byte { return file_old_faithful_proto_rawDescData } -var file_old_faithful_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_old_faithful_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_old_faithful_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_old_faithful_proto_msgTypes = make([]protoimpl.MessageInfo, 16) 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 - (*BlockTimeRequest)(nil), // 5: OldFaithful.BlockTimeRequest - (*BlockTimeResponse)(nil), // 6: OldFaithful.BlockTimeResponse - (*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 + (GetResponseErrorCode)(0), // 0: OldFaithful.GetResponseErrorCode + (StreamBlocksErrorCode)(0), // 1: OldFaithful.StreamBlocksErrorCode + (*VersionRequest)(nil), // 2: OldFaithful.VersionRequest + (*VersionResponse)(nil), // 3: OldFaithful.VersionResponse + (*BlockRequest)(nil), // 4: OldFaithful.BlockRequest + (*BlockResponse)(nil), // 5: OldFaithful.BlockResponse + (*BlockTimeRequest)(nil), // 6: OldFaithful.BlockTimeRequest + (*BlockTimeResponse)(nil), // 7: OldFaithful.BlockTimeResponse + (*TransactionRequest)(nil), // 8: OldFaithful.TransactionRequest + (*TransactionResponse)(nil), // 9: OldFaithful.TransactionResponse + (*Transaction)(nil), // 10: OldFaithful.Transaction + (*GetRequest)(nil), // 11: OldFaithful.GetRequest + (*GetResponse)(nil), // 12: OldFaithful.GetResponse + (*GetResponseError)(nil), // 13: OldFaithful.GetResponseError + (*StreamBlocksRequest)(nil), // 14: OldFaithful.StreamBlocksRequest + (*StreamBlocksFilter)(nil), // 15: OldFaithful.StreamBlocksFilter + (*StreamBlocksResponse)(nil), // 16: OldFaithful.StreamBlocksResponse + (*StreamBlocksError)(nil), // 17: OldFaithful.StreamBlocksError } var file_old_faithful_proto_depIdxs = []int32{ - 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 - 5, // 3: OldFaithful.GetRequest.block_time:type_name -> OldFaithful.BlockTimeRequest - 3, // 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 - 6, // 8: OldFaithful.GetResponse.block_time:type_name -> OldFaithful.BlockTimeResponse - 4, // 9: OldFaithful.GetResponse.block:type_name -> OldFaithful.BlockResponse - 8, // 10: OldFaithful.GetResponse.transaction:type_name -> OldFaithful.TransactionResponse + 10, // 0: OldFaithful.BlockResponse.transactions:type_name -> OldFaithful.Transaction + 10, // 1: OldFaithful.TransactionResponse.transaction:type_name -> OldFaithful.Transaction + 2, // 2: OldFaithful.GetRequest.version:type_name -> OldFaithful.VersionRequest + 6, // 3: OldFaithful.GetRequest.block_time:type_name -> OldFaithful.BlockTimeRequest + 4, // 4: OldFaithful.GetRequest.block:type_name -> OldFaithful.BlockRequest + 8, // 5: OldFaithful.GetRequest.transaction:type_name -> OldFaithful.TransactionRequest + 13, // 6: OldFaithful.GetResponse.error:type_name -> OldFaithful.GetResponseError + 3, // 7: OldFaithful.GetResponse.version:type_name -> OldFaithful.VersionResponse + 7, // 8: OldFaithful.GetResponse.block_time:type_name -> OldFaithful.BlockTimeResponse + 5, // 9: OldFaithful.GetResponse.block:type_name -> OldFaithful.BlockResponse + 9, // 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.GetBlock:input_type -> OldFaithful.BlockRequest - 5, // 14: OldFaithful.OldFaithful.GetBlockTime:input_type -> OldFaithful.BlockTimeRequest - 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.GetBlock:output_type -> OldFaithful.BlockResponse - 6, // 19: OldFaithful.OldFaithful.GetBlockTime:output_type -> OldFaithful.BlockTimeResponse - 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 + 15, // 12: OldFaithful.StreamBlocksRequest.filter:type_name -> OldFaithful.StreamBlocksFilter + 17, // 13: OldFaithful.StreamBlocksResponse.error:type_name -> OldFaithful.StreamBlocksError + 5, // 14: OldFaithful.StreamBlocksResponse.block:type_name -> OldFaithful.BlockResponse + 1, // 15: OldFaithful.StreamBlocksError.code:type_name -> OldFaithful.StreamBlocksErrorCode + 2, // 16: OldFaithful.OldFaithful.GetVersion:input_type -> OldFaithful.VersionRequest + 4, // 17: OldFaithful.OldFaithful.GetBlock:input_type -> OldFaithful.BlockRequest + 6, // 18: OldFaithful.OldFaithful.GetBlockTime:input_type -> OldFaithful.BlockTimeRequest + 8, // 19: OldFaithful.OldFaithful.GetTransaction:input_type -> OldFaithful.TransactionRequest + 11, // 20: OldFaithful.OldFaithful.Get:input_type -> OldFaithful.GetRequest + 14, // 21: OldFaithful.OldFaithful.StreamBlocks:input_type -> OldFaithful.StreamBlocksRequest + 3, // 22: OldFaithful.OldFaithful.GetVersion:output_type -> OldFaithful.VersionResponse + 5, // 23: OldFaithful.OldFaithful.GetBlock:output_type -> OldFaithful.BlockResponse + 7, // 24: OldFaithful.OldFaithful.GetBlockTime:output_type -> OldFaithful.BlockTimeResponse + 9, // 25: OldFaithful.OldFaithful.GetTransaction:output_type -> OldFaithful.TransactionResponse + 12, // 26: OldFaithful.OldFaithful.Get:output_type -> OldFaithful.GetResponse + 16, // 27: OldFaithful.OldFaithful.StreamBlocks:output_type -> OldFaithful.StreamBlocksResponse + 22, // [22:28] is the sub-list for method output_type + 16, // [16:22] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name } func init() { file_old_faithful_proto_init() } @@ -1080,152 +1411,7 @@ func file_old_faithful_proto_init() { if File_old_faithful_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_old_faithful_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*VersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_old_faithful_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*VersionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_old_faithful_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BlockRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_old_faithful_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*BlockResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_old_faithful_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*BlockTimeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_old_faithful_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*BlockTimeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_old_faithful_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*TransactionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_old_faithful_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*TransactionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_old_faithful_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Transaction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - 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 - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } + file_old_faithful_proto_msgTypes[3].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{ @@ -1241,13 +1427,18 @@ func file_old_faithful_proto_init() { (*GetResponse_Block)(nil), (*GetResponse_Transaction)(nil), } + file_old_faithful_proto_msgTypes[12].OneofWrappers = []any{} + file_old_faithful_proto_msgTypes[14].OneofWrappers = []any{ + (*StreamBlocksResponse_Error)(nil), + (*StreamBlocksResponse_Block)(nil), + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_old_faithful_proto_rawDesc, - NumEnums: 1, - NumMessages: 12, + NumEnums: 2, + NumMessages: 16, 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 29351c4c..7ad3b42b 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 @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.4.0 -// - protoc v5.27.1 +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.28.3 // source: old-faithful.proto package old_faithful_grpc @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.62.0 or later. -const _ = grpc.SupportPackageIsVersion8 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( OldFaithful_GetVersion_FullMethodName = "/OldFaithful.OldFaithful/GetVersion" @@ -24,6 +24,7 @@ const ( OldFaithful_GetBlockTime_FullMethodName = "/OldFaithful.OldFaithful/GetBlockTime" OldFaithful_GetTransaction_FullMethodName = "/OldFaithful.OldFaithful/GetTransaction" OldFaithful_Get_FullMethodName = "/OldFaithful.OldFaithful/Get" + OldFaithful_StreamBlocks_FullMethodName = "/OldFaithful.OldFaithful/StreamBlocks" ) // OldFaithfulClient is the client API for OldFaithful service. @@ -34,7 +35,8 @@ type OldFaithfulClient interface { GetBlock(ctx context.Context, in *BlockRequest, opts ...grpc.CallOption) (*BlockResponse, error) GetBlockTime(ctx context.Context, in *BlockTimeRequest, opts ...grpc.CallOption) (*BlockTimeResponse, error) GetTransaction(ctx context.Context, in *TransactionRequest, opts ...grpc.CallOption) (*TransactionResponse, error) - Get(ctx context.Context, opts ...grpc.CallOption) (OldFaithful_GetClient, error) + Get(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[GetRequest, GetResponse], error) + StreamBlocks(ctx context.Context, in *StreamBlocksRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamBlocksResponse], error) } type oldFaithfulClient struct { @@ -85,53 +87,57 @@ func (c *oldFaithfulClient) GetTransaction(ctx context.Context, in *TransactionR return out, nil } -func (c *oldFaithfulClient) Get(ctx context.Context, opts ...grpc.CallOption) (OldFaithful_GetClient, error) { +func (c *oldFaithfulClient) Get(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[GetRequest, GetResponse], error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) stream, err := c.cc.NewStream(ctx, &OldFaithful_ServiceDesc.Streams[0], OldFaithful_Get_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &oldFaithfulGetClient{ClientStream: stream} + x := &grpc.GenericClientStream[GetRequest, GetResponse]{ClientStream: stream} return x, nil } -type OldFaithful_GetClient interface { - Send(*GetRequest) error - Recv() (*GetResponse, error) - grpc.ClientStream -} - -type oldFaithfulGetClient struct { - grpc.ClientStream -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type OldFaithful_GetClient = grpc.BidiStreamingClient[GetRequest, GetResponse] -func (x *oldFaithfulGetClient) Send(m *GetRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *oldFaithfulGetClient) Recv() (*GetResponse, error) { - m := new(GetResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { +func (c *oldFaithfulClient) StreamBlocks(ctx context.Context, in *StreamBlocksRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamBlocksResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &OldFaithful_ServiceDesc.Streams[1], OldFaithful_StreamBlocks_FullMethodName, cOpts...) + if err != nil { return nil, err } - return m, nil + x := &grpc.GenericClientStream[StreamBlocksRequest, StreamBlocksResponse]{ClientStream: stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil } +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type OldFaithful_StreamBlocksClient = grpc.ServerStreamingClient[StreamBlocksResponse] + // OldFaithfulServer is the server API for OldFaithful service. // All implementations must embed UnimplementedOldFaithfulServer -// for forward compatibility +// for forward compatibility. type OldFaithfulServer interface { GetVersion(context.Context, *VersionRequest) (*VersionResponse, error) GetBlock(context.Context, *BlockRequest) (*BlockResponse, error) GetBlockTime(context.Context, *BlockTimeRequest) (*BlockTimeResponse, error) GetTransaction(context.Context, *TransactionRequest) (*TransactionResponse, error) - Get(OldFaithful_GetServer) error + Get(grpc.BidiStreamingServer[GetRequest, GetResponse]) error + StreamBlocks(*StreamBlocksRequest, grpc.ServerStreamingServer[StreamBlocksResponse]) error mustEmbedUnimplementedOldFaithfulServer() } -// UnimplementedOldFaithfulServer must be embedded to have forward compatible implementations. -type UnimplementedOldFaithfulServer struct { -} +// UnimplementedOldFaithfulServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedOldFaithfulServer struct{} func (UnimplementedOldFaithfulServer) GetVersion(context.Context, *VersionRequest) (*VersionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetVersion not implemented") @@ -145,10 +151,14 @@ func (UnimplementedOldFaithfulServer) GetBlockTime(context.Context, *BlockTimeRe func (UnimplementedOldFaithfulServer) GetTransaction(context.Context, *TransactionRequest) (*TransactionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetTransaction not implemented") } -func (UnimplementedOldFaithfulServer) Get(OldFaithful_GetServer) error { +func (UnimplementedOldFaithfulServer) Get(grpc.BidiStreamingServer[GetRequest, GetResponse]) error { return status.Errorf(codes.Unimplemented, "method Get not implemented") } +func (UnimplementedOldFaithfulServer) StreamBlocks(*StreamBlocksRequest, grpc.ServerStreamingServer[StreamBlocksResponse]) error { + return status.Errorf(codes.Unimplemented, "method StreamBlocks not implemented") +} func (UnimplementedOldFaithfulServer) mustEmbedUnimplementedOldFaithfulServer() {} +func (UnimplementedOldFaithfulServer) testEmbeddedByValue() {} // UnsafeOldFaithfulServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to OldFaithfulServer will @@ -158,6 +168,13 @@ type UnsafeOldFaithfulServer interface { } func RegisterOldFaithfulServer(s grpc.ServiceRegistrar, srv OldFaithfulServer) { + // If the following call pancis, it indicates UnimplementedOldFaithfulServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&OldFaithful_ServiceDesc, srv) } @@ -234,31 +251,23 @@ func _OldFaithful_GetTransaction_Handler(srv interface{}, ctx context.Context, d } func _OldFaithful_Get_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(OldFaithfulServer).Get(&oldFaithfulGetServer{ServerStream: stream}) + return srv.(OldFaithfulServer).Get(&grpc.GenericServerStream[GetRequest, GetResponse]{ServerStream: stream}) } -type OldFaithful_GetServer interface { - Send(*GetResponse) error - Recv() (*GetRequest, error) - grpc.ServerStream -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type OldFaithful_GetServer = grpc.BidiStreamingServer[GetRequest, GetResponse] -type oldFaithfulGetServer struct { - grpc.ServerStream -} - -func (x *oldFaithfulGetServer) Send(m *GetResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *oldFaithfulGetServer) Recv() (*GetRequest, error) { - m := new(GetRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err +func _OldFaithful_StreamBlocks_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(StreamBlocksRequest) + if err := stream.RecvMsg(m); err != nil { + return err } - return m, nil + return srv.(OldFaithfulServer).StreamBlocks(m, &grpc.GenericServerStream[StreamBlocksRequest, StreamBlocksResponse]{ServerStream: stream}) } +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type OldFaithful_StreamBlocksServer = grpc.ServerStreamingServer[StreamBlocksResponse] + // OldFaithful_ServiceDesc is the grpc.ServiceDesc for OldFaithful service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -290,6 +299,11 @@ var OldFaithful_ServiceDesc = grpc.ServiceDesc{ ServerStreams: true, ClientStreams: true, }, + { + StreamName: "StreamBlocks", + Handler: _OldFaithful_StreamBlocks_Handler, + ServerStreams: true, + }, }, Metadata: "old-faithful.proto", } diff --git a/old-faithful-proto/proto/old-faithful.proto b/old-faithful-proto/proto/old-faithful.proto index b5797eb3..82a22b88 100644 --- a/old-faithful-proto/proto/old-faithful.proto +++ b/old-faithful-proto/proto/old-faithful.proto @@ -84,8 +84,8 @@ message GetResponse { } enum GetResponseErrorCode { - INTERNAL = 0; - NOT_FOUND = 1; + GET_RESPONSE_INTERNAL = 0; + GET_RESPONSE_NOT_FOUND = 1; } message GetResponseError { @@ -102,8 +102,6 @@ message StreamBlocksRequest { message StreamBlocksFilter { repeated string account_include = 1; // Filter blocks/txns mentioning these accounts - optional bool include_transactions = 2; // Include full transaction details - optional bool include_accounts = 3; // Include account updates } message StreamBlocksResponse { @@ -119,7 +117,7 @@ message StreamBlocksError { } enum StreamBlocksErrorCode { - INTERNAL = 0; - INVALID_SLOT_RANGE = 1; - SLOT_NOT_FOUND = 2; + STREAM_BLOCKS_INTERNAL = 0; + STREAM_BLOCKS_INVALID_SLOT_RANGE = 1; + STREAM_BLOCKS_SLOT_NOT_FOUND = 2; } From b3e3754b52be72843a7d6aadc62c60ab3f80b81a Mon Sep 17 00:00:00 2001 From: anjor Date: Wed, 30 Oct 2024 09:23:44 +0000 Subject: [PATCH 03/11] leave old as is --- .../old-faithful-grpc/old-faithful.pb.go | 109 +++++++++--------- old-faithful-proto/proto/old-faithful.proto | 4 +- 2 files changed, 56 insertions(+), 57 deletions(-) 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 d17b1b87..5ed7b72b 100644 --- a/old-faithful-proto/old-faithful-grpc/old-faithful.pb.go +++ b/old-faithful-proto/old-faithful-grpc/old-faithful.pb.go @@ -23,19 +23,19 @@ const ( type GetResponseErrorCode int32 const ( - GetResponseErrorCode_GET_RESPONSE_INTERNAL GetResponseErrorCode = 0 - GetResponseErrorCode_GET_RESPONSE_NOT_FOUND GetResponseErrorCode = 1 + GetResponseErrorCode_INTERNAL GetResponseErrorCode = 0 + GetResponseErrorCode_NOT_FOUND GetResponseErrorCode = 1 ) // Enum value maps for GetResponseErrorCode. var ( GetResponseErrorCode_name = map[int32]string{ - 0: "GET_RESPONSE_INTERNAL", - 1: "GET_RESPONSE_NOT_FOUND", + 0: "INTERNAL", + 1: "NOT_FOUND", } GetResponseErrorCode_value = map[string]int32{ - "GET_RESPONSE_INTERNAL": 0, - "GET_RESPONSE_NOT_FOUND": 1, + "INTERNAL": 0, + "NOT_FOUND": 1, } ) @@ -902,7 +902,7 @@ func (x *GetResponseError) GetCode() GetResponseErrorCode { if x != nil { return x.Code } - return GetResponseErrorCode_GET_RESPONSE_INTERNAL + return GetResponseErrorCode_INTERNAL } func (x *GetResponseError) GetMessage() string { @@ -1286,54 +1286,53 @@ var file_old_faithful_proto_rawDesc = []byte{ 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 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, 0x4d, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x47, - 0x45, 0x54, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x45, - 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x47, 0x45, 0x54, 0x5f, 0x52, 0x45, - 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, - 0x10, 0x01, 0x2a, 0x7b, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x53, - 0x54, 0x52, 0x45, 0x41, 0x4d, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x53, 0x5f, 0x49, 0x4e, 0x54, - 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x24, 0x0a, 0x20, 0x53, 0x54, 0x52, 0x45, 0x41, - 0x4d, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x53, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, - 0x5f, 0x53, 0x4c, 0x4f, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x01, 0x12, 0x20, 0x0a, - 0x1c, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x53, 0x5f, 0x53, - 0x4c, 0x4f, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x02, 0x32, - 0xd2, 0x03, 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, 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, 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, 0x54, 0x69, - 0x6d, 0x65, 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, 0x12, 0x55, 0x0a, - 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x20, 0x2e, - 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x21, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 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, + 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, 0x2a, 0x7b, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, + 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x5f, 0x42, 0x4c, 0x4f, 0x43, + 0x4b, 0x53, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x24, 0x0a, + 0x20, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x53, 0x5f, 0x49, + 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x53, 0x4c, 0x4f, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x47, + 0x45, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x5f, 0x42, 0x4c, + 0x4f, 0x43, 0x4b, 0x53, 0x5f, 0x53, 0x4c, 0x4f, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, + 0x55, 0x4e, 0x44, 0x10, 0x02, 0x32, 0xd2, 0x03, 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, 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, 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, 0x54, 0x69, 0x6d, 0x65, 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, 0x12, 0x55, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x73, 0x12, 0x20, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, + 0x6c, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, + 0x66, 0x75, 0x6c, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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 ( diff --git a/old-faithful-proto/proto/old-faithful.proto b/old-faithful-proto/proto/old-faithful.proto index 82a22b88..1a7ed9ec 100644 --- a/old-faithful-proto/proto/old-faithful.proto +++ b/old-faithful-proto/proto/old-faithful.proto @@ -84,8 +84,8 @@ message GetResponse { } enum GetResponseErrorCode { - GET_RESPONSE_INTERNAL = 0; - GET_RESPONSE_NOT_FOUND = 1; + INTERNAL = 0; + NOT_FOUND = 1; } message GetResponseError { From 8de6a649483c18b5fed845959b7bf3ff71450fd6 Mon Sep 17 00:00:00 2001 From: anjor Date: Wed, 30 Oct 2024 13:22:27 +0000 Subject: [PATCH 04/11] return BlockResponse --- grpc-server.go | 4 ++++ old-faithful-proto/proto/old-faithful.proto | 20 +------------------- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/grpc-server.go b/grpc-server.go index c5155a6f..63a3fc11 100644 --- a/grpc-server.go +++ b/grpc-server.go @@ -621,3 +621,7 @@ func (multi *MultiEpoch) GetBlockTime(ctx context.Context, params *old_faithful_ BlockTime: int64(blocktime), }, nil } + +func (multi *MultiEpoch) StreamBlocks(*old_faithful_grpc.StreamBlocksRequest, grpc.ServerStreamingServer[*old_faithful_grpc.StreamBlocksResponse]) error { + return nil +} diff --git a/old-faithful-proto/proto/old-faithful.proto b/old-faithful-proto/proto/old-faithful.proto index 1a7ed9ec..de328a7e 100644 --- a/old-faithful-proto/proto/old-faithful.proto +++ b/old-faithful-proto/proto/old-faithful.proto @@ -12,7 +12,7 @@ service OldFaithful { rpc Get(stream GetRequest) returns (stream GetResponse); - rpc StreamBlocks(StreamBlocksRequest) returns (stream StreamBlocksResponse); + rpc StreamBlocks(StreamBlocksRequest) returns (stream BlockResponse); } message VersionRequest {} @@ -103,21 +103,3 @@ message StreamBlocksRequest { message StreamBlocksFilter { repeated string account_include = 1; // Filter blocks/txns mentioning these accounts } - -message StreamBlocksResponse { - oneof response { - StreamBlocksError error = 1; - BlockResponse block = 2; - } -} - -message StreamBlocksError { - StreamBlocksErrorCode code = 1; - string message = 2; -} - -enum StreamBlocksErrorCode { - STREAM_BLOCKS_INTERNAL = 0; - STREAM_BLOCKS_INVALID_SLOT_RANGE = 1; - STREAM_BLOCKS_SLOT_NOT_FOUND = 2; -} From a3a97c0ca96ff70de492be5df7767d8a0244b026 Mon Sep 17 00:00:00 2001 From: anjor Date: Wed, 30 Oct 2024 13:22:38 +0000 Subject: [PATCH 05/11] gen code --- .../old-faithful-grpc/old-faithful.pb.go | 389 ++++-------------- .../old-faithful-grpc/old-faithful_grpc.pb.go | 16 +- 2 files changed, 95 insertions(+), 310 deletions(-) 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 5ed7b72b..cd4f53a4 100644 --- a/old-faithful-proto/old-faithful-grpc/old-faithful.pb.go +++ b/old-faithful-proto/old-faithful-grpc/old-faithful.pb.go @@ -66,55 +66,6 @@ func (GetResponseErrorCode) EnumDescriptor() ([]byte, []int) { return file_old_faithful_proto_rawDescGZIP(), []int{0} } -type StreamBlocksErrorCode int32 - -const ( - StreamBlocksErrorCode_STREAM_BLOCKS_INTERNAL StreamBlocksErrorCode = 0 - StreamBlocksErrorCode_STREAM_BLOCKS_INVALID_SLOT_RANGE StreamBlocksErrorCode = 1 - StreamBlocksErrorCode_STREAM_BLOCKS_SLOT_NOT_FOUND StreamBlocksErrorCode = 2 -) - -// Enum value maps for StreamBlocksErrorCode. -var ( - StreamBlocksErrorCode_name = map[int32]string{ - 0: "STREAM_BLOCKS_INTERNAL", - 1: "STREAM_BLOCKS_INVALID_SLOT_RANGE", - 2: "STREAM_BLOCKS_SLOT_NOT_FOUND", - } - StreamBlocksErrorCode_value = map[string]int32{ - "STREAM_BLOCKS_INTERNAL": 0, - "STREAM_BLOCKS_INVALID_SLOT_RANGE": 1, - "STREAM_BLOCKS_SLOT_NOT_FOUND": 2, - } -) - -func (x StreamBlocksErrorCode) Enum() *StreamBlocksErrorCode { - p := new(StreamBlocksErrorCode) - *p = x - return p -} - -func (x StreamBlocksErrorCode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (StreamBlocksErrorCode) Descriptor() protoreflect.EnumDescriptor { - return file_old_faithful_proto_enumTypes[1].Descriptor() -} - -func (StreamBlocksErrorCode) Type() protoreflect.EnumType { - return &file_old_faithful_proto_enumTypes[1] -} - -func (x StreamBlocksErrorCode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use StreamBlocksErrorCode.Descriptor instead. -func (StreamBlocksErrorCode) EnumDescriptor() ([]byte, []int) { - return file_old_faithful_proto_rawDescGZIP(), []int{1} -} - type VersionRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1018,138 +969,6 @@ func (x *StreamBlocksFilter) GetAccountInclude() []string { return nil } -type StreamBlocksResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Response: - // - // *StreamBlocksResponse_Error - // *StreamBlocksResponse_Block - Response isStreamBlocksResponse_Response `protobuf_oneof:"response"` -} - -func (x *StreamBlocksResponse) Reset() { - *x = StreamBlocksResponse{} - mi := &file_old_faithful_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StreamBlocksResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamBlocksResponse) ProtoMessage() {} - -func (x *StreamBlocksResponse) ProtoReflect() protoreflect.Message { - mi := &file_old_faithful_proto_msgTypes[14] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StreamBlocksResponse.ProtoReflect.Descriptor instead. -func (*StreamBlocksResponse) Descriptor() ([]byte, []int) { - return file_old_faithful_proto_rawDescGZIP(), []int{14} -} - -func (m *StreamBlocksResponse) GetResponse() isStreamBlocksResponse_Response { - if m != nil { - return m.Response - } - return nil -} - -func (x *StreamBlocksResponse) GetError() *StreamBlocksError { - if x, ok := x.GetResponse().(*StreamBlocksResponse_Error); ok { - return x.Error - } - return nil -} - -func (x *StreamBlocksResponse) GetBlock() *BlockResponse { - if x, ok := x.GetResponse().(*StreamBlocksResponse_Block); ok { - return x.Block - } - return nil -} - -type isStreamBlocksResponse_Response interface { - isStreamBlocksResponse_Response() -} - -type StreamBlocksResponse_Error struct { - Error *StreamBlocksError `protobuf:"bytes,1,opt,name=error,proto3,oneof"` -} - -type StreamBlocksResponse_Block struct { - Block *BlockResponse `protobuf:"bytes,2,opt,name=block,proto3,oneof"` -} - -func (*StreamBlocksResponse_Error) isStreamBlocksResponse_Response() {} - -func (*StreamBlocksResponse_Block) isStreamBlocksResponse_Response() {} - -type StreamBlocksError struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Code StreamBlocksErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=OldFaithful.StreamBlocksErrorCode" json:"code,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` -} - -func (x *StreamBlocksError) Reset() { - *x = StreamBlocksError{} - mi := &file_old_faithful_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StreamBlocksError) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamBlocksError) ProtoMessage() {} - -func (x *StreamBlocksError) ProtoReflect() protoreflect.Message { - mi := &file_old_faithful_proto_msgTypes[15] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StreamBlocksError.ProtoReflect.Descriptor instead. -func (*StreamBlocksError) Descriptor() ([]byte, []int) { - return file_old_faithful_proto_rawDescGZIP(), []int{15} -} - -func (x *StreamBlocksError) GetCode() StreamBlocksErrorCode { - if x != nil { - return x.Code - } - return StreamBlocksErrorCode_STREAM_BLOCKS_INTERNAL -} - -func (x *StreamBlocksError) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - var File_old_faithful_proto protoreflect.FileDescriptor var file_old_faithful_proto_rawDesc = []byte{ @@ -1270,69 +1089,45 @@ var file_old_faithful_proto_rawDesc = []byte{ 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x14, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, - 0x6c, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x32, 0x0a, 0x05, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 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, - 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x65, 0x0a, 0x11, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x12, 0x36, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x22, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 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, 0x2a, 0x7b, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, - 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x5f, 0x42, 0x4c, 0x4f, 0x43, - 0x4b, 0x53, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x24, 0x0a, - 0x20, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x53, 0x5f, 0x49, - 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x53, 0x4c, 0x4f, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x47, - 0x45, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x5f, 0x42, 0x4c, - 0x4f, 0x43, 0x4b, 0x53, 0x5f, 0x53, 0x4c, 0x4f, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, - 0x55, 0x4e, 0x44, 0x10, 0x02, 0x32, 0xd2, 0x03, 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, 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, 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, 0x54, 0x69, 0x6d, 0x65, 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, 0x12, 0x55, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x73, 0x12, 0x20, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, - 0x6c, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, - 0x66, 0x75, 0x6c, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, + 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x64, 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, 0xcb, 0x03, 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, 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, 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, 0x54, + 0x69, 0x6d, 0x65, 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, 0x12, 0x4e, + 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x20, + 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 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, 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 ( @@ -1347,62 +1142,56 @@ func file_old_faithful_proto_rawDescGZIP() []byte { return file_old_faithful_proto_rawDescData } -var file_old_faithful_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_old_faithful_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_old_faithful_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_old_faithful_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_old_faithful_proto_goTypes = []any{ - (GetResponseErrorCode)(0), // 0: OldFaithful.GetResponseErrorCode - (StreamBlocksErrorCode)(0), // 1: OldFaithful.StreamBlocksErrorCode - (*VersionRequest)(nil), // 2: OldFaithful.VersionRequest - (*VersionResponse)(nil), // 3: OldFaithful.VersionResponse - (*BlockRequest)(nil), // 4: OldFaithful.BlockRequest - (*BlockResponse)(nil), // 5: OldFaithful.BlockResponse - (*BlockTimeRequest)(nil), // 6: OldFaithful.BlockTimeRequest - (*BlockTimeResponse)(nil), // 7: OldFaithful.BlockTimeResponse - (*TransactionRequest)(nil), // 8: OldFaithful.TransactionRequest - (*TransactionResponse)(nil), // 9: OldFaithful.TransactionResponse - (*Transaction)(nil), // 10: OldFaithful.Transaction - (*GetRequest)(nil), // 11: OldFaithful.GetRequest - (*GetResponse)(nil), // 12: OldFaithful.GetResponse - (*GetResponseError)(nil), // 13: OldFaithful.GetResponseError - (*StreamBlocksRequest)(nil), // 14: OldFaithful.StreamBlocksRequest - (*StreamBlocksFilter)(nil), // 15: OldFaithful.StreamBlocksFilter - (*StreamBlocksResponse)(nil), // 16: OldFaithful.StreamBlocksResponse - (*StreamBlocksError)(nil), // 17: OldFaithful.StreamBlocksError + (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 + (*BlockTimeRequest)(nil), // 5: OldFaithful.BlockTimeRequest + (*BlockTimeResponse)(nil), // 6: OldFaithful.BlockTimeResponse + (*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 + (*StreamBlocksRequest)(nil), // 13: OldFaithful.StreamBlocksRequest + (*StreamBlocksFilter)(nil), // 14: OldFaithful.StreamBlocksFilter } var file_old_faithful_proto_depIdxs = []int32{ - 10, // 0: OldFaithful.BlockResponse.transactions:type_name -> OldFaithful.Transaction - 10, // 1: OldFaithful.TransactionResponse.transaction:type_name -> OldFaithful.Transaction - 2, // 2: OldFaithful.GetRequest.version:type_name -> OldFaithful.VersionRequest - 6, // 3: OldFaithful.GetRequest.block_time:type_name -> OldFaithful.BlockTimeRequest - 4, // 4: OldFaithful.GetRequest.block:type_name -> OldFaithful.BlockRequest - 8, // 5: OldFaithful.GetRequest.transaction:type_name -> OldFaithful.TransactionRequest - 13, // 6: OldFaithful.GetResponse.error:type_name -> OldFaithful.GetResponseError - 3, // 7: OldFaithful.GetResponse.version:type_name -> OldFaithful.VersionResponse - 7, // 8: OldFaithful.GetResponse.block_time:type_name -> OldFaithful.BlockTimeResponse - 5, // 9: OldFaithful.GetResponse.block:type_name -> OldFaithful.BlockResponse - 9, // 10: OldFaithful.GetResponse.transaction:type_name -> OldFaithful.TransactionResponse + 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 + 5, // 3: OldFaithful.GetRequest.block_time:type_name -> OldFaithful.BlockTimeRequest + 3, // 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 + 6, // 8: OldFaithful.GetResponse.block_time:type_name -> OldFaithful.BlockTimeResponse + 4, // 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 - 15, // 12: OldFaithful.StreamBlocksRequest.filter:type_name -> OldFaithful.StreamBlocksFilter - 17, // 13: OldFaithful.StreamBlocksResponse.error:type_name -> OldFaithful.StreamBlocksError - 5, // 14: OldFaithful.StreamBlocksResponse.block:type_name -> OldFaithful.BlockResponse - 1, // 15: OldFaithful.StreamBlocksError.code:type_name -> OldFaithful.StreamBlocksErrorCode - 2, // 16: OldFaithful.OldFaithful.GetVersion:input_type -> OldFaithful.VersionRequest - 4, // 17: OldFaithful.OldFaithful.GetBlock:input_type -> OldFaithful.BlockRequest - 6, // 18: OldFaithful.OldFaithful.GetBlockTime:input_type -> OldFaithful.BlockTimeRequest - 8, // 19: OldFaithful.OldFaithful.GetTransaction:input_type -> OldFaithful.TransactionRequest - 11, // 20: OldFaithful.OldFaithful.Get:input_type -> OldFaithful.GetRequest - 14, // 21: OldFaithful.OldFaithful.StreamBlocks:input_type -> OldFaithful.StreamBlocksRequest - 3, // 22: OldFaithful.OldFaithful.GetVersion:output_type -> OldFaithful.VersionResponse - 5, // 23: OldFaithful.OldFaithful.GetBlock:output_type -> OldFaithful.BlockResponse - 7, // 24: OldFaithful.OldFaithful.GetBlockTime:output_type -> OldFaithful.BlockTimeResponse - 9, // 25: OldFaithful.OldFaithful.GetTransaction:output_type -> OldFaithful.TransactionResponse - 12, // 26: OldFaithful.OldFaithful.Get:output_type -> OldFaithful.GetResponse - 16, // 27: OldFaithful.OldFaithful.StreamBlocks:output_type -> OldFaithful.StreamBlocksResponse - 22, // [22:28] is the sub-list for method output_type - 16, // [16:22] is the sub-list for method input_type - 16, // [16:16] is the sub-list for extension type_name - 16, // [16:16] is the sub-list for extension extendee - 0, // [0:16] is the sub-list for field type_name + 14, // 12: OldFaithful.StreamBlocksRequest.filter:type_name -> OldFaithful.StreamBlocksFilter + 1, // 13: OldFaithful.OldFaithful.GetVersion:input_type -> OldFaithful.VersionRequest + 3, // 14: OldFaithful.OldFaithful.GetBlock:input_type -> OldFaithful.BlockRequest + 5, // 15: OldFaithful.OldFaithful.GetBlockTime:input_type -> OldFaithful.BlockTimeRequest + 7, // 16: OldFaithful.OldFaithful.GetTransaction:input_type -> OldFaithful.TransactionRequest + 10, // 17: OldFaithful.OldFaithful.Get:input_type -> OldFaithful.GetRequest + 13, // 18: OldFaithful.OldFaithful.StreamBlocks:input_type -> OldFaithful.StreamBlocksRequest + 2, // 19: OldFaithful.OldFaithful.GetVersion:output_type -> OldFaithful.VersionResponse + 4, // 20: OldFaithful.OldFaithful.GetBlock:output_type -> OldFaithful.BlockResponse + 6, // 21: OldFaithful.OldFaithful.GetBlockTime:output_type -> OldFaithful.BlockTimeResponse + 8, // 22: OldFaithful.OldFaithful.GetTransaction:output_type -> OldFaithful.TransactionResponse + 11, // 23: OldFaithful.OldFaithful.Get:output_type -> OldFaithful.GetResponse + 4, // 24: OldFaithful.OldFaithful.StreamBlocks:output_type -> OldFaithful.BlockResponse + 19, // [19:25] is the sub-list for method output_type + 13, // [13:19] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name } func init() { file_old_faithful_proto_init() } @@ -1427,17 +1216,13 @@ func file_old_faithful_proto_init() { (*GetResponse_Transaction)(nil), } file_old_faithful_proto_msgTypes[12].OneofWrappers = []any{} - file_old_faithful_proto_msgTypes[14].OneofWrappers = []any{ - (*StreamBlocksResponse_Error)(nil), - (*StreamBlocksResponse_Block)(nil), - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_old_faithful_proto_rawDesc, - NumEnums: 2, - NumMessages: 16, + NumEnums: 1, + NumMessages: 14, 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 7ad3b42b..309884be 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 @@ -36,7 +36,7 @@ type OldFaithfulClient interface { GetBlockTime(ctx context.Context, in *BlockTimeRequest, opts ...grpc.CallOption) (*BlockTimeResponse, error) GetTransaction(ctx context.Context, in *TransactionRequest, opts ...grpc.CallOption) (*TransactionResponse, error) Get(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[GetRequest, GetResponse], error) - StreamBlocks(ctx context.Context, in *StreamBlocksRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamBlocksResponse], error) + StreamBlocks(ctx context.Context, in *StreamBlocksRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[BlockResponse], error) } type oldFaithfulClient struct { @@ -100,13 +100,13 @@ func (c *oldFaithfulClient) Get(ctx context.Context, opts ...grpc.CallOption) (g // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. type OldFaithful_GetClient = grpc.BidiStreamingClient[GetRequest, GetResponse] -func (c *oldFaithfulClient) StreamBlocks(ctx context.Context, in *StreamBlocksRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamBlocksResponse], error) { +func (c *oldFaithfulClient) StreamBlocks(ctx context.Context, in *StreamBlocksRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[BlockResponse], error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) stream, err := c.cc.NewStream(ctx, &OldFaithful_ServiceDesc.Streams[1], OldFaithful_StreamBlocks_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &grpc.GenericClientStream[StreamBlocksRequest, StreamBlocksResponse]{ClientStream: stream} + x := &grpc.GenericClientStream[StreamBlocksRequest, BlockResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -117,7 +117,7 @@ func (c *oldFaithfulClient) StreamBlocks(ctx context.Context, in *StreamBlocksRe } // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type OldFaithful_StreamBlocksClient = grpc.ServerStreamingClient[StreamBlocksResponse] +type OldFaithful_StreamBlocksClient = grpc.ServerStreamingClient[BlockResponse] // OldFaithfulServer is the server API for OldFaithful service. // All implementations must embed UnimplementedOldFaithfulServer @@ -128,7 +128,7 @@ type OldFaithfulServer interface { GetBlockTime(context.Context, *BlockTimeRequest) (*BlockTimeResponse, error) GetTransaction(context.Context, *TransactionRequest) (*TransactionResponse, error) Get(grpc.BidiStreamingServer[GetRequest, GetResponse]) error - StreamBlocks(*StreamBlocksRequest, grpc.ServerStreamingServer[StreamBlocksResponse]) error + StreamBlocks(*StreamBlocksRequest, grpc.ServerStreamingServer[BlockResponse]) error mustEmbedUnimplementedOldFaithfulServer() } @@ -154,7 +154,7 @@ func (UnimplementedOldFaithfulServer) GetTransaction(context.Context, *Transacti func (UnimplementedOldFaithfulServer) Get(grpc.BidiStreamingServer[GetRequest, GetResponse]) error { return status.Errorf(codes.Unimplemented, "method Get not implemented") } -func (UnimplementedOldFaithfulServer) StreamBlocks(*StreamBlocksRequest, grpc.ServerStreamingServer[StreamBlocksResponse]) error { +func (UnimplementedOldFaithfulServer) StreamBlocks(*StreamBlocksRequest, grpc.ServerStreamingServer[BlockResponse]) error { return status.Errorf(codes.Unimplemented, "method StreamBlocks not implemented") } func (UnimplementedOldFaithfulServer) mustEmbedUnimplementedOldFaithfulServer() {} @@ -262,11 +262,11 @@ func _OldFaithful_StreamBlocks_Handler(srv interface{}, stream grpc.ServerStream if err := stream.RecvMsg(m); err != nil { return err } - return srv.(OldFaithfulServer).StreamBlocks(m, &grpc.GenericServerStream[StreamBlocksRequest, StreamBlocksResponse]{ServerStream: stream}) + return srv.(OldFaithfulServer).StreamBlocks(m, &grpc.GenericServerStream[StreamBlocksRequest, BlockResponse]{ServerStream: stream}) } // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type OldFaithful_StreamBlocksServer = grpc.ServerStreamingServer[StreamBlocksResponse] +type OldFaithful_StreamBlocksServer = grpc.ServerStreamingServer[BlockResponse] // OldFaithful_ServiceDesc is the grpc.ServiceDesc for OldFaithful service. // It's only intended for direct use with grpc.RegisterService, From 156450ee1b9f19927c520896ad689dfcff2db9f4 Mon Sep 17 00:00:00 2001 From: anjor Date: Wed, 30 Oct 2024 23:27:22 +0000 Subject: [PATCH 06/11] minor --- grpc-server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grpc-server.go b/grpc-server.go index 63a3fc11..7eabe30c 100644 --- a/grpc-server.go +++ b/grpc-server.go @@ -622,6 +622,6 @@ func (multi *MultiEpoch) GetBlockTime(ctx context.Context, params *old_faithful_ }, nil } -func (multi *MultiEpoch) StreamBlocks(*old_faithful_grpc.StreamBlocksRequest, grpc.ServerStreamingServer[*old_faithful_grpc.StreamBlocksResponse]) error { +func (multi *MultiEpoch) StreamBlocks(params *old_faithful_grpc.StreamBlocksRequest, ser old_faithful_grpc.OldFaithful_StreamBlocksServer) error { return nil } From a58987859d3149d5e3c3dcb169f2a8b82e5d78b4 Mon Sep 17 00:00:00 2001 From: anjor Date: Tue, 5 Nov 2024 18:14:11 +0000 Subject: [PATCH 07/11] implementation --- grpc-server.go | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/grpc-server.go b/grpc-server.go index 7eabe30c..3215c3a4 100644 --- a/grpc-server.go +++ b/grpc-server.go @@ -28,6 +28,8 @@ import ( "k8s.io/klog/v2" ) +const maxSlotsToStream uint64 = 100 + // ListeAndServe starts listening on the configured address and serves the RPC API. func (me *MultiEpoch) ListenAndServeGRPC(ctx context.Context, listenOn string) error { lis, err := net.Listen("tcp", listenOn) @@ -623,5 +625,69 @@ func (multi *MultiEpoch) GetBlockTime(ctx context.Context, params *old_faithful_ } func (multi *MultiEpoch) StreamBlocks(params *old_faithful_grpc.StreamBlocksRequest, ser old_faithful_grpc.OldFaithful_StreamBlocksServer) error { + ctx := ser.Context() + + startSlot := params.StartSlot + endSlot := startSlot + maxSlotsToStream + + if params.EndSlot != nil { + endSlot = *params.EndSlot + } + + filterFunc := func(block *old_faithful_grpc.BlockResponse) bool { + if params.Filter == nil || len(params.Filter.AccountInclude) == 0 { + retrun true + } + + return blockContainsAccounts(block, params.Filter.AccountInclude) + } + + for slot := startSlot; slot <= endSlot; slot++ { + select { + case <- ctx.Done(): + return ctx.Err() + default: + } + + epochNumber := CalcEpochForSlot(slot) + epochHandler, err := multi.GetEpoch(epochNumber) + if err != nil { + klog.Warningf("Epoch %d not available, skipping slot %d", epochNumber, slot) + continue + } + + block, err := multi.GetBlock(ctx, &old_faithful_grpc.BlockRequest{Slot: slot}) + if err != nil { + if status.Code(err) == codes.NotFound { + continue // is this the right thing to do? + } + return err + } + + if filterFunc(block) { + if err := ser.Send(block); err != nil { + return err + } + } + } + return nil } + +func blockContainsAccounts(block *old_faithful_grpc.BlockResponse, accounts []string) bool { + accountSet := make(map[string]struct{}, len(accounts)) + for _, acc := range accounts { + accountSet[acc] = struct{}{} + } + + for _, tx := range block.Transactions { + for _, acc := range tx.Transation.Message.AccountKeys { + if _, exists := accountSet[string(acc)]; exists { + return true + } + } + + } + + return false +} From 4e6ee27cac3da126a9975848ee2b92ab0c97a8f2 Mon Sep 17 00:00:00 2001 From: anjor Date: Tue, 5 Nov 2024 18:16:48 +0000 Subject: [PATCH 08/11] fix --- grpc-server.go | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/grpc-server.go b/grpc-server.go index 3215c3a4..f70007d6 100644 --- a/grpc-server.go +++ b/grpc-server.go @@ -636,7 +636,7 @@ func (multi *MultiEpoch) StreamBlocks(params *old_faithful_grpc.StreamBlocksRequ filterFunc := func(block *old_faithful_grpc.BlockResponse) bool { if params.Filter == nil || len(params.Filter.AccountInclude) == 0 { - retrun true + return true } return blockContainsAccounts(block, params.Filter.AccountInclude) @@ -644,16 +644,9 @@ func (multi *MultiEpoch) StreamBlocks(params *old_faithful_grpc.StreamBlocksRequ for slot := startSlot; slot <= endSlot; slot++ { select { - case <- ctx.Done(): - return ctx.Err() - default: - } - - epochNumber := CalcEpochForSlot(slot) - epochHandler, err := multi.GetEpoch(epochNumber) - if err != nil { - klog.Warningf("Epoch %d not available, skipping slot %d", epochNumber, slot) - continue + case <-ctx.Done(): + return ctx.Err() + default: } block, err := multi.GetBlock(ctx, &old_faithful_grpc.BlockRequest{Slot: slot}) From 0af7f33974e16ee423026090b37b611ed38d44f0 Mon Sep 17 00:00:00 2001 From: anjor Date: Tue, 5 Nov 2024 18:25:54 +0000 Subject: [PATCH 09/11] contains accounts --- grpc-server.go | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/grpc-server.go b/grpc-server.go index f70007d6..baa41f9d 100644 --- a/grpc-server.go +++ b/grpc-server.go @@ -668,19 +668,5 @@ func (multi *MultiEpoch) StreamBlocks(params *old_faithful_grpc.StreamBlocksRequ } func blockContainsAccounts(block *old_faithful_grpc.BlockResponse, accounts []string) bool { - accountSet := make(map[string]struct{}, len(accounts)) - for _, acc := range accounts { - accountSet[acc] = struct{}{} - } - - for _, tx := range block.Transactions { - for _, acc := range tx.Transation.Message.AccountKeys { - if _, exists := accountSet[string(acc)]; exists { - return true - } - } - - } - - return false + return true // to do } From ef05807431a33bd3cf29ebedbca3c42e81a56b6f Mon Sep 17 00:00:00 2001 From: anjor Date: Tue, 5 Nov 2024 21:02:31 +0000 Subject: [PATCH 10/11] impl --- grpc-server.go | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/grpc-server.go b/grpc-server.go index baa41f9d..989b3278 100644 --- a/grpc-server.go +++ b/grpc-server.go @@ -19,6 +19,7 @@ import ( cidlink "github.com/ipld/go-ipld-prime/linking/cid" "github.com/rpcpool/yellowstone-faithful/compactindexsized" "github.com/rpcpool/yellowstone-faithful/ipld/ipldbindcode" + "github.com/rpcpool/yellowstone-faithful/iplddecoders" old_faithful_grpc "github.com/rpcpool/yellowstone-faithful/old-faithful-proto/old-faithful-grpc" "golang.org/x/sync/errgroup" "google.golang.org/grpc" @@ -668,5 +669,45 @@ func (multi *MultiEpoch) StreamBlocks(params *old_faithful_grpc.StreamBlocksRequ } func blockContainsAccounts(block *old_faithful_grpc.BlockResponse, accounts []string) bool { - return true // to do + accountSet := make(map[string]struct{}, len(accounts)) + for _, acc := range accounts { + accountSet[acc] = struct{}{} + } + + for _, tx := range block.Transactions { + decoded, err := iplddecoders.DecodeTransaction(tx.Transaction) + if err != nil { + klog.Warningf("Failed to decode transaction: %w", err) + continue // skip if there's error decoding + } + solTx, err := decoded.GetSolanaTransaction() + if err != nil { + klog.Warningf("Failed to get sol transaction: %w", err) + continue + } + + for _, acc := range solTx.Message.AccountKeys { + if _, exists := accountSet[acc.String()]; exists { + return true + } + } + + for _, inst := range solTx.Message.Instructions { + programId := solTx.Message.AccountKeys[inst.ProgramIDIndex] + if _, exists := accountSet[programId.String()]; exists { + return true + } + + for _, accIdx := range inst.Accounts { + if _, exists := accountSet[string(solTx.Message.AccountKeys[accIdx].String())]; exists { + return true + } + + } + } + + } + + return false + } From 5f6cd6fa47315db2d145cee34dc8e0d03cc3788d Mon Sep 17 00:00:00 2001 From: anjor Date: Wed, 6 Nov 2024 11:18:24 +0000 Subject: [PATCH 11/11] remove redundant loop --- grpc-server.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/grpc-server.go b/grpc-server.go index 989b3278..b4e2a165 100644 --- a/grpc-server.go +++ b/grpc-server.go @@ -692,20 +692,6 @@ func blockContainsAccounts(block *old_faithful_grpc.BlockResponse, accounts []st } } - for _, inst := range solTx.Message.Instructions { - programId := solTx.Message.AccountKeys[inst.ProgramIDIndex] - if _, exists := accountSet[programId.String()]; exists { - return true - } - - for _, accIdx := range inst.Accounts { - if _, exists := accountSet[string(solTx.Message.AccountKeys[accIdx].String())]; exists { - return true - } - - } - } - } return false