From 9e5f476b45f33075e19df296ba58794a7a984e68 Mon Sep 17 00:00:00 2001 From: anjor Date: Fri, 8 Nov 2024 22:02:33 +0000 Subject: [PATCH] add stream transactions protobuf --- .../old-faithful-grpc/old-faithful.pb.go | 323 ++++++++++++++---- .../old-faithful-grpc/old-faithful_grpc.pb.go | 53 ++- old-faithful-proto/proto/old-faithful.proto | 17 +- 3 files changed, 313 insertions(+), 80 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 cd4f53a4..ba476802 100644 --- a/old-faithful-proto/old-faithful-grpc/old-faithful.pb.go +++ b/old-faithful-proto/old-faithful-grpc/old-faithful.pb.go @@ -869,7 +869,7 @@ type StreamBlocksRequest struct { 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 + EndSlot *uint64 `protobuf:"varint,2,opt,name=end_slot,json=endSlot,proto3,oneof" json:"end_slot,omitempty"` Filter *StreamBlocksFilter `protobuf:"bytes,3,opt,name=filter,proto3,oneof" json:"filter,omitempty"` } @@ -969,6 +969,144 @@ func (x *StreamBlocksFilter) GetAccountInclude() []string { return nil } +type StreamTransactionsRequest 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"` + Filter *StreamTransactionsFilter `protobuf:"bytes,3,opt,name=filter,proto3,oneof" json:"filter,omitempty"` +} + +func (x *StreamTransactionsRequest) Reset() { + *x = StreamTransactionsRequest{} + mi := &file_old_faithful_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StreamTransactionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamTransactionsRequest) ProtoMessage() {} + +func (x *StreamTransactionsRequest) 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 StreamTransactionsRequest.ProtoReflect.Descriptor instead. +func (*StreamTransactionsRequest) Descriptor() ([]byte, []int) { + return file_old_faithful_proto_rawDescGZIP(), []int{14} +} + +func (x *StreamTransactionsRequest) GetStartSlot() uint64 { + if x != nil { + return x.StartSlot + } + return 0 +} + +func (x *StreamTransactionsRequest) GetEndSlot() uint64 { + if x != nil && x.EndSlot != nil { + return *x.EndSlot + } + return 0 +} + +func (x *StreamTransactionsRequest) GetFilter() *StreamTransactionsFilter { + if x != nil { + return x.Filter + } + return nil +} + +type StreamTransactionsFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Vote *bool `protobuf:"varint,1,opt,name=vote,proto3,oneof" json:"vote,omitempty"` + Failed *bool `protobuf:"varint,2,opt,name=failed,proto3,oneof" json:"failed,omitempty"` + AccountInclude []string `protobuf:"bytes,3,rep,name=account_include,json=accountInclude,proto3" json:"account_include,omitempty"` + AccountExclude []string `protobuf:"bytes,4,rep,name=account_exclude,json=accountExclude,proto3" json:"account_exclude,omitempty"` + AccountRequired []string `protobuf:"bytes,5,rep,name=account_required,json=accountRequired,proto3" json:"account_required,omitempty"` +} + +func (x *StreamTransactionsFilter) Reset() { + *x = StreamTransactionsFilter{} + mi := &file_old_faithful_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StreamTransactionsFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamTransactionsFilter) ProtoMessage() {} + +func (x *StreamTransactionsFilter) 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 StreamTransactionsFilter.ProtoReflect.Descriptor instead. +func (*StreamTransactionsFilter) Descriptor() ([]byte, []int) { + return file_old_faithful_proto_rawDescGZIP(), []int{15} +} + +func (x *StreamTransactionsFilter) GetVote() bool { + if x != nil && x.Vote != nil { + return *x.Vote + } + return false +} + +func (x *StreamTransactionsFilter) GetFailed() bool { + if x != nil && x.Failed != nil { + return *x.Failed + } + return false +} + +func (x *StreamTransactionsFilter) GetAccountInclude() []string { + if x != nil { + return x.AccountInclude + } + return nil +} + +func (x *StreamTransactionsFilter) GetAccountExclude() []string { + if x != nil { + return x.AccountExclude + } + return nil +} + +func (x *StreamTransactionsFilter) GetAccountRequired() []string { + if x != nil { + return x.AccountRequired + } + return nil +} + var File_old_faithful_proto protoreflect.FileDescriptor var file_old_faithful_proto_rawDesc = []byte{ @@ -1089,45 +1227,77 @@ 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, 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, + 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x22, 0xb6, 0x01, 0x0a, 0x19, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 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, 0x42, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, + 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 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, 0xe1, 0x01, 0x0a, 0x18, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x12, 0x17, 0x0a, 0x04, 0x76, 0x6f, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, + 0x00, 0x52, 0x04, 0x76, 0x6f, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x66, 0x61, + 0x69, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x06, 0x66, 0x61, + 0x69, 0x6c, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x6c, + 0x75, 0x64, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x64, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 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, 0xad, 0x04, + 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, 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, + 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, 0x12, 0x60, 0x0a, 0x12, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x26, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 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, 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 ( @@ -1143,23 +1313,25 @@ func file_old_faithful_proto_rawDescGZIP() []byte { } var file_old_faithful_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_old_faithful_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +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 - (*StreamBlocksRequest)(nil), // 13: OldFaithful.StreamBlocksRequest - (*StreamBlocksFilter)(nil), // 14: OldFaithful.StreamBlocksFilter + (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 + (*StreamTransactionsRequest)(nil), // 15: OldFaithful.StreamTransactionsRequest + (*StreamTransactionsFilter)(nil), // 16: OldFaithful.StreamTransactionsFilter } var file_old_faithful_proto_depIdxs = []int32{ 9, // 0: OldFaithful.BlockResponse.transactions:type_name -> OldFaithful.Transaction @@ -1175,23 +1347,26 @@ var file_old_faithful_proto_depIdxs = []int32{ 8, // 10: OldFaithful.GetResponse.transaction:type_name -> OldFaithful.TransactionResponse 0, // 11: OldFaithful.GetResponseError.code:type_name -> OldFaithful.GetResponseErrorCode 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 + 16, // 13: OldFaithful.StreamTransactionsRequest.filter:type_name -> OldFaithful.StreamTransactionsFilter + 1, // 14: OldFaithful.OldFaithful.GetVersion:input_type -> OldFaithful.VersionRequest + 3, // 15: OldFaithful.OldFaithful.GetBlock:input_type -> OldFaithful.BlockRequest + 5, // 16: OldFaithful.OldFaithful.GetBlockTime:input_type -> OldFaithful.BlockTimeRequest + 7, // 17: OldFaithful.OldFaithful.GetTransaction:input_type -> OldFaithful.TransactionRequest + 10, // 18: OldFaithful.OldFaithful.Get:input_type -> OldFaithful.GetRequest + 13, // 19: OldFaithful.OldFaithful.StreamBlocks:input_type -> OldFaithful.StreamBlocksRequest + 15, // 20: OldFaithful.OldFaithful.StreamTransactions:input_type -> OldFaithful.StreamTransactionsRequest + 2, // 21: OldFaithful.OldFaithful.GetVersion:output_type -> OldFaithful.VersionResponse + 4, // 22: OldFaithful.OldFaithful.GetBlock:output_type -> OldFaithful.BlockResponse + 6, // 23: OldFaithful.OldFaithful.GetBlockTime:output_type -> OldFaithful.BlockTimeResponse + 8, // 24: OldFaithful.OldFaithful.GetTransaction:output_type -> OldFaithful.TransactionResponse + 11, // 25: OldFaithful.OldFaithful.Get:output_type -> OldFaithful.GetResponse + 4, // 26: OldFaithful.OldFaithful.StreamBlocks:output_type -> OldFaithful.BlockResponse + 8, // 27: OldFaithful.OldFaithful.StreamTransactions:output_type -> OldFaithful.TransactionResponse + 21, // [21:28] is the sub-list for method output_type + 14, // [14:21] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name } func init() { file_old_faithful_proto_init() } @@ -1216,13 +1391,15 @@ 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{} + file_old_faithful_proto_msgTypes[15].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_old_faithful_proto_rawDesc, NumEnums: 1, - NumMessages: 14, + 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 309884be..c13ab44c 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 @@ -19,12 +19,13 @@ import ( const _ = grpc.SupportPackageIsVersion9 const ( - OldFaithful_GetVersion_FullMethodName = "/OldFaithful.OldFaithful/GetVersion" - OldFaithful_GetBlock_FullMethodName = "/OldFaithful.OldFaithful/GetBlock" - OldFaithful_GetBlockTime_FullMethodName = "/OldFaithful.OldFaithful/GetBlockTime" - OldFaithful_GetTransaction_FullMethodName = "/OldFaithful.OldFaithful/GetTransaction" - OldFaithful_Get_FullMethodName = "/OldFaithful.OldFaithful/Get" - OldFaithful_StreamBlocks_FullMethodName = "/OldFaithful.OldFaithful/StreamBlocks" + OldFaithful_GetVersion_FullMethodName = "/OldFaithful.OldFaithful/GetVersion" + OldFaithful_GetBlock_FullMethodName = "/OldFaithful.OldFaithful/GetBlock" + OldFaithful_GetBlockTime_FullMethodName = "/OldFaithful.OldFaithful/GetBlockTime" + OldFaithful_GetTransaction_FullMethodName = "/OldFaithful.OldFaithful/GetTransaction" + OldFaithful_Get_FullMethodName = "/OldFaithful.OldFaithful/Get" + OldFaithful_StreamBlocks_FullMethodName = "/OldFaithful.OldFaithful/StreamBlocks" + OldFaithful_StreamTransactions_FullMethodName = "/OldFaithful.OldFaithful/StreamTransactions" ) // OldFaithfulClient is the client API for OldFaithful service. @@ -37,6 +38,7 @@ type OldFaithfulClient interface { 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[BlockResponse], error) + StreamTransactions(ctx context.Context, in *StreamTransactionsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[TransactionResponse], error) } type oldFaithfulClient struct { @@ -119,6 +121,25 @@ 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[BlockResponse] +func (c *oldFaithfulClient) StreamTransactions(ctx context.Context, in *StreamTransactionsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[TransactionResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &OldFaithful_ServiceDesc.Streams[2], OldFaithful_StreamTransactions_FullMethodName, cOpts...) + if err != nil { + return nil, err + } + x := &grpc.GenericClientStream[StreamTransactionsRequest, TransactionResponse]{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_StreamTransactionsClient = grpc.ServerStreamingClient[TransactionResponse] + // OldFaithfulServer is the server API for OldFaithful service. // All implementations must embed UnimplementedOldFaithfulServer // for forward compatibility. @@ -129,6 +150,7 @@ type OldFaithfulServer interface { GetTransaction(context.Context, *TransactionRequest) (*TransactionResponse, error) Get(grpc.BidiStreamingServer[GetRequest, GetResponse]) error StreamBlocks(*StreamBlocksRequest, grpc.ServerStreamingServer[BlockResponse]) error + StreamTransactions(*StreamTransactionsRequest, grpc.ServerStreamingServer[TransactionResponse]) error mustEmbedUnimplementedOldFaithfulServer() } @@ -157,6 +179,9 @@ func (UnimplementedOldFaithfulServer) Get(grpc.BidiStreamingServer[GetRequest, G func (UnimplementedOldFaithfulServer) StreamBlocks(*StreamBlocksRequest, grpc.ServerStreamingServer[BlockResponse]) error { return status.Errorf(codes.Unimplemented, "method StreamBlocks not implemented") } +func (UnimplementedOldFaithfulServer) StreamTransactions(*StreamTransactionsRequest, grpc.ServerStreamingServer[TransactionResponse]) error { + return status.Errorf(codes.Unimplemented, "method StreamTransactions not implemented") +} func (UnimplementedOldFaithfulServer) mustEmbedUnimplementedOldFaithfulServer() {} func (UnimplementedOldFaithfulServer) testEmbeddedByValue() {} @@ -268,6 +293,17 @@ func _OldFaithful_StreamBlocks_Handler(srv interface{}, stream 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_StreamBlocksServer = grpc.ServerStreamingServer[BlockResponse] +func _OldFaithful_StreamTransactions_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(StreamTransactionsRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(OldFaithfulServer).StreamTransactions(m, &grpc.GenericServerStream[StreamTransactionsRequest, TransactionResponse]{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_StreamTransactionsServer = grpc.ServerStreamingServer[TransactionResponse] + // 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) @@ -304,6 +340,11 @@ var OldFaithful_ServiceDesc = grpc.ServiceDesc{ Handler: _OldFaithful_StreamBlocks_Handler, ServerStreams: true, }, + { + StreamName: "StreamTransactions", + Handler: _OldFaithful_StreamTransactions_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 de328a7e..ae1bd3fb 100644 --- a/old-faithful-proto/proto/old-faithful.proto +++ b/old-faithful-proto/proto/old-faithful.proto @@ -13,6 +13,7 @@ service OldFaithful { rpc Get(stream GetRequest) returns (stream GetResponse); rpc StreamBlocks(StreamBlocksRequest) returns (stream BlockResponse); + rpc StreamTransactions(StreamTransactionsRequest) returns (stream TransactionResponse); } message VersionRequest {} @@ -96,10 +97,24 @@ message GetResponseError { message StreamBlocksRequest { uint64 start_slot = 1; - optional uint64 end_slot = 2; // If not specified, continues indefinitely + optional uint64 end_slot = 2; optional StreamBlocksFilter filter = 3; } message StreamBlocksFilter { repeated string account_include = 1; // Filter blocks/txns mentioning these accounts } + +message StreamTransactionsRequest { + uint64 start_slot = 1; + optional uint64 end_slot = 2; + optional StreamTransactionsFilter filter = 3; +} + +message StreamTransactionsFilter { + optional bool vote = 1; + optional bool failed = 2; + repeated string account_include = 3; + repeated string account_exclude = 4; + repeated string account_required = 5; +}