From cec8e04323cde5f319383df2e559801f5820a373 Mon Sep 17 00:00:00 2001 From: Alok Date: Wed, 6 Mar 2024 01:47:36 +0530 Subject: [PATCH 01/14] feat: divide buf modules --- Makefile | 4 + buf.work.yaml | 4 + buf.yaml | 5 - gen/go/bidderapi/v1/bidderapi.pb.go | 671 ++++++++++ .../{rpc => }/bidderapi/v1/bidderapi.pb.gw.go | 16 +- .../bidderapi/v1/bidderapi_grpc.pb.go | 14 +- gen/go/discovery/v1/discovery.pb.go | 229 ++++ .../preconfirmation/v1/preconfirmation.pb.go | 292 +++++ gen/go/providerapi/v1/providerapi.pb.go | 1039 ++++++++++++++++ .../providerapi/v1/providerapi.pb.gw.go | 26 +- .../providerapi/v1/providerapi_grpc.pb.go | 20 +- gen/go/rpc/bidderapi/v1/bidderapi.pb.go | 743 ----------- gen/go/rpc/providerapi/v1/providerapi.pb.go | 1085 ----------------- gen/go/streammsg/v1/streammsg.pb.go | 198 +++ .../bidderapi/v1/bidderapi.swagger.yaml | 42 +- .../providerapi/v1/providerapi.swagger.yaml | 10 +- messages/buf.gen.yaml | 14 + messages/buf.lock | 13 + {rpc/bidderapi/v1 => messages}/buf.yaml | 1 + messages/discovery/v1/discovery.proto | 12 + .../preconfirmation/v1/preconfirmation.proto | 18 + messages/streammsg/v1/streammsg.proto | 11 + rpc/bidderapi/v1/bidderapi.proto | 4 +- buf.gen.yaml => rpc/buf.gen.yaml | 2 +- buf.lock => rpc/buf.lock | 0 rpc/{providerapi/v1 => }/buf.yaml | 3 + rpc/providerapi/v1/providerapi.proto | 4 +- 27 files changed, 2576 insertions(+), 1904 deletions(-) create mode 100644 buf.work.yaml delete mode 100644 buf.yaml create mode 100644 gen/go/bidderapi/v1/bidderapi.pb.go rename gen/go/{rpc => }/bidderapi/v1/bidderapi.pb.gw.go (95%) rename gen/go/{rpc => }/bidderapi/v1/bidderapi_grpc.pb.go (95%) create mode 100644 gen/go/discovery/v1/discovery.pb.go create mode 100644 gen/go/preconfirmation/v1/preconfirmation.pb.go create mode 100644 gen/go/providerapi/v1/providerapi.pb.go rename gen/go/{rpc => }/providerapi/v1/providerapi.pb.gw.go (94%) rename gen/go/{rpc => }/providerapi/v1/providerapi_grpc.pb.go (95%) delete mode 100644 gen/go/rpc/bidderapi/v1/bidderapi.pb.go delete mode 100644 gen/go/rpc/providerapi/v1/providerapi.pb.go create mode 100644 gen/go/streammsg/v1/streammsg.pb.go rename gen/openapi/{rpc => }/bidderapi/v1/bidderapi.swagger.yaml (98%) rename gen/openapi/{rpc => }/providerapi/v1/providerapi.swagger.yaml (97%) create mode 100644 messages/buf.gen.yaml create mode 100644 messages/buf.lock rename {rpc/bidderapi/v1 => messages}/buf.yaml (80%) create mode 100644 messages/discovery/v1/discovery.proto create mode 100644 messages/preconfirmation/v1/preconfirmation.proto create mode 100644 messages/streammsg/v1/streammsg.proto rename buf.gen.yaml => rpc/buf.gen.yaml (92%) rename buf.lock => rpc/buf.lock (100%) rename rpc/{providerapi/v1 => }/buf.yaml (56%) diff --git a/Makefile b/Makefile index d9a7e4fa..e18a75a7 100644 --- a/Makefile +++ b/Makefile @@ -8,3 +8,7 @@ build: bin bin: mkdir $@ + +bufgen: + cd rpc && buf generate -o ../ + cd messages && buf generate -o ../ diff --git a/buf.work.yaml b/buf.work.yaml new file mode 100644 index 00000000..62ca7278 --- /dev/null +++ b/buf.work.yaml @@ -0,0 +1,4 @@ +version: v1 +directories: + - rpc + - messages diff --git a/buf.yaml b/buf.yaml deleted file mode 100644 index ff3705c8..00000000 --- a/buf.yaml +++ /dev/null @@ -1,5 +0,0 @@ -version: v1 -deps: - - buf.build/googleapis/googleapis - - buf.build/grpc-ecosystem/grpc-gateway - - buf.build/bufbuild/protovalidate diff --git a/gen/go/bidderapi/v1/bidderapi.pb.go b/gen/go/bidderapi/v1/bidderapi.pb.go new file mode 100644 index 00000000..c7a093d9 --- /dev/null +++ b/gen/go/bidderapi/v1/bidderapi.pb.go @@ -0,0 +1,671 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: bidderapi/v1/bidderapi.proto + +package bidderapiv1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PrepayRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Amount string `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *PrepayRequest) Reset() { + *x = PrepayRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_bidderapi_v1_bidderapi_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrepayRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrepayRequest) ProtoMessage() {} + +func (x *PrepayRequest) ProtoReflect() protoreflect.Message { + mi := &file_bidderapi_v1_bidderapi_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PrepayRequest.ProtoReflect.Descriptor instead. +func (*PrepayRequest) Descriptor() ([]byte, []int) { + return file_bidderapi_v1_bidderapi_proto_rawDescGZIP(), []int{0} +} + +func (x *PrepayRequest) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +type PrepayResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Amount string `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *PrepayResponse) Reset() { + *x = PrepayResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_bidderapi_v1_bidderapi_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrepayResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrepayResponse) ProtoMessage() {} + +func (x *PrepayResponse) ProtoReflect() protoreflect.Message { + mi := &file_bidderapi_v1_bidderapi_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PrepayResponse.ProtoReflect.Descriptor instead. +func (*PrepayResponse) Descriptor() ([]byte, []int) { + return file_bidderapi_v1_bidderapi_proto_rawDescGZIP(), []int{1} +} + +func (x *PrepayResponse) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +type EmptyMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *EmptyMessage) Reset() { + *x = EmptyMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_bidderapi_v1_bidderapi_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EmptyMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EmptyMessage) ProtoMessage() {} + +func (x *EmptyMessage) ProtoReflect() protoreflect.Message { + mi := &file_bidderapi_v1_bidderapi_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EmptyMessage.ProtoReflect.Descriptor instead. +func (*EmptyMessage) Descriptor() ([]byte, []int) { + return file_bidderapi_v1_bidderapi_proto_rawDescGZIP(), []int{2} +} + +type Bid struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TxHashes []string `protobuf:"bytes,1,rep,name=tx_hashes,json=txHashes,proto3" json:"tx_hashes,omitempty"` + Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` + BlockNumber int64 `protobuf:"varint,3,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` +} + +func (x *Bid) Reset() { + *x = Bid{} + if protoimpl.UnsafeEnabled { + mi := &file_bidderapi_v1_bidderapi_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Bid) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bid) ProtoMessage() {} + +func (x *Bid) ProtoReflect() protoreflect.Message { + mi := &file_bidderapi_v1_bidderapi_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bid.ProtoReflect.Descriptor instead. +func (*Bid) Descriptor() ([]byte, []int) { + return file_bidderapi_v1_bidderapi_proto_rawDescGZIP(), []int{3} +} + +func (x *Bid) GetTxHashes() []string { + if x != nil { + return x.TxHashes + } + return nil +} + +func (x *Bid) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +func (x *Bid) GetBlockNumber() int64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +type Commitment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TxHashes []string `protobuf:"bytes,1,rep,name=tx_hashes,json=txHashes,proto3" json:"tx_hashes,omitempty"` + BidAmount int64 `protobuf:"varint,2,opt,name=bid_amount,json=bidAmount,proto3" json:"bid_amount,omitempty"` + BlockNumber int64 `protobuf:"varint,3,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + ReceivedBidDigest string `protobuf:"bytes,4,opt,name=received_bid_digest,json=receivedBidDigest,proto3" json:"received_bid_digest,omitempty"` + ReceivedBidSignature string `protobuf:"bytes,5,opt,name=received_bid_signature,json=receivedBidSignature,proto3" json:"received_bid_signature,omitempty"` + CommitmentDigest string `protobuf:"bytes,6,opt,name=commitment_digest,json=commitmentDigest,proto3" json:"commitment_digest,omitempty"` + CommitmentSignature string `protobuf:"bytes,7,opt,name=commitment_signature,json=commitmentSignature,proto3" json:"commitment_signature,omitempty"` + ProviderAddress string `protobuf:"bytes,8,opt,name=provider_address,json=providerAddress,proto3" json:"provider_address,omitempty"` +} + +func (x *Commitment) Reset() { + *x = Commitment{} + if protoimpl.UnsafeEnabled { + mi := &file_bidderapi_v1_bidderapi_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Commitment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Commitment) ProtoMessage() {} + +func (x *Commitment) ProtoReflect() protoreflect.Message { + mi := &file_bidderapi_v1_bidderapi_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Commitment.ProtoReflect.Descriptor instead. +func (*Commitment) Descriptor() ([]byte, []int) { + return file_bidderapi_v1_bidderapi_proto_rawDescGZIP(), []int{4} +} + +func (x *Commitment) GetTxHashes() []string { + if x != nil { + return x.TxHashes + } + return nil +} + +func (x *Commitment) GetBidAmount() int64 { + if x != nil { + return x.BidAmount + } + return 0 +} + +func (x *Commitment) GetBlockNumber() int64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *Commitment) GetReceivedBidDigest() string { + if x != nil { + return x.ReceivedBidDigest + } + return "" +} + +func (x *Commitment) GetReceivedBidSignature() string { + if x != nil { + return x.ReceivedBidSignature + } + return "" +} + +func (x *Commitment) GetCommitmentDigest() string { + if x != nil { + return x.CommitmentDigest + } + return "" +} + +func (x *Commitment) GetCommitmentSignature() string { + if x != nil { + return x.CommitmentSignature + } + return "" +} + +func (x *Commitment) GetProviderAddress() string { + if x != nil { + return x.ProviderAddress + } + return "" +} + +var File_bidderapi_v1_bidderapi_proto protoreflect.FileDescriptor + +var file_bidderapi_v1_bidderapi_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x62, + 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, + 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x1a, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, + 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb3, 0x02, 0x0a, 0x0d, 0x50, 0x72, 0x65, 0x70, + 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0xa5, 0x01, 0x0a, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x8c, 0x01, 0x92, 0x41, 0x2e, + 0x32, 0x23, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x45, 0x54, 0x48, 0x20, + 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x70, 0x72, 0x65, 0x70, 0x61, 0x69, 0x64, 0x20, 0x69, 0x6e, + 0x20, 0x77, 0x65, 0x69, 0x2e, 0x8a, 0x01, 0x06, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0xba, 0x48, + 0x58, 0xba, 0x01, 0x55, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x2e, 0x1a, 0x2a, 0x74, + 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x5e, 0x5b, 0x30, + 0x2d, 0x39, 0x5d, 0x2b, 0x24, 0x27, 0x29, 0x20, 0x26, 0x26, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x28, + 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, 0x3e, 0x20, 0x30, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x3a, 0x7a, 0x92, 0x41, 0x77, 0x0a, 0x51, 0x2a, 0x0e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x79, + 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x32, 0x36, 0x50, 0x72, 0x65, 0x70, 0x61, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x62, 0x69, 0x64, 0x73, 0x20, 0x74, 0x6f, + 0x20, 0x62, 0x65, 0x20, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x77, 0x65, 0x69, 0x2e, + 0xd2, 0x01, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0x22, 0x7b, 0x22, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, + 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x20, 0x7d, 0x22, 0x9e, 0x01, + 0x0a, 0x0e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x74, 0x92, 0x41, 0x71, 0x0a, 0x4b, 0x2a, + 0x0f, 0x50, 0x72, 0x65, 0x70, 0x61, 0x79, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x32, 0x38, 0x47, 0x65, 0x74, 0x20, 0x70, 0x72, 0x65, 0x70, 0x61, 0x69, 0x64, 0x20, 0x61, 0x6c, + 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x62, 0x69, 0x64, 0x64, + 0x65, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, + 0x20, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x32, 0x22, 0x7b, 0x22, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, + 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x20, 0x7d, 0x22, 0x0e, + 0x0a, 0x0c, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xa2, + 0x08, 0x0a, 0x03, 0x42, 0x69, 0x64, 0x12, 0xa3, 0x02, 0x0a, 0x09, 0x74, 0x78, 0x5f, 0x68, 0x61, + 0x73, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x85, 0x02, 0x92, 0x41, 0x78, + 0x32, 0x64, 0x48, 0x65, 0x78, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x63, + 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x68, 0x61, 0x73, + 0x68, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x74, 0x6f, + 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x8a, 0x01, 0x0f, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, + 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x36, 0x34, 0x7d, 0xba, 0x48, 0x86, 0x01, 0xba, 0x01, 0x82, 0x01, + 0x0a, 0x09, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x36, 0x74, 0x78, 0x5f, + 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, + 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x20, 0x6f, 0x66, 0x20, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x68, 0x61, 0x73, 0x68, + 0x65, 0x73, 0x2e, 0x1a, 0x3d, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x61, 0x6c, 0x6c, 0x28, 0x72, 0x2c, + 0x20, 0x72, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x5e, 0x5b, 0x61, 0x2d, + 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x36, 0x34, 0x7d, 0x24, 0x27, 0x29, 0x29, + 0x20, 0x26, 0x26, 0x20, 0x73, 0x69, 0x7a, 0x65, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, 0x3e, + 0x20, 0x30, 0x52, 0x08, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0xed, 0x01, 0x0a, + 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0xd4, 0x01, + 0x92, 0x41, 0x76, 0x32, 0x6b, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x45, + 0x54, 0x48, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, + 0x65, 0x72, 0x20, 0x69, 0x73, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, + 0x20, 0x70, 0x61, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x69, + 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, + 0x8a, 0x01, 0x06, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0xba, 0x48, 0x58, 0xba, 0x01, 0x55, 0x0a, + 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, + 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, + 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x2e, 0x1a, 0x2a, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x5e, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x24, + 0x27, 0x29, 0x20, 0x26, 0x26, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, + 0x20, 0x3e, 0x20, 0x30, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0xb9, 0x01, 0x0a, + 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x42, 0x95, 0x01, 0x92, 0x41, 0x47, 0x32, 0x45, 0x4d, 0x61, 0x78, 0x20, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x74, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x77, 0x61, 0x6e, 0x74, + 0x73, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x2e, + 0xba, 0x48, 0x48, 0xba, 0x01, 0x45, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x12, 0x25, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x2e, 0x1a, 0x0e, 0x75, 0x69, 0x6e, + 0x74, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, 0x3e, 0x20, 0x30, 0x52, 0x0b, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x3a, 0xc8, 0x02, 0x92, 0x41, 0xc4, 0x02, 0x0a, + 0x71, 0x2a, 0x0b, 0x42, 0x69, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x40, + 0x55, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x69, 0x64, 0x20, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, + 0x73, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, + 0x6d, 0x65, 0x76, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x20, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0xd2, 0x01, 0x08, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0xd2, 0x01, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0xd2, 0x01, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x32, 0xce, 0x01, 0x7b, 0x22, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x22, + 0x3a, 0x20, 0x5b, 0x22, 0x66, 0x65, 0x34, 0x63, 0x62, 0x34, 0x37, 0x64, 0x62, 0x33, 0x36, 0x33, + 0x30, 0x35, 0x35, 0x31, 0x62, 0x65, 0x65, 0x64, 0x66, 0x62, 0x64, 0x30, 0x32, 0x61, 0x37, 0x31, + 0x65, 0x63, 0x63, 0x36, 0x39, 0x66, 0x64, 0x35, 0x39, 0x37, 0x35, 0x38, 0x65, 0x32, 0x62, 0x61, + 0x36, 0x39, 0x39, 0x36, 0x30, 0x36, 0x65, 0x32, 0x64, 0x35, 0x63, 0x37, 0x34, 0x32, 0x38, 0x34, + 0x66, 0x66, 0x61, 0x37, 0x22, 0x2c, 0x20, 0x22, 0x37, 0x31, 0x63, 0x31, 0x33, 0x34, 0x38, 0x66, + 0x32, 0x64, 0x37, 0x66, 0x66, 0x37, 0x65, 0x38, 0x31, 0x34, 0x66, 0x39, 0x63, 0x33, 0x36, 0x31, + 0x37, 0x39, 0x38, 0x33, 0x37, 0x30, 0x33, 0x34, 0x33, 0x35, 0x65, 0x61, 0x37, 0x34, 0x34, 0x36, + 0x64, 0x65, 0x34, 0x32, 0x30, 0x61, 0x65, 0x61, 0x63, 0x34, 0x38, 0x38, 0x62, 0x66, 0x31, 0x64, + 0x65, 0x33, 0x35, 0x37, 0x33, 0x37, 0x65, 0x38, 0x22, 0x5d, 0x2c, 0x20, 0x22, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, + 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x20, 0x22, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x3a, 0x20, 0x31, 0x32, 0x33, 0x34, + 0x35, 0x36, 0x7d, 0x22, 0xb1, 0x08, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x95, 0x01, 0x0a, 0x09, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x78, 0x92, 0x41, 0x75, 0x32, 0x61, 0x48, 0x65, 0x78, + 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x68, 0x61, 0x73, 0x68, 0x20, 0x6f, 0x66, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, + 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, + 0x77, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x8a, 0x01, + 0x0f, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x36, 0x34, 0x7d, + 0x52, 0x08, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x8f, 0x01, 0x0a, 0x0a, 0x62, + 0x69, 0x64, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, + 0x70, 0x92, 0x41, 0x6d, 0x32, 0x6b, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, + 0x45, 0x54, 0x48, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, + 0x64, 0x65, 0x72, 0x20, 0x68, 0x61, 0x73, 0x20, 0x61, 0x67, 0x72, 0x65, 0x65, 0x64, 0x20, 0x74, + 0x6f, 0x20, 0x70, 0x61, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, + 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x2e, 0x52, 0x09, 0x62, 0x69, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x6d, 0x0a, 0x0c, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x03, 0x42, 0x4a, 0x92, 0x41, 0x47, 0x32, 0x45, 0x4d, 0x61, 0x78, 0x20, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x73, 0x20, + 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x2e, 0x52, 0x0b, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x7b, 0x0a, 0x13, 0x72, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x62, 0x69, 0x64, 0x5f, 0x64, 0x69, 0x67, 0x65, + 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x4b, 0x92, 0x41, 0x48, 0x32, 0x46, 0x48, + 0x65, 0x78, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, + 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, + 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, + 0x64, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x11, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, + 0x69, 0x64, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x7d, 0x0a, 0x16, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x64, 0x5f, 0x62, 0x69, 0x64, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x47, 0x92, 0x41, 0x44, 0x32, 0x42, 0x48, + 0x65, 0x78, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, + 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x20, + 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, + 0x61, 0x74, 0x20, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x62, 0x69, 0x64, + 0x2e, 0x52, 0x14, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x69, 0x64, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x62, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x35, 0x92, 0x41, 0x32, 0x32, 0x30, 0x48, 0x65, 0x78, 0x20, 0x73, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, + 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x9e, 0x01, 0x0a, 0x14, + 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x6b, 0x92, 0x41, 0x68, 0x32, + 0x66, 0x48, 0x65, 0x78, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x63, 0x6f, + 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, + 0x65, 0x6e, 0x74, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, + 0x65, 0x6e, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x88, 0x01, 0x0a, + 0x10, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x5d, 0x92, 0x41, 0x5a, 0x32, 0x58, 0x48, 0x65, + 0x78, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, + 0x67, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x32, 0xae, 0x03, 0x0a, 0x06, 0x42, 0x69, 0x64, 0x64, + 0x65, 0x72, 0x12, 0x53, 0x0a, 0x07, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x69, 0x64, 0x12, 0x11, 0x2e, + 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x69, 0x64, + 0x1a, 0x18, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x69, 0x64, 0x64, 0x65, + 0x72, 0x2f, 0x62, 0x69, 0x64, 0x30, 0x01, 0x12, 0x70, 0x0a, 0x0f, 0x50, 0x72, 0x65, 0x70, 0x61, + 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x62, 0x69, 0x64, + 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x22, 0x1a, 0x2f, + 0x76, 0x31, 0x2f, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x65, 0x70, 0x61, 0x79, + 0x2f, 0x7b, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x7d, 0x12, 0x6a, 0x0a, 0x0c, 0x47, 0x65, 0x74, + 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1a, 0x2e, 0x62, 0x69, 0x64, 0x64, + 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x1c, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x76, 0x31, + 0x2f, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, + 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x71, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x6e, 0x41, + 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1a, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, + 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x1a, 0x1c, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x76, 0x31, 0x2f, + 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x61, + 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x42, 0xb6, 0x02, 0x92, 0x41, 0x7a, 0x12, 0x78, + 0x0a, 0x0a, 0x42, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x41, 0x50, 0x49, 0x2a, 0x5d, 0x0a, 0x1b, + 0x42, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, + 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x31, 0x2e, 0x31, 0x12, 0x3e, 0x68, 0x74, 0x74, + 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x70, 0x72, 0x69, 0x6d, 0x65, 0x76, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x6d, + 0x65, 0x76, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, + 0x61, 0x69, 0x6e, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, 0x0b, 0x31, 0x2e, 0x30, + 0x2e, 0x30, 0x2d, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x69, + 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x42, 0x69, 0x64, 0x64, + 0x65, 0x72, 0x61, 0x70, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x65, 0x76, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x6d, 0x65, 0x76, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, + 0x76, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x42, 0x69, 0x64, 0x64, 0x65, + 0x72, 0x61, 0x70, 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x42, 0x69, 0x64, 0x64, 0x65, 0x72, + 0x61, 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x42, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, + 0x70, 0x69, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x0d, 0x42, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_bidderapi_v1_bidderapi_proto_rawDescOnce sync.Once + file_bidderapi_v1_bidderapi_proto_rawDescData = file_bidderapi_v1_bidderapi_proto_rawDesc +) + +func file_bidderapi_v1_bidderapi_proto_rawDescGZIP() []byte { + file_bidderapi_v1_bidderapi_proto_rawDescOnce.Do(func() { + file_bidderapi_v1_bidderapi_proto_rawDescData = protoimpl.X.CompressGZIP(file_bidderapi_v1_bidderapi_proto_rawDescData) + }) + return file_bidderapi_v1_bidderapi_proto_rawDescData +} + +var file_bidderapi_v1_bidderapi_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_bidderapi_v1_bidderapi_proto_goTypes = []interface{}{ + (*PrepayRequest)(nil), // 0: bidderapi.v1.PrepayRequest + (*PrepayResponse)(nil), // 1: bidderapi.v1.PrepayResponse + (*EmptyMessage)(nil), // 2: bidderapi.v1.EmptyMessage + (*Bid)(nil), // 3: bidderapi.v1.Bid + (*Commitment)(nil), // 4: bidderapi.v1.Commitment +} +var file_bidderapi_v1_bidderapi_proto_depIdxs = []int32{ + 3, // 0: bidderapi.v1.Bidder.SendBid:input_type -> bidderapi.v1.Bid + 0, // 1: bidderapi.v1.Bidder.PrepayAllowance:input_type -> bidderapi.v1.PrepayRequest + 2, // 2: bidderapi.v1.Bidder.GetAllowance:input_type -> bidderapi.v1.EmptyMessage + 2, // 3: bidderapi.v1.Bidder.GetMinAllowance:input_type -> bidderapi.v1.EmptyMessage + 4, // 4: bidderapi.v1.Bidder.SendBid:output_type -> bidderapi.v1.Commitment + 1, // 5: bidderapi.v1.Bidder.PrepayAllowance:output_type -> bidderapi.v1.PrepayResponse + 1, // 6: bidderapi.v1.Bidder.GetAllowance:output_type -> bidderapi.v1.PrepayResponse + 1, // 7: bidderapi.v1.Bidder.GetMinAllowance:output_type -> bidderapi.v1.PrepayResponse + 4, // [4:8] is the sub-list for method output_type + 0, // [0:4] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_bidderapi_v1_bidderapi_proto_init() } +func file_bidderapi_v1_bidderapi_proto_init() { + if File_bidderapi_v1_bidderapi_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_bidderapi_v1_bidderapi_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrepayRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_bidderapi_v1_bidderapi_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrepayResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_bidderapi_v1_bidderapi_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EmptyMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_bidderapi_v1_bidderapi_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Bid); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_bidderapi_v1_bidderapi_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Commitment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_bidderapi_v1_bidderapi_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_bidderapi_v1_bidderapi_proto_goTypes, + DependencyIndexes: file_bidderapi_v1_bidderapi_proto_depIdxs, + MessageInfos: file_bidderapi_v1_bidderapi_proto_msgTypes, + }.Build() + File_bidderapi_v1_bidderapi_proto = out.File + file_bidderapi_v1_bidderapi_proto_rawDesc = nil + file_bidderapi_v1_bidderapi_proto_goTypes = nil + file_bidderapi_v1_bidderapi_proto_depIdxs = nil +} diff --git a/gen/go/rpc/bidderapi/v1/bidderapi.pb.gw.go b/gen/go/bidderapi/v1/bidderapi.pb.gw.go similarity index 95% rename from gen/go/rpc/bidderapi/v1/bidderapi.pb.gw.go rename to gen/go/bidderapi/v1/bidderapi.pb.gw.go index ba6fc4d7..910b8362 100644 --- a/gen/go/rpc/bidderapi/v1/bidderapi.pb.gw.go +++ b/gen/go/bidderapi/v1/bidderapi.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: rpc/bidderapi/v1/bidderapi.proto +// source: bidderapi/v1/bidderapi.proto /* Package bidderapiv1 is a reverse proxy. @@ -161,7 +161,7 @@ func RegisterBidderHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/rpc.bidderapi.v1.Bidder/PrepayAllowance", runtime.WithHTTPPathPattern("/v1/bidder/prepay/{amount}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bidderapi.v1.Bidder/PrepayAllowance", runtime.WithHTTPPathPattern("/v1/bidder/prepay/{amount}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -186,7 +186,7 @@ func RegisterBidderHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/rpc.bidderapi.v1.Bidder/GetAllowance", runtime.WithHTTPPathPattern("/v1/bidder/get_allowance")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bidderapi.v1.Bidder/GetAllowance", runtime.WithHTTPPathPattern("/v1/bidder/get_allowance")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -211,7 +211,7 @@ func RegisterBidderHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/rpc.bidderapi.v1.Bidder/GetMinAllowance", runtime.WithHTTPPathPattern("/v1/bidder/get_min_allowance")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bidderapi.v1.Bidder/GetMinAllowance", runtime.WithHTTPPathPattern("/v1/bidder/get_min_allowance")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -275,7 +275,7 @@ func RegisterBidderHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/rpc.bidderapi.v1.Bidder/SendBid", runtime.WithHTTPPathPattern("/v1/bidder/bid")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bidderapi.v1.Bidder/SendBid", runtime.WithHTTPPathPattern("/v1/bidder/bid")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -297,7 +297,7 @@ func RegisterBidderHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/rpc.bidderapi.v1.Bidder/PrepayAllowance", runtime.WithHTTPPathPattern("/v1/bidder/prepay/{amount}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bidderapi.v1.Bidder/PrepayAllowance", runtime.WithHTTPPathPattern("/v1/bidder/prepay/{amount}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -319,7 +319,7 @@ func RegisterBidderHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/rpc.bidderapi.v1.Bidder/GetAllowance", runtime.WithHTTPPathPattern("/v1/bidder/get_allowance")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bidderapi.v1.Bidder/GetAllowance", runtime.WithHTTPPathPattern("/v1/bidder/get_allowance")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -341,7 +341,7 @@ func RegisterBidderHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/rpc.bidderapi.v1.Bidder/GetMinAllowance", runtime.WithHTTPPathPattern("/v1/bidder/get_min_allowance")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bidderapi.v1.Bidder/GetMinAllowance", runtime.WithHTTPPathPattern("/v1/bidder/get_min_allowance")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return diff --git a/gen/go/rpc/bidderapi/v1/bidderapi_grpc.pb.go b/gen/go/bidderapi/v1/bidderapi_grpc.pb.go similarity index 95% rename from gen/go/rpc/bidderapi/v1/bidderapi_grpc.pb.go rename to gen/go/bidderapi/v1/bidderapi_grpc.pb.go index 1da071af..fed53db5 100644 --- a/gen/go/rpc/bidderapi/v1/bidderapi_grpc.pb.go +++ b/gen/go/bidderapi/v1/bidderapi_grpc.pb.go @@ -2,7 +2,7 @@ // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) -// source: rpc/bidderapi/v1/bidderapi.proto +// source: bidderapi/v1/bidderapi.proto package bidderapiv1 @@ -19,10 +19,10 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Bidder_SendBid_FullMethodName = "/rpc.bidderapi.v1.Bidder/SendBid" - Bidder_PrepayAllowance_FullMethodName = "/rpc.bidderapi.v1.Bidder/PrepayAllowance" - Bidder_GetAllowance_FullMethodName = "/rpc.bidderapi.v1.Bidder/GetAllowance" - Bidder_GetMinAllowance_FullMethodName = "/rpc.bidderapi.v1.Bidder/GetMinAllowance" + Bidder_SendBid_FullMethodName = "/bidderapi.v1.Bidder/SendBid" + Bidder_PrepayAllowance_FullMethodName = "/bidderapi.v1.Bidder/PrepayAllowance" + Bidder_GetAllowance_FullMethodName = "/bidderapi.v1.Bidder/GetAllowance" + Bidder_GetMinAllowance_FullMethodName = "/bidderapi.v1.Bidder/GetMinAllowance" ) // BidderClient is the client API for Bidder service. @@ -245,7 +245,7 @@ func _Bidder_GetMinAllowance_Handler(srv interface{}, ctx context.Context, dec f // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Bidder_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "rpc.bidderapi.v1.Bidder", + ServiceName: "bidderapi.v1.Bidder", HandlerType: (*BidderServer)(nil), Methods: []grpc.MethodDesc{ { @@ -268,5 +268,5 @@ var Bidder_ServiceDesc = grpc.ServiceDesc{ ServerStreams: true, }, }, - Metadata: "rpc/bidderapi/v1/bidderapi.proto", + Metadata: "bidderapi/v1/bidderapi.proto", } diff --git a/gen/go/discovery/v1/discovery.pb.go b/gen/go/discovery/v1/discovery.pb.go new file mode 100644 index 00000000..c2853463 --- /dev/null +++ b/gen/go/discovery/v1/discovery.pb.go @@ -0,0 +1,229 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: discovery/v1/discovery.proto + +package discoveryv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PeerList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Peers []*PeerInfo `protobuf:"bytes,1,rep,name=peers,proto3" json:"peers,omitempty"` +} + +func (x *PeerList) Reset() { + *x = PeerList{} + if protoimpl.UnsafeEnabled { + mi := &file_discovery_v1_discovery_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PeerList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PeerList) ProtoMessage() {} + +func (x *PeerList) ProtoReflect() protoreflect.Message { + mi := &file_discovery_v1_discovery_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PeerList.ProtoReflect.Descriptor instead. +func (*PeerList) Descriptor() ([]byte, []int) { + return file_discovery_v1_discovery_proto_rawDescGZIP(), []int{0} +} + +func (x *PeerList) GetPeers() []*PeerInfo { + if x != nil { + return x.Peers + } + return nil +} + +type PeerInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + EthAddress []byte `protobuf:"bytes,1,opt,name=eth_address,json=ethAddress,proto3" json:"eth_address,omitempty"` + Underlay []byte `protobuf:"bytes,2,opt,name=underlay,proto3" json:"underlay,omitempty"` +} + +func (x *PeerInfo) Reset() { + *x = PeerInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_discovery_v1_discovery_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PeerInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PeerInfo) ProtoMessage() {} + +func (x *PeerInfo) ProtoReflect() protoreflect.Message { + mi := &file_discovery_v1_discovery_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PeerInfo.ProtoReflect.Descriptor instead. +func (*PeerInfo) Descriptor() ([]byte, []int) { + return file_discovery_v1_discovery_proto_rawDescGZIP(), []int{1} +} + +func (x *PeerInfo) GetEthAddress() []byte { + if x != nil { + return x.EthAddress + } + return nil +} + +func (x *PeerInfo) GetUnderlay() []byte { + if x != nil { + return x.Underlay + } + return nil +} + +var File_discovery_v1_discovery_proto protoreflect.FileDescriptor + +var file_discovery_v1_discovery_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x64, + 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, + 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x22, 0x38, 0x0a, 0x08, + 0x50, 0x65, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x05, 0x70, 0x65, 0x65, 0x72, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x22, 0x47, 0x0a, 0x08, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, + 0x66, 0x6f, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x74, 0x68, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x65, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x6c, 0x61, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x6c, 0x61, 0x79, 0x42, + 0xb9, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x79, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x65, 0x76, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x2f, 0x6d, 0x65, 0x76, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x2f, 0x67, 0x65, 0x6e, + 0x2f, 0x67, 0x6f, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, + 0x3b, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, + 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x0c, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x18, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x44, 0x69, + 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_discovery_v1_discovery_proto_rawDescOnce sync.Once + file_discovery_v1_discovery_proto_rawDescData = file_discovery_v1_discovery_proto_rawDesc +) + +func file_discovery_v1_discovery_proto_rawDescGZIP() []byte { + file_discovery_v1_discovery_proto_rawDescOnce.Do(func() { + file_discovery_v1_discovery_proto_rawDescData = protoimpl.X.CompressGZIP(file_discovery_v1_discovery_proto_rawDescData) + }) + return file_discovery_v1_discovery_proto_rawDescData +} + +var file_discovery_v1_discovery_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_discovery_v1_discovery_proto_goTypes = []interface{}{ + (*PeerList)(nil), // 0: discovery.v1.PeerList + (*PeerInfo)(nil), // 1: discovery.v1.PeerInfo +} +var file_discovery_v1_discovery_proto_depIdxs = []int32{ + 1, // 0: discovery.v1.PeerList.peers:type_name -> discovery.v1.PeerInfo + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_discovery_v1_discovery_proto_init() } +func file_discovery_v1_discovery_proto_init() { + if File_discovery_v1_discovery_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_discovery_v1_discovery_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PeerList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_discovery_v1_discovery_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PeerInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_discovery_v1_discovery_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_discovery_v1_discovery_proto_goTypes, + DependencyIndexes: file_discovery_v1_discovery_proto_depIdxs, + MessageInfos: file_discovery_v1_discovery_proto_msgTypes, + }.Build() + File_discovery_v1_discovery_proto = out.File + file_discovery_v1_discovery_proto_rawDesc = nil + file_discovery_v1_discovery_proto_goTypes = nil + file_discovery_v1_discovery_proto_depIdxs = nil +} diff --git a/gen/go/preconfirmation/v1/preconfirmation.pb.go b/gen/go/preconfirmation/v1/preconfirmation.pb.go new file mode 100644 index 00000000..ea3def68 --- /dev/null +++ b/gen/go/preconfirmation/v1/preconfirmation.pb.go @@ -0,0 +1,292 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: preconfirmation/v1/preconfirmation.proto + +package preconfirmationv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Bid struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TxHash string `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + BidAmount string `protobuf:"bytes,2,opt,name=bid_amount,json=bidAmount,proto3" json:"bid_amount,omitempty"` + BlockNumber string `protobuf:"bytes,3,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + Digest []byte `protobuf:"bytes,4,opt,name=digest,proto3" json:"digest,omitempty"` + Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (x *Bid) Reset() { + *x = Bid{} + if protoimpl.UnsafeEnabled { + mi := &file_preconfirmation_v1_preconfirmation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Bid) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bid) ProtoMessage() {} + +func (x *Bid) ProtoReflect() protoreflect.Message { + mi := &file_preconfirmation_v1_preconfirmation_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bid.ProtoReflect.Descriptor instead. +func (*Bid) Descriptor() ([]byte, []int) { + return file_preconfirmation_v1_preconfirmation_proto_rawDescGZIP(), []int{0} +} + +func (x *Bid) GetTxHash() string { + if x != nil { + return x.TxHash + } + return "" +} + +func (x *Bid) GetBidAmount() string { + if x != nil { + return x.BidAmount + } + return "" +} + +func (x *Bid) GetBlockNumber() string { + if x != nil { + return x.BlockNumber + } + return "" +} + +func (x *Bid) GetDigest() []byte { + if x != nil { + return x.Digest + } + return nil +} + +func (x *Bid) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +type PreConfirmation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Bid *Bid `protobuf:"bytes,1,opt,name=bid,proto3" json:"bid,omitempty"` + Digest []byte `protobuf:"bytes,2,opt,name=digest,proto3" json:"digest,omitempty"` + Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` + ProviderAddress []byte `protobuf:"bytes,4,opt,name=provider_address,json=providerAddress,proto3" json:"provider_address,omitempty"` +} + +func (x *PreConfirmation) Reset() { + *x = PreConfirmation{} + if protoimpl.UnsafeEnabled { + mi := &file_preconfirmation_v1_preconfirmation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PreConfirmation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PreConfirmation) ProtoMessage() {} + +func (x *PreConfirmation) ProtoReflect() protoreflect.Message { + mi := &file_preconfirmation_v1_preconfirmation_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PreConfirmation.ProtoReflect.Descriptor instead. +func (*PreConfirmation) Descriptor() ([]byte, []int) { + return file_preconfirmation_v1_preconfirmation_proto_rawDescGZIP(), []int{1} +} + +func (x *PreConfirmation) GetBid() *Bid { + if x != nil { + return x.Bid + } + return nil +} + +func (x *PreConfirmation) GetDigest() []byte { + if x != nil { + return x.Digest + } + return nil +} + +func (x *PreConfirmation) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *PreConfirmation) GetProviderAddress() []byte { + if x != nil { + return x.ProviderAddress + } + return nil +} + +var File_preconfirmation_v1_preconfirmation_proto protoreflect.FileDescriptor + +var file_preconfirmation_v1_preconfirmation_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x70, 0x72, 0x65, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x22, 0x96, + 0x01, 0x0a, 0x03, 0x42, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, + 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, + 0x1d, 0x0a, 0x0a, 0x62, 0x69, 0x64, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x69, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x21, + 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x9d, 0x01, 0x0a, 0x0f, 0x50, 0x72, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x03, 0x62, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x65, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x69, + 0x64, 0x52, 0x03, 0x62, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x1c, + 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x29, 0x0a, 0x10, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0xe9, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, + 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x42, 0x14, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x50, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x65, 0x76, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x6d, 0x65, 0x76, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x72, 0x65, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x50, + 0x58, 0x58, 0xaa, 0x02, 0x12, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x50, + 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, + 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, + 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_preconfirmation_v1_preconfirmation_proto_rawDescOnce sync.Once + file_preconfirmation_v1_preconfirmation_proto_rawDescData = file_preconfirmation_v1_preconfirmation_proto_rawDesc +) + +func file_preconfirmation_v1_preconfirmation_proto_rawDescGZIP() []byte { + file_preconfirmation_v1_preconfirmation_proto_rawDescOnce.Do(func() { + file_preconfirmation_v1_preconfirmation_proto_rawDescData = protoimpl.X.CompressGZIP(file_preconfirmation_v1_preconfirmation_proto_rawDescData) + }) + return file_preconfirmation_v1_preconfirmation_proto_rawDescData +} + +var file_preconfirmation_v1_preconfirmation_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_preconfirmation_v1_preconfirmation_proto_goTypes = []interface{}{ + (*Bid)(nil), // 0: preconfirmation.v1.Bid + (*PreConfirmation)(nil), // 1: preconfirmation.v1.PreConfirmation +} +var file_preconfirmation_v1_preconfirmation_proto_depIdxs = []int32{ + 0, // 0: preconfirmation.v1.PreConfirmation.bid:type_name -> preconfirmation.v1.Bid + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_preconfirmation_v1_preconfirmation_proto_init() } +func file_preconfirmation_v1_preconfirmation_proto_init() { + if File_preconfirmation_v1_preconfirmation_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_preconfirmation_v1_preconfirmation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Bid); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_preconfirmation_v1_preconfirmation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PreConfirmation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_preconfirmation_v1_preconfirmation_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_preconfirmation_v1_preconfirmation_proto_goTypes, + DependencyIndexes: file_preconfirmation_v1_preconfirmation_proto_depIdxs, + MessageInfos: file_preconfirmation_v1_preconfirmation_proto_msgTypes, + }.Build() + File_preconfirmation_v1_preconfirmation_proto = out.File + file_preconfirmation_v1_preconfirmation_proto_rawDesc = nil + file_preconfirmation_v1_preconfirmation_proto_goTypes = nil + file_preconfirmation_v1_preconfirmation_proto_depIdxs = nil +} diff --git a/gen/go/providerapi/v1/providerapi.pb.go b/gen/go/providerapi/v1/providerapi.pb.go new file mode 100644 index 00000000..1824f790 --- /dev/null +++ b/gen/go/providerapi/v1/providerapi.pb.go @@ -0,0 +1,1039 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: providerapi/v1/providerapi.proto + +package providerapiv1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type BidResponse_Status int32 + +const ( + BidResponse_STATUS_UNSPECIFIED BidResponse_Status = 0 + BidResponse_STATUS_ACCEPTED BidResponse_Status = 1 + BidResponse_STATUS_REJECTED BidResponse_Status = 2 +) + +// Enum value maps for BidResponse_Status. +var ( + BidResponse_Status_name = map[int32]string{ + 0: "STATUS_UNSPECIFIED", + 1: "STATUS_ACCEPTED", + 2: "STATUS_REJECTED", + } + BidResponse_Status_value = map[string]int32{ + "STATUS_UNSPECIFIED": 0, + "STATUS_ACCEPTED": 1, + "STATUS_REJECTED": 2, + } +) + +func (x BidResponse_Status) Enum() *BidResponse_Status { + p := new(BidResponse_Status) + *p = x + return p +} + +func (x BidResponse_Status) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BidResponse_Status) Descriptor() protoreflect.EnumDescriptor { + return file_providerapi_v1_providerapi_proto_enumTypes[0].Descriptor() +} + +func (BidResponse_Status) Type() protoreflect.EnumType { + return &file_providerapi_v1_providerapi_proto_enumTypes[0] +} + +func (x BidResponse_Status) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use BidResponse_Status.Descriptor instead. +func (BidResponse_Status) EnumDescriptor() ([]byte, []int) { + return file_providerapi_v1_providerapi_proto_rawDescGZIP(), []int{4, 0} +} + +type StakeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Amount string `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *StakeRequest) Reset() { + *x = StakeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_providerapi_v1_providerapi_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StakeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StakeRequest) ProtoMessage() {} + +func (x *StakeRequest) ProtoReflect() protoreflect.Message { + mi := &file_providerapi_v1_providerapi_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StakeRequest.ProtoReflect.Descriptor instead. +func (*StakeRequest) Descriptor() ([]byte, []int) { + return file_providerapi_v1_providerapi_proto_rawDescGZIP(), []int{0} +} + +func (x *StakeRequest) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +type StakeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Amount string `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *StakeResponse) Reset() { + *x = StakeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_providerapi_v1_providerapi_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StakeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StakeResponse) ProtoMessage() {} + +func (x *StakeResponse) ProtoReflect() protoreflect.Message { + mi := &file_providerapi_v1_providerapi_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StakeResponse.ProtoReflect.Descriptor instead. +func (*StakeResponse) Descriptor() ([]byte, []int) { + return file_providerapi_v1_providerapi_proto_rawDescGZIP(), []int{1} +} + +func (x *StakeResponse) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +type EmptyMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *EmptyMessage) Reset() { + *x = EmptyMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_providerapi_v1_providerapi_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EmptyMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EmptyMessage) ProtoMessage() {} + +func (x *EmptyMessage) ProtoReflect() protoreflect.Message { + mi := &file_providerapi_v1_providerapi_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EmptyMessage.ProtoReflect.Descriptor instead. +func (*EmptyMessage) Descriptor() ([]byte, []int) { + return file_providerapi_v1_providerapi_proto_rawDescGZIP(), []int{2} +} + +type Bid struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TxHashes []string `protobuf:"bytes,1,rep,name=tx_hashes,json=txHashes,proto3" json:"tx_hashes,omitempty"` + BidAmount string `protobuf:"bytes,2,opt,name=bid_amount,json=bidAmount,proto3" json:"bid_amount,omitempty"` + BlockNumber int64 `protobuf:"varint,3,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + BidDigest []byte `protobuf:"bytes,4,opt,name=bid_digest,json=bidDigest,proto3" json:"bid_digest,omitempty"` +} + +func (x *Bid) Reset() { + *x = Bid{} + if protoimpl.UnsafeEnabled { + mi := &file_providerapi_v1_providerapi_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Bid) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bid) ProtoMessage() {} + +func (x *Bid) ProtoReflect() protoreflect.Message { + mi := &file_providerapi_v1_providerapi_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bid.ProtoReflect.Descriptor instead. +func (*Bid) Descriptor() ([]byte, []int) { + return file_providerapi_v1_providerapi_proto_rawDescGZIP(), []int{3} +} + +func (x *Bid) GetTxHashes() []string { + if x != nil { + return x.TxHashes + } + return nil +} + +func (x *Bid) GetBidAmount() string { + if x != nil { + return x.BidAmount + } + return "" +} + +func (x *Bid) GetBlockNumber() int64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *Bid) GetBidDigest() []byte { + if x != nil { + return x.BidDigest + } + return nil +} + +type BidResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BidDigest []byte `protobuf:"bytes,1,opt,name=bid_digest,json=bidDigest,proto3" json:"bid_digest,omitempty"` + Status BidResponse_Status `protobuf:"varint,2,opt,name=status,proto3,enum=providerapi.v1.BidResponse_Status" json:"status,omitempty"` +} + +func (x *BidResponse) Reset() { + *x = BidResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_providerapi_v1_providerapi_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BidResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BidResponse) ProtoMessage() {} + +func (x *BidResponse) ProtoReflect() protoreflect.Message { + mi := &file_providerapi_v1_providerapi_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BidResponse.ProtoReflect.Descriptor instead. +func (*BidResponse) Descriptor() ([]byte, []int) { + return file_providerapi_v1_providerapi_proto_rawDescGZIP(), []int{4} +} + +func (x *BidResponse) GetBidDigest() []byte { + if x != nil { + return x.BidDigest + } + return nil +} + +func (x *BidResponse) GetStatus() BidResponse_Status { + if x != nil { + return x.Status + } + return BidResponse_STATUS_UNSPECIFIED +} + +type PendingTxnsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PendingTxns []*TransactionInfo `protobuf:"bytes,1,rep,name=pending_txns,json=pendingTxns,proto3" json:"pending_txns,omitempty"` +} + +func (x *PendingTxnsResponse) Reset() { + *x = PendingTxnsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_providerapi_v1_providerapi_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PendingTxnsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PendingTxnsResponse) ProtoMessage() {} + +func (x *PendingTxnsResponse) ProtoReflect() protoreflect.Message { + mi := &file_providerapi_v1_providerapi_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PendingTxnsResponse.ProtoReflect.Descriptor instead. +func (*PendingTxnsResponse) Descriptor() ([]byte, []int) { + return file_providerapi_v1_providerapi_proto_rawDescGZIP(), []int{5} +} + +func (x *PendingTxnsResponse) GetPendingTxns() []*TransactionInfo { + if x != nil { + return x.PendingTxns + } + return nil +} + +type TransactionInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TxHash string `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + Nonce int64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` + Created string `protobuf:"bytes,3,opt,name=created,proto3" json:"created,omitempty"` +} + +func (x *TransactionInfo) Reset() { + *x = TransactionInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_providerapi_v1_providerapi_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransactionInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionInfo) ProtoMessage() {} + +func (x *TransactionInfo) ProtoReflect() protoreflect.Message { + mi := &file_providerapi_v1_providerapi_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionInfo.ProtoReflect.Descriptor instead. +func (*TransactionInfo) Descriptor() ([]byte, []int) { + return file_providerapi_v1_providerapi_proto_rawDescGZIP(), []int{6} +} + +func (x *TransactionInfo) GetTxHash() string { + if x != nil { + return x.TxHash + } + return "" +} + +func (x *TransactionInfo) GetNonce() int64 { + if x != nil { + return x.Nonce + } + return 0 +} + +func (x *TransactionInfo) GetCreated() string { + if x != nil { + return x.Created + } + return "" +} + +type CancelReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TxHash string `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` +} + +func (x *CancelReq) Reset() { + *x = CancelReq{} + if protoimpl.UnsafeEnabled { + mi := &file_providerapi_v1_providerapi_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CancelReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CancelReq) ProtoMessage() {} + +func (x *CancelReq) ProtoReflect() protoreflect.Message { + mi := &file_providerapi_v1_providerapi_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CancelReq.ProtoReflect.Descriptor instead. +func (*CancelReq) Descriptor() ([]byte, []int) { + return file_providerapi_v1_providerapi_proto_rawDescGZIP(), []int{7} +} + +func (x *CancelReq) GetTxHash() string { + if x != nil { + return x.TxHash + } + return "" +} + +type CancelResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TxHash string `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` +} + +func (x *CancelResponse) Reset() { + *x = CancelResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_providerapi_v1_providerapi_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CancelResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CancelResponse) ProtoMessage() {} + +func (x *CancelResponse) ProtoReflect() protoreflect.Message { + mi := &file_providerapi_v1_providerapi_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CancelResponse.ProtoReflect.Descriptor instead. +func (*CancelResponse) Descriptor() ([]byte, []int) { + return file_providerapi_v1_providerapi_proto_rawDescGZIP(), []int{8} +} + +func (x *CancelResponse) GetTxHash() string { + if x != nil { + return x.TxHash + } + return "" +} + +var File_providerapi_v1_providerapi_proto protoreflect.FileDescriptor + +var file_providerapi_v1_providerapi_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x0e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc1, 0x02, + 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0xbb, + 0x01, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0xa2, 0x01, 0x92, 0x41, 0x44, 0x32, 0x39, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x6f, 0x66, + 0x20, 0x45, 0x54, 0x48, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x20, 0x69, 0x6e, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x20, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, + 0x8a, 0x01, 0x06, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0xba, 0x48, 0x58, 0xba, 0x01, 0x55, 0x0a, + 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, + 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, + 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x2e, 0x1a, 0x2a, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x5e, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x24, + 0x27, 0x29, 0x20, 0x26, 0x26, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, + 0x20, 0x3e, 0x20, 0x30, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x73, 0x92, 0x41, + 0x70, 0x0a, 0x4a, 0x2a, 0x0d, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x32, 0x31, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x79, 0x2e, 0xd2, 0x01, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x32, 0x22, 0x7b, + 0x22, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x30, 0x30, 0x30, 0x30, + 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x20, + 0x7d, 0x22, 0xa5, 0x01, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x7c, 0x92, 0x41, 0x79, + 0x0a, 0x53, 0x2a, 0x0e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x32, 0x41, 0x47, 0x65, 0x74, 0x20, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x64, 0x20, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x79, 0x2e, 0x32, 0x22, 0x7b, 0x22, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, + 0x3a, 0x20, 0x22, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, + 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x20, 0x7d, 0x22, 0x0e, 0x0a, 0x0c, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xb1, 0x09, 0x0a, 0x03, 0x42, 0x69, + 0x64, 0x12, 0xa3, 0x02, 0x0a, 0x09, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x85, 0x02, 0x92, 0x41, 0x78, 0x32, 0x64, 0x48, 0x65, 0x78, + 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, + 0x65, 0x72, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x63, 0x6c, + 0x75, 0x64, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x2e, 0x8a, 0x01, 0x0f, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, + 0x36, 0x34, 0x7d, 0xba, 0x48, 0x86, 0x01, 0xba, 0x01, 0x82, 0x01, 0x0a, 0x09, 0x74, 0x78, 0x5f, + 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x36, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, + 0x73, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x2e, 0x1a, 0x3d, + 0x74, 0x68, 0x69, 0x73, 0x2e, 0x61, 0x6c, 0x6c, 0x28, 0x72, 0x2c, 0x20, 0x72, 0x2e, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x5e, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, + 0x2d, 0x39, 0x5d, 0x7b, 0x36, 0x34, 0x7d, 0x24, 0x27, 0x29, 0x29, 0x20, 0x26, 0x26, 0x20, 0x73, + 0x69, 0x7a, 0x65, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, 0x3e, 0x20, 0x30, 0x52, 0x08, 0x74, + 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0xfc, 0x01, 0x0a, 0x0a, 0x62, 0x69, 0x64, 0x5f, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0xdc, 0x01, 0x92, + 0x41, 0x76, 0x32, 0x6b, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x45, 0x54, + 0x48, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, + 0x72, 0x20, 0x69, 0x73, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, + 0x70, 0x61, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, + 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x8a, + 0x01, 0x06, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0xba, 0x48, 0x60, 0xba, 0x01, 0x5d, 0x0a, 0x0a, + 0x62, 0x69, 0x64, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x23, 0x62, 0x69, 0x64, 0x5f, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, + 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x2e, 0x1a, + 0x2a, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x5e, + 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x24, 0x27, 0x29, 0x20, 0x26, 0x26, 0x20, 0x75, 0x69, 0x6e, + 0x74, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, 0x3e, 0x20, 0x30, 0x52, 0x09, 0x62, 0x69, 0x64, + 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x74, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, + 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x51, 0x92, 0x41, + 0x47, 0x32, 0x45, 0x4d, 0x61, 0x78, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x20, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, + 0x64, 0x65, 0x72, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x63, + 0x6c, 0x75, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x2e, 0xba, 0x48, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, + 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x5c, 0x0a, 0x0a, + 0x62, 0x69, 0x64, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, + 0x42, 0x3d, 0x92, 0x41, 0x31, 0x32, 0x2f, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x20, 0x6f, 0x66, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x20, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, + 0x69, 0x64, 0x64, 0x65, 0x72, 0x2e, 0xba, 0x48, 0x06, 0x7a, 0x04, 0x10, 0x01, 0x18, 0x40, 0x52, + 0x09, 0x62, 0x69, 0x64, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x3a, 0xb0, 0x03, 0x92, 0x41, 0xac, + 0x03, 0x0a, 0x70, 0x2a, 0x0b, 0x42, 0x69, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x32, 0x30, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x69, 0x64, 0x20, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, + 0x73, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x2e, 0xd2, 0x01, 0x08, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0xd2, 0x01, 0x09, + 0x62, 0x69, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0xd2, 0x01, 0x0b, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0xd2, 0x01, 0x09, 0x62, 0x69, 0x64, 0x44, 0x69, 0x67, + 0x65, 0x73, 0x74, 0x32, 0xb7, 0x02, 0x7b, 0x22, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, + 0x22, 0x3a, 0x20, 0x5b, 0x22, 0x66, 0x65, 0x34, 0x63, 0x62, 0x34, 0x37, 0x64, 0x62, 0x33, 0x36, + 0x33, 0x30, 0x35, 0x35, 0x31, 0x62, 0x65, 0x65, 0x64, 0x66, 0x62, 0x64, 0x30, 0x32, 0x61, 0x37, + 0x31, 0x65, 0x63, 0x63, 0x36, 0x39, 0x66, 0x64, 0x35, 0x39, 0x37, 0x35, 0x38, 0x65, 0x32, 0x62, + 0x61, 0x36, 0x39, 0x39, 0x36, 0x30, 0x36, 0x65, 0x32, 0x64, 0x35, 0x63, 0x37, 0x34, 0x32, 0x38, + 0x34, 0x66, 0x66, 0x61, 0x37, 0x22, 0x2c, 0x20, 0x22, 0x37, 0x31, 0x63, 0x31, 0x33, 0x34, 0x38, + 0x66, 0x32, 0x64, 0x37, 0x66, 0x66, 0x37, 0x65, 0x38, 0x31, 0x34, 0x66, 0x39, 0x63, 0x33, 0x36, + 0x31, 0x37, 0x39, 0x38, 0x33, 0x37, 0x30, 0x33, 0x34, 0x33, 0x35, 0x65, 0x61, 0x37, 0x34, 0x34, + 0x36, 0x64, 0x65, 0x34, 0x32, 0x30, 0x61, 0x65, 0x61, 0x63, 0x34, 0x38, 0x38, 0x62, 0x66, 0x31, + 0x64, 0x65, 0x33, 0x35, 0x37, 0x33, 0x37, 0x65, 0x38, 0x22, 0x5d, 0x2c, 0x20, 0x22, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, + 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x20, 0x22, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x3a, 0x20, 0x31, 0x32, 0x33, + 0x34, 0x35, 0x36, 0x2c, 0x20, 0x22, 0x62, 0x69, 0x64, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x22, + 0x3a, 0x20, 0x22, 0x39, 0x64, 0x4a, 0x69, 0x6e, 0x77, 0x4c, 0x2b, 0x46, 0x5a, 0x36, 0x42, 0x31, + 0x78, 0x73, 0x49, 0x51, 0x51, 0x6f, 0x38, 0x74, 0x38, 0x42, 0x30, 0x5a, 0x58, 0x4a, 0x75, 0x62, + 0x4a, 0x77, 0x59, 0x38, 0x36, 0x6c, 0x2f, 0x59, 0x75, 0x37, 0x79, 0x41, 0x48, 0x31, 0x35, 0x39, + 0x51, 0x72, 0x50, 0x48, 0x55, 0x30, 0x71, 0x6a, 0x32, 0x50, 0x2b, 0x59, 0x46, 0x6a, 0x2b, 0x6c, + 0x6c, 0x62, 0x75, 0x49, 0x31, 0x5a, 0x79, 0x67, 0x64, 0x78, 0x47, 0x73, 0x58, 0x38, 0x2b, 0x50, + 0x33, 0x62, 0x79, 0x4d, 0x45, 0x41, 0x35, 0x69, 0x67, 0x3d, 0x3d, 0x22, 0x7d, 0x22, 0x8a, 0x04, + 0x0a, 0x0b, 0x42, 0x69, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, + 0x0a, 0x62, 0x69, 0x64, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x42, 0x34, 0x92, 0x41, 0x31, 0x32, 0x2f, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x09, 0x62, 0x69, 0x64, 0x44, 0x69, 0x67, 0x65, + 0x73, 0x74, 0x12, 0x5f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x69, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x23, 0x92, 0x41, 0x14, 0x32, 0x12, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x2e, 0xba, + 0x48, 0x09, 0x82, 0x01, 0x06, 0x10, 0x01, 0x1a, 0x02, 0x01, 0x02, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x22, 0x4a, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, + 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x02, 0x3a, + 0xf8, 0x01, 0x92, 0x41, 0xf4, 0x01, 0x0a, 0x69, 0x2a, 0x0c, 0x42, 0x69, 0x64, 0x20, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x20, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, + 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, + 0x69, 0x64, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x2e, 0xd2, 0x01, 0x09, 0x62, + 0x69, 0x64, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0xd2, 0x01, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x32, 0x86, 0x01, 0x7b, 0x22, 0x62, 0x69, 0x64, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x22, + 0x3a, 0x20, 0x22, 0x39, 0x64, 0x4a, 0x69, 0x6e, 0x77, 0x4c, 0x2b, 0x46, 0x5a, 0x36, 0x42, 0x31, + 0x78, 0x73, 0x49, 0x51, 0x51, 0x6f, 0x38, 0x74, 0x38, 0x42, 0x30, 0x5a, 0x58, 0x4a, 0x75, 0x62, + 0x4a, 0x77, 0x59, 0x38, 0x36, 0x6c, 0x2f, 0x59, 0x75, 0x37, 0x79, 0x41, 0x48, 0x31, 0x35, 0x39, + 0x51, 0x72, 0x50, 0x48, 0x55, 0x30, 0x71, 0x6a, 0x32, 0x50, 0x2b, 0x59, 0x46, 0x6a, 0x2b, 0x6c, + 0x6c, 0x62, 0x75, 0x49, 0x31, 0x5a, 0x79, 0x67, 0x64, 0x78, 0x47, 0x73, 0x58, 0x38, 0x2b, 0x50, + 0x33, 0x62, 0x79, 0x4d, 0x45, 0x41, 0x35, 0x69, 0x67, 0x3d, 0x3d, 0x22, 0x2c, 0x20, 0x22, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x20, 0x22, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x22, 0x7d, 0x22, 0xfc, 0x01, 0x0a, 0x13, 0x50, + 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x78, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x88, 0x01, 0x0a, 0x0c, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x74, + 0x78, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x44, 0x92, 0x41, 0x41, 0x32, + 0x3f, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x6e, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x20, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, + 0x52, 0x0b, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x78, 0x6e, 0x73, 0x3a, 0x5a, 0x92, + 0x41, 0x57, 0x0a, 0x55, 0x2a, 0x19, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x32, + 0x2a, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x66, + 0x6f, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0xd2, 0x01, 0x0b, 0x70, 0x65, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x78, 0x6e, 0x73, 0x22, 0xa5, 0x04, 0x0a, 0x0f, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x91, 0x01, + 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x78, 0x92, 0x41, 0x75, 0x32, 0x61, 0x48, 0x65, 0x78, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x68, 0x61, 0x73, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x74, + 0x6f, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x8a, 0x01, 0x0f, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, + 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x36, 0x34, 0x7d, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, + 0x68, 0x12, 0x3a, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x42, 0x24, 0x92, 0x41, 0x21, 0x32, 0x1f, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x20, 0x75, 0x73, 0x65, + 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x45, 0x0a, + 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, + 0x92, 0x41, 0x28, 0x32, 0x26, 0x54, 0x69, 0x6d, 0x65, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, + 0x61, 0x73, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x52, 0x07, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x3a, 0xfa, 0x01, 0x92, 0x41, 0xf6, 0x01, 0x0a, 0x59, 0x2a, 0x10, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x32, + 0x2a, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x66, + 0x6f, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0xd2, 0x01, 0x06, 0x74, 0x78, + 0x48, 0x61, 0x73, 0x68, 0xd2, 0x01, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0xd2, 0x01, 0x07, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x32, 0x98, 0x01, 0x7b, 0x22, 0x74, 0x78, 0x48, 0x61, 0x73, + 0x68, 0x22, 0x3a, 0x20, 0x22, 0x37, 0x31, 0x63, 0x31, 0x33, 0x34, 0x38, 0x66, 0x32, 0x64, 0x37, + 0x66, 0x66, 0x37, 0x65, 0x38, 0x31, 0x34, 0x66, 0x39, 0x63, 0x33, 0x36, 0x31, 0x37, 0x39, 0x38, + 0x33, 0x37, 0x30, 0x33, 0x34, 0x33, 0x35, 0x65, 0x61, 0x37, 0x34, 0x34, 0x36, 0x64, 0x65, 0x34, + 0x32, 0x30, 0x61, 0x65, 0x61, 0x63, 0x34, 0x38, 0x38, 0x62, 0x66, 0x31, 0x64, 0x65, 0x33, 0x35, + 0x37, 0x33, 0x37, 0x65, 0x38, 0x22, 0x2c, 0x20, 0x22, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x22, 0x3a, + 0x20, 0x31, 0x32, 0x33, 0x34, 0x2c, 0x20, 0x22, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, + 0x3a, 0x20, 0x22, 0x32, 0x30, 0x30, 0x39, 0x2d, 0x31, 0x31, 0x2d, 0x31, 0x30, 0x20, 0x32, 0x33, + 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x20, 0x2b, 0x30, 0x30, 0x30, 0x30, 0x20, 0x55, 0x54, 0x43, + 0x20, 0x6d, 0x3d, 0x2b, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x31, 0x22, + 0x7d, 0x22, 0xad, 0x02, 0x0a, 0x09, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x12, + 0x83, 0x01, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x6a, 0x92, 0x41, 0x67, 0x32, 0x53, 0x48, 0x65, 0x78, 0x20, 0x73, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x68, 0x61, 0x73, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x73, + 0x20, 0x74, 0x6f, 0x20, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x2e, 0x8a, 0x01, 0x0f, 0x5b, 0x61, + 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x36, 0x34, 0x7d, 0x52, 0x06, 0x74, + 0x78, 0x48, 0x61, 0x73, 0x68, 0x3a, 0x99, 0x01, 0x92, 0x41, 0x95, 0x01, 0x0a, 0x5b, 0x2a, 0x0e, + 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x32, 0x40, + 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x73, 0x20, + 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, + 0xd2, 0x01, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x32, 0x36, 0x7b, 0x22, 0x74, 0x78, 0x48, + 0x61, 0x73, 0x68, 0x22, 0x3a, 0x20, 0x22, 0x39, 0x31, 0x61, 0x38, 0x39, 0x42, 0x36, 0x33, 0x33, + 0x31, 0x39, 0x34, 0x63, 0x30, 0x44, 0x38, 0x36, 0x43, 0x35, 0x33, 0x39, 0x41, 0x31, 0x41, 0x35, + 0x42, 0x31, 0x34, 0x44, 0x43, 0x43, 0x61, 0x63, 0x66, 0x44, 0x34, 0x37, 0x30, 0x39, 0x34, 0x22, + 0x7d, 0x22, 0xb8, 0x02, 0x0a, 0x0e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x83, 0x01, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x6a, 0x92, 0x41, 0x67, 0x32, 0x53, 0x48, 0x65, 0x78, + 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x68, 0x61, 0x73, 0x68, 0x20, 0x6f, 0x66, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, + 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, + 0x77, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x2e, + 0x8a, 0x01, 0x0f, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x36, + 0x34, 0x7d, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x3a, 0x9f, 0x01, 0x92, 0x41, 0x9b, + 0x01, 0x0a, 0x49, 0x2a, 0x0f, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x20, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x2d, 0x48, 0x61, 0x73, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x2e, 0xd2, 0x01, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x32, 0x4e, 0x7b, 0x22, + 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x22, 0x3a, 0x20, 0x22, 0x37, 0x31, 0x63, 0x31, 0x33, 0x34, + 0x38, 0x66, 0x32, 0x64, 0x37, 0x66, 0x66, 0x37, 0x65, 0x38, 0x31, 0x34, 0x66, 0x39, 0x63, 0x33, + 0x36, 0x31, 0x37, 0x39, 0x38, 0x33, 0x37, 0x30, 0x33, 0x34, 0x33, 0x35, 0x65, 0x61, 0x37, 0x34, + 0x34, 0x36, 0x64, 0x65, 0x34, 0x32, 0x30, 0x61, 0x65, 0x61, 0x63, 0x34, 0x38, 0x38, 0x62, 0x66, + 0x31, 0x64, 0x65, 0x33, 0x35, 0x37, 0x33, 0x37, 0x65, 0x38, 0x22, 0x7d, 0x32, 0xc5, 0x06, 0x0a, + 0x08, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x65, 0x0a, 0x0b, 0x52, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x42, 0x69, 0x64, 0x73, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x69, 0x64, 0x22, 0x21, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x2f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x5f, 0x62, 0x69, 0x64, 0x73, 0x30, 0x01, + 0x12, 0x7d, 0x0a, 0x11, 0x53, 0x65, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, + 0x64, 0x42, 0x69, 0x64, 0x73, 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x69, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x1a, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x76, 0x31, + 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x70, + 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x5f, 0x62, 0x69, 0x64, 0x73, 0x28, 0x01, 0x12, + 0x7a, 0x0a, 0x0d, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x6b, 0x65, + 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, + 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x22, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, + 0x6b, 0x65, 0x2f, 0x7b, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x7d, 0x12, 0x67, 0x0a, 0x08, 0x47, + 0x65, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x76, + 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x73, + 0x74, 0x61, 0x6b, 0x65, 0x12, 0x6e, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x6e, 0x53, 0x74, + 0x61, 0x6b, 0x65, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x73, + 0x74, 0x61, 0x6b, 0x65, 0x12, 0x7a, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x54, 0x78, 0x6e, 0x73, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x1a, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x78, 0x6e, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1f, 0x12, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, + 0x67, 0x65, 0x74, 0x5f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x78, 0x6e, 0x73, + 0x12, 0x81, 0x01, 0x0a, 0x11, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, + 0x71, 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x22, 0x29, 0x2f, 0x76, 0x31, 0x2f, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x5f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x74, 0x78, 0x5f, 0x68, + 0x61, 0x73, 0x68, 0x7d, 0x42, 0xc8, 0x02, 0x92, 0x41, 0x7c, 0x12, 0x7a, 0x0a, 0x0c, 0x50, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x20, 0x41, 0x50, 0x49, 0x2a, 0x5d, 0x0a, 0x1b, 0x42, 0x75, + 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x4c, 0x69, + 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x31, 0x2e, 0x31, 0x12, 0x3e, 0x68, 0x74, 0x74, 0x70, 0x73, + 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, + 0x69, 0x6d, 0x65, 0x76, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x6d, 0x65, 0x76, + 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x69, + 0x6e, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, 0x0b, 0x31, 0x2e, 0x30, 0x2e, 0x30, + 0x2d, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x10, 0x50, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x65, + 0x76, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x6d, 0x65, 0x76, 0x2d, 0x63, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x50, 0x58, 0x58, 0xaa, 0x02, + 0x0e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x56, 0x31, 0xca, + 0x02, 0x0e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x1a, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x5c, 0x56, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, + 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_providerapi_v1_providerapi_proto_rawDescOnce sync.Once + file_providerapi_v1_providerapi_proto_rawDescData = file_providerapi_v1_providerapi_proto_rawDesc +) + +func file_providerapi_v1_providerapi_proto_rawDescGZIP() []byte { + file_providerapi_v1_providerapi_proto_rawDescOnce.Do(func() { + file_providerapi_v1_providerapi_proto_rawDescData = protoimpl.X.CompressGZIP(file_providerapi_v1_providerapi_proto_rawDescData) + }) + return file_providerapi_v1_providerapi_proto_rawDescData +} + +var file_providerapi_v1_providerapi_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_providerapi_v1_providerapi_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_providerapi_v1_providerapi_proto_goTypes = []interface{}{ + (BidResponse_Status)(0), // 0: providerapi.v1.BidResponse.Status + (*StakeRequest)(nil), // 1: providerapi.v1.StakeRequest + (*StakeResponse)(nil), // 2: providerapi.v1.StakeResponse + (*EmptyMessage)(nil), // 3: providerapi.v1.EmptyMessage + (*Bid)(nil), // 4: providerapi.v1.Bid + (*BidResponse)(nil), // 5: providerapi.v1.BidResponse + (*PendingTxnsResponse)(nil), // 6: providerapi.v1.PendingTxnsResponse + (*TransactionInfo)(nil), // 7: providerapi.v1.TransactionInfo + (*CancelReq)(nil), // 8: providerapi.v1.CancelReq + (*CancelResponse)(nil), // 9: providerapi.v1.CancelResponse +} +var file_providerapi_v1_providerapi_proto_depIdxs = []int32{ + 0, // 0: providerapi.v1.BidResponse.status:type_name -> providerapi.v1.BidResponse.Status + 7, // 1: providerapi.v1.PendingTxnsResponse.pending_txns:type_name -> providerapi.v1.TransactionInfo + 3, // 2: providerapi.v1.Provider.ReceiveBids:input_type -> providerapi.v1.EmptyMessage + 5, // 3: providerapi.v1.Provider.SendProcessedBids:input_type -> providerapi.v1.BidResponse + 1, // 4: providerapi.v1.Provider.RegisterStake:input_type -> providerapi.v1.StakeRequest + 3, // 5: providerapi.v1.Provider.GetStake:input_type -> providerapi.v1.EmptyMessage + 3, // 6: providerapi.v1.Provider.GetMinStake:input_type -> providerapi.v1.EmptyMessage + 3, // 7: providerapi.v1.Provider.GetPendingTxns:input_type -> providerapi.v1.EmptyMessage + 8, // 8: providerapi.v1.Provider.CancelTransaction:input_type -> providerapi.v1.CancelReq + 4, // 9: providerapi.v1.Provider.ReceiveBids:output_type -> providerapi.v1.Bid + 3, // 10: providerapi.v1.Provider.SendProcessedBids:output_type -> providerapi.v1.EmptyMessage + 2, // 11: providerapi.v1.Provider.RegisterStake:output_type -> providerapi.v1.StakeResponse + 2, // 12: providerapi.v1.Provider.GetStake:output_type -> providerapi.v1.StakeResponse + 2, // 13: providerapi.v1.Provider.GetMinStake:output_type -> providerapi.v1.StakeResponse + 6, // 14: providerapi.v1.Provider.GetPendingTxns:output_type -> providerapi.v1.PendingTxnsResponse + 9, // 15: providerapi.v1.Provider.CancelTransaction:output_type -> providerapi.v1.CancelResponse + 9, // [9:16] is the sub-list for method output_type + 2, // [2:9] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_providerapi_v1_providerapi_proto_init() } +func file_providerapi_v1_providerapi_proto_init() { + if File_providerapi_v1_providerapi_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_providerapi_v1_providerapi_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StakeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_providerapi_v1_providerapi_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StakeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_providerapi_v1_providerapi_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EmptyMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_providerapi_v1_providerapi_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Bid); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_providerapi_v1_providerapi_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BidResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_providerapi_v1_providerapi_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PendingTxnsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_providerapi_v1_providerapi_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransactionInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_providerapi_v1_providerapi_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CancelReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_providerapi_v1_providerapi_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CancelResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_providerapi_v1_providerapi_proto_rawDesc, + NumEnums: 1, + NumMessages: 9, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_providerapi_v1_providerapi_proto_goTypes, + DependencyIndexes: file_providerapi_v1_providerapi_proto_depIdxs, + EnumInfos: file_providerapi_v1_providerapi_proto_enumTypes, + MessageInfos: file_providerapi_v1_providerapi_proto_msgTypes, + }.Build() + File_providerapi_v1_providerapi_proto = out.File + file_providerapi_v1_providerapi_proto_rawDesc = nil + file_providerapi_v1_providerapi_proto_goTypes = nil + file_providerapi_v1_providerapi_proto_depIdxs = nil +} diff --git a/gen/go/rpc/providerapi/v1/providerapi.pb.gw.go b/gen/go/providerapi/v1/providerapi.pb.gw.go similarity index 94% rename from gen/go/rpc/providerapi/v1/providerapi.pb.gw.go rename to gen/go/providerapi/v1/providerapi.pb.gw.go index 83269b22..ccb48b82 100644 --- a/gen/go/rpc/providerapi/v1/providerapi.pb.gw.go +++ b/gen/go/providerapi/v1/providerapi.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: rpc/providerapi/v1/providerapi.proto +// source: providerapi/v1/providerapi.proto /* Package providerapiv1 is a reverse proxy. @@ -278,7 +278,7 @@ func RegisterProviderHandlerServer(ctx context.Context, mux *runtime.ServeMux, s inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/rpc.providerapi.v1.Provider/RegisterStake", runtime.WithHTTPPathPattern("/v1/provider/register_stake/{amount}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/providerapi.v1.Provider/RegisterStake", runtime.WithHTTPPathPattern("/v1/provider/register_stake/{amount}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -303,7 +303,7 @@ func RegisterProviderHandlerServer(ctx context.Context, mux *runtime.ServeMux, s inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/rpc.providerapi.v1.Provider/GetStake", runtime.WithHTTPPathPattern("/v1/provider/get_stake")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/providerapi.v1.Provider/GetStake", runtime.WithHTTPPathPattern("/v1/provider/get_stake")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -328,7 +328,7 @@ func RegisterProviderHandlerServer(ctx context.Context, mux *runtime.ServeMux, s inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/rpc.providerapi.v1.Provider/GetMinStake", runtime.WithHTTPPathPattern("/v1/provider/get_min_stake")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/providerapi.v1.Provider/GetMinStake", runtime.WithHTTPPathPattern("/v1/provider/get_min_stake")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -353,7 +353,7 @@ func RegisterProviderHandlerServer(ctx context.Context, mux *runtime.ServeMux, s inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/rpc.providerapi.v1.Provider/GetPendingTxns", runtime.WithHTTPPathPattern("/v1/provider/get_pending_txns")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/providerapi.v1.Provider/GetPendingTxns", runtime.WithHTTPPathPattern("/v1/provider/get_pending_txns")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -378,7 +378,7 @@ func RegisterProviderHandlerServer(ctx context.Context, mux *runtime.ServeMux, s inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/rpc.providerapi.v1.Provider/CancelTransaction", runtime.WithHTTPPathPattern("/v1/provider/cancel_transaction/{tx_hash}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/providerapi.v1.Provider/CancelTransaction", runtime.WithHTTPPathPattern("/v1/provider/cancel_transaction/{tx_hash}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -442,7 +442,7 @@ func RegisterProviderHandlerClient(ctx context.Context, mux *runtime.ServeMux, c inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/rpc.providerapi.v1.Provider/ReceiveBids", runtime.WithHTTPPathPattern("/v1/provider/receive_bids")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/providerapi.v1.Provider/ReceiveBids", runtime.WithHTTPPathPattern("/v1/provider/receive_bids")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -464,7 +464,7 @@ func RegisterProviderHandlerClient(ctx context.Context, mux *runtime.ServeMux, c inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/rpc.providerapi.v1.Provider/SendProcessedBids", runtime.WithHTTPPathPattern("/v1/provider/send_processed_bids")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/providerapi.v1.Provider/SendProcessedBids", runtime.WithHTTPPathPattern("/v1/provider/send_processed_bids")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -486,7 +486,7 @@ func RegisterProviderHandlerClient(ctx context.Context, mux *runtime.ServeMux, c inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/rpc.providerapi.v1.Provider/RegisterStake", runtime.WithHTTPPathPattern("/v1/provider/register_stake/{amount}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/providerapi.v1.Provider/RegisterStake", runtime.WithHTTPPathPattern("/v1/provider/register_stake/{amount}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -508,7 +508,7 @@ func RegisterProviderHandlerClient(ctx context.Context, mux *runtime.ServeMux, c inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/rpc.providerapi.v1.Provider/GetStake", runtime.WithHTTPPathPattern("/v1/provider/get_stake")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/providerapi.v1.Provider/GetStake", runtime.WithHTTPPathPattern("/v1/provider/get_stake")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -530,7 +530,7 @@ func RegisterProviderHandlerClient(ctx context.Context, mux *runtime.ServeMux, c inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/rpc.providerapi.v1.Provider/GetMinStake", runtime.WithHTTPPathPattern("/v1/provider/get_min_stake")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/providerapi.v1.Provider/GetMinStake", runtime.WithHTTPPathPattern("/v1/provider/get_min_stake")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -552,7 +552,7 @@ func RegisterProviderHandlerClient(ctx context.Context, mux *runtime.ServeMux, c inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/rpc.providerapi.v1.Provider/GetPendingTxns", runtime.WithHTTPPathPattern("/v1/provider/get_pending_txns")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/providerapi.v1.Provider/GetPendingTxns", runtime.WithHTTPPathPattern("/v1/provider/get_pending_txns")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -574,7 +574,7 @@ func RegisterProviderHandlerClient(ctx context.Context, mux *runtime.ServeMux, c inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/rpc.providerapi.v1.Provider/CancelTransaction", runtime.WithHTTPPathPattern("/v1/provider/cancel_transaction/{tx_hash}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/providerapi.v1.Provider/CancelTransaction", runtime.WithHTTPPathPattern("/v1/provider/cancel_transaction/{tx_hash}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return diff --git a/gen/go/rpc/providerapi/v1/providerapi_grpc.pb.go b/gen/go/providerapi/v1/providerapi_grpc.pb.go similarity index 95% rename from gen/go/rpc/providerapi/v1/providerapi_grpc.pb.go rename to gen/go/providerapi/v1/providerapi_grpc.pb.go index 78673677..006471e0 100644 --- a/gen/go/rpc/providerapi/v1/providerapi_grpc.pb.go +++ b/gen/go/providerapi/v1/providerapi_grpc.pb.go @@ -2,7 +2,7 @@ // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) -// source: rpc/providerapi/v1/providerapi.proto +// source: providerapi/v1/providerapi.proto package providerapiv1 @@ -19,13 +19,13 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Provider_ReceiveBids_FullMethodName = "/rpc.providerapi.v1.Provider/ReceiveBids" - Provider_SendProcessedBids_FullMethodName = "/rpc.providerapi.v1.Provider/SendProcessedBids" - Provider_RegisterStake_FullMethodName = "/rpc.providerapi.v1.Provider/RegisterStake" - Provider_GetStake_FullMethodName = "/rpc.providerapi.v1.Provider/GetStake" - Provider_GetMinStake_FullMethodName = "/rpc.providerapi.v1.Provider/GetMinStake" - Provider_GetPendingTxns_FullMethodName = "/rpc.providerapi.v1.Provider/GetPendingTxns" - Provider_CancelTransaction_FullMethodName = "/rpc.providerapi.v1.Provider/CancelTransaction" + Provider_ReceiveBids_FullMethodName = "/providerapi.v1.Provider/ReceiveBids" + Provider_SendProcessedBids_FullMethodName = "/providerapi.v1.Provider/SendProcessedBids" + Provider_RegisterStake_FullMethodName = "/providerapi.v1.Provider/RegisterStake" + Provider_GetStake_FullMethodName = "/providerapi.v1.Provider/GetStake" + Provider_GetMinStake_FullMethodName = "/providerapi.v1.Provider/GetMinStake" + Provider_GetPendingTxns_FullMethodName = "/providerapi.v1.Provider/GetPendingTxns" + Provider_CancelTransaction_FullMethodName = "/providerapi.v1.Provider/CancelTransaction" ) // ProviderClient is the client API for Provider service. @@ -399,7 +399,7 @@ func _Provider_CancelTransaction_Handler(srv interface{}, ctx context.Context, d // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Provider_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "rpc.providerapi.v1.Provider", + ServiceName: "providerapi.v1.Provider", HandlerType: (*ProviderServer)(nil), Methods: []grpc.MethodDesc{ { @@ -435,5 +435,5 @@ var Provider_ServiceDesc = grpc.ServiceDesc{ ClientStreams: true, }, }, - Metadata: "rpc/providerapi/v1/providerapi.proto", + Metadata: "providerapi/v1/providerapi.proto", } diff --git a/gen/go/rpc/bidderapi/v1/bidderapi.pb.go b/gen/go/rpc/bidderapi/v1/bidderapi.pb.go deleted file mode 100644 index 9b2d706b..00000000 --- a/gen/go/rpc/bidderapi/v1/bidderapi.pb.go +++ /dev/null @@ -1,743 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.31.0 -// protoc (unknown) -// source: rpc/bidderapi/v1/bidderapi.proto - -package bidderapiv1 - -import ( - _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type PrepayRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Amount string `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *PrepayRequest) Reset() { - *x = PrepayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_bidderapi_v1_bidderapi_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PrepayRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PrepayRequest) ProtoMessage() {} - -func (x *PrepayRequest) ProtoReflect() protoreflect.Message { - mi := &file_rpc_bidderapi_v1_bidderapi_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PrepayRequest.ProtoReflect.Descriptor instead. -func (*PrepayRequest) Descriptor() ([]byte, []int) { - return file_rpc_bidderapi_v1_bidderapi_proto_rawDescGZIP(), []int{0} -} - -func (x *PrepayRequest) GetAmount() string { - if x != nil { - return x.Amount - } - return "" -} - -type PrepayResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Amount string `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *PrepayResponse) Reset() { - *x = PrepayResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_bidderapi_v1_bidderapi_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PrepayResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PrepayResponse) ProtoMessage() {} - -func (x *PrepayResponse) ProtoReflect() protoreflect.Message { - mi := &file_rpc_bidderapi_v1_bidderapi_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PrepayResponse.ProtoReflect.Descriptor instead. -func (*PrepayResponse) Descriptor() ([]byte, []int) { - return file_rpc_bidderapi_v1_bidderapi_proto_rawDescGZIP(), []int{1} -} - -func (x *PrepayResponse) GetAmount() string { - if x != nil { - return x.Amount - } - return "" -} - -type EmptyMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *EmptyMessage) Reset() { - *x = EmptyMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_bidderapi_v1_bidderapi_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EmptyMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EmptyMessage) ProtoMessage() {} - -func (x *EmptyMessage) ProtoReflect() protoreflect.Message { - mi := &file_rpc_bidderapi_v1_bidderapi_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EmptyMessage.ProtoReflect.Descriptor instead. -func (*EmptyMessage) Descriptor() ([]byte, []int) { - return file_rpc_bidderapi_v1_bidderapi_proto_rawDescGZIP(), []int{2} -} - -type Bid struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - TxHashes []string `protobuf:"bytes,1,rep,name=tx_hashes,json=txHashes,proto3" json:"tx_hashes,omitempty"` - Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` - BlockNumber int64 `protobuf:"varint,3,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` - DecayStartTimestamp int64 `protobuf:"varint,4,opt,name=decay_start_timestamp,json=decayStartTimestamp,proto3" json:"decay_start_timestamp,omitempty"` - DecayEndTimestamp int64 `protobuf:"varint,5,opt,name=decay_end_timestamp,json=decayEndTimestamp,proto3" json:"decay_end_timestamp,omitempty"` -} - -func (x *Bid) Reset() { - *x = Bid{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_bidderapi_v1_bidderapi_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Bid) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Bid) ProtoMessage() {} - -func (x *Bid) ProtoReflect() protoreflect.Message { - mi := &file_rpc_bidderapi_v1_bidderapi_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Bid.ProtoReflect.Descriptor instead. -func (*Bid) Descriptor() ([]byte, []int) { - return file_rpc_bidderapi_v1_bidderapi_proto_rawDescGZIP(), []int{3} -} - -func (x *Bid) GetTxHashes() []string { - if x != nil { - return x.TxHashes - } - return nil -} - -func (x *Bid) GetAmount() string { - if x != nil { - return x.Amount - } - return "" -} - -func (x *Bid) GetBlockNumber() int64 { - if x != nil { - return x.BlockNumber - } - return 0 -} - -func (x *Bid) GetDecayStartTimestamp() int64 { - if x != nil { - return x.DecayStartTimestamp - } - return 0 -} - -func (x *Bid) GetDecayEndTimestamp() int64 { - if x != nil { - return x.DecayEndTimestamp - } - return 0 -} - -type Commitment struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - TxHashes []string `protobuf:"bytes,1,rep,name=tx_hashes,json=txHashes,proto3" json:"tx_hashes,omitempty"` - BidAmount int64 `protobuf:"varint,2,opt,name=bid_amount,json=bidAmount,proto3" json:"bid_amount,omitempty"` - BlockNumber int64 `protobuf:"varint,3,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` - ReceivedBidDigest string `protobuf:"bytes,4,opt,name=received_bid_digest,json=receivedBidDigest,proto3" json:"received_bid_digest,omitempty"` - ReceivedBidSignature string `protobuf:"bytes,5,opt,name=received_bid_signature,json=receivedBidSignature,proto3" json:"received_bid_signature,omitempty"` - CommitmentDigest string `protobuf:"bytes,6,opt,name=commitment_digest,json=commitmentDigest,proto3" json:"commitment_digest,omitempty"` - CommitmentSignature string `protobuf:"bytes,7,opt,name=commitment_signature,json=commitmentSignature,proto3" json:"commitment_signature,omitempty"` - ProviderAddress string `protobuf:"bytes,8,opt,name=provider_address,json=providerAddress,proto3" json:"provider_address,omitempty"` - DecayStartTimestamp int64 `protobuf:"varint,9,opt,name=decay_start_timestamp,json=decayStartTimestamp,proto3" json:"decay_start_timestamp,omitempty"` - DecayEndTimestamp int64 `protobuf:"varint,10,opt,name=decay_end_timestamp,json=decayEndTimestamp,proto3" json:"decay_end_timestamp,omitempty"` -} - -func (x *Commitment) Reset() { - *x = Commitment{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_bidderapi_v1_bidderapi_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Commitment) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Commitment) ProtoMessage() {} - -func (x *Commitment) ProtoReflect() protoreflect.Message { - mi := &file_rpc_bidderapi_v1_bidderapi_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Commitment.ProtoReflect.Descriptor instead. -func (*Commitment) Descriptor() ([]byte, []int) { - return file_rpc_bidderapi_v1_bidderapi_proto_rawDescGZIP(), []int{4} -} - -func (x *Commitment) GetTxHashes() []string { - if x != nil { - return x.TxHashes - } - return nil -} - -func (x *Commitment) GetBidAmount() int64 { - if x != nil { - return x.BidAmount - } - return 0 -} - -func (x *Commitment) GetBlockNumber() int64 { - if x != nil { - return x.BlockNumber - } - return 0 -} - -func (x *Commitment) GetReceivedBidDigest() string { - if x != nil { - return x.ReceivedBidDigest - } - return "" -} - -func (x *Commitment) GetReceivedBidSignature() string { - if x != nil { - return x.ReceivedBidSignature - } - return "" -} - -func (x *Commitment) GetCommitmentDigest() string { - if x != nil { - return x.CommitmentDigest - } - return "" -} - -func (x *Commitment) GetCommitmentSignature() string { - if x != nil { - return x.CommitmentSignature - } - return "" -} - -func (x *Commitment) GetProviderAddress() string { - if x != nil { - return x.ProviderAddress - } - return "" -} - -func (x *Commitment) GetDecayStartTimestamp() int64 { - if x != nil { - return x.DecayStartTimestamp - } - return 0 -} - -func (x *Commitment) GetDecayEndTimestamp() int64 { - if x != nil { - return x.DecayEndTimestamp - } - return 0 -} - -var File_rpc_bidderapi_v1_bidderapi_proto protoreflect.FileDescriptor - -var file_rpc_bidderapi_v1_bidderapi_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x72, 0x70, 0x63, 0x2f, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x31, 0x2f, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x10, 0x72, 0x70, 0x63, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, - 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xb3, 0x02, 0x0a, 0x0d, 0x50, 0x72, 0x65, 0x70, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0xa5, 0x01, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x8c, 0x01, 0x92, 0x41, 0x2e, 0x32, 0x23, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x20, 0x6f, 0x66, 0x20, 0x45, 0x54, 0x48, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x70, 0x72, - 0x65, 0x70, 0x61, 0x69, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x77, 0x65, 0x69, 0x2e, 0x8a, 0x01, 0x06, - 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0xba, 0x48, 0x58, 0xba, 0x01, 0x55, 0x0a, 0x06, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x6d, 0x75, 0x73, - 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x69, 0x6e, 0x74, - 0x65, 0x67, 0x65, 0x72, 0x2e, 0x1a, 0x2a, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x73, 0x28, 0x27, 0x5e, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x24, 0x27, 0x29, 0x20, - 0x26, 0x26, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, 0x3e, 0x20, - 0x30, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x7a, 0x92, 0x41, 0x77, 0x0a, 0x51, - 0x2a, 0x0e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x79, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x32, 0x36, 0x50, 0x72, 0x65, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x66, 0x6f, 0x72, - 0x20, 0x62, 0x69, 0x64, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x69, 0x73, 0x73, 0x75, - 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, - 0x20, 0x69, 0x6e, 0x20, 0x77, 0x65, 0x69, 0x2e, 0xd2, 0x01, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x32, 0x22, 0x7b, 0x22, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x31, - 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x30, 0x22, 0x20, 0x7d, 0x22, 0x9e, 0x01, 0x0a, 0x0e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x3a, 0x74, 0x92, 0x41, 0x71, 0x0a, 0x4b, 0x2a, 0x0f, 0x50, 0x72, 0x65, 0x70, 0x61, 0x79, 0x20, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x38, 0x47, 0x65, 0x74, 0x20, 0x70, 0x72, - 0x65, 0x70, 0x61, 0x69, 0x64, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x20, - 0x66, 0x6f, 0x72, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x79, 0x2e, 0x32, 0x22, 0x7b, 0x22, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x20, 0x22, - 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x30, 0x30, 0x22, 0x20, 0x7d, 0x22, 0x0e, 0x0a, 0x0c, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xa2, 0x0b, 0x0a, 0x03, 0x42, 0x69, 0x64, 0x12, 0xa3, - 0x02, 0x0a, 0x09, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x09, 0x42, 0x85, 0x02, 0x92, 0x41, 0x78, 0x32, 0x64, 0x48, 0x65, 0x78, 0x20, 0x73, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, - 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, - 0x77, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, - 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x8a, 0x01, - 0x0f, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x36, 0x34, 0x7d, - 0xba, 0x48, 0x86, 0x01, 0xba, 0x01, 0x82, 0x01, 0x0a, 0x09, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, - 0x68, 0x65, 0x73, 0x12, 0x36, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x20, 0x6d, - 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x61, - 0x72, 0x72, 0x61, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x20, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x2e, 0x1a, 0x3d, 0x74, 0x68, 0x69, - 0x73, 0x2e, 0x61, 0x6c, 0x6c, 0x28, 0x72, 0x2c, 0x20, 0x72, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x73, 0x28, 0x27, 0x5e, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, - 0x7b, 0x36, 0x34, 0x7d, 0x24, 0x27, 0x29, 0x29, 0x20, 0x26, 0x26, 0x20, 0x73, 0x69, 0x7a, 0x65, - 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, 0x3e, 0x20, 0x30, 0x52, 0x08, 0x74, 0x78, 0x48, 0x61, - 0x73, 0x68, 0x65, 0x73, 0x12, 0xed, 0x01, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0xd4, 0x01, 0x92, 0x41, 0x76, 0x32, 0x6b, 0x41, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x45, 0x54, 0x48, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, - 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x69, 0x73, 0x20, 0x77, 0x69, - 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x61, 0x79, 0x20, 0x74, 0x6f, 0x20, - 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x20, 0x66, 0x6f, 0x72, - 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x8a, 0x01, 0x06, 0x5b, 0x30, 0x2d, 0x39, 0x5d, - 0x2b, 0xba, 0x48, 0x58, 0xba, 0x01, 0x55, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x1f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, - 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x2e, - 0x1a, 0x2a, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, - 0x5e, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x24, 0x27, 0x29, 0x20, 0x26, 0x26, 0x20, 0x75, 0x69, - 0x6e, 0x74, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, 0x3e, 0x20, 0x30, 0x52, 0x06, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0xb9, 0x01, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x95, 0x01, 0x92, 0x41, - 0x47, 0x32, 0x45, 0x4d, 0x61, 0x78, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x20, 0x6e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, - 0x64, 0x65, 0x72, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x63, - 0x6c, 0x75, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x2e, 0xba, 0x48, 0x48, 0xba, 0x01, 0x45, 0x0a, 0x0c, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x25, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, - 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x67, - 0x65, 0x72, 0x2e, 0x1a, 0x0e, 0x75, 0x69, 0x6e, 0x74, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, - 0x3e, 0x20, 0x30, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x12, 0xc2, 0x01, 0x0a, 0x15, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, - 0x42, 0x8d, 0x01, 0x92, 0x41, 0x2d, 0x32, 0x2b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x20, 0x61, 0x74, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, - 0x69, 0x64, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x20, 0x64, 0x65, 0x63, 0x61, 0x79, 0x69, - 0x6e, 0x67, 0x2e, 0xba, 0x48, 0x5a, 0xba, 0x01, 0x57, 0x0a, 0x15, 0x64, 0x65, 0x63, 0x61, 0x79, - 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x12, 0x2e, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, - 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x2e, - 0x1a, 0x0e, 0x75, 0x69, 0x6e, 0x74, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, 0x3e, 0x20, 0x30, - 0x52, 0x13, 0x64, 0x65, 0x63, 0x61, 0x79, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0xb8, 0x01, 0x0a, 0x13, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, - 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x03, 0x42, 0x87, 0x01, 0x92, 0x41, 0x2b, 0x32, 0x29, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x20, 0x61, 0x74, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x62, 0x69, 0x64, 0x20, 0x65, 0x6e, 0x64, 0x73, 0x20, 0x64, 0x65, 0x63, 0x61, 0x79, - 0x69, 0x6e, 0x67, 0x2e, 0xba, 0x48, 0x56, 0xba, 0x01, 0x53, 0x0a, 0x13, 0x64, 0x65, 0x63, 0x61, - 0x79, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, - 0x2c, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x2e, 0x1a, 0x0e, 0x75, - 0x69, 0x6e, 0x74, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, 0x3e, 0x20, 0x30, 0x52, 0x11, 0x64, - 0x65, 0x63, 0x61, 0x79, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x3a, 0xc8, 0x02, 0x92, 0x41, 0xc4, 0x02, 0x0a, 0x71, 0x2a, 0x0b, 0x42, 0x69, 0x64, 0x20, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x40, 0x55, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, - 0x20, 0x62, 0x69, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x66, 0x72, 0x6f, - 0x6d, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x6d, 0x65, 0x76, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x20, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0xd2, 0x01, 0x08, 0x74, 0x78, 0x48, 0x61, 0x73, - 0x68, 0x65, 0x73, 0xd2, 0x01, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0xd2, 0x01, 0x0b, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x32, 0xce, 0x01, 0x7b, 0x22, 0x74, - 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0x22, 0x66, 0x65, 0x34, 0x63, - 0x62, 0x34, 0x37, 0x64, 0x62, 0x33, 0x36, 0x33, 0x30, 0x35, 0x35, 0x31, 0x62, 0x65, 0x65, 0x64, - 0x66, 0x62, 0x64, 0x30, 0x32, 0x61, 0x37, 0x31, 0x65, 0x63, 0x63, 0x36, 0x39, 0x66, 0x64, 0x35, - 0x39, 0x37, 0x35, 0x38, 0x65, 0x32, 0x62, 0x61, 0x36, 0x39, 0x39, 0x36, 0x30, 0x36, 0x65, 0x32, - 0x64, 0x35, 0x63, 0x37, 0x34, 0x32, 0x38, 0x34, 0x66, 0x66, 0x61, 0x37, 0x22, 0x2c, 0x20, 0x22, - 0x37, 0x31, 0x63, 0x31, 0x33, 0x34, 0x38, 0x66, 0x32, 0x64, 0x37, 0x66, 0x66, 0x37, 0x65, 0x38, - 0x31, 0x34, 0x66, 0x39, 0x63, 0x33, 0x36, 0x31, 0x37, 0x39, 0x38, 0x33, 0x37, 0x30, 0x33, 0x34, - 0x33, 0x35, 0x65, 0x61, 0x37, 0x34, 0x34, 0x36, 0x64, 0x65, 0x34, 0x32, 0x30, 0x61, 0x65, 0x61, - 0x63, 0x34, 0x38, 0x38, 0x62, 0x66, 0x31, 0x64, 0x65, 0x33, 0x35, 0x37, 0x33, 0x37, 0x65, 0x38, - 0x22, 0x5d, 0x2c, 0x20, 0x22, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x31, - 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x30, 0x22, 0x2c, 0x20, 0x22, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x22, 0x3a, 0x20, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x7d, 0x22, 0xf7, 0x09, 0x0a, 0x0a, - 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x95, 0x01, 0x0a, 0x09, 0x74, - 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x78, - 0x92, 0x41, 0x75, 0x32, 0x61, 0x48, 0x65, 0x78, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, - 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, - 0x68, 0x61, 0x73, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x74, 0x6f, - 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x8a, 0x01, 0x0f, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, - 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x36, 0x34, 0x7d, 0x52, 0x08, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, - 0x65, 0x73, 0x12, 0x8f, 0x01, 0x0a, 0x0a, 0x62, 0x69, 0x64, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x70, 0x92, 0x41, 0x6d, 0x32, 0x6b, 0x41, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x45, 0x54, 0x48, 0x20, 0x74, 0x68, 0x61, 0x74, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x68, 0x61, 0x73, 0x20, - 0x61, 0x67, 0x72, 0x65, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x61, 0x79, 0x20, 0x74, 0x6f, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x20, 0x66, 0x6f, - 0x72, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x52, 0x09, 0x62, 0x69, 0x64, 0x41, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x6d, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x4a, 0x92, 0x41, 0x47, 0x32, - 0x45, 0x4d, 0x61, 0x78, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, - 0x72, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, - 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x2e, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x12, 0x7b, 0x0a, 0x13, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, - 0x62, 0x69, 0x64, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x4b, 0x92, 0x41, 0x48, 0x32, 0x46, 0x48, 0x65, 0x78, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x64, 0x69, - 0x67, 0x65, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x20, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x62, - 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x11, 0x72, - 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x69, 0x64, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, - 0x12, 0x7d, 0x0a, 0x16, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x62, 0x69, 0x64, - 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x47, 0x92, 0x41, 0x44, 0x32, 0x42, 0x48, 0x65, 0x78, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, - 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x73, 0x65, 0x6e, 0x74, 0x20, - 0x74, 0x68, 0x69, 0x73, 0x20, 0x62, 0x69, 0x64, 0x2e, 0x52, 0x14, 0x72, 0x65, 0x63, 0x65, 0x69, - 0x76, 0x65, 0x64, 0x42, 0x69, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, - 0x62, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x69, - 0x67, 0x65, 0x73, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, 0x92, 0x41, 0x32, 0x32, - 0x30, 0x48, 0x65, 0x78, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x63, 0x6f, - 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x20, 0x6f, - 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, - 0x2e, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x67, - 0x65, 0x73, 0x74, 0x12, 0x9e, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, - 0x6e, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x6b, 0x92, 0x41, 0x68, 0x32, 0x66, 0x48, 0x65, 0x78, 0x20, 0x73, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x73, 0x69, 0x67, 0x6e, - 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x20, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, - 0x69, 0x73, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, - 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x12, 0x88, 0x01, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x5d, 0x92, 0x41, 0x5a, 0x32, 0x58, 0x48, 0x65, 0x78, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x73, 0x69, - 0x67, 0x6e, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, - 0x65, 0x6e, 0x74, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x52, 0x0f, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x64, 0x0a, 0x15, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x42, 0x30, - 0x92, 0x41, 0x2d, 0x32, 0x2b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x61, - 0x74, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x20, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x20, 0x64, 0x65, 0x63, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x2e, - 0x52, 0x13, 0x64, 0x65, 0x63, 0x61, 0x79, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x5e, 0x0a, 0x13, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x65, - 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x03, 0x42, 0x2e, 0x92, 0x41, 0x2b, 0x32, 0x29, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x20, 0x61, 0x74, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, - 0x62, 0x69, 0x64, 0x20, 0x65, 0x6e, 0x64, 0x73, 0x20, 0x64, 0x65, 0x63, 0x61, 0x79, 0x69, 0x6e, - 0x67, 0x2e, 0x52, 0x11, 0x64, 0x65, 0x63, 0x61, 0x79, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x32, 0xce, 0x03, 0x0a, 0x06, 0x42, 0x69, 0x64, 0x64, 0x65, 0x72, - 0x12, 0x5b, 0x0a, 0x07, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x69, 0x64, 0x12, 0x15, 0x2e, 0x72, 0x70, - 0x63, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, - 0x69, 0x64, 0x1a, 0x1c, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, - 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x76, 0x31, - 0x2f, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x2f, 0x62, 0x69, 0x64, 0x30, 0x01, 0x12, 0x78, 0x0a, - 0x0f, 0x50, 0x72, 0x65, 0x70, 0x61, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, - 0x12, 0x1f, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x20, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x22, 0x1a, 0x2f, 0x76, 0x31, - 0x2f, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x65, 0x70, 0x61, 0x79, 0x2f, 0x7b, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x7d, 0x12, 0x72, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x41, 0x6c, - 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1e, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x62, 0x69, - 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x20, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x62, 0x69, - 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x70, 0x61, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x1a, 0x12, 0x18, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x2f, 0x67, 0x65, - 0x74, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x79, 0x0a, 0x0f, 0x47, - 0x65, 0x74, 0x4d, 0x69, 0x6e, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1e, - 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x20, - 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x69, - 0x64, 0x64, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x61, 0x6c, 0x6c, - 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x42, 0xcc, 0x02, 0x92, 0x41, 0x7a, 0x12, 0x78, 0x0a, 0x0a, - 0x42, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x41, 0x50, 0x49, 0x2a, 0x5d, 0x0a, 0x1b, 0x42, 0x75, - 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x4c, 0x69, - 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x31, 0x2e, 0x31, 0x12, 0x3e, 0x68, 0x74, 0x74, 0x70, 0x73, - 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, - 0x69, 0x6d, 0x65, 0x76, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x6d, 0x65, 0x76, - 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x69, - 0x6e, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, 0x0b, 0x31, 0x2e, 0x30, 0x2e, 0x30, - 0x2d, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x70, 0x63, 0x2e, - 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x42, 0x69, - 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x65, - 0x76, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x6d, 0x65, 0x76, 0x2d, 0x63, 0x6f, - 0x6d, 0x6d, 0x69, 0x74, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x62, 0x69, 0x64, - 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, - 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x52, 0x42, 0x58, 0xaa, 0x02, 0x10, 0x52, 0x70, - 0x63, 0x2e, 0x42, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, - 0x10, 0x52, 0x70, 0x63, 0x5c, 0x42, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x1c, 0x52, 0x70, 0x63, 0x5c, 0x42, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, - 0x69, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x12, 0x52, 0x70, 0x63, 0x3a, 0x3a, 0x42, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, - 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_rpc_bidderapi_v1_bidderapi_proto_rawDescOnce sync.Once - file_rpc_bidderapi_v1_bidderapi_proto_rawDescData = file_rpc_bidderapi_v1_bidderapi_proto_rawDesc -) - -func file_rpc_bidderapi_v1_bidderapi_proto_rawDescGZIP() []byte { - file_rpc_bidderapi_v1_bidderapi_proto_rawDescOnce.Do(func() { - file_rpc_bidderapi_v1_bidderapi_proto_rawDescData = protoimpl.X.CompressGZIP(file_rpc_bidderapi_v1_bidderapi_proto_rawDescData) - }) - return file_rpc_bidderapi_v1_bidderapi_proto_rawDescData -} - -var file_rpc_bidderapi_v1_bidderapi_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_rpc_bidderapi_v1_bidderapi_proto_goTypes = []interface{}{ - (*PrepayRequest)(nil), // 0: rpc.bidderapi.v1.PrepayRequest - (*PrepayResponse)(nil), // 1: rpc.bidderapi.v1.PrepayResponse - (*EmptyMessage)(nil), // 2: rpc.bidderapi.v1.EmptyMessage - (*Bid)(nil), // 3: rpc.bidderapi.v1.Bid - (*Commitment)(nil), // 4: rpc.bidderapi.v1.Commitment -} -var file_rpc_bidderapi_v1_bidderapi_proto_depIdxs = []int32{ - 3, // 0: rpc.bidderapi.v1.Bidder.SendBid:input_type -> rpc.bidderapi.v1.Bid - 0, // 1: rpc.bidderapi.v1.Bidder.PrepayAllowance:input_type -> rpc.bidderapi.v1.PrepayRequest - 2, // 2: rpc.bidderapi.v1.Bidder.GetAllowance:input_type -> rpc.bidderapi.v1.EmptyMessage - 2, // 3: rpc.bidderapi.v1.Bidder.GetMinAllowance:input_type -> rpc.bidderapi.v1.EmptyMessage - 4, // 4: rpc.bidderapi.v1.Bidder.SendBid:output_type -> rpc.bidderapi.v1.Commitment - 1, // 5: rpc.bidderapi.v1.Bidder.PrepayAllowance:output_type -> rpc.bidderapi.v1.PrepayResponse - 1, // 6: rpc.bidderapi.v1.Bidder.GetAllowance:output_type -> rpc.bidderapi.v1.PrepayResponse - 1, // 7: rpc.bidderapi.v1.Bidder.GetMinAllowance:output_type -> rpc.bidderapi.v1.PrepayResponse - 4, // [4:8] is the sub-list for method output_type - 0, // [0:4] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_rpc_bidderapi_v1_bidderapi_proto_init() } -func file_rpc_bidderapi_v1_bidderapi_proto_init() { - if File_rpc_bidderapi_v1_bidderapi_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_rpc_bidderapi_v1_bidderapi_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PrepayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_bidderapi_v1_bidderapi_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PrepayResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_bidderapi_v1_bidderapi_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EmptyMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_bidderapi_v1_bidderapi_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Bid); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_bidderapi_v1_bidderapi_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Commitment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_rpc_bidderapi_v1_bidderapi_proto_rawDesc, - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_rpc_bidderapi_v1_bidderapi_proto_goTypes, - DependencyIndexes: file_rpc_bidderapi_v1_bidderapi_proto_depIdxs, - MessageInfos: file_rpc_bidderapi_v1_bidderapi_proto_msgTypes, - }.Build() - File_rpc_bidderapi_v1_bidderapi_proto = out.File - file_rpc_bidderapi_v1_bidderapi_proto_rawDesc = nil - file_rpc_bidderapi_v1_bidderapi_proto_goTypes = nil - file_rpc_bidderapi_v1_bidderapi_proto_depIdxs = nil -} diff --git a/gen/go/rpc/providerapi/v1/providerapi.pb.go b/gen/go/rpc/providerapi/v1/providerapi.pb.go deleted file mode 100644 index 94f539b0..00000000 --- a/gen/go/rpc/providerapi/v1/providerapi.pb.go +++ /dev/null @@ -1,1085 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.31.0 -// protoc (unknown) -// source: rpc/providerapi/v1/providerapi.proto - -package providerapiv1 - -import ( - _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type BidResponse_Status int32 - -const ( - BidResponse_STATUS_UNSPECIFIED BidResponse_Status = 0 - BidResponse_STATUS_ACCEPTED BidResponse_Status = 1 - BidResponse_STATUS_REJECTED BidResponse_Status = 2 -) - -// Enum value maps for BidResponse_Status. -var ( - BidResponse_Status_name = map[int32]string{ - 0: "STATUS_UNSPECIFIED", - 1: "STATUS_ACCEPTED", - 2: "STATUS_REJECTED", - } - BidResponse_Status_value = map[string]int32{ - "STATUS_UNSPECIFIED": 0, - "STATUS_ACCEPTED": 1, - "STATUS_REJECTED": 2, - } -) - -func (x BidResponse_Status) Enum() *BidResponse_Status { - p := new(BidResponse_Status) - *p = x - return p -} - -func (x BidResponse_Status) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (BidResponse_Status) Descriptor() protoreflect.EnumDescriptor { - return file_rpc_providerapi_v1_providerapi_proto_enumTypes[0].Descriptor() -} - -func (BidResponse_Status) Type() protoreflect.EnumType { - return &file_rpc_providerapi_v1_providerapi_proto_enumTypes[0] -} - -func (x BidResponse_Status) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use BidResponse_Status.Descriptor instead. -func (BidResponse_Status) EnumDescriptor() ([]byte, []int) { - return file_rpc_providerapi_v1_providerapi_proto_rawDescGZIP(), []int{4, 0} -} - -type StakeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Amount string `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *StakeRequest) Reset() { - *x = StakeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_providerapi_v1_providerapi_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StakeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StakeRequest) ProtoMessage() {} - -func (x *StakeRequest) ProtoReflect() protoreflect.Message { - mi := &file_rpc_providerapi_v1_providerapi_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StakeRequest.ProtoReflect.Descriptor instead. -func (*StakeRequest) Descriptor() ([]byte, []int) { - return file_rpc_providerapi_v1_providerapi_proto_rawDescGZIP(), []int{0} -} - -func (x *StakeRequest) GetAmount() string { - if x != nil { - return x.Amount - } - return "" -} - -type StakeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Amount string `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *StakeResponse) Reset() { - *x = StakeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_providerapi_v1_providerapi_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StakeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StakeResponse) ProtoMessage() {} - -func (x *StakeResponse) ProtoReflect() protoreflect.Message { - mi := &file_rpc_providerapi_v1_providerapi_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StakeResponse.ProtoReflect.Descriptor instead. -func (*StakeResponse) Descriptor() ([]byte, []int) { - return file_rpc_providerapi_v1_providerapi_proto_rawDescGZIP(), []int{1} -} - -func (x *StakeResponse) GetAmount() string { - if x != nil { - return x.Amount - } - return "" -} - -type EmptyMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *EmptyMessage) Reset() { - *x = EmptyMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_providerapi_v1_providerapi_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EmptyMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EmptyMessage) ProtoMessage() {} - -func (x *EmptyMessage) ProtoReflect() protoreflect.Message { - mi := &file_rpc_providerapi_v1_providerapi_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EmptyMessage.ProtoReflect.Descriptor instead. -func (*EmptyMessage) Descriptor() ([]byte, []int) { - return file_rpc_providerapi_v1_providerapi_proto_rawDescGZIP(), []int{2} -} - -type Bid struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - TxHashes []string `protobuf:"bytes,1,rep,name=tx_hashes,json=txHashes,proto3" json:"tx_hashes,omitempty"` - BidAmount string `protobuf:"bytes,2,opt,name=bid_amount,json=bidAmount,proto3" json:"bid_amount,omitempty"` - BlockNumber int64 `protobuf:"varint,3,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` - BidDigest []byte `protobuf:"bytes,4,opt,name=bid_digest,json=bidDigest,proto3" json:"bid_digest,omitempty"` - DecayStartTimestamp int64 `protobuf:"varint,5,opt,name=decay_start_timestamp,json=decayStartTimestamp,proto3" json:"decay_start_timestamp,omitempty"` - DecayEndTimestamp int64 `protobuf:"varint,6,opt,name=decay_end_timestamp,json=decayEndTimestamp,proto3" json:"decay_end_timestamp,omitempty"` -} - -func (x *Bid) Reset() { - *x = Bid{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_providerapi_v1_providerapi_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Bid) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Bid) ProtoMessage() {} - -func (x *Bid) ProtoReflect() protoreflect.Message { - mi := &file_rpc_providerapi_v1_providerapi_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Bid.ProtoReflect.Descriptor instead. -func (*Bid) Descriptor() ([]byte, []int) { - return file_rpc_providerapi_v1_providerapi_proto_rawDescGZIP(), []int{3} -} - -func (x *Bid) GetTxHashes() []string { - if x != nil { - return x.TxHashes - } - return nil -} - -func (x *Bid) GetBidAmount() string { - if x != nil { - return x.BidAmount - } - return "" -} - -func (x *Bid) GetBlockNumber() int64 { - if x != nil { - return x.BlockNumber - } - return 0 -} - -func (x *Bid) GetBidDigest() []byte { - if x != nil { - return x.BidDigest - } - return nil -} - -func (x *Bid) GetDecayStartTimestamp() int64 { - if x != nil { - return x.DecayStartTimestamp - } - return 0 -} - -func (x *Bid) GetDecayEndTimestamp() int64 { - if x != nil { - return x.DecayEndTimestamp - } - return 0 -} - -type BidResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BidDigest []byte `protobuf:"bytes,1,opt,name=bid_digest,json=bidDigest,proto3" json:"bid_digest,omitempty"` - Status BidResponse_Status `protobuf:"varint,2,opt,name=status,proto3,enum=rpc.providerapi.v1.BidResponse_Status" json:"status,omitempty"` -} - -func (x *BidResponse) Reset() { - *x = BidResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_providerapi_v1_providerapi_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BidResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BidResponse) ProtoMessage() {} - -func (x *BidResponse) ProtoReflect() protoreflect.Message { - mi := &file_rpc_providerapi_v1_providerapi_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BidResponse.ProtoReflect.Descriptor instead. -func (*BidResponse) Descriptor() ([]byte, []int) { - return file_rpc_providerapi_v1_providerapi_proto_rawDescGZIP(), []int{4} -} - -func (x *BidResponse) GetBidDigest() []byte { - if x != nil { - return x.BidDigest - } - return nil -} - -func (x *BidResponse) GetStatus() BidResponse_Status { - if x != nil { - return x.Status - } - return BidResponse_STATUS_UNSPECIFIED -} - -type PendingTxnsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PendingTxns []*TransactionInfo `protobuf:"bytes,1,rep,name=pending_txns,json=pendingTxns,proto3" json:"pending_txns,omitempty"` -} - -func (x *PendingTxnsResponse) Reset() { - *x = PendingTxnsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_providerapi_v1_providerapi_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PendingTxnsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PendingTxnsResponse) ProtoMessage() {} - -func (x *PendingTxnsResponse) ProtoReflect() protoreflect.Message { - mi := &file_rpc_providerapi_v1_providerapi_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PendingTxnsResponse.ProtoReflect.Descriptor instead. -func (*PendingTxnsResponse) Descriptor() ([]byte, []int) { - return file_rpc_providerapi_v1_providerapi_proto_rawDescGZIP(), []int{5} -} - -func (x *PendingTxnsResponse) GetPendingTxns() []*TransactionInfo { - if x != nil { - return x.PendingTxns - } - return nil -} - -type TransactionInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - TxHash string `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` - Nonce int64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` - Created string `protobuf:"bytes,3,opt,name=created,proto3" json:"created,omitempty"` -} - -func (x *TransactionInfo) Reset() { - *x = TransactionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_providerapi_v1_providerapi_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TransactionInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TransactionInfo) ProtoMessage() {} - -func (x *TransactionInfo) ProtoReflect() protoreflect.Message { - mi := &file_rpc_providerapi_v1_providerapi_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TransactionInfo.ProtoReflect.Descriptor instead. -func (*TransactionInfo) Descriptor() ([]byte, []int) { - return file_rpc_providerapi_v1_providerapi_proto_rawDescGZIP(), []int{6} -} - -func (x *TransactionInfo) GetTxHash() string { - if x != nil { - return x.TxHash - } - return "" -} - -func (x *TransactionInfo) GetNonce() int64 { - if x != nil { - return x.Nonce - } - return 0 -} - -func (x *TransactionInfo) GetCreated() string { - if x != nil { - return x.Created - } - return "" -} - -type CancelReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - TxHash string `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` -} - -func (x *CancelReq) Reset() { - *x = CancelReq{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_providerapi_v1_providerapi_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CancelReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CancelReq) ProtoMessage() {} - -func (x *CancelReq) ProtoReflect() protoreflect.Message { - mi := &file_rpc_providerapi_v1_providerapi_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CancelReq.ProtoReflect.Descriptor instead. -func (*CancelReq) Descriptor() ([]byte, []int) { - return file_rpc_providerapi_v1_providerapi_proto_rawDescGZIP(), []int{7} -} - -func (x *CancelReq) GetTxHash() string { - if x != nil { - return x.TxHash - } - return "" -} - -type CancelResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - TxHash string `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` -} - -func (x *CancelResponse) Reset() { - *x = CancelResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_providerapi_v1_providerapi_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CancelResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CancelResponse) ProtoMessage() {} - -func (x *CancelResponse) ProtoReflect() protoreflect.Message { - mi := &file_rpc_providerapi_v1_providerapi_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CancelResponse.ProtoReflect.Descriptor instead. -func (*CancelResponse) Descriptor() ([]byte, []int) { - return file_rpc_providerapi_v1_providerapi_proto_rawDescGZIP(), []int{8} -} - -func (x *CancelResponse) GetTxHash() string { - if x != nil { - return x.TxHash - } - return "" -} - -var File_rpc_providerapi_v1_providerapi_proto protoreflect.FileDescriptor - -var file_rpc_providerapi_v1_providerapi_proto_rawDesc = []byte{ - 0x0a, 0x24, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, - 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc1, 0x02, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0xbb, 0x01, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0xa2, 0x01, 0x92, 0x41, 0x44, 0x32, 0x39, 0x41, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x45, 0x54, 0x48, 0x20, 0x74, 0x6f, 0x20, - 0x73, 0x74, 0x61, 0x6b, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x72, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x8a, 0x01, 0x06, 0x5b, 0x30, 0x2d, 0x39, 0x5d, - 0x2b, 0xba, 0x48, 0x58, 0xba, 0x01, 0x55, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x1f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, - 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x2e, - 0x1a, 0x2a, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, - 0x5e, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x24, 0x27, 0x29, 0x20, 0x26, 0x26, 0x20, 0x75, 0x69, - 0x6e, 0x74, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, 0x3e, 0x20, 0x30, 0x52, 0x06, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x73, 0x92, 0x41, 0x70, 0x0a, 0x4a, 0x2a, 0x0d, 0x53, 0x74, 0x61, - 0x6b, 0x65, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x32, 0x31, 0x53, 0x74, 0x61, 0x6b, - 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0xd2, 0x01, 0x05, - 0x73, 0x74, 0x61, 0x6b, 0x65, 0x32, 0x22, 0x7b, 0x22, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, - 0x3a, 0x20, 0x22, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x20, 0x7d, 0x22, 0xa5, 0x01, 0x0a, 0x0d, 0x53, 0x74, - 0x61, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x3a, 0x7c, 0x92, 0x41, 0x79, 0x0a, 0x53, 0x2a, 0x0e, 0x53, 0x74, 0x61, 0x6b, - 0x65, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x41, 0x47, 0x65, 0x74, 0x20, - 0x73, 0x74, 0x61, 0x6b, 0x65, 0x64, 0x20, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x66, 0x6f, - 0x72, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x32, 0x22, 0x7b, - 0x22, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x20, - 0x7d, 0x22, 0x0e, 0x0a, 0x0c, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x22, 0xb1, 0x0c, 0x0a, 0x03, 0x42, 0x69, 0x64, 0x12, 0xa3, 0x02, 0x0a, 0x09, 0x74, 0x78, - 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x85, 0x02, - 0x92, 0x41, 0x78, 0x32, 0x64, 0x48, 0x65, 0x78, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, - 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, - 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, - 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x73, - 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x8a, 0x01, 0x0f, 0x5b, 0x61, 0x2d, 0x66, - 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x36, 0x34, 0x7d, 0xba, 0x48, 0x86, 0x01, 0xba, - 0x01, 0x82, 0x01, 0x0a, 0x09, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x36, - 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, - 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x20, - 0x6f, 0x66, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x68, - 0x61, 0x73, 0x68, 0x65, 0x73, 0x2e, 0x1a, 0x3d, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x61, 0x6c, 0x6c, - 0x28, 0x72, 0x2c, 0x20, 0x72, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x5e, - 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x36, 0x34, 0x7d, 0x24, - 0x27, 0x29, 0x29, 0x20, 0x26, 0x26, 0x20, 0x73, 0x69, 0x7a, 0x65, 0x28, 0x74, 0x68, 0x69, 0x73, - 0x29, 0x20, 0x3e, 0x20, 0x30, 0x52, 0x08, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, - 0xfc, 0x01, 0x0a, 0x0a, 0x62, 0x69, 0x64, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x42, 0xdc, 0x01, 0x92, 0x41, 0x76, 0x32, 0x6b, 0x41, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x45, 0x54, 0x48, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x69, 0x73, 0x20, 0x77, 0x69, 0x6c, - 0x6c, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x61, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x20, - 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x8a, 0x01, 0x06, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, - 0xba, 0x48, 0x60, 0xba, 0x01, 0x5d, 0x0a, 0x0a, 0x62, 0x69, 0x64, 0x5f, 0x61, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x23, 0x62, 0x69, 0x64, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x6d, - 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x69, - 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x2e, 0x1a, 0x2a, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x5e, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x24, 0x27, - 0x29, 0x20, 0x26, 0x26, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, - 0x3e, 0x20, 0x30, 0x52, 0x09, 0x62, 0x69, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x74, - 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x03, 0x42, 0x51, 0x92, 0x41, 0x47, 0x32, 0x45, 0x4d, 0x61, 0x78, 0x20, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x74, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x77, 0x61, 0x6e, 0x74, - 0x73, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x2e, - 0xba, 0x48, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x12, 0x5c, 0x0a, 0x0a, 0x62, 0x69, 0x64, 0x5f, 0x64, 0x69, 0x67, 0x65, - 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x3d, 0x92, 0x41, 0x31, 0x32, 0x2f, 0x44, - 0x69, 0x67, 0x65, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, - 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, - 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x2e, 0xba, 0x48, - 0x06, 0x7a, 0x04, 0x10, 0x01, 0x18, 0x40, 0x52, 0x09, 0x62, 0x69, 0x64, 0x44, 0x69, 0x67, 0x65, - 0x73, 0x74, 0x12, 0xc2, 0x01, 0x0a, 0x15, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x03, 0x42, 0x8d, 0x01, 0x92, 0x41, 0x2d, 0x32, 0x2b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x20, 0x61, 0x74, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x62, 0x69, 0x64, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x20, 0x64, 0x65, 0x63, 0x61, - 0x79, 0x69, 0x6e, 0x67, 0x2e, 0xba, 0x48, 0x5a, 0xba, 0x01, 0x57, 0x0a, 0x15, 0x64, 0x65, 0x63, - 0x61, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x12, 0x2e, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, - 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, - 0x72, 0x2e, 0x1a, 0x0e, 0x75, 0x69, 0x6e, 0x74, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, 0x3e, - 0x20, 0x30, 0x52, 0x13, 0x64, 0x65, 0x63, 0x61, 0x79, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0xb8, 0x01, 0x0a, 0x13, 0x64, 0x65, 0x63, 0x61, - 0x79, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x03, 0x42, 0x87, 0x01, 0x92, 0x41, 0x2b, 0x32, 0x29, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x61, 0x74, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, - 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x20, 0x65, 0x6e, 0x64, 0x73, 0x20, 0x64, 0x65, 0x63, - 0x61, 0x79, 0x69, 0x6e, 0x67, 0x2e, 0xba, 0x48, 0x56, 0xba, 0x01, 0x53, 0x0a, 0x13, 0x64, 0x65, - 0x63, 0x61, 0x79, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x12, 0x2c, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, - 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x2e, 0x1a, - 0x0e, 0x75, 0x69, 0x6e, 0x74, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, 0x3e, 0x20, 0x30, 0x52, - 0x11, 0x64, 0x65, 0x63, 0x61, 0x79, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x3a, 0xb0, 0x03, 0x92, 0x41, 0xac, 0x03, 0x0a, 0x70, 0x2a, 0x0b, 0x42, 0x69, 0x64, - 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x30, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, - 0x20, 0x62, 0x69, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x66, 0x72, 0x6f, - 0x6d, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0xd2, 0x01, 0x08, 0x74, 0x78, 0x48, - 0x61, 0x73, 0x68, 0x65, 0x73, 0xd2, 0x01, 0x09, 0x62, 0x69, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0xd2, 0x01, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0xd2, - 0x01, 0x09, 0x62, 0x69, 0x64, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x32, 0xb7, 0x02, 0x7b, 0x22, - 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0x22, 0x66, 0x65, 0x34, - 0x63, 0x62, 0x34, 0x37, 0x64, 0x62, 0x33, 0x36, 0x33, 0x30, 0x35, 0x35, 0x31, 0x62, 0x65, 0x65, - 0x64, 0x66, 0x62, 0x64, 0x30, 0x32, 0x61, 0x37, 0x31, 0x65, 0x63, 0x63, 0x36, 0x39, 0x66, 0x64, - 0x35, 0x39, 0x37, 0x35, 0x38, 0x65, 0x32, 0x62, 0x61, 0x36, 0x39, 0x39, 0x36, 0x30, 0x36, 0x65, - 0x32, 0x64, 0x35, 0x63, 0x37, 0x34, 0x32, 0x38, 0x34, 0x66, 0x66, 0x61, 0x37, 0x22, 0x2c, 0x20, - 0x22, 0x37, 0x31, 0x63, 0x31, 0x33, 0x34, 0x38, 0x66, 0x32, 0x64, 0x37, 0x66, 0x66, 0x37, 0x65, - 0x38, 0x31, 0x34, 0x66, 0x39, 0x63, 0x33, 0x36, 0x31, 0x37, 0x39, 0x38, 0x33, 0x37, 0x30, 0x33, - 0x34, 0x33, 0x35, 0x65, 0x61, 0x37, 0x34, 0x34, 0x36, 0x64, 0x65, 0x34, 0x32, 0x30, 0x61, 0x65, - 0x61, 0x63, 0x34, 0x38, 0x38, 0x62, 0x66, 0x31, 0x64, 0x65, 0x33, 0x35, 0x37, 0x33, 0x37, 0x65, - 0x38, 0x22, 0x5d, 0x2c, 0x20, 0x22, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x20, 0x22, - 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x30, 0x30, 0x22, 0x2c, 0x20, 0x22, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x22, 0x3a, 0x20, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x2c, 0x20, 0x22, 0x62, 0x69, - 0x64, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x39, 0x64, 0x4a, 0x69, 0x6e, - 0x77, 0x4c, 0x2b, 0x46, 0x5a, 0x36, 0x42, 0x31, 0x78, 0x73, 0x49, 0x51, 0x51, 0x6f, 0x38, 0x74, - 0x38, 0x42, 0x30, 0x5a, 0x58, 0x4a, 0x75, 0x62, 0x4a, 0x77, 0x59, 0x38, 0x36, 0x6c, 0x2f, 0x59, - 0x75, 0x37, 0x79, 0x41, 0x48, 0x31, 0x35, 0x39, 0x51, 0x72, 0x50, 0x48, 0x55, 0x30, 0x71, 0x6a, - 0x32, 0x50, 0x2b, 0x59, 0x46, 0x6a, 0x2b, 0x6c, 0x6c, 0x62, 0x75, 0x49, 0x31, 0x5a, 0x79, 0x67, - 0x64, 0x78, 0x47, 0x73, 0x58, 0x38, 0x2b, 0x50, 0x33, 0x62, 0x79, 0x4d, 0x45, 0x41, 0x35, 0x69, - 0x67, 0x3d, 0x3d, 0x22, 0x7d, 0x22, 0x8e, 0x04, 0x0a, 0x0b, 0x42, 0x69, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0a, 0x62, 0x69, 0x64, 0x5f, 0x64, 0x69, 0x67, - 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x34, 0x92, 0x41, 0x31, 0x32, 0x2f, - 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, - 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, - 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x2e, 0x52, - 0x09, 0x62, 0x69, 0x64, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x63, 0x0a, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x72, 0x70, 0x63, - 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x42, 0x69, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x42, 0x23, 0x92, 0x41, 0x14, 0x32, 0x12, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, - 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x2e, 0xba, 0x48, 0x09, 0x82, 0x01, - 0x06, 0x10, 0x01, 0x1a, 0x02, 0x01, 0x02, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, - 0x4a, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x43, 0x43, 0x45, - 0x50, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x02, 0x3a, 0xf8, 0x01, 0x92, 0x41, - 0xf4, 0x01, 0x0a, 0x69, 0x2a, 0x0c, 0x42, 0x69, 0x64, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x32, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x20, 0x73, 0x65, 0x6e, - 0x74, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x65, 0x63, 0x69, 0x73, - 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x20, 0x72, - 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x2e, 0xd2, 0x01, 0x09, 0x62, 0x69, 0x64, 0x44, 0x69, - 0x67, 0x65, 0x73, 0x74, 0xd2, 0x01, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0x86, 0x01, - 0x7b, 0x22, 0x62, 0x69, 0x64, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x39, - 0x64, 0x4a, 0x69, 0x6e, 0x77, 0x4c, 0x2b, 0x46, 0x5a, 0x36, 0x42, 0x31, 0x78, 0x73, 0x49, 0x51, - 0x51, 0x6f, 0x38, 0x74, 0x38, 0x42, 0x30, 0x5a, 0x58, 0x4a, 0x75, 0x62, 0x4a, 0x77, 0x59, 0x38, - 0x36, 0x6c, 0x2f, 0x59, 0x75, 0x37, 0x79, 0x41, 0x48, 0x31, 0x35, 0x39, 0x51, 0x72, 0x50, 0x48, - 0x55, 0x30, 0x71, 0x6a, 0x32, 0x50, 0x2b, 0x59, 0x46, 0x6a, 0x2b, 0x6c, 0x6c, 0x62, 0x75, 0x49, - 0x31, 0x5a, 0x79, 0x67, 0x64, 0x78, 0x47, 0x73, 0x58, 0x38, 0x2b, 0x50, 0x33, 0x62, 0x79, 0x4d, - 0x45, 0x41, 0x35, 0x69, 0x67, 0x3d, 0x3d, 0x22, 0x2c, 0x20, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x22, 0x3a, 0x20, 0x22, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x43, 0x43, 0x45, - 0x50, 0x54, 0x45, 0x44, 0x22, 0x7d, 0x22, 0x80, 0x02, 0x0a, 0x13, 0x50, 0x65, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x54, 0x78, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8c, - 0x01, 0x0a, 0x0c, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x78, 0x6e, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x44, 0x92, 0x41, 0x41, 0x32, - 0x3f, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x6e, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x20, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, - 0x52, 0x0b, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x78, 0x6e, 0x73, 0x3a, 0x5a, 0x92, - 0x41, 0x57, 0x0a, 0x55, 0x2a, 0x19, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x32, - 0x2a, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x66, - 0x6f, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0xd2, 0x01, 0x0b, 0x70, 0x65, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x78, 0x6e, 0x73, 0x22, 0xa5, 0x04, 0x0a, 0x0f, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x91, 0x01, - 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x78, 0x92, 0x41, 0x75, 0x32, 0x61, 0x48, 0x65, 0x78, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x68, 0x61, 0x73, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x74, - 0x6f, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x8a, 0x01, 0x0f, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, - 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x36, 0x34, 0x7d, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, - 0x68, 0x12, 0x3a, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, - 0x42, 0x24, 0x92, 0x41, 0x21, 0x32, 0x1f, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x20, 0x75, 0x73, 0x65, - 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x45, 0x0a, - 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, - 0x92, 0x41, 0x28, 0x32, 0x26, 0x54, 0x69, 0x6d, 0x65, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, - 0x61, 0x73, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x52, 0x07, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x3a, 0xfa, 0x01, 0x92, 0x41, 0xf6, 0x01, 0x0a, 0x59, 0x2a, 0x10, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x32, - 0x2a, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x66, - 0x6f, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0xd2, 0x01, 0x06, 0x74, 0x78, - 0x48, 0x61, 0x73, 0x68, 0xd2, 0x01, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0xd2, 0x01, 0x07, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x32, 0x98, 0x01, 0x7b, 0x22, 0x74, 0x78, 0x48, 0x61, 0x73, - 0x68, 0x22, 0x3a, 0x20, 0x22, 0x37, 0x31, 0x63, 0x31, 0x33, 0x34, 0x38, 0x66, 0x32, 0x64, 0x37, - 0x66, 0x66, 0x37, 0x65, 0x38, 0x31, 0x34, 0x66, 0x39, 0x63, 0x33, 0x36, 0x31, 0x37, 0x39, 0x38, - 0x33, 0x37, 0x30, 0x33, 0x34, 0x33, 0x35, 0x65, 0x61, 0x37, 0x34, 0x34, 0x36, 0x64, 0x65, 0x34, - 0x32, 0x30, 0x61, 0x65, 0x61, 0x63, 0x34, 0x38, 0x38, 0x62, 0x66, 0x31, 0x64, 0x65, 0x33, 0x35, - 0x37, 0x33, 0x37, 0x65, 0x38, 0x22, 0x2c, 0x20, 0x22, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x22, 0x3a, - 0x20, 0x31, 0x32, 0x33, 0x34, 0x2c, 0x20, 0x22, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, - 0x3a, 0x20, 0x22, 0x32, 0x30, 0x30, 0x39, 0x2d, 0x31, 0x31, 0x2d, 0x31, 0x30, 0x20, 0x32, 0x33, - 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x20, 0x2b, 0x30, 0x30, 0x30, 0x30, 0x20, 0x55, 0x54, 0x43, - 0x20, 0x6d, 0x3d, 0x2b, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x31, 0x22, - 0x7d, 0x22, 0xad, 0x02, 0x0a, 0x09, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x12, - 0x83, 0x01, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x6a, 0x92, 0x41, 0x67, 0x32, 0x53, 0x48, 0x65, 0x78, 0x20, 0x73, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x68, 0x61, 0x73, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, - 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x73, - 0x20, 0x74, 0x6f, 0x20, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x2e, 0x8a, 0x01, 0x0f, 0x5b, 0x61, - 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x36, 0x34, 0x7d, 0x52, 0x06, 0x74, - 0x78, 0x48, 0x61, 0x73, 0x68, 0x3a, 0x99, 0x01, 0x92, 0x41, 0x95, 0x01, 0x0a, 0x5b, 0x2a, 0x0e, - 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x32, 0x40, - 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x73, 0x20, - 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, - 0xd2, 0x01, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x32, 0x36, 0x7b, 0x22, 0x74, 0x78, 0x48, - 0x61, 0x73, 0x68, 0x22, 0x3a, 0x20, 0x22, 0x39, 0x31, 0x61, 0x38, 0x39, 0x42, 0x36, 0x33, 0x33, - 0x31, 0x39, 0x34, 0x63, 0x30, 0x44, 0x38, 0x36, 0x43, 0x35, 0x33, 0x39, 0x41, 0x31, 0x41, 0x35, - 0x42, 0x31, 0x34, 0x44, 0x43, 0x43, 0x61, 0x63, 0x66, 0x44, 0x34, 0x37, 0x30, 0x39, 0x34, 0x22, - 0x7d, 0x22, 0xb8, 0x02, 0x0a, 0x0e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x83, 0x01, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x6a, 0x92, 0x41, 0x67, 0x32, 0x53, 0x48, 0x65, 0x78, - 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, - 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x68, 0x61, 0x73, 0x68, 0x20, 0x6f, 0x66, 0x20, - 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, - 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, - 0x77, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x2e, - 0x8a, 0x01, 0x0f, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x36, - 0x34, 0x7d, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x3a, 0x9f, 0x01, 0x92, 0x41, 0x9b, - 0x01, 0x0a, 0x49, 0x2a, 0x0f, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x20, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x2d, 0x48, 0x61, 0x73, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x2e, 0xd2, 0x01, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x32, 0x4e, 0x7b, 0x22, - 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x22, 0x3a, 0x20, 0x22, 0x37, 0x31, 0x63, 0x31, 0x33, 0x34, - 0x38, 0x66, 0x32, 0x64, 0x37, 0x66, 0x66, 0x37, 0x65, 0x38, 0x31, 0x34, 0x66, 0x39, 0x63, 0x33, - 0x36, 0x31, 0x37, 0x39, 0x38, 0x33, 0x37, 0x30, 0x33, 0x34, 0x33, 0x35, 0x65, 0x61, 0x37, 0x34, - 0x34, 0x36, 0x64, 0x65, 0x34, 0x32, 0x30, 0x61, 0x65, 0x61, 0x63, 0x34, 0x38, 0x38, 0x62, 0x66, - 0x31, 0x64, 0x65, 0x33, 0x35, 0x37, 0x33, 0x37, 0x65, 0x38, 0x22, 0x7d, 0x32, 0x80, 0x07, 0x0a, - 0x08, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x6d, 0x0a, 0x0b, 0x52, 0x65, 0x63, - 0x65, 0x69, 0x76, 0x65, 0x42, 0x69, 0x64, 0x73, 0x12, 0x20, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x17, 0x2e, 0x72, 0x70, 0x63, - 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x42, 0x69, 0x64, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x76, 0x31, - 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, - 0x65, 0x5f, 0x62, 0x69, 0x64, 0x73, 0x30, 0x01, 0x12, 0x85, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x6e, - 0x64, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x42, 0x69, 0x64, 0x73, 0x12, 0x1f, - 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x69, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, - 0x20, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x76, - 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x6e, 0x64, 0x5f, - 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x5f, 0x62, 0x69, 0x64, 0x73, 0x28, 0x01, - 0x12, 0x82, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, - 0x6b, 0x65, 0x12, 0x20, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x22, - 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, 0x72, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x2f, 0x7b, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x7d, 0x12, 0x6f, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x6b, - 0x65, 0x12, 0x20, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x1a, 0x21, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, - 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x74, - 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x76, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x6e, - 0x53, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x20, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x21, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, - 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x82, - 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x78, 0x6e, - 0x73, 0x12, 0x20, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x1a, 0x27, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x54, 0x78, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x74, - 0x78, 0x6e, 0x73, 0x12, 0x89, 0x01, 0x0a, 0x11, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x72, 0x70, 0x63, 0x2e, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, - 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x2b, 0x22, 0x29, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x2f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x7d, 0x42, - 0xde, 0x02, 0x92, 0x41, 0x7c, 0x12, 0x7a, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x20, 0x41, 0x50, 0x49, 0x2a, 0x5d, 0x0a, 0x1b, 0x42, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, - 0x73, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, - 0x20, 0x31, 0x2e, 0x31, 0x12, 0x3e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x65, 0x76, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x6d, 0x65, 0x76, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x69, 0x6e, 0x2f, 0x4c, 0x49, 0x43, - 0x45, 0x4e, 0x53, 0x45, 0x32, 0x0b, 0x31, 0x2e, 0x30, 0x2e, 0x30, 0x2d, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x10, 0x50, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x49, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x65, 0x76, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x6d, 0x65, 0x76, 0x2d, 0x63, 0x6f, 0x6d, - 0x6d, 0x69, 0x74, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x52, 0x50, 0x58, 0xaa, 0x02, - 0x12, 0x52, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, - 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x52, 0x70, 0x63, 0x5c, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x61, 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x52, 0x70, 0x63, 0x5c, 0x50, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x52, 0x70, 0x63, 0x3a, - 0x3a, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_rpc_providerapi_v1_providerapi_proto_rawDescOnce sync.Once - file_rpc_providerapi_v1_providerapi_proto_rawDescData = file_rpc_providerapi_v1_providerapi_proto_rawDesc -) - -func file_rpc_providerapi_v1_providerapi_proto_rawDescGZIP() []byte { - file_rpc_providerapi_v1_providerapi_proto_rawDescOnce.Do(func() { - file_rpc_providerapi_v1_providerapi_proto_rawDescData = protoimpl.X.CompressGZIP(file_rpc_providerapi_v1_providerapi_proto_rawDescData) - }) - return file_rpc_providerapi_v1_providerapi_proto_rawDescData -} - -var file_rpc_providerapi_v1_providerapi_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_rpc_providerapi_v1_providerapi_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_rpc_providerapi_v1_providerapi_proto_goTypes = []interface{}{ - (BidResponse_Status)(0), // 0: rpc.providerapi.v1.BidResponse.Status - (*StakeRequest)(nil), // 1: rpc.providerapi.v1.StakeRequest - (*StakeResponse)(nil), // 2: rpc.providerapi.v1.StakeResponse - (*EmptyMessage)(nil), // 3: rpc.providerapi.v1.EmptyMessage - (*Bid)(nil), // 4: rpc.providerapi.v1.Bid - (*BidResponse)(nil), // 5: rpc.providerapi.v1.BidResponse - (*PendingTxnsResponse)(nil), // 6: rpc.providerapi.v1.PendingTxnsResponse - (*TransactionInfo)(nil), // 7: rpc.providerapi.v1.TransactionInfo - (*CancelReq)(nil), // 8: rpc.providerapi.v1.CancelReq - (*CancelResponse)(nil), // 9: rpc.providerapi.v1.CancelResponse -} -var file_rpc_providerapi_v1_providerapi_proto_depIdxs = []int32{ - 0, // 0: rpc.providerapi.v1.BidResponse.status:type_name -> rpc.providerapi.v1.BidResponse.Status - 7, // 1: rpc.providerapi.v1.PendingTxnsResponse.pending_txns:type_name -> rpc.providerapi.v1.TransactionInfo - 3, // 2: rpc.providerapi.v1.Provider.ReceiveBids:input_type -> rpc.providerapi.v1.EmptyMessage - 5, // 3: rpc.providerapi.v1.Provider.SendProcessedBids:input_type -> rpc.providerapi.v1.BidResponse - 1, // 4: rpc.providerapi.v1.Provider.RegisterStake:input_type -> rpc.providerapi.v1.StakeRequest - 3, // 5: rpc.providerapi.v1.Provider.GetStake:input_type -> rpc.providerapi.v1.EmptyMessage - 3, // 6: rpc.providerapi.v1.Provider.GetMinStake:input_type -> rpc.providerapi.v1.EmptyMessage - 3, // 7: rpc.providerapi.v1.Provider.GetPendingTxns:input_type -> rpc.providerapi.v1.EmptyMessage - 8, // 8: rpc.providerapi.v1.Provider.CancelTransaction:input_type -> rpc.providerapi.v1.CancelReq - 4, // 9: rpc.providerapi.v1.Provider.ReceiveBids:output_type -> rpc.providerapi.v1.Bid - 3, // 10: rpc.providerapi.v1.Provider.SendProcessedBids:output_type -> rpc.providerapi.v1.EmptyMessage - 2, // 11: rpc.providerapi.v1.Provider.RegisterStake:output_type -> rpc.providerapi.v1.StakeResponse - 2, // 12: rpc.providerapi.v1.Provider.GetStake:output_type -> rpc.providerapi.v1.StakeResponse - 2, // 13: rpc.providerapi.v1.Provider.GetMinStake:output_type -> rpc.providerapi.v1.StakeResponse - 6, // 14: rpc.providerapi.v1.Provider.GetPendingTxns:output_type -> rpc.providerapi.v1.PendingTxnsResponse - 9, // 15: rpc.providerapi.v1.Provider.CancelTransaction:output_type -> rpc.providerapi.v1.CancelResponse - 9, // [9:16] is the sub-list for method output_type - 2, // [2:9] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_rpc_providerapi_v1_providerapi_proto_init() } -func file_rpc_providerapi_v1_providerapi_proto_init() { - if File_rpc_providerapi_v1_providerapi_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_rpc_providerapi_v1_providerapi_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StakeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_providerapi_v1_providerapi_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StakeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_providerapi_v1_providerapi_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EmptyMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_providerapi_v1_providerapi_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Bid); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_providerapi_v1_providerapi_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BidResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_providerapi_v1_providerapi_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PendingTxnsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_providerapi_v1_providerapi_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TransactionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_providerapi_v1_providerapi_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CancelReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_providerapi_v1_providerapi_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CancelResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_rpc_providerapi_v1_providerapi_proto_rawDesc, - NumEnums: 1, - NumMessages: 9, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_rpc_providerapi_v1_providerapi_proto_goTypes, - DependencyIndexes: file_rpc_providerapi_v1_providerapi_proto_depIdxs, - EnumInfos: file_rpc_providerapi_v1_providerapi_proto_enumTypes, - MessageInfos: file_rpc_providerapi_v1_providerapi_proto_msgTypes, - }.Build() - File_rpc_providerapi_v1_providerapi_proto = out.File - file_rpc_providerapi_v1_providerapi_proto_rawDesc = nil - file_rpc_providerapi_v1_providerapi_proto_goTypes = nil - file_rpc_providerapi_v1_providerapi_proto_depIdxs = nil -} diff --git a/gen/go/streammsg/v1/streammsg.pb.go b/gen/go/streammsg/v1/streammsg.pb.go new file mode 100644 index 00000000..6eb9aa9a --- /dev/null +++ b/gen/go/streammsg/v1/streammsg.pb.go @@ -0,0 +1,198 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: streammsg/v1/streammsg.proto + +package streammsgv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type StreamMsg struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Header map[string]*structpb.Value `protobuf:"bytes,1,rep,name=header,proto3" json:"header,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + Trailer map[string]*structpb.Value `protobuf:"bytes,3,rep,name=trailer,proto3" json:"trailer,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *StreamMsg) Reset() { + *x = StreamMsg{} + if protoimpl.UnsafeEnabled { + mi := &file_streammsg_v1_streammsg_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamMsg) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamMsg) ProtoMessage() {} + +func (x *StreamMsg) ProtoReflect() protoreflect.Message { + mi := &file_streammsg_v1_streammsg_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamMsg.ProtoReflect.Descriptor instead. +func (*StreamMsg) Descriptor() ([]byte, []int) { + return file_streammsg_v1_streammsg_proto_rawDescGZIP(), []int{0} +} + +func (x *StreamMsg) GetHeader() map[string]*structpb.Value { + if x != nil { + return x.Header + } + return nil +} + +func (x *StreamMsg) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *StreamMsg) GetTrailer() map[string]*structpb.Value { + if x != nil { + return x.Trailer + } + return nil +} + +var File_streammsg_v1_streammsg_proto protoreflect.FileDescriptor + +var file_streammsg_v1_streammsg_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x6d, 0x73, 0x67, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc3, 0x02, 0x0a, 0x09, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x73, 0x67, 0x12, 0x3b, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x6d, 0x73, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x73, + 0x67, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3e, 0x0a, 0x07, 0x74, 0x72, 0x61, + 0x69, 0x6c, 0x65, 0x72, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x6d, 0x73, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x4d, 0x73, 0x67, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x07, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x1a, 0x51, 0x0a, 0x0b, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x52, 0x0a, 0x0c, + 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x42, 0xb9, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x6d, + 0x73, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x6d, 0x73, 0x67, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x65, 0x76, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x2f, 0x6d, 0x65, 0x76, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x2f, 0x67, 0x65, + 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x6d, 0x73, 0x67, 0x2f, 0x76, + 0x31, 0x3b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x6d, 0x73, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, + 0x53, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x6d, 0x73, 0x67, 0x2e, + 0x56, 0x31, 0xca, 0x02, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x6d, 0x73, 0x67, 0x5c, 0x56, + 0x31, 0xe2, 0x02, 0x18, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x6d, 0x73, 0x67, 0x5c, 0x56, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_streammsg_v1_streammsg_proto_rawDescOnce sync.Once + file_streammsg_v1_streammsg_proto_rawDescData = file_streammsg_v1_streammsg_proto_rawDesc +) + +func file_streammsg_v1_streammsg_proto_rawDescGZIP() []byte { + file_streammsg_v1_streammsg_proto_rawDescOnce.Do(func() { + file_streammsg_v1_streammsg_proto_rawDescData = protoimpl.X.CompressGZIP(file_streammsg_v1_streammsg_proto_rawDescData) + }) + return file_streammsg_v1_streammsg_proto_rawDescData +} + +var file_streammsg_v1_streammsg_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_streammsg_v1_streammsg_proto_goTypes = []interface{}{ + (*StreamMsg)(nil), // 0: streammsg.v1.StreamMsg + nil, // 1: streammsg.v1.StreamMsg.HeaderEntry + nil, // 2: streammsg.v1.StreamMsg.TrailerEntry + (*structpb.Value)(nil), // 3: google.protobuf.Value +} +var file_streammsg_v1_streammsg_proto_depIdxs = []int32{ + 1, // 0: streammsg.v1.StreamMsg.header:type_name -> streammsg.v1.StreamMsg.HeaderEntry + 2, // 1: streammsg.v1.StreamMsg.trailer:type_name -> streammsg.v1.StreamMsg.TrailerEntry + 3, // 2: streammsg.v1.StreamMsg.HeaderEntry.value:type_name -> google.protobuf.Value + 3, // 3: streammsg.v1.StreamMsg.TrailerEntry.value:type_name -> google.protobuf.Value + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_streammsg_v1_streammsg_proto_init() } +func file_streammsg_v1_streammsg_proto_init() { + if File_streammsg_v1_streammsg_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_streammsg_v1_streammsg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamMsg); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_streammsg_v1_streammsg_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_streammsg_v1_streammsg_proto_goTypes, + DependencyIndexes: file_streammsg_v1_streammsg_proto_depIdxs, + MessageInfos: file_streammsg_v1_streammsg_proto_msgTypes, + }.Build() + File_streammsg_v1_streammsg_proto = out.File + file_streammsg_v1_streammsg_proto_rawDesc = nil + file_streammsg_v1_streammsg_proto_goTypes = nil + file_streammsg_v1_streammsg_proto_depIdxs = nil +} diff --git a/gen/openapi/rpc/bidderapi/v1/bidderapi.swagger.yaml b/gen/openapi/bidderapi/v1/bidderapi.swagger.yaml similarity index 98% rename from gen/openapi/rpc/bidderapi/v1/bidderapi.swagger.yaml rename to gen/openapi/bidderapi/v1/bidderapi.swagger.yaml index 3fa2321a..86f8f369 100644 --- a/gen/openapi/rpc/bidderapi/v1/bidderapi.swagger.yaml +++ b/gen/openapi/bidderapi/v1/bidderapi.swagger.yaml @@ -36,7 +36,7 @@ paths: in: body required: true schema: - $ref: '#/definitions/rpcbidderapiv1Bid' + $ref: '#/definitions/bidderapiv1Bid' /v1/bidder/get_allowance: get: summary: GetAllowance @@ -86,26 +86,7 @@ paths: required: true type: string definitions: - googlerpcStatus: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - $ref: '#/definitions/protobufAny' - protobufAny: - type: object - properties: - '@type': - type: string - additionalProperties: {} - rpcbidderapiv1Bid: + bidderapiv1Bid: type: object example: amount: "1000000000000000000" @@ -142,6 +123,25 @@ definitions: - txHashes - amount - blockNumber + googlerpcStatus: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + $ref: '#/definitions/protobufAny' + protobufAny: + type: object + properties: + '@type': + type: string + additionalProperties: {} v1Commitment: type: object properties: diff --git a/gen/openapi/rpc/providerapi/v1/providerapi.swagger.yaml b/gen/openapi/providerapi/v1/providerapi.swagger.yaml similarity index 97% rename from gen/openapi/rpc/providerapi/v1/providerapi.swagger.yaml rename to gen/openapi/providerapi/v1/providerapi.swagger.yaml index 9b870d67..dafd3a5a 100644 --- a/gen/openapi/rpc/providerapi/v1/providerapi.swagger.yaml +++ b/gen/openapi/providerapi/v1/providerapi.swagger.yaml @@ -86,10 +86,10 @@ paths: type: object properties: result: - $ref: '#/definitions/rpcproviderapiv1Bid' + $ref: '#/definitions/providerapiv1Bid' error: $ref: '#/definitions/googlerpcStatus' - title: Stream result of rpcproviderapiv1Bid + title: Stream result of providerapiv1Bid default: description: An unexpected error response. schema: @@ -125,7 +125,7 @@ paths: "200": description: A successful response. schema: - $ref: '#/definitions/rpcproviderapiv1EmptyMessage' + $ref: '#/definitions/providerapiv1EmptyMessage' default: description: An unexpected error response. schema: @@ -157,7 +157,7 @@ definitions: '@type': type: string additionalProperties: {} - rpcproviderapiv1Bid: + providerapiv1Bid: type: object example: amount: "1000000000000000000" @@ -200,7 +200,7 @@ definitions: - bidAmount - blockNumber - bidDigest - rpcproviderapiv1EmptyMessage: + providerapiv1EmptyMessage: type: object v1BidResponse: type: object diff --git a/messages/buf.gen.yaml b/messages/buf.gen.yaml new file mode 100644 index 00000000..6cd6599d --- /dev/null +++ b/messages/buf.gen.yaml @@ -0,0 +1,14 @@ +version: v1 +managed: + enabled: true + go_package_prefix: + default: github.com/primevprotocol/mev-commit/gen/go + except: + - buf.build/bufbuild/protovalidate + - buf.build/googleapis/googleapis + - buf.build/grpc-ecosystem/grpc-gateway + +plugins: + - plugin: buf.build/protocolbuffers/go:v1.31.0 + out: gen/go + opt: paths=source_relative diff --git a/messages/buf.lock b/messages/buf.lock new file mode 100644 index 00000000..c3288990 --- /dev/null +++ b/messages/buf.lock @@ -0,0 +1,13 @@ +# Generated by buf. DO NOT EDIT. +version: v1 +deps: + - remote: buf.build + owner: bufbuild + repository: protovalidate + commit: f05a6f4403ce4327bae4f50f281c3ed0 + digest: shake256:668a0661b8df44d41839194896329330965fc215f3d2f88057fd60eeb759c2daf6cc6edfdd13b2a653d49fe2896ebedcb1a33c4c5b2dd10919f03ffb7fc52ae6 + - remote: buf.build + owner: googleapis + repository: googleapis + commit: 7e6f6e774e29406da95bd61cdcdbc8bc + digest: shake256:fe43dd2265ea0c07d76bd925eeba612667cf4c948d2ce53d6e367e1b4b3cb5fa69a51e6acb1a6a50d32f894f054a35e6c0406f6808a483f2752e10c866ffbf73 diff --git a/rpc/bidderapi/v1/buf.yaml b/messages/buf.yaml similarity index 80% rename from rpc/bidderapi/v1/buf.yaml rename to messages/buf.yaml index d4e08464..4053a33d 100644 --- a/rpc/bidderapi/v1/buf.yaml +++ b/messages/buf.yaml @@ -1,4 +1,5 @@ version: v1 +name: buf.build/mev-commit/messages deps: - buf.build/googleapis/googleapis - buf.build/bufbuild/protovalidate diff --git a/messages/discovery/v1/discovery.proto b/messages/discovery/v1/discovery.proto new file mode 100644 index 00000000..b104c43b --- /dev/null +++ b/messages/discovery/v1/discovery.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; + +package discovery.v1; + +message PeerList { + repeated PeerInfo peers = 1; +}; + +message PeerInfo { + bytes eth_address = 1; + bytes underlay = 2; +}; diff --git a/messages/preconfirmation/v1/preconfirmation.proto b/messages/preconfirmation/v1/preconfirmation.proto new file mode 100644 index 00000000..9661b3d2 --- /dev/null +++ b/messages/preconfirmation/v1/preconfirmation.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; + +package preconfirmation.v1; + +message Bid { + string tx_hash = 1; + string bid_amount = 2; + string block_number = 3; + bytes digest = 4; + bytes signature = 5; +}; + +message PreConfirmation { + Bid bid = 1; + bytes digest = 2; + bytes signature = 3; + bytes provider_address = 4; +}; diff --git a/messages/streammsg/v1/streammsg.proto b/messages/streammsg/v1/streammsg.proto new file mode 100644 index 00000000..86d4eb0a --- /dev/null +++ b/messages/streammsg/v1/streammsg.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +package streammsg.v1; + +import "google/protobuf/struct.proto"; + +message StreamMsg { + map header = 1; + bytes data = 2; + map trailer = 3; +}; diff --git a/rpc/bidderapi/v1/bidderapi.proto b/rpc/bidderapi/v1/bidderapi.proto index fe13c072..d2896773 100644 --- a/rpc/bidderapi/v1/bidderapi.proto +++ b/rpc/bidderapi/v1/bidderapi.proto @@ -1,8 +1,6 @@ syntax = "proto3"; -package rpc.bidderapi.v1; - -option go_package = "github.com/primevprotocol/mev-commit/rpc/bidderapi/v1;bidderapiv1"; +package bidderapi.v1; import "protoc-gen-openapiv2/options/annotations.proto"; import "google/api/annotations.proto"; diff --git a/buf.gen.yaml b/rpc/buf.gen.yaml similarity index 92% rename from buf.gen.yaml rename to rpc/buf.gen.yaml index 41764361..55fae8dc 100644 --- a/buf.gen.yaml +++ b/rpc/buf.gen.yaml @@ -2,7 +2,7 @@ version: v1 managed: enabled: true go_package_prefix: - default: github.com/primevprotocol/mev-commit/gen + default: github.com/primevprotocol/mev-commit/gen/go except: - buf.build/bufbuild/protovalidate - buf.build/googleapis/googleapis diff --git a/buf.lock b/rpc/buf.lock similarity index 100% rename from buf.lock rename to rpc/buf.lock diff --git a/rpc/providerapi/v1/buf.yaml b/rpc/buf.yaml similarity index 56% rename from rpc/providerapi/v1/buf.yaml rename to rpc/buf.yaml index d4e08464..6964b458 100644 --- a/rpc/providerapi/v1/buf.yaml +++ b/rpc/buf.yaml @@ -1,7 +1,10 @@ version: v1 +name: buf.build/mev-commit/rpc deps: + - buf.build/grpc-ecosystem/grpc-gateway - buf.build/googleapis/googleapis - buf.build/bufbuild/protovalidate + - buf.build/grpc-ecosystem/openapiv2 breaking: use: - FILE diff --git a/rpc/providerapi/v1/providerapi.proto b/rpc/providerapi/v1/providerapi.proto index dc52e928..dfa1aeb5 100644 --- a/rpc/providerapi/v1/providerapi.proto +++ b/rpc/providerapi/v1/providerapi.proto @@ -1,8 +1,6 @@ syntax = "proto3"; -package rpc.providerapi.v1; - -option go_package = "github.com/primevprotocol/mev-commit/rpc/providerapi/v1;providerapiv1"; +package providerapi.v1; import "protoc-gen-openapiv2/options/annotations.proto"; import "google/api/annotations.proto"; From f5b412cacc04b1c63d865046aabc2dac7caedfae Mon Sep 17 00:00:00 2001 From: Alok Date: Wed, 6 Mar 2024 01:54:24 +0530 Subject: [PATCH 02/14] fix: build and tests --- examples/biddercli/main.go | 2 +- examples/provideremulator/client/client.go | 2 +- examples/provideremulator/main.go | 2 +- integrationtest/bidder/main.go | 2 +- integrationtest/provider/client.go | 2 +- integrationtest/provider/main.go | 2 +- integrationtest/real-bidder/main.go | 2 +- pkg/node/node.go | 4 ++-- pkg/preconfirmation/preconfirmation.go | 2 +- pkg/preconfirmation/preconfirmation_test.go | 2 +- pkg/rpc/bidder/service.go | 2 +- pkg/rpc/bidder/service_test.go | 2 +- pkg/rpc/provider/service.go | 2 +- pkg/rpc/provider/service_test.go | 2 +- 14 files changed, 15 insertions(+), 15 deletions(-) diff --git a/examples/biddercli/main.go b/examples/biddercli/main.go index 712470ea..a628854e 100644 --- a/examples/biddercli/main.go +++ b/examples/biddercli/main.go @@ -10,7 +10,7 @@ import ( "strconv" "time" - pb "github.com/primevprotocol/mev-commit/gen/go/rpc/bidderapi/v1" + pb "github.com/primevprotocol/mev-commit/gen/go/bidderapi/v1" "github.com/urfave/cli/v2" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" diff --git a/examples/provideremulator/client/client.go b/examples/provideremulator/client/client.go index 40f5a458..ad9ab8f7 100644 --- a/examples/provideremulator/client/client.go +++ b/examples/provideremulator/client/client.go @@ -12,7 +12,7 @@ import ( "fmt" "log/slog" - providerapiv1 "github.com/primevprotocol/mev-commit/gen/go/rpc/providerapi/v1" + providerapiv1 "github.com/primevprotocol/mev-commit/gen/go/providerapi/v1" "google.golang.org/grpc" ) diff --git a/examples/provideremulator/main.go b/examples/provideremulator/main.go index 552d8336..fce6b512 100644 --- a/examples/provideremulator/main.go +++ b/examples/provideremulator/main.go @@ -8,7 +8,7 @@ import ( "os" "github.com/primevprotocol/mev-commit/examples/provideremulator/client" - providerapiv1 "github.com/primevprotocol/mev-commit/gen/go/rpc/providerapi/v1" + providerapiv1 "github.com/primevprotocol/mev-commit/gen/go/providerapi/v1" ) var ( diff --git a/integrationtest/bidder/main.go b/integrationtest/bidder/main.go index f53e1596..622e78e5 100644 --- a/integrationtest/bidder/main.go +++ b/integrationtest/bidder/main.go @@ -20,7 +20,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethclient" - pb "github.com/primevprotocol/mev-commit/gen/go/rpc/bidderapi/v1" + pb "github.com/primevprotocol/mev-commit/gen/go/bidderapi/v1" "github.com/primevprotocol/mev-commit/pkg/util" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" diff --git a/integrationtest/provider/client.go b/integrationtest/provider/client.go index 704f7420..24a1512a 100644 --- a/integrationtest/provider/client.go +++ b/integrationtest/provider/client.go @@ -9,7 +9,7 @@ import ( "math/big" "time" - providerapiv1 "github.com/primevprotocol/mev-commit/gen/go/rpc/providerapi/v1" + providerapiv1 "github.com/primevprotocol/mev-commit/gen/go/providerapi/v1" "google.golang.org/grpc" "google.golang.org/grpc/credentials" "google.golang.org/grpc/credentials/insecure" diff --git a/integrationtest/provider/main.go b/integrationtest/provider/main.go index 751b14d4..6da37557 100644 --- a/integrationtest/provider/main.go +++ b/integrationtest/provider/main.go @@ -10,7 +10,7 @@ import ( "net/http" "os" - providerapiv1 "github.com/primevprotocol/mev-commit/gen/go/rpc/providerapi/v1" + providerapiv1 "github.com/primevprotocol/mev-commit/gen/go/providerapi/v1" "github.com/primevprotocol/mev-commit/pkg/util" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" diff --git a/integrationtest/real-bidder/main.go b/integrationtest/real-bidder/main.go index 40fcfc95..227b69c2 100644 --- a/integrationtest/real-bidder/main.go +++ b/integrationtest/real-bidder/main.go @@ -17,7 +17,7 @@ import ( "time" "github.com/ethereum/go-ethereum/ethclient" - pb "github.com/primevprotocol/mev-commit/gen/go/rpc/bidderapi/v1" + pb "github.com/primevprotocol/mev-commit/gen/go/bidderapi/v1" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" "google.golang.org/grpc" diff --git a/pkg/node/node.go b/pkg/node/node.go index 8c7df79c..14309727 100644 --- a/pkg/node/node.go +++ b/pkg/node/node.go @@ -16,8 +16,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - bidderapiv1 "github.com/primevprotocol/mev-commit/gen/go/rpc/bidderapi/v1" - providerapiv1 "github.com/primevprotocol/mev-commit/gen/go/rpc/providerapi/v1" + bidderapiv1 "github.com/primevprotocol/mev-commit/gen/go/bidderapi/v1" + providerapiv1 "github.com/primevprotocol/mev-commit/gen/go/providerapi/v1" "github.com/primevprotocol/mev-commit/pkg/apiserver" bidder_registrycontract "github.com/primevprotocol/mev-commit/pkg/contracts/bidder_registry" preconfcontract "github.com/primevprotocol/mev-commit/pkg/contracts/preconf" diff --git a/pkg/preconfirmation/preconfirmation.go b/pkg/preconfirmation/preconfirmation.go index b06b3972..de3f46c4 100644 --- a/pkg/preconfirmation/preconfirmation.go +++ b/pkg/preconfirmation/preconfirmation.go @@ -9,7 +9,7 @@ import ( "time" "github.com/ethereum/go-ethereum/common" - providerapiv1 "github.com/primevprotocol/mev-commit/gen/go/rpc/providerapi/v1" + providerapiv1 "github.com/primevprotocol/mev-commit/gen/go/providerapi/v1" preconfcontract "github.com/primevprotocol/mev-commit/pkg/contracts/preconf" "github.com/primevprotocol/mev-commit/pkg/p2p" "github.com/primevprotocol/mev-commit/pkg/p2p/msgpack" diff --git a/pkg/preconfirmation/preconfirmation_test.go b/pkg/preconfirmation/preconfirmation_test.go index e541ba81..6e6cf77b 100644 --- a/pkg/preconfirmation/preconfirmation_test.go +++ b/pkg/preconfirmation/preconfirmation_test.go @@ -10,7 +10,7 @@ import ( "time" "github.com/ethereum/go-ethereum/common" - providerapiv1 "github.com/primevprotocol/mev-commit/gen/go/rpc/providerapi/v1" + providerapiv1 "github.com/primevprotocol/mev-commit/gen/go/providerapi/v1" "github.com/primevprotocol/mev-commit/pkg/p2p" p2ptest "github.com/primevprotocol/mev-commit/pkg/p2p/testing" "github.com/primevprotocol/mev-commit/pkg/preconfirmation" diff --git a/pkg/rpc/bidder/service.go b/pkg/rpc/bidder/service.go index cc3b1eca..60b5f731 100644 --- a/pkg/rpc/bidder/service.go +++ b/pkg/rpc/bidder/service.go @@ -10,7 +10,7 @@ import ( "github.com/bufbuild/protovalidate-go" "github.com/ethereum/go-ethereum/common" - bidderapiv1 "github.com/primevprotocol/mev-commit/gen/go/rpc/bidderapi/v1" + bidderapiv1 "github.com/primevprotocol/mev-commit/gen/go/bidderapi/v1" registrycontract "github.com/primevprotocol/mev-commit/pkg/contracts/bidder_registry" "github.com/primevprotocol/mev-commit/pkg/signer/preconfsigner" "google.golang.org/grpc/codes" diff --git a/pkg/rpc/bidder/service_test.go b/pkg/rpc/bidder/service_test.go index 2e765fca..c573c80f 100644 --- a/pkg/rpc/bidder/service_test.go +++ b/pkg/rpc/bidder/service_test.go @@ -13,7 +13,7 @@ import ( "github.com/bufbuild/protovalidate-go" "github.com/ethereum/go-ethereum/common" - bidderapiv1 "github.com/primevprotocol/mev-commit/gen/go/rpc/bidderapi/v1" + bidderapiv1 "github.com/primevprotocol/mev-commit/gen/go/bidderapi/v1" bidderapi "github.com/primevprotocol/mev-commit/pkg/rpc/bidder" "github.com/primevprotocol/mev-commit/pkg/signer/preconfsigner" "github.com/primevprotocol/mev-commit/pkg/util" diff --git a/pkg/rpc/provider/service.go b/pkg/rpc/provider/service.go index 5eeb6e9b..cae81f6d 100644 --- a/pkg/rpc/provider/service.go +++ b/pkg/rpc/provider/service.go @@ -12,7 +12,7 @@ import ( "github.com/bufbuild/protovalidate-go" "github.com/ethereum/go-ethereum/common" - providerapiv1 "github.com/primevprotocol/mev-commit/gen/go/rpc/providerapi/v1" + providerapiv1 "github.com/primevprotocol/mev-commit/gen/go/providerapi/v1" registrycontract "github.com/primevprotocol/mev-commit/pkg/contracts/provider_registry" "github.com/primevprotocol/mev-commit/pkg/evmclient" "github.com/primevprotocol/mev-commit/pkg/signer/preconfsigner" diff --git a/pkg/rpc/provider/service_test.go b/pkg/rpc/provider/service_test.go index cd4b9747..dd8406a0 100644 --- a/pkg/rpc/provider/service_test.go +++ b/pkg/rpc/provider/service_test.go @@ -11,7 +11,7 @@ import ( "github.com/bufbuild/protovalidate-go" "github.com/ethereum/go-ethereum/common" - providerapiv1 "github.com/primevprotocol/mev-commit/gen/go/rpc/providerapi/v1" + providerapiv1 "github.com/primevprotocol/mev-commit/gen/go/providerapi/v1" "github.com/primevprotocol/mev-commit/pkg/evmclient" providerapi "github.com/primevprotocol/mev-commit/pkg/rpc/provider" "github.com/primevprotocol/mev-commit/pkg/signer/preconfsigner" From 52a91bb62c877258a4a57ade72eee8b87ec35747 Mon Sep 17 00:00:00 2001 From: Alok Date: Thu, 14 Mar 2024 23:24:03 +0530 Subject: [PATCH 03/14] feat: integrate new libp2p messages --- gen/go/bidderapi/v1/bidderapi.pb.go | 8 +- gen/go/handshake/v1/handshake.pb.go | 246 ++++++++++++++++++ .../preconfirmation/v1/preconfirmation.pb.go | 8 +- gen/go/streammsg/v1/streammsg.pb.go | 198 +++++++++----- .../bidderapi/v1/bidderapi.swagger.yaml | 1 - go.mod | 1 + go.sum | 2 + messages/handshake/v1/handshake.proto | 15 ++ .../preconfirmation/v1/preconfirmation.proto | 2 +- messages/streammsg/v1/streammsg.proto | 12 +- pkg/discovery/discovery.go | 45 ++-- pkg/discovery/discovery_test.go | 2 +- pkg/node/node.go | 7 +- .../libp2p/internal/handshake/handshake.go | 52 ++-- pkg/p2p/libp2p/libp2p.go | 146 ++++++++--- pkg/p2p/libp2p/libp2p_test.go | 66 ++--- pkg/p2p/libp2p/stream.go | 172 +++++++++++- pkg/p2p/msgpack/msgpack.go | 77 ------ pkg/p2p/msgpack/msgpack_test.go | 47 ---- pkg/p2p/p2p.go | 50 ++-- pkg/p2p/protobuf/protobuf.go | 68 ----- pkg/p2p/protobuf/protobuf_test.go | 61 ----- pkg/p2p/testing/p2p.go | 34 ++- pkg/preconfirmation/preconfirmation.go | 134 +++++----- pkg/preconfirmation/preconfirmation_test.go | 41 +-- pkg/rpc/bidder/service.go | 24 +- pkg/rpc/bidder/service_test.go | 26 +- pkg/rpc/provider/service.go | 12 +- pkg/rpc/provider/service_test.go | 72 ++--- pkg/signer/preconfsigner/export_test.go | 5 +- pkg/signer/preconfsigner/signer.go | 192 +++----------- pkg/signer/preconfsigner/signer_test.go | 29 ++- rpc/bidderapi/v1/bidderapi.proto | 2 +- 33 files changed, 1050 insertions(+), 807 deletions(-) create mode 100644 gen/go/handshake/v1/handshake.pb.go create mode 100644 messages/handshake/v1/handshake.proto delete mode 100644 pkg/p2p/msgpack/msgpack.go delete mode 100644 pkg/p2p/msgpack/msgpack_test.go delete mode 100644 pkg/p2p/protobuf/protobuf.go delete mode 100644 pkg/p2p/protobuf/protobuf_test.go diff --git a/gen/go/bidderapi/v1/bidderapi.pb.go b/gen/go/bidderapi/v1/bidderapi.pb.go index c7a093d9..badc0a64 100644 --- a/gen/go/bidderapi/v1/bidderapi.pb.go +++ b/gen/go/bidderapi/v1/bidderapi.pb.go @@ -224,7 +224,7 @@ type Commitment struct { unknownFields protoimpl.UnknownFields TxHashes []string `protobuf:"bytes,1,rep,name=tx_hashes,json=txHashes,proto3" json:"tx_hashes,omitempty"` - BidAmount int64 `protobuf:"varint,2,opt,name=bid_amount,json=bidAmount,proto3" json:"bid_amount,omitempty"` + BidAmount string `protobuf:"bytes,2,opt,name=bid_amount,json=bidAmount,proto3" json:"bid_amount,omitempty"` BlockNumber int64 `protobuf:"varint,3,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` ReceivedBidDigest string `protobuf:"bytes,4,opt,name=received_bid_digest,json=receivedBidDigest,proto3" json:"received_bid_digest,omitempty"` ReceivedBidSignature string `protobuf:"bytes,5,opt,name=received_bid_signature,json=receivedBidSignature,proto3" json:"received_bid_signature,omitempty"` @@ -272,11 +272,11 @@ func (x *Commitment) GetTxHashes() []string { return nil } -func (x *Commitment) GetBidAmount() int64 { +func (x *Commitment) GetBidAmount() string { if x != nil { return x.BidAmount } - return 0 + return "" } func (x *Commitment) GetBlockNumber() int64 { @@ -441,7 +441,7 @@ var file_bidderapi_v1_bidderapi_proto_rawDesc = []byte{ 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x8a, 0x01, 0x0f, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x36, 0x34, 0x7d, 0x52, 0x08, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x8f, 0x01, 0x0a, 0x0a, 0x62, - 0x69, 0x64, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, + 0x69, 0x64, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x70, 0x92, 0x41, 0x6d, 0x32, 0x6b, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x45, 0x54, 0x48, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x68, 0x61, 0x73, 0x20, 0x61, 0x67, 0x72, 0x65, 0x65, 0x64, 0x20, 0x74, diff --git a/gen/go/handshake/v1/handshake.pb.go b/gen/go/handshake/v1/handshake.pb.go new file mode 100644 index 00000000..4ac8750e --- /dev/null +++ b/gen/go/handshake/v1/handshake.pb.go @@ -0,0 +1,246 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: handshake/v1/handshake.proto + +package handshakev1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type HandshakeReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PeerType string `protobuf:"bytes,1,opt,name=peer_type,json=peerType,proto3" json:"peer_type,omitempty"` + Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` + Sig []byte `protobuf:"bytes,3,opt,name=sig,proto3" json:"sig,omitempty"` +} + +func (x *HandshakeReq) Reset() { + *x = HandshakeReq{} + if protoimpl.UnsafeEnabled { + mi := &file_handshake_v1_handshake_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HandshakeReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HandshakeReq) ProtoMessage() {} + +func (x *HandshakeReq) ProtoReflect() protoreflect.Message { + mi := &file_handshake_v1_handshake_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HandshakeReq.ProtoReflect.Descriptor instead. +func (*HandshakeReq) Descriptor() ([]byte, []int) { + return file_handshake_v1_handshake_proto_rawDescGZIP(), []int{0} +} + +func (x *HandshakeReq) GetPeerType() string { + if x != nil { + return x.PeerType + } + return "" +} + +func (x *HandshakeReq) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *HandshakeReq) GetSig() []byte { + if x != nil { + return x.Sig + } + return nil +} + +type HandshakeResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ObservedAddress []byte `protobuf:"bytes,1,opt,name=observed_address,json=observedAddress,proto3" json:"observed_address,omitempty"` + PeerType string `protobuf:"bytes,2,opt,name=peer_type,json=peerType,proto3" json:"peer_type,omitempty"` +} + +func (x *HandshakeResp) Reset() { + *x = HandshakeResp{} + if protoimpl.UnsafeEnabled { + mi := &file_handshake_v1_handshake_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HandshakeResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HandshakeResp) ProtoMessage() {} + +func (x *HandshakeResp) ProtoReflect() protoreflect.Message { + mi := &file_handshake_v1_handshake_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HandshakeResp.ProtoReflect.Descriptor instead. +func (*HandshakeResp) Descriptor() ([]byte, []int) { + return file_handshake_v1_handshake_proto_rawDescGZIP(), []int{1} +} + +func (x *HandshakeResp) GetObservedAddress() []byte { + if x != nil { + return x.ObservedAddress + } + return nil +} + +func (x *HandshakeResp) GetPeerType() string { + if x != nil { + return x.PeerType + } + return "" +} + +var File_handshake_v1_handshake_proto protoreflect.FileDescriptor + +var file_handshake_v1_handshake_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x68, + 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, + 0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x2e, 0x76, 0x31, 0x22, 0x53, 0x0a, 0x0c, + 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1b, 0x0a, 0x09, + 0x70, 0x65, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x70, 0x65, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x10, 0x0a, 0x03, 0x73, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x73, 0x69, + 0x67, 0x22, 0x57, 0x0a, 0x0d, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x29, 0x0a, 0x10, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x6f, 0x62, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1b, 0x0a, + 0x09, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x70, 0x65, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x42, 0xb9, 0x01, 0x0a, 0x10, 0x63, + 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x2e, 0x76, 0x31, 0x42, + 0x0e, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, + 0x69, 0x6d, 0x65, 0x76, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x6d, 0x65, 0x76, + 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x68, + 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x68, 0x61, 0x6e, 0x64, + 0x73, 0x68, 0x61, 0x6b, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x48, 0x58, 0x58, 0xaa, 0x02, 0x0c, + 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x48, + 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x48, 0x61, + 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, + 0x6b, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_handshake_v1_handshake_proto_rawDescOnce sync.Once + file_handshake_v1_handshake_proto_rawDescData = file_handshake_v1_handshake_proto_rawDesc +) + +func file_handshake_v1_handshake_proto_rawDescGZIP() []byte { + file_handshake_v1_handshake_proto_rawDescOnce.Do(func() { + file_handshake_v1_handshake_proto_rawDescData = protoimpl.X.CompressGZIP(file_handshake_v1_handshake_proto_rawDescData) + }) + return file_handshake_v1_handshake_proto_rawDescData +} + +var file_handshake_v1_handshake_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_handshake_v1_handshake_proto_goTypes = []interface{}{ + (*HandshakeReq)(nil), // 0: handshake.v1.HandshakeReq + (*HandshakeResp)(nil), // 1: handshake.v1.HandshakeResp +} +var file_handshake_v1_handshake_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_handshake_v1_handshake_proto_init() } +func file_handshake_v1_handshake_proto_init() { + if File_handshake_v1_handshake_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_handshake_v1_handshake_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HandshakeReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_handshake_v1_handshake_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HandshakeResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_handshake_v1_handshake_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_handshake_v1_handshake_proto_goTypes, + DependencyIndexes: file_handshake_v1_handshake_proto_depIdxs, + MessageInfos: file_handshake_v1_handshake_proto_msgTypes, + }.Build() + File_handshake_v1_handshake_proto = out.File + file_handshake_v1_handshake_proto_rawDesc = nil + file_handshake_v1_handshake_proto_goTypes = nil + file_handshake_v1_handshake_proto_depIdxs = nil +} diff --git a/gen/go/preconfirmation/v1/preconfirmation.pb.go b/gen/go/preconfirmation/v1/preconfirmation.pb.go index ea3def68..2696dbea 100644 --- a/gen/go/preconfirmation/v1/preconfirmation.pb.go +++ b/gen/go/preconfirmation/v1/preconfirmation.pb.go @@ -27,7 +27,7 @@ type Bid struct { TxHash string `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` BidAmount string `protobuf:"bytes,2,opt,name=bid_amount,json=bidAmount,proto3" json:"bid_amount,omitempty"` - BlockNumber string `protobuf:"bytes,3,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + BlockNumber int64 `protobuf:"varint,3,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` Digest []byte `protobuf:"bytes,4,opt,name=digest,proto3" json:"digest,omitempty"` Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"` } @@ -78,11 +78,11 @@ func (x *Bid) GetBidAmount() string { return "" } -func (x *Bid) GetBlockNumber() string { +func (x *Bid) GetBlockNumber() int64 { if x != nil { return x.BlockNumber } - return "" + return 0 } func (x *Bid) GetDigest() []byte { @@ -182,7 +182,7 @@ var file_preconfirmation_v1_preconfirmation_proto_rawDesc = []byte{ 0x1d, 0x0a, 0x0a, 0x62, 0x69, 0x64, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x69, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, diff --git a/gen/go/streammsg/v1/streammsg.pb.go b/gen/go/streammsg/v1/streammsg.pb.go index 6eb9aa9a..ebbbad31 100644 --- a/gen/go/streammsg/v1/streammsg.pb.go +++ b/gen/go/streammsg/v1/streammsg.pb.go @@ -7,6 +7,7 @@ package streammsgv1 import ( + status "google.golang.org/genproto/googleapis/rpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" structpb "google.golang.org/protobuf/types/known/structpb" @@ -21,20 +22,69 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type Header struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Header map[string]*structpb.Value `protobuf:"bytes,1,rep,name=header,proto3" json:"header,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Header) Reset() { + *x = Header{} + if protoimpl.UnsafeEnabled { + mi := &file_streammsg_v1_streammsg_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Header) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Header) ProtoMessage() {} + +func (x *Header) ProtoReflect() protoreflect.Message { + mi := &file_streammsg_v1_streammsg_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Header.ProtoReflect.Descriptor instead. +func (*Header) Descriptor() ([]byte, []int) { + return file_streammsg_v1_streammsg_proto_rawDescGZIP(), []int{0} +} + +func (x *Header) GetHeader() map[string]*structpb.Value { + if x != nil { + return x.Header + } + return nil +} + type StreamMsg struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Header map[string]*structpb.Value `protobuf:"bytes,1,rep,name=header,proto3" json:"header,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - Trailer map[string]*structpb.Value `protobuf:"bytes,3,rep,name=trailer,proto3" json:"trailer,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Types that are assignable to Body: + // + // *StreamMsg_Data + // *StreamMsg_Error + Body isStreamMsg_Body `protobuf_oneof:"body"` } func (x *StreamMsg) Reset() { *x = StreamMsg{} if protoimpl.UnsafeEnabled { - mi := &file_streammsg_v1_streammsg_proto_msgTypes[0] + mi := &file_streammsg_v1_streammsg_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -47,7 +97,7 @@ func (x *StreamMsg) String() string { func (*StreamMsg) ProtoMessage() {} func (x *StreamMsg) ProtoReflect() protoreflect.Message { - mi := &file_streammsg_v1_streammsg_proto_msgTypes[0] + mi := &file_streammsg_v1_streammsg_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -60,30 +110,46 @@ func (x *StreamMsg) ProtoReflect() protoreflect.Message { // Deprecated: Use StreamMsg.ProtoReflect.Descriptor instead. func (*StreamMsg) Descriptor() ([]byte, []int) { - return file_streammsg_v1_streammsg_proto_rawDescGZIP(), []int{0} + return file_streammsg_v1_streammsg_proto_rawDescGZIP(), []int{1} } -func (x *StreamMsg) GetHeader() map[string]*structpb.Value { - if x != nil { - return x.Header +func (m *StreamMsg) GetBody() isStreamMsg_Body { + if m != nil { + return m.Body } return nil } func (x *StreamMsg) GetData() []byte { - if x != nil { + if x, ok := x.GetBody().(*StreamMsg_Data); ok { return x.Data } return nil } -func (x *StreamMsg) GetTrailer() map[string]*structpb.Value { - if x != nil { - return x.Trailer +func (x *StreamMsg) GetError() *status.Status { + if x, ok := x.GetBody().(*StreamMsg_Error); ok { + return x.Error } return nil } +type isStreamMsg_Body interface { + isStreamMsg_Body() +} + +type StreamMsg_Data struct { + Data []byte `protobuf:"bytes,1,opt,name=data,proto3,oneof"` +} + +type StreamMsg_Error struct { + Error *status.Status `protobuf:"bytes,2,opt,name=error,proto3,oneof"` +} + +func (*StreamMsg_Data) isStreamMsg_Body() {} + +func (*StreamMsg_Error) isStreamMsg_Body() {} + var File_streammsg_v1_streammsg_proto protoreflect.FileDescriptor var file_streammsg_v1_streammsg_proto_rawDesc = []byte{ @@ -91,40 +157,36 @@ var file_streammsg_v1_streammsg_proto_rawDesc = []byte{ 0x74, 0x72, 0x65, 0x61, 0x6d, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x6d, 0x73, 0x67, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, - 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc3, 0x02, 0x0a, 0x09, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x73, 0x67, 0x12, 0x3b, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x6d, 0x73, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x73, - 0x67, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3e, 0x0a, 0x07, 0x74, 0x72, 0x61, - 0x69, 0x6c, 0x65, 0x72, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x6d, 0x73, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x4d, 0x73, 0x67, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x07, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x1a, 0x51, 0x0a, 0x0b, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x52, 0x0a, 0x0c, - 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x42, 0xb9, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x6d, - 0x73, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x6d, 0x73, 0x67, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x65, 0x76, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x2f, 0x6d, 0x65, 0x76, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x2f, 0x67, 0x65, - 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x6d, 0x73, 0x67, 0x2f, 0x76, - 0x31, 0x3b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x6d, 0x73, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, - 0x53, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x6d, 0x73, 0x67, 0x2e, - 0x56, 0x31, 0xca, 0x02, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x6d, 0x73, 0x67, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x18, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x6d, 0x73, 0x67, 0x5c, 0x56, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x95, 0x01, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x38, + 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, + 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x6d, 0x73, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x1a, 0x51, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x55, 0x0a, 0x09, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x73, 0x67, 0x12, 0x14, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2a, + 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x06, 0x0a, 0x04, 0x62, 0x6f, + 0x64, 0x79, 0x42, 0xb9, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x6d, 0x73, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x6d, + 0x73, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x65, 0x76, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x6d, 0x65, 0x76, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x2f, + 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x6d, 0x73, 0x67, + 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x6d, 0x73, 0x67, 0x76, 0x31, 0xa2, + 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x6d, 0x73, + 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x6d, 0x73, 0x67, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x6d, 0x73, 0x67, 0x5c, + 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x0d, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -141,21 +203,21 @@ func file_streammsg_v1_streammsg_proto_rawDescGZIP() []byte { var file_streammsg_v1_streammsg_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_streammsg_v1_streammsg_proto_goTypes = []interface{}{ - (*StreamMsg)(nil), // 0: streammsg.v1.StreamMsg - nil, // 1: streammsg.v1.StreamMsg.HeaderEntry - nil, // 2: streammsg.v1.StreamMsg.TrailerEntry - (*structpb.Value)(nil), // 3: google.protobuf.Value + (*Header)(nil), // 0: streammsg.v1.Header + (*StreamMsg)(nil), // 1: streammsg.v1.StreamMsg + nil, // 2: streammsg.v1.Header.HeaderEntry + (*status.Status)(nil), // 3: google.rpc.Status + (*structpb.Value)(nil), // 4: google.protobuf.Value } var file_streammsg_v1_streammsg_proto_depIdxs = []int32{ - 1, // 0: streammsg.v1.StreamMsg.header:type_name -> streammsg.v1.StreamMsg.HeaderEntry - 2, // 1: streammsg.v1.StreamMsg.trailer:type_name -> streammsg.v1.StreamMsg.TrailerEntry - 3, // 2: streammsg.v1.StreamMsg.HeaderEntry.value:type_name -> google.protobuf.Value - 3, // 3: streammsg.v1.StreamMsg.TrailerEntry.value:type_name -> google.protobuf.Value - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 2, // 0: streammsg.v1.Header.header:type_name -> streammsg.v1.Header.HeaderEntry + 3, // 1: streammsg.v1.StreamMsg.error:type_name -> google.rpc.Status + 4, // 2: streammsg.v1.Header.HeaderEntry.value:type_name -> google.protobuf.Value + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_streammsg_v1_streammsg_proto_init() } @@ -165,6 +227,18 @@ func file_streammsg_v1_streammsg_proto_init() { } if !protoimpl.UnsafeEnabled { file_streammsg_v1_streammsg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Header); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_streammsg_v1_streammsg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StreamMsg); i { case 0: return &v.state @@ -177,6 +251,10 @@ func file_streammsg_v1_streammsg_proto_init() { } } } + file_streammsg_v1_streammsg_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*StreamMsg_Data)(nil), + (*StreamMsg_Error)(nil), + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/openapi/bidderapi/v1/bidderapi.swagger.yaml b/gen/openapi/bidderapi/v1/bidderapi.swagger.yaml index 86f8f369..5ad93c7f 100644 --- a/gen/openapi/bidderapi/v1/bidderapi.swagger.yaml +++ b/gen/openapi/bidderapi/v1/bidderapi.swagger.yaml @@ -153,7 +153,6 @@ definitions: description: Hex string encoding of the hash of the transaction that the bidder wants to include in the block. bidAmount: type: string - format: int64 description: Amount of ETH that the bidder has agreed to pay to the provider for including the transaction in the block. blockNumber: type: string diff --git a/go.mod b/go.mod index 7493d2c3..74f3dc93 100644 --- a/go.mod +++ b/go.mod @@ -28,6 +28,7 @@ require ( require ( github.com/BurntSushi/toml v1.3.2 // indirect + github.com/Masterminds/semver/v3 v3.2.1 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/StackExchange/wmi v1.2.1 // indirect github.com/antlr4-go/antlr/v4 v4.13.0 // indirect diff --git a/go.sum b/go.sum index d3862c4f..d9e1a54e 100644 --- a/go.sum +++ b/go.sum @@ -14,6 +14,8 @@ github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8 github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= +github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= diff --git a/messages/handshake/v1/handshake.proto b/messages/handshake/v1/handshake.proto new file mode 100644 index 00000000..3eabd107 --- /dev/null +++ b/messages/handshake/v1/handshake.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; + +package handshake.v1; + +message HandshakeReq { + string peer_type = 1; + string token = 2; + bytes sig = 3; +}; + +message HandshakeResp { + bytes observed_address = 1; + string peer_type = 2; +}; + diff --git a/messages/preconfirmation/v1/preconfirmation.proto b/messages/preconfirmation/v1/preconfirmation.proto index 9661b3d2..4fbcb820 100644 --- a/messages/preconfirmation/v1/preconfirmation.proto +++ b/messages/preconfirmation/v1/preconfirmation.proto @@ -5,7 +5,7 @@ package preconfirmation.v1; message Bid { string tx_hash = 1; string bid_amount = 2; - string block_number = 3; + int64 block_number = 3; bytes digest = 4; bytes signature = 5; }; diff --git a/messages/streammsg/v1/streammsg.proto b/messages/streammsg/v1/streammsg.proto index 86d4eb0a..abe11dd8 100644 --- a/messages/streammsg/v1/streammsg.proto +++ b/messages/streammsg/v1/streammsg.proto @@ -3,9 +3,15 @@ syntax = "proto3"; package streammsg.v1; import "google/protobuf/struct.proto"; +import "google/rpc/status.proto"; -message StreamMsg { +message Header { map header = 1; - bytes data = 2; - map trailer = 3; +}; + +message StreamMsg { + oneof body { + bytes data = 1; + google.rpc.Status error = 2; + } }; diff --git a/pkg/discovery/discovery.go b/pkg/discovery/discovery.go index 087a1ed2..fbc789a3 100644 --- a/pkg/discovery/discovery.go +++ b/pkg/discovery/discovery.go @@ -5,9 +5,11 @@ import ( "log/slog" "github.com/ethereum/go-ethereum/common" + discoverypb "github.com/primevprotocol/mev-commit/gen/go/discovery/v1" "github.com/primevprotocol/mev-commit/pkg/p2p" - "github.com/primevprotocol/mev-commit/pkg/p2p/msgpack" "golang.org/x/sync/semaphore" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) const ( @@ -30,7 +32,7 @@ type Discovery struct { topo Topology streamer P2PService logger *slog.Logger - checkPeers chan p2p.PeerInfo + checkPeers chan *discoverypb.PeerInfo sem *semaphore.Weighted quit chan struct{} } @@ -45,41 +47,39 @@ func New( streamer: streamer, logger: logger.With("protocol", ProtocolName), sem: semaphore.NewWeighted(checkWorkers), - checkPeers: make(chan p2p.PeerInfo), + checkPeers: make(chan *discoverypb.PeerInfo), quit: make(chan struct{}), } go d.checkAndAddPeers() return d } -func (d *Discovery) Protocol() p2p.ProtocolSpec { - return p2p.ProtocolSpec{ +func (d *Discovery) peerListStream() p2p.StreamDesc { + return p2p.StreamDesc{ Name: ProtocolName, Version: ProtocolVersion, - StreamSpecs: []p2p.StreamSpec{ - { - Name: "peersList", - Handler: d.handlePeersList, - }, - }, + Handler: d.handlePeersList, } } +func (d *Discovery) Streams() []p2p.StreamDesc { + return []p2p.StreamDesc{d.peerListStream()} +} + type peersList struct { Peers []p2p.PeerInfo } func (d *Discovery) handlePeersList(ctx context.Context, peer p2p.Peer, s p2p.Stream) error { - r, _ := msgpack.NewReaderWriter[peersList, peersList](s) - - peers, err := r.ReadMsg(ctx) + peers := new(discoverypb.PeerList) + err := s.ReadMsg(ctx, peers) if err != nil { d.logger.Error("failed to read peers list", "err", err, "from_peer", peer) - return err + return status.Errorf(codes.InvalidArgument, "failed to read peers list: %v", err) } for _, p := range peers.Peers { - if d.topo.IsConnected(p.EthAddress) { + if d.topo.IsConnected(common.BytesToAddress(p.EthAddress)) { continue } select { @@ -99,15 +99,22 @@ func (d *Discovery) BroadcastPeers( peer p2p.Peer, peers []p2p.PeerInfo, ) error { - stream, err := d.streamer.NewStream(ctx, peer, ProtocolName, ProtocolVersion, "peersList") + stream, err := d.streamer.NewStream(ctx, peer, nil, d.peerListStream()) if err != nil { d.logger.Error("failed to create stream", "err", err, "to_peer", peer) return err } defer stream.Close() - _, w := msgpack.NewReaderWriter[peersList, peersList](stream) - if err := w.WriteMsg(ctx, &peersList{Peers: peers}); err != nil { + peersToSend := make([]*discoverypb.PeerInfo, 0, len(peers)) + for _, p := range peers { + peersToSend = append(peersToSend, &discoverypb.PeerInfo{ + EthAddress: p.EthAddress.Bytes(), + Underlay: p.Underlay, + }) + } + + if err := stream.WriteMsg(ctx, &discoverypb.PeerList{Peers: peersToSend}); err != nil { d.logger.Error("failed to write peers list", "err", err, "to_peer", peer) return err } diff --git a/pkg/discovery/discovery_test.go b/pkg/discovery/discovery_test.go index 45652d0a..5c2a3bcc 100644 --- a/pkg/discovery/discovery_test.go +++ b/pkg/discovery/discovery_test.go @@ -86,7 +86,7 @@ func TestDiscovery(t *testing.T) { } }) - svc.SetPeerHandler(server, d.Protocol()) + svc.SetPeerHandler(server, d.Streams()[0]) err := d.BroadcastPeers(context.Background(), server, []p2p.PeerInfo{ { diff --git a/pkg/node/node.go b/pkg/node/node.go index 14309727..98008786 100644 --- a/pkg/node/node.go +++ b/pkg/node/node.go @@ -17,6 +17,7 @@ import ( "github.com/ethereum/go-ethereum/ethclient" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" bidderapiv1 "github.com/primevprotocol/mev-commit/gen/go/bidderapi/v1" + preconfpb "github.com/primevprotocol/mev-commit/gen/go/preconfirmation/v1" providerapiv1 "github.com/primevprotocol/mev-commit/gen/go/providerapi/v1" "github.com/primevprotocol/mev-commit/pkg/apiserver" bidder_registrycontract "github.com/primevprotocol/mev-commit/pkg/contracts/bidder_registry" @@ -136,7 +137,7 @@ func NewNode(opts *Options) (*Node, error) { p2pSvc.SetNotifier(topo) // Register the discovery protocol with the p2p service - p2pSvc.AddProtocol(disc.Protocol()) + p2pSvc.AddStreamHandlers(disc.Streams()...) debugapi.RegisterAPI(srv, topo, p2pSvc, opts.Logger.With("component", "debugapi")) @@ -200,7 +201,7 @@ func NewNode(opts *Options) (*Node, error) { opts.Logger.With("component", "preconfirmation_protocol"), ) // Only register handler for provider - p2pSvc.AddProtocol(preconfProto.Protocol()) + p2pSvc.AddStreamHandlers(preconfProto.Streams()...) srv.RegisterMetricsCollectors(preconfProto.Metrics()...) case p2p.PeerTypeBidder.String(): @@ -356,7 +357,7 @@ type noOpBidProcessor struct{} // ProcessBid auto accepts all bids sent. func (noOpBidProcessor) ProcessBid( _ context.Context, - _ *preconfsigner.Bid, + _ *preconfpb.Bid, ) (chan providerapiv1.BidResponse_Status, error) { statusC := make(chan providerapiv1.BidResponse_Status, 5) statusC <- providerapiv1.BidResponse_STATUS_ACCEPTED diff --git a/pkg/p2p/libp2p/internal/handshake/handshake.go b/pkg/p2p/libp2p/internal/handshake/handshake.go index 2f1b9ab9..b9545ecc 100644 --- a/pkg/p2p/libp2p/internal/handshake/handshake.go +++ b/pkg/p2p/libp2p/internal/handshake/handshake.go @@ -4,14 +4,15 @@ import ( "bytes" "context" "errors" + "fmt" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/libp2p/go-libp2p/core" "github.com/libp2p/go-libp2p/core/protocol" + handshakepb "github.com/primevprotocol/mev-commit/gen/go/handshake/v1" "github.com/primevprotocol/mev-commit/pkg/keysigner" "github.com/primevprotocol/mev-commit/pkg/p2p" - "github.com/primevprotocol/mev-commit/pkg/p2p/msgpack" "github.com/primevprotocol/mev-commit/pkg/signer" ) @@ -38,7 +39,7 @@ type Service struct { passcode string signer signer.Signer register ProviderRegistry - handshakeReq *HandshakeReq + handshakeReq *handshakepb.HandshakeReq getEthAddress func(core.PeerID) (common.Address, error) } @@ -68,11 +69,7 @@ func New( } func ProtocolID() protocol.ID { - return protocol.ID(p2p.NewStreamName( - ProtocolName, - ProtocolVersion, - StreamName, - )) + return protocol.ID(fmt.Sprintf("%s/%s", ProtocolName, ProtocolVersion)) } type HandshakeReq struct { @@ -87,7 +84,7 @@ type HandshakeResp struct { } func (h *Service) verifyReq( - req *HandshakeReq, + req *handshakepb.HandshakeReq, peerID core.PeerID, ) (common.Address, error) { unsignedData := []byte(req.PeerType + req.Token) @@ -136,7 +133,7 @@ func (h *Service) setHandshakeReq() error { return err } - req := &HandshakeReq{ + req := &handshakepb.HandshakeReq{ PeerType: h.peerType.String(), Token: h.passcode, Sig: sig, @@ -146,8 +143,8 @@ func (h *Service) setHandshakeReq() error { return nil } -func (h *Service) verifyResp(resp *HandshakeResp) error { - if !bytes.Equal(resp.ObservedAddress.Bytes(), h.ks.GetAddress().Bytes()) { +func (h *Service) verifyResp(resp *handshakepb.HandshakeResp) error { + if !bytes.Equal(resp.ObservedAddress, h.ks.GetAddress().Bytes()) { return errors.New("observed address mismatch") } @@ -164,8 +161,8 @@ func (h *Service) Handle( peerID core.PeerID, ) (p2p.Peer, error) { - r, w := msgpack.NewReaderWriter[HandshakeReq, HandshakeResp](stream) - req, err := r.ReadMsg(ctx) + req := new(handshakepb.HandshakeReq) + err := stream.ReadMsg(ctx, req) if err != nil { return p2p.Peer{}, err } @@ -175,23 +172,22 @@ func (h *Service) Handle( return p2p.Peer{}, err } - resp := &HandshakeResp{ - ObservedAddress: ethAddress, + resp := &handshakepb.HandshakeResp{ + ObservedAddress: ethAddress.Bytes(), PeerType: req.PeerType, } - if err := w.WriteMsg(ctx, resp); err != nil { + if err := stream.WriteMsg(ctx, resp); err != nil { return p2p.Peer{}, err } - ar, aw := msgpack.NewReaderWriter[HandshakeResp, HandshakeReq](stream) - - err = aw.WriteMsg(ctx, h.handshakeReq) + err = stream.WriteMsg(ctx, h.handshakeReq) if err != nil { return p2p.Peer{}, err } - ack, err := ar.ReadMsg(ctx) + ack := new(handshakepb.HandshakeResp) + err = stream.ReadMsg(ctx, ack) if err != nil { return p2p.Peer{}, err } @@ -212,13 +208,12 @@ func (h *Service) Handshake( stream p2p.Stream, ) (p2p.Peer, error) { - r, w := msgpack.NewReaderWriter[HandshakeResp, HandshakeReq](stream) - - if err := w.WriteMsg(ctx, h.handshakeReq); err != nil { + if err := stream.WriteMsg(ctx, h.handshakeReq); err != nil { return p2p.Peer{}, err } - resp, err := r.ReadMsg(ctx) + resp := new(handshakepb.HandshakeResp) + err := stream.ReadMsg(ctx, resp) if err != nil { return p2p.Peer{}, err } @@ -227,9 +222,8 @@ func (h *Service) Handshake( return p2p.Peer{}, err } - ar, aw := msgpack.NewReaderWriter[HandshakeReq, HandshakeResp](stream) - - ack, err := ar.ReadMsg(ctx) + ack := new(handshakepb.HandshakeReq) + err = stream.ReadMsg(ctx, ack) if err != nil { return p2p.Peer{}, err } @@ -239,8 +233,8 @@ func (h *Service) Handshake( return p2p.Peer{}, err } - err = aw.WriteMsg(ctx, &HandshakeResp{ - ObservedAddress: ethAddress, + err = stream.WriteMsg(ctx, &handshakepb.HandshakeResp{ + ObservedAddress: ethAddress.Bytes(), PeerType: ack.PeerType, }) if err != nil { diff --git a/pkg/p2p/libp2p/libp2p.go b/pkg/p2p/libp2p/libp2p.go index d3fdcdf9..62510420 100644 --- a/pkg/p2p/libp2p/libp2p.go +++ b/pkg/p2p/libp2p/libp2p.go @@ -6,13 +6,16 @@ import ( "fmt" "log/slog" "net" + "strings" "sync" "time" + "github.com/Masterminds/semver/v3" ma "github.com/multiformats/go-multiaddr" madns "github.com/multiformats/go-multiaddr-dns" "github.com/primevprotocol/mev-commit/pkg/keysigner" "github.com/primevprotocol/mev-commit/pkg/util" + "google.golang.org/grpc/status" "github.com/ethereum/go-ethereum/common" "github.com/libp2p/go-libp2p" @@ -210,7 +213,7 @@ func (s *Service) SetNotifier(n p2p.Notifier) { func (s *Service) handleConnectReq(streamlibp2p network.Stream) { peerID := streamlibp2p.Conn().RemotePeer() - stream := newStream(streamlibp2p) + stream := newStream(streamlibp2p, nil, nil) peer, err := s.hsSvc.Handle(s.baseCtx, stream, peerID) if err != nil { s.logger.Error("error handling handshake", "err", err) @@ -244,7 +247,6 @@ func (s *Service) handleConnectReq(streamlibp2p network.Stream) { func (s *Service) disconnected(p p2p.Peer) { if s.notifier != nil { s.notifier.Disconnected(p) - } } @@ -257,44 +259,104 @@ func (s *Service) Self() map[string]interface{} { } } -func (s *Service) AddProtocol(spec p2p.ProtocolSpec) { - for _, streamSpec := range spec.StreamSpecs { - ss := streamSpec - id := protocol.ID(p2p.NewStreamName(spec.Name, spec.Version, ss.Name)) - - // TODO: If we need semantic versioning, we need to use the - // SetStreamHandlerMatch function instead of SetStreamHandler - s.host.SetStreamHandler(id, func(streamlibp2p network.Stream) { - peerID := streamlibp2p.Conn().RemotePeer() - p, found := s.peers.getPeer(peerID) - if !found { - s.logger.Error("received stream from unknown peer", "peer", peerID) - _ = streamlibp2p.Reset() - return - } - - ctx, cancel := context.WithCancel(s.baseCtx) - s.peers.addStream(peerID, streamlibp2p, cancel) - defer s.peers.removeStream(peerID, streamlibp2p) - - stream := newStream(streamlibp2p) - - if err := ss.Handler(ctx, p, stream); err != nil { - _ = stream.Reset() - s.logger.Error("error handling stream", "err", err) - } else { +func matchProtocolIDWithSemver(protoID string, supportedVersion string) bool { + // Extract the version part from the protocol ID. + parts := strings.Split(protoID, "/") + if len(parts) != 3 { + return false + } + protocolVersion := parts[2] + + // Parse the supported version and the protocol version. + supportedSemver, err := semver.NewVersion(supportedVersion) + if err != nil { + return false + } + protoSemver, err := semver.NewVersion(protocolVersion) + if err != nil { + return false + } + + return supportedSemver.Major() == protoSemver.Major() && supportedSemver.Minor() >= protoSemver.Minor() +} + +func (s *Service) AddStreamHandlers(streams ...p2p.StreamDesc) { + for _, stream := range streams { + ss := stream + + s.host.SetStreamHandlerMatch( + protocol.ID(ss.Name), + func(p protocol.ID) bool { + return matchProtocolIDWithSemver(string(p), ss.Version) + }, + func(streamlibp2p network.Stream) { + peerID := streamlibp2p.Conn().RemotePeer() + p, found := s.peers.getPeer(peerID) + if !found { + s.logger.Error("received stream from unknown peer", "peer", peerID) + _ = streamlibp2p.Reset() + return + } + + // Keep track of the stream so we can cancel the handler if the peer disconnects. + ctx, cancel := context.WithCancel(s.baseCtx) + s.peers.addStream(peerID, streamlibp2p, cancel) + defer s.peers.removeStream(peerID, streamlibp2p) + + mtdtStream := newMetadataStream(streamlibp2p) + headers, err := mtdtStream.ReadHeader(ctx) + if err != nil { + _ = streamlibp2p.Reset() + s.logger.Error("reading headers", "err", err) + return + } + + respHdrs := p2p.Header{} + if ss.Header != nil { + respHdrs, err = ss.Header(ctx, p, headers) + if err != nil { + s.logger.Error("handling headers", "err", err) + retErr, _ := status.FromError(err) + err = mtdtStream.WriteError(ctx, retErr) + if err != nil { + s.logger.Error("writing error", "err", err) + _ = streamlibp2p.Reset() + return + } + return + } + } + + err = mtdtStream.WriteHeader(ctx, respHdrs) + if err != nil { + _ = streamlibp2p.Reset() + s.logger.Error("writing headers", "err", err) + return + } + + stream := newStream(streamlibp2p, headers, respHdrs) + + err = ss.Handler(ctx, p, stream) + if err != nil { + s.logger.Error("stream handler", "err", err) + retErr, _ := status.FromError(err) + err = mtdtStream.WriteError(ctx, retErr) + if err != nil { + s.logger.Error("writing error", "err", err) + _ = stream.Reset() + return + } + } _ = stream.Close() - } - }) + }) } } func (s *Service) NewStream( ctx context.Context, peer p2p.Peer, - proto string, - version string, - streamName string, + headers p2p.Header, + stream p2p.StreamDesc, ) (p2p.Stream, error) { peerID, found := s.peers.getPeerID(peer.EthAddress) @@ -302,13 +364,25 @@ func (s *Service) NewStream( return nil, p2p.ErrPeerNotFound } - streamID := protocol.ID(p2p.NewStreamName(proto, version, streamName)) + streamID := protocol.ID(fmt.Sprintf("/%s/%s", stream.Name, stream.Version)) streamlibp2p, err := s.host.NewStream(ctx, peerID, streamID) if err != nil { return nil, err } - return newStream(streamlibp2p), nil + mtdtStream := newMetadataStream(streamlibp2p) + if err := mtdtStream.WriteHeader(ctx, headers); err != nil { + _ = streamlibp2p.Reset() + return nil, err + } + + respHdrs, err := mtdtStream.ReadHeader(ctx) + if err != nil { + _ = streamlibp2p.Reset() + return nil, err + } + + return newStream(streamlibp2p, headers, respHdrs), nil } func (s *Service) Connect(ctx context.Context, info []byte) (p2p.Peer, error) { @@ -333,7 +407,7 @@ func (s *Service) Connect(ctx context.Context, info []byte) (p2p.Peer, error) { if err != nil { return p2p.Peer{}, err } - stream := newStream(streamlibp2p) + stream := newStream(streamlibp2p, nil, nil) p, err := s.hsSvc.Handshake(ctx, addrInfo.ID, stream) if err != nil { diff --git a/pkg/p2p/libp2p/libp2p_test.go b/pkg/p2p/libp2p/libp2p_test.go index f0c7ca04..00314a5c 100644 --- a/pkg/p2p/libp2p/libp2p_test.go +++ b/pkg/p2p/libp2p/libp2p_test.go @@ -16,6 +16,7 @@ import ( mockkeysigner "github.com/primevprotocol/mev-commit/pkg/keysigner/mock" "github.com/primevprotocol/mev-commit/pkg/p2p" "github.com/primevprotocol/mev-commit/pkg/p2p/libp2p" + "google.golang.org/protobuf/types/known/wrapperspb" ) type testRegistry struct{} @@ -86,40 +87,39 @@ func TestP2PService(t *testing.T) { }) done := make(chan struct{}) - svc.AddProtocol(p2p.ProtocolSpec{ + stream := p2p.StreamDesc{ Name: "test", Version: "1.0.0", - StreamSpecs: []p2p.StreamSpec{ - { - Name: "test", - Handler: func(ctx context.Context, peer p2p.Peer, str p2p.Stream) error { - if peer.EthAddress.Hex() != client.Peer().EthAddress.Hex() { - t.Fatalf( - "expected eth address %s, got %s", - client.Peer().EthAddress.Hex(), peer.EthAddress.Hex(), - ) - } - - if peer.Type != client.Peer().Type { - t.Fatalf( - "expected peer type %s, got %s", - client.Peer().Type, peer.Type, - ) - } - - buf, err := str.ReadMsg() - if err != nil { - t.Fatal(err) - } - if string(buf) != "test" { - t.Fatalf("expected message %s, got %s", "test", string(buf)) - } - close(done) - return nil - }, - }, + Handler: func(ctx context.Context, peer p2p.Peer, str p2p.Stream) error { + if peer.EthAddress.Hex() != client.Peer().EthAddress.Hex() { + t.Fatalf( + "expected eth address %s, got %s", + client.Peer().EthAddress.Hex(), peer.EthAddress.Hex(), + ) + } + + if peer.Type != client.Peer().Type { + t.Fatalf( + "expected peer type %s, got %s", + client.Peer().Type, peer.Type, + ) + } + + strMsg := new(wrapperspb.StringValue) + + err := str.ReadMsg(ctx, strMsg) + if err != nil { + t.Fatal(err) + } + if strMsg.Value != "test" { + t.Fatalf("expected message %s, got %s", "test", strMsg.Value) + } + close(done) + return nil }, - }) + } + + svc.AddStreamHandlers(stream) svAddr, err := svc.Addrs() if err != nil { @@ -145,12 +145,12 @@ func TestP2PService(t *testing.T) { ) } - str, err := client.NewStream(context.Background(), p, "test", "1.0.0", "test") + str, err := client.NewStream(context.Background(), p, nil, stream) if err != nil { t.Fatal(err) } - err = str.WriteMsg([]byte("test")) + err = str.WriteMsg(context.Background(), &wrapperspb.StringValue{Value: "test"}) if err != nil { t.Fatal(err) } diff --git a/pkg/p2p/libp2p/stream.go b/pkg/p2p/libp2p/stream.go index 50117083..45b7ec61 100644 --- a/pkg/p2p/libp2p/stream.go +++ b/pkg/p2p/libp2p/stream.go @@ -1,29 +1,185 @@ package libp2p import ( + "context" + "fmt" + "github.com/libp2p/go-libp2p/core/network" "github.com/libp2p/go-msgio" + streammsgv1 "github.com/primevprotocol/mev-commit/gen/go/streammsg/v1" "github.com/primevprotocol/mev-commit/pkg/p2p" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) -func newStream(libp2pstream network.Stream) p2p.Stream { +func newStream(libp2pstream network.Stream, hdrs, respHdrs p2p.Header) p2p.Stream { return &stream{ - Stream: libp2pstream, - reader: msgio.NewVarintReaderSize(libp2pstream, network.MessageSizeMax), - writer: msgio.NewVarintWriter(libp2pstream), + Stream: libp2pstream, + reader: msgio.NewVarintReaderSize(libp2pstream, network.MessageSizeMax), + writer: msgio.NewVarintWriter(libp2pstream), + hdrs: hdrs, + respHdrs: respHdrs, } } type stream struct { + network.Stream + reader msgio.Reader + writer msgio.Writer + hdrs p2p.Header + respHdrs p2p.Header +} + +type result struct { + buf []byte + err error +} + +func (s *stream) ReadMsg(ctx context.Context, m proto.Message) error { + ch := make(chan result, 1) + go func() { + sMsgBuf, err := s.reader.ReadMsg() + ch <- result{sMsgBuf, err} + }() + + select { + case <-ctx.Done(): + return ctx.Err() + case res := <-ch: + if res.err != nil { + return fmt.Errorf("failed to read message: %w", res.err) + } + + sMsg := new(streammsgv1.StreamMsg) + err := proto.Unmarshal(res.buf, sMsg) + if err != nil { + return fmt.Errorf("failed to unmarshal message: %w", err) + } + + if sMsg.GetError() != nil { + return status.FromProto(sMsg.GetError()).Err() + } + + if sMsg.GetData() == nil { + return fmt.Errorf("message has no data") + } + + return proto.Unmarshal(sMsg.GetData(), m) + } +} + +func (s *stream) WriteMsg(ctx context.Context, m proto.Message) error { + msg, err := proto.Marshal(m) + if err != nil { + return fmt.Errorf("failed to marshal message: %w", err) + } + + sMsg := &streammsgv1.StreamMsg{ + Body: &streammsgv1.StreamMsg_Data{ + Data: msg, + }, + } + + sMsgBuf, err := proto.Marshal(sMsg) + if err != nil { + return fmt.Errorf("failed to marshal message: %w", err) + } + + errC := make(chan error, 1) + + go func() { + errC <- s.writer.WriteMsg(sMsgBuf) + }() + + select { + case <-ctx.Done(): + return ctx.Err() + case err := <-errC: + return err + } +} + +type metadataStream struct { network.Stream reader msgio.Reader writer msgio.Writer } -func (s *stream) ReadMsg() ([]byte, error) { - return s.reader.ReadMsg() +func newMetadataStream(libp2pstream network.Stream) p2p.MetadataStream { + return &metadataStream{ + Stream: libp2pstream, + reader: msgio.NewVarintReaderSize(libp2pstream, network.MessageSizeMax), + writer: msgio.NewVarintWriter(libp2pstream), + } } -func (s *stream) WriteMsg(msg []byte) error { - return s.writer.WriteMsg(msg) +func (s *metadataStream) ReadHeader(ctx context.Context) (p2p.Header, error) { + ch := make(chan result, 1) + go func() { + sMsgBuf, err := s.reader.ReadMsg() + ch <- result{sMsgBuf, err} + }() + + select { + case <-ctx.Done(): + return nil, ctx.Err() + case res := <-ch: + if res.err != nil { + return nil, fmt.Errorf("failed to read header: %w", res.err) + } + header := new(streammsgv1.Header) + err := proto.Unmarshal(res.buf, header) + if err != nil { + return nil, fmt.Errorf("failed to unmarshal header: %w", err) + } + return header.Header, nil + } +} + +func (s *metadataStream) WriteHeader(ctx context.Context, hdr p2p.Header) error { + sMsg := &streammsgv1.Header{ + Header: hdr, + } + + sMsgBuf, err := proto.Marshal(sMsg) + if err != nil { + return fmt.Errorf("failed to marshal header: %w", err) + } + + errC := make(chan error, 1) + go func() { + errC <- s.writer.WriteMsg(sMsgBuf) + }() + + select { + case <-ctx.Done(): + return ctx.Err() + case err := <-errC: + return err + } +} + +func (s *metadataStream) WriteError(ctx context.Context, st *status.Status) error { + sMsg := &streammsgv1.StreamMsg{ + Body: &streammsgv1.StreamMsg_Error{ + Error: st.Proto(), + }, + } + + buf, err := proto.Marshal(sMsg) + if err != nil { + return fmt.Errorf("failed to marshal error message: %w", err) + } + + errC := make(chan error, 1) + go func() { + errC <- s.writer.WriteMsg(buf) + }() + + select { + case <-ctx.Done(): + return ctx.Err() + case err := <-errC: + return err + } } diff --git a/pkg/p2p/msgpack/msgpack.go b/pkg/p2p/msgpack/msgpack.go deleted file mode 100644 index 80b9822a..00000000 --- a/pkg/p2p/msgpack/msgpack.go +++ /dev/null @@ -1,77 +0,0 @@ -package msgpack - -import ( - "context" - "fmt" - - "github.com/primevprotocol/mev-commit/pkg/p2p" - "github.com/vmihailenco/msgpack/v5" -) - -const delimitedReaderMaxSize = 1024 * 1024 //nolint:unused - -func NewReaderWriter[Req any, Resp any](s p2p.Stream) (Reader[Req], Writer[Resp]) { - return newReader[Req](s), newWriter[Resp](s) -} - -type Reader[Msg any] struct { - p2p.Stream -} - -type Writer[Msg any] struct { - p2p.Stream -} - -func newReader[Msg any](s p2p.Stream) Reader[Msg] { - return Reader[Msg]{s} -} - -func newWriter[Msg any](s p2p.Stream) Writer[Msg] { - return Writer[Msg]{s} -} - -func (r Reader[Msg]) ReadMsg(ctx context.Context) (*Msg, error) { - type result struct { - msgBuf []byte - err error - } - - resultC := make(chan result, 1) - go func() { - msgBuf, err := r.Stream.ReadMsg() - resultC <- result{msgBuf: msgBuf, err: err} - }() - - select { - case <-ctx.Done(): - return nil, ctx.Err() - case res := <-resultC: - if res.err != nil { - return nil, fmt.Errorf("failed to read msg: %w", res.err) - } - msg := new(Msg) - if err := msgpack.Unmarshal(res.msgBuf, msg); err != nil { - return nil, fmt.Errorf("failed to unmarshal msg: %w", err) - } - return msg, nil - } -} - -func (w Writer[Msg]) WriteMsg(ctx context.Context, msg *Msg) error { - msgBuf, err := msgpack.Marshal(msg) - if err != nil { - return fmt.Errorf("failed marshaling msg: %w", err) - } - - errC := make(chan error, 1) - go func() { - errC <- w.Stream.WriteMsg(msgBuf) - }() - - select { - case <-ctx.Done(): - return ctx.Err() - case err := <-errC: - return err - } -} diff --git a/pkg/p2p/msgpack/msgpack_test.go b/pkg/p2p/msgpack/msgpack_test.go deleted file mode 100644 index 45dd98ff..00000000 --- a/pkg/p2p/msgpack/msgpack_test.go +++ /dev/null @@ -1,47 +0,0 @@ -package msgpack_test - -import ( - "context" - "testing" - - "github.com/primevprotocol/mev-commit/pkg/p2p/msgpack" - p2ptest "github.com/primevprotocol/mev-commit/pkg/p2p/testing" -) - -func TestMsgpackEncoding(t *testing.T) { - t.Parallel() - - t.Run("ok", func(t *testing.T) { - out, in := p2ptest.NewDuplexStream() - - type testStruct struct { - Str string - Num int - } - - test := testStruct{ - Str: "test", - Num: 1, - } - - r, _ := msgpack.NewReaderWriter[testStruct, testStruct](in) - _, w := msgpack.NewReaderWriter[testStruct, testStruct](out) - - if err := w.WriteMsg(context.Background(), &test); err != nil { - t.Fatal(err) - } - - res, err := r.ReadMsg(context.Background()) - if err != nil { - t.Fatal(err) - } - - if res.Str != test.Str { - t.Fatalf("expected %s, got %s", test.Str, res.Str) - } - - if res.Num != test.Num { - t.Fatalf("expected %d, got %d", test.Num, res.Num) - } - }) -} diff --git a/pkg/p2p/p2p.go b/pkg/p2p/p2p.go index 4843657c..469edf43 100644 --- a/pkg/p2p/p2p.go +++ b/pkg/p2p/p2p.go @@ -6,6 +6,9 @@ import ( "io" "github.com/ethereum/go-ethereum/common" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/structpb" ) // PeerType is the type of a peer @@ -61,25 +64,42 @@ type PeerInfo struct { Underlay []byte } +// Stream is a bidirectional stream of messages between two peers per protocol. type Stream interface { - ReadMsg() ([]byte, error) - WriteMsg([]byte) error + // ReadMsg reads the next message from the stream. + ReadMsg(context.Context, proto.Message) error + // WriteMsg writes a message to the stream. + WriteMsg(context.Context, proto.Message) error Reset() error io.Closer } -type Handler func(ctx context.Context, peer Peer, stream Stream) error - -type StreamSpec struct { - Name string - Handler Handler +type MetadataStream interface { + // ReadHeader reads the header from the stream. + ReadHeader(context.Context) (Header, error) + // WriteHeader writes the header to the stream. + WriteHeader(context.Context, Header) error + // WriteError writes an error to the stream. + WriteError(context.Context, *status.Status) error } -type ProtocolSpec struct { - Name string - Version string - StreamSpecs []StreamSpec +// Header is a map of string to structpb.Value. It is used to pass headers +// between the client and the server. +type Header map[string]*structpb.Value + +// HandlerFunc is a function that handles a stream. +type HandlerFunc func(ctx context.Context, peer Peer, stream Stream) error + +// HeaderFunc is a function that handles a header. +type HeaderFunc func(ctx context.Context, peer Peer, hdr Header) (Header, error) + +// StreamDesc describes a stream handler. +type StreamDesc struct { + Name string + Version string + Handler HandlerFunc + Header HeaderFunc } type Addressbook interface { @@ -87,11 +107,11 @@ type Addressbook interface { } type Streamer interface { - NewStream(ctx context.Context, peer Peer, proto, version, stream string) (Stream, error) + NewStream(context.Context, Peer, Header, StreamDesc) (Stream, error) } type Service interface { - AddProtocol(spec ProtocolSpec) + AddStreamHandlers(desc ...StreamDesc) Connect(ctx context.Context, info []byte) (Peer, error) Streamer Addressbook @@ -111,7 +131,3 @@ type BlockedPeerInfo struct { Reason string Duration string } - -func NewStreamName(protocol, version, stream string) string { - return "/primev/" + protocol + "/" + version + "/" + stream -} diff --git a/pkg/p2p/protobuf/protobuf.go b/pkg/p2p/protobuf/protobuf.go deleted file mode 100644 index ba8cae4d..00000000 --- a/pkg/p2p/protobuf/protobuf.go +++ /dev/null @@ -1,68 +0,0 @@ -package protobuf - -import ( - "context" - "fmt" - "github.com/primevprotocol/mev-commit/pkg/p2p" - "google.golang.org/protobuf/proto" -) - -type Encoder interface { - ReadMsg(context.Context, proto.Message) error - WriteMsg(context.Context, proto.Message) error -} - -type protobuf struct { - p2p.Stream -} - -func NewReaderWriter(s p2p.Stream) Encoder { - return &protobuf{s} -} - -func (p *protobuf) ReadMsg(ctx context.Context, msg proto.Message) error { - type result struct { - msgBuf []byte - err error - } - - resultC := make(chan result, 1) - go func() { - msgBuf, err := p.Stream.ReadMsg() - resultC <- result{msgBuf: msgBuf, err: err} - }() - - select { - case <-ctx.Done(): - return ctx.Err() - case res := <-resultC: - if res.err != nil { - return fmt.Errorf("failed to read msg: %w", res.err) - } - - if err := proto.Unmarshal(res.msgBuf, msg); err != nil { - return fmt.Errorf("failed to unmarshal message: %w", err) - } - - return nil - } -} - -func (p *protobuf) WriteMsg(ctx context.Context, msg proto.Message) error { - msgBuf, err := proto.Marshal(msg) - if err != nil { - return fmt.Errorf("failed marshaling message: %w", err) - } - - errC := make(chan error, 1) - go func() { - errC <- p.Stream.WriteMsg(msgBuf) - }() - - select { - case <-ctx.Done(): - return ctx.Err() - case err := <-errC: - return err - } -} diff --git a/pkg/p2p/protobuf/protobuf_test.go b/pkg/p2p/protobuf/protobuf_test.go deleted file mode 100644 index 20209a5d..00000000 --- a/pkg/p2p/protobuf/protobuf_test.go +++ /dev/null @@ -1,61 +0,0 @@ -package protobuf_test - -import ( - "bytes" - "context" - "testing" - - "github.com/libp2p/go-libp2p/p2p/host/autonat/pb" - "github.com/primevprotocol/mev-commit/pkg/p2p/protobuf" - p2ptest "github.com/primevprotocol/mev-commit/pkg/p2p/testing" - "google.golang.org/protobuf/proto" -) - -func TestProtobufEncodingDecoding(t *testing.T) { - t.Parallel() - - t.Run("ok", func(t *testing.T) { - out, in := p2ptest.NewDuplexStream() - - test := &pb.Message{ - Type: pb.Message_DIAL.Enum(), - Dial: &pb.Message_Dial{ - Peer: &pb.Message_PeerInfo{ - Id: []byte("16Uiu2HAmK8EQ9axsSaE9hqjdHX7Hq5Jbeo2tmuNcLHwyQLWKjSYw"), - Addrs: [][]byte{ - []byte("0x9Bbc6Bef724d483C8f834C03fC2D3FE115D47ABF"), - []byte("0x903e2Abdc0fF09aBCB4C23CD8Ef1e267dfD32c2C"), - []byte("0xdCFA8524A3A266A388A4884cB6448463ae19D025"), - }, - }, - }, - } - - reader := protobuf.NewReaderWriter(in) - writer := protobuf.NewReaderWriter(out) - - if err := writer.WriteMsg(context.Background(), test); err != nil { - t.Fatal(err) - } - - var res pb.Message - err := reader.ReadMsg(context.Background(), &res) - if err != nil { - t.Fatal(err) - } - - testBytes, err := proto.Marshal(test) - if err != nil { - t.Fatal(err) - } - - resBytes, err := proto.Marshal(&res) - if err != nil { - t.Fatal(err) - } - - if !bytes.Equal(testBytes, resBytes) { - t.Fatalf("expected %v, got %v", testBytes, resBytes) - } - }) -} diff --git a/pkg/p2p/testing/p2p.go b/pkg/p2p/testing/p2p.go index 99db115c..e14fd421 100644 --- a/pkg/p2p/testing/p2p.go +++ b/pkg/p2p/testing/p2p.go @@ -5,6 +5,7 @@ import ( "errors" "github.com/primevprotocol/mev-commit/pkg/p2p" + "google.golang.org/protobuf/proto" ) func NewDuplexStream() (out *testStream, in *testStream) { @@ -26,12 +27,20 @@ func newStream() *testStream { } } -func (s *testStream) ReadMsg() ([]byte, error) { - return <-s.in, nil +func (s *testStream) ReadMsg(ctx context.Context, msg proto.Message) error { + buf, ok := <-s.in + if !ok { + return errors.New("stream closed") + } + return proto.Unmarshal(buf, msg) } -func (s *testStream) WriteMsg(msg []byte) error { - s.out <- msg +func (s *testStream) WriteMsg(_ context.Context, msg proto.Message) error { + buf, err := proto.Marshal(msg) + if err != nil { + return err + } + s.out <- buf return nil } @@ -71,7 +80,7 @@ type Option func(*P2PTest) type P2PTest struct { self *p2p.Peer - handlers map[string]p2p.ProtocolSpec + handlers map[string][]p2p.StreamDesc connectFunc func([]byte) (p2p.Peer, error) addressbookFunc func(p2p.Peer) ([]byte, error) } @@ -90,7 +99,7 @@ func WithAddressbookFunc(fn func(p p2p.Peer) ([]byte, error)) Option { func New(selfNode *p2p.Peer, opts ...Option) *P2PTest { p := &P2PTest{ - handlers: make(map[string]p2p.ProtocolSpec), + handlers: make(map[string][]p2p.StreamDesc), self: selfNode, } @@ -101,8 +110,8 @@ func New(selfNode *p2p.Peer, opts ...Option) *P2PTest { return p } -func (p *P2PTest) SetPeerHandler(peer p2p.Peer, proto p2p.ProtocolSpec) { - p.handlers[peer.EthAddress.Hex()] = proto +func (p *P2PTest) SetPeerHandler(peer p2p.Peer, proto p2p.StreamDesc) { + p.handlers[peer.EthAddress.Hex()] = append(p.handlers[peer.EthAddress.Hex()], proto) } func (p *P2PTest) Connect(_ context.Context, addr []byte) (p2p.Peer, error) { @@ -124,16 +133,17 @@ func (p *P2PTest) GetPeerInfo(peer p2p.Peer) ([]byte, error) { func (p *P2PTest) NewStream( _ context.Context, peer p2p.Peer, - proto, version, stream string, + _ p2p.Header, + stream p2p.StreamDesc, ) (p2p.Stream, error) { sHandlers, found := p.handlers[peer.EthAddress.Hex()] if !found { return nil, errors.New("peer not found") } - var handler p2p.Handler - for _, h := range sHandlers.StreamSpecs { - if h.Name == stream { + var handler p2p.HandlerFunc + for _, h := range sHandlers { + if h.Name == stream.Name && h.Version == stream.Version { handler = h.Handler break } diff --git a/pkg/preconfirmation/preconfirmation.go b/pkg/preconfirmation/preconfirmation.go index de3f46c4..46c83e18 100644 --- a/pkg/preconfirmation/preconfirmation.go +++ b/pkg/preconfirmation/preconfirmation.go @@ -9,12 +9,14 @@ import ( "time" "github.com/ethereum/go-ethereum/common" + preconfpb "github.com/primevprotocol/mev-commit/gen/go/preconfirmation/v1" providerapiv1 "github.com/primevprotocol/mev-commit/gen/go/providerapi/v1" preconfcontract "github.com/primevprotocol/mev-commit/pkg/contracts/preconf" "github.com/primevprotocol/mev-commit/pkg/p2p" - "github.com/primevprotocol/mev-commit/pkg/p2p/msgpack" signer "github.com/primevprotocol/mev-commit/pkg/signer/preconfsigner" "github.com/primevprotocol/mev-commit/pkg/topology" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) const ( @@ -42,7 +44,7 @@ type BidderStore interface { } type BidProcessor interface { - ProcessBid(context.Context, *signer.Bid) (chan providerapiv1.BidResponse_Status, error) + ProcessBid(context.Context, *preconfpb.Bid) (chan providerapiv1.BidResponse_Status, error) } func New( @@ -66,19 +68,18 @@ func New( } } -func (p *Preconfirmation) Protocol() p2p.ProtocolSpec { - return p2p.ProtocolSpec{ +func (p *Preconfirmation) preconfStream() p2p.StreamDesc { + return p2p.StreamDesc{ Name: ProtocolName, Version: ProtocolVersion, - StreamSpecs: []p2p.StreamSpec{ - { - Name: "bid", - Handler: p.handleBid, - }, - }, + Handler: p.handleBid, } } +func (p *Preconfirmation) Streams() []p2p.StreamDesc { + return []p2p.StreamDesc{p.preconfStream()} +} + // SendBid is meant to be called by the bidder to construct and send bids to the provider. // It takes the txHash, the bid amount in wei and the maximum valid block number. // It waits for preConfirmations from all providers and then returns. @@ -86,11 +87,11 @@ func (p *Preconfirmation) Protocol() p2p.ProtocolSpec { func (p *Preconfirmation) SendBid( ctx context.Context, txHash string, - bidAmt *big.Int, - blockNumber *big.Int, - decayStartTimestamp *big.Int, - decayEndTimestamp *big.Int, -) (chan *signer.PreConfirmation, error) { + bidAmt string, + blockNumber int64, + decayStartTimestamp int64, + decayEndTimestamp int64, +) (chan *preconfpb.PreConfirmation, error) { signedBid, err := p.signer.ConstructSignedBid(txHash, bidAmt, blockNumber, decayStartTimestamp, decayEndTimestamp) if err != nil { p.logger.Error("constructing signed bid", "error", err, "txHash", txHash) @@ -105,7 +106,7 @@ func (p *Preconfirmation) SendBid( } // Create a new channel to receive preConfirmations - preConfirmations := make(chan *signer.PreConfirmation, len(providers)) + preConfirmations := make(chan *preconfpb.PreConfirmation, len(providers)) wg := sync.WaitGroup{} for idx := range providers { @@ -118,9 +119,8 @@ func (p *Preconfirmation) SendBid( providerStream, err := p.streamer.NewStream( ctx, provider, - ProtocolName, - ProtocolVersion, - "bid", + nil, + p.preconfStream(), ) if err != nil { logger.Error("creating stream", "error", err) @@ -129,8 +129,7 @@ func (p *Preconfirmation) SendBid( logger.Info("sending signed bid", "signedBid", signedBid) - r, w := msgpack.NewReaderWriter[signer.PreConfirmation, signer.Bid](providerStream) - err = w.WriteMsg(ctx, signedBid) + err = providerStream.WriteMsg(ctx, signedBid) if err != nil { _ = providerStream.Reset() logger.Error("writing message", "error", err) @@ -138,7 +137,8 @@ func (p *Preconfirmation) SendBid( } p.metrics.SentBidsCount.Inc() - preConfirmation, err := r.ReadMsg(ctx) + preConfirmation := new(preconfpb.PreConfirmation) + err = providerStream.ReadMsg(ctx, preConfirmation) if err != nil { _ = providerStream.Reset() logger.Error("reading message", "error", err) @@ -153,7 +153,8 @@ func (p *Preconfirmation) SendBid( logger.Error("verifying provider signature", "error", err) return } - preConfirmation.ProviderAddress = *providerAddress + preConfirmation.ProviderAddress = make([]byte, len(providerAddress)) + copy(preConfirmation.ProviderAddress, providerAddress[:]) logger.Info("received preconfirmation", "preConfirmation", preConfirmation) p.metrics.ReceivedPreconfsCount.Inc() @@ -187,8 +188,8 @@ func (p *Preconfirmation) handleBid( return ErrInvalidBidderTypeForBid } - r, w := msgpack.NewReaderWriter[signer.Bid, signer.PreConfirmation](stream) - bid, err := r.ReadMsg(ctx) + bid := new(preconfpb.Bid) + err := stream.ReadMsg(ctx, bid) if err != nil { return err } @@ -197,51 +198,54 @@ func (p *Preconfirmation) handleBid( ethAddress, err := p.signer.VerifyBid(bid) if err != nil { - return err + p.logger.Error("verifying bid", "error", err) + return status.Errorf(codes.InvalidArgument, "invalid bid: %v", err) } - if p.us.CheckBidderAllowance(ctx, *ethAddress) { - // try to enqueue for 5 seconds - ctx, cancel := context.WithTimeout(ctx, 5*time.Second) - defer cancel() + if !p.us.CheckBidderAllowance(ctx, *ethAddress) { + p.logger.Error("bidder does not have enough allowance", "ethAddress", ethAddress) + return status.Errorf(codes.PermissionDenied, "bidder not allowed") + } - statusC, err := p.processer.ProcessBid(ctx, bid) - if err != nil { - return err - } - select { - case <-ctx.Done(): - return ctx.Err() - case status := <-statusC: - switch status { - case providerapiv1.BidResponse_STATUS_REJECTED: - return errors.New("bid rejected") - case providerapiv1.BidResponse_STATUS_ACCEPTED: - preConfirmation, err := p.signer.ConstructPreConfirmation(bid) - if err != nil { - return err - } - p.logger.Info("sending preconfirmation", "preConfirmation", preConfirmation) - err = p.commitmentDA.StoreCommitment( - ctx, - preConfirmation.Bid.BidAmt, - preConfirmation.Bid.BlockNumber.Uint64(), - preConfirmation.Bid.TxHash, - preConfirmation.Bid.DecayStartTimeStamp.Uint64(), - preConfirmation.Bid.DecayEndTimeStamp.Uint64(), - preConfirmation.Bid.Signature, - preConfirmation.Signature, - ) - if err != nil { - p.logger.Error("storing commitment", "error", err) - return err - } - return w.WriteMsg(ctx, preConfirmation) + bidAmt, _ := new(big.Int).SetString(bid.BidAmount, 10) + + // try to enqueue for 5 seconds + ctx, cancel := context.WithTimeout(ctx, 5*time.Second) + defer cancel() + + statusC, err := p.processer.ProcessBid(ctx, bid) + if err != nil { + return err + } + select { + case <-ctx.Done(): + return ctx.Err() + case status := <-statusC: + switch status { + case providerapiv1.BidResponse_STATUS_REJECTED: + return errors.New("bid rejected") + case providerapiv1.BidResponse_STATUS_ACCEPTED: + preConfirmation, err := p.signer.ConstructPreConfirmation(bid) + if err != nil { + return err + } + p.logger.Info("sending preconfirmation", "preConfirmation", preConfirmation) + err = p.commitmentDA.StoreCommitment( + ctx, + bidAmt, + uint64(preConfirmation.Bid.BlockNumber), + preConfirmation.Bid.TxHash, + uint64(preConfirmation.Bid.DecayStartTimeStamp), + uint64(preConfirmation.Bid.DecayEndTimeStamp), + preConfirmation.Bid.Signature, + preConfirmation.Signature, + ) + if err != nil { + p.logger.Error("storing commitment", "error", err) + return err } + return stream.WriteMsg(ctx, preConfirmation) } - } else { - p.logger.Error("bidder does not have enough allowance", "ethAddress", ethAddress) - return errors.New("bidder not allowed") } return nil diff --git a/pkg/preconfirmation/preconfirmation_test.go b/pkg/preconfirmation/preconfirmation_test.go index 6e6cf77b..88326e88 100644 --- a/pkg/preconfirmation/preconfirmation_test.go +++ b/pkg/preconfirmation/preconfirmation_test.go @@ -10,11 +10,11 @@ import ( "time" "github.com/ethereum/go-ethereum/common" + preconfpb "github.com/primevprotocol/mev-commit/gen/go/preconfirmation/v1" providerapiv1 "github.com/primevprotocol/mev-commit/gen/go/providerapi/v1" "github.com/primevprotocol/mev-commit/pkg/p2p" p2ptest "github.com/primevprotocol/mev-commit/pkg/p2p/testing" "github.com/primevprotocol/mev-commit/pkg/preconfirmation" - "github.com/primevprotocol/mev-commit/pkg/signer/preconfsigner" "github.com/primevprotocol/mev-commit/pkg/topology" ) @@ -33,25 +33,29 @@ func (t *testBidderStore) CheckBidderAllowance(_ context.Context, _ common.Addre } type testSigner struct { - bid *preconfsigner.Bid - preConfirmation *preconfsigner.PreConfirmation + bid *preconfpb.Bid + preConfirmation *preconfpb.PreConfirmation bidSigner common.Address preConfirmationSigner common.Address } +<<<<<<< HEAD func (t *testSigner) ConstructSignedBid(_ string, _ *big.Int, _ *big.Int, _ *big.Int, _ *big.Int) (*preconfsigner.Bid, error) { +======= +func (t *testSigner) ConstructSignedBid(_ string, _ string, _ int64) (*preconfpb.Bid, error) { +>>>>>>> d4e267e (feat: integrate new libp2p messages) return t.bid, nil } -func (t *testSigner) ConstructPreConfirmation(_ *preconfsigner.Bid) (*preconfsigner.PreConfirmation, error) { +func (t *testSigner) ConstructPreConfirmation(_ *preconfpb.Bid) (*preconfpb.PreConfirmation, error) { return t.preConfirmation, nil } -func (t *testSigner) VerifyBid(_ *preconfsigner.Bid) (*common.Address, error) { +func (t *testSigner) VerifyBid(_ *preconfpb.Bid) (*common.Address, error) { return &t.bidSigner, nil } -func (t *testSigner) VerifyPreConfirmation(_ *preconfsigner.PreConfirmation) (*common.Address, error) { +func (t *testSigner) VerifyPreConfirmation(_ *preconfpb.PreConfirmation) (*common.Address, error) { return &t.preConfirmationSigner, nil } @@ -61,7 +65,8 @@ type testProcessor struct { func (t *testProcessor) ProcessBid( _ context.Context, - _ *preconfsigner.Bid) (chan providerapiv1.BidResponse_Status, error) { + _ *preconfpb.Bid, +) (chan providerapiv1.BidResponse_Status, error) { statusC := make(chan providerapiv1.BidResponse_Status, 1) statusC <- t.status return statusC, nil @@ -108,18 +113,18 @@ func TestPreconfBidSubmission(t *testing.T) { Type: p2p.PeerTypeProvider, } - bid := &preconfsigner.Bid{ - TxHash: "test", - BidAmt: big.NewInt(10), - BlockNumber: big.NewInt(10), - DecayStartTimeStamp: big.NewInt(time.Now().UnixMilli() - 10000*time.Millisecond.Milliseconds()), - DecayEndTimeStamp: big.NewInt(time.Now().UnixMilli()), - Digest: []byte("test"), - Signature: []byte("test"), + bid := &preconfpb.Bid{ + TxHash: "test", + BidAmount: "10", + BlockNumber: 10, + DecayStartTimeStamp: time.Now().UnixMilli() - 10000*time.Millisecond.Milliseconds(), + DecayEndTimeStamp: time.Now().UnixMilli(), + Digest: []byte("test"), + Signature: []byte("test"), } - preConfirmation := &preconfsigner.PreConfirmation{ - Bid: *bid, + preConfirmation := &preconfpb.PreConfirmation{ + Bid: bid, Digest: []byte("test"), Signature: []byte("test"), } @@ -150,7 +155,7 @@ func TestPreconfBidSubmission(t *testing.T) { newTestLogger(t, os.Stdout), ) - svc.SetPeerHandler(server, p.Protocol()) + svc.SetPeerHandler(server, p.Streams()[0]) respC, err := p.SendBid(context.Background(), bid.TxHash, bid.BidAmt, bid.BlockNumber, bid.DecayStartTimeStamp, bid.DecayEndTimeStamp) if err != nil { diff --git a/pkg/rpc/bidder/service.go b/pkg/rpc/bidder/service.go index 60b5f731..b251c3ee 100644 --- a/pkg/rpc/bidder/service.go +++ b/pkg/rpc/bidder/service.go @@ -11,8 +11,8 @@ import ( "github.com/bufbuild/protovalidate-go" "github.com/ethereum/go-ethereum/common" bidderapiv1 "github.com/primevprotocol/mev-commit/gen/go/bidderapi/v1" + preconfirmationv1 "github.com/primevprotocol/mev-commit/gen/go/preconfirmation/v1" registrycontract "github.com/primevprotocol/mev-commit/pkg/contracts/bidder_registry" - "github.com/primevprotocol/mev-commit/pkg/signer/preconfsigner" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) @@ -45,7 +45,7 @@ func NewService( } type PreconfSender interface { - SendBid(context.Context, string, *big.Int, *big.Int, *big.Int, *big.Int) (chan *preconfsigner.PreConfirmation, error) + SendBid(context.Context, string, string, int64, int64, int64) (chan *preconfirmationv1.PreConfirmation, error) } func (s *Service) SendBid( @@ -64,21 +64,15 @@ func (s *Service) SendBid( return status.Errorf(codes.InvalidArgument, "validating bid: %v", err) } - amtVal, success := big.NewInt(0).SetString(bid.Amount, 10) - if !success { - s.logger.Error("parsing amount", "amount", bid.Amount) - return status.Errorf(codes.InvalidArgument, "error parsing amount: %v", bid.Amount) - } - txnsStr := strings.Join(bid.TxHashes, ",") respC, err := s.sender.SendBid( ctx, txnsStr, - amtVal, - big.NewInt(bid.BlockNumber), - big.NewInt(bid.DecayStartTimestamp), - big.NewInt(bid.DecayEndTimestamp), + bid.Amount, + bid.BlockNumber, + bid.DecayStartTimestamp, + bid.DecayEndTimestamp, ) if err != nil { s.logger.Error("sending bid", "error", err) @@ -89,13 +83,13 @@ func (s *Service) SendBid( b := resp.Bid err := srv.Send(&bidderapiv1.Commitment{ TxHashes: strings.Split(b.TxHash, ","), - BidAmount: b.BidAmt.Int64(), - BlockNumber: b.BlockNumber.Int64(), + BidAmount: b.BidAmount, + BlockNumber: b.BlockNumber, ReceivedBidDigest: hex.EncodeToString(b.Digest), ReceivedBidSignature: hex.EncodeToString(b.Signature), CommitmentDigest: hex.EncodeToString(resp.Digest), CommitmentSignature: hex.EncodeToString(resp.Signature), - ProviderAddress: resp.ProviderAddress.String(), + ProviderAddress: common.Bytes2Hex(resp.ProviderAddress), }) if err != nil { s.logger.Error("sending preConfirmation", "error", err) diff --git a/pkg/rpc/bidder/service_test.go b/pkg/rpc/bidder/service_test.go index c573c80f..97a2a054 100644 --- a/pkg/rpc/bidder/service_test.go +++ b/pkg/rpc/bidder/service_test.go @@ -14,8 +14,8 @@ import ( "github.com/bufbuild/protovalidate-go" "github.com/ethereum/go-ethereum/common" bidderapiv1 "github.com/primevprotocol/mev-commit/gen/go/bidderapi/v1" + preconfpb "github.com/primevprotocol/mev-commit/gen/go/preconfirmation/v1" bidderapi "github.com/primevprotocol/mev-commit/pkg/rpc/bidder" - "github.com/primevprotocol/mev-commit/pkg/signer/preconfsigner" "github.com/primevprotocol/mev-commit/pkg/util" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" @@ -28,8 +28,8 @@ const ( type bid struct { txHex string - amount *big.Int - blockNum *big.Int + amount string + blockNum int64 } type testSender struct { @@ -40,23 +40,23 @@ type testSender struct { func (s *testSender) SendBid( ctx context.Context, txHex string, - amount *big.Int, - blockNum *big.Int, - decayStartTimestamp *big.Int, - decayEndTimestamp *big.Int, -) (chan *preconfsigner.PreConfirmation, error) { + amount string, + blockNum int64, + decayStartTimestamp int64, + decayEndTimestamp int64, +) (chan *preconfpb.PreConfirmation, error) { s.bids = append(s.bids, bid{ txHex: txHex, amount: amount, blockNum: blockNum, }) - preconfs := make(chan *preconfsigner.PreConfirmation, s.noOfPreconfs) + preconfs := make(chan *preconfpb.PreConfirmation, s.noOfPreconfs) for i := 0; i < s.noOfPreconfs; i++ { - preconfs <- &preconfsigner.PreConfirmation{ - Bid: preconfsigner.Bid{ + preconfs <- &preconfpb.PreConfirmation{ + Bid: &preconfpb.Bid{ TxHash: txHex, - BidAmt: amount, + BidAmount: amount, BlockNumber: blockNum, DecayStartTimeStamp: decayStartTimestamp, DecayEndTimeStamp: decayEndTimestamp, @@ -65,7 +65,7 @@ func (s *testSender) SendBid( }, Digest: []byte("digest"), Signature: []byte("signature"), - ProviderAddress: common.HexToAddress(fmt.Sprintf("%x", i)), + ProviderAddress: common.HexToAddress(fmt.Sprintf("%x", i)).Bytes(), } } diff --git a/pkg/rpc/provider/service.go b/pkg/rpc/provider/service.go index cae81f6d..53924495 100644 --- a/pkg/rpc/provider/service.go +++ b/pkg/rpc/provider/service.go @@ -12,10 +12,10 @@ import ( "github.com/bufbuild/protovalidate-go" "github.com/ethereum/go-ethereum/common" + preconfpb "github.com/primevprotocol/mev-commit/gen/go/preconfirmation/v1" providerapiv1 "github.com/primevprotocol/mev-commit/gen/go/providerapi/v1" registrycontract "github.com/primevprotocol/mev-commit/pkg/contracts/provider_registry" "github.com/primevprotocol/mev-commit/pkg/evmclient" - "github.com/primevprotocol/mev-commit/pkg/signer/preconfsigner" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) @@ -66,15 +66,15 @@ func toString(bid *providerapiv1.Bid) string { func (s *Service) ProcessBid( ctx context.Context, - bid *preconfsigner.Bid, + bid *preconfpb.Bid, ) (chan providerapiv1.BidResponse_Status, error) { bidMsg := &providerapiv1.Bid{ TxHashes: strings.Split(bid.TxHash, ","), - BidAmount: bid.BidAmt.String(), - BlockNumber: bid.BlockNumber.Int64(), + BidAmount: bid.BidAmount, + BlockNumber: bid.BlockNumber, BidDigest: bid.Digest, - DecayStartTimestamp: bid.DecayStartTimeStamp.Int64(), - DecayEndTimestamp: bid.DecayEndTimeStamp.Int64(), + DecayStartTimestamp: bid.DecayStartTimeStamp, + DecayEndTimestamp: bid.DecayEndTimeStamp, } err := s.validator.Validate(bidMsg) diff --git a/pkg/rpc/provider/service_test.go b/pkg/rpc/provider/service_test.go index dd8406a0..ef09db5b 100644 --- a/pkg/rpc/provider/service_test.go +++ b/pkg/rpc/provider/service_test.go @@ -11,10 +11,10 @@ import ( "github.com/bufbuild/protovalidate-go" "github.com/ethereum/go-ethereum/common" + preconfpb "github.com/primevprotocol/mev-commit/gen/go/preconfirmation/v1" providerapiv1 "github.com/primevprotocol/mev-commit/gen/go/providerapi/v1" "github.com/primevprotocol/mev-commit/pkg/evmclient" providerapi "github.com/primevprotocol/mev-commit/pkg/rpc/provider" - "github.com/primevprotocol/mev-commit/pkg/signer/preconfsigner" "github.com/primevprotocol/mev-commit/pkg/util" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" @@ -181,7 +181,7 @@ func TestBidHandling(t *testing.T) { type testCase struct { name string - bid *preconfsigner.Bid + bid *preconfpb.Bid status providerapiv1.BidResponse_Status noStatus bool processErr string @@ -190,85 +190,85 @@ func TestBidHandling(t *testing.T) { for _, tc := range []testCase{ { name: "accepted bid", - bid: &preconfsigner.Bid{ + bid: &preconfpb.Bid{ TxHash: strings.Join( []string{ common.HexToHash("0x00001").Hex()[2:], // remove 0x common.HexToHash("0x00002").Hex()[2:], // remove 0x }, ",", // join with comma ), - BidAmt: big.NewInt(1000000000000000000), - BlockNumber: big.NewInt(1), + BidAmount: "1000000000000000000", + BlockNumber: 1, Digest: []byte("digest"), Signature: []byte("signature"), - DecayStartTimeStamp: big.NewInt(199), - DecayEndTimeStamp: big.NewInt(299), + DecayStartTimeStamp: 199, + DecayEndTimeStamp: 299, }, status: providerapiv1.BidResponse_STATUS_ACCEPTED, }, { name: "rejected bid", - bid: &preconfsigner.Bid{ + bid: &preconfpb.Bid{ TxHash: common.HexToHash("0x00003").Hex()[2:], // remove 0x - BidAmt: big.NewInt(1000000000000000000), - BlockNumber: big.NewInt(1), + BidAmount: "1000000000000000000", + BlockNumber: 1, Digest: []byte("digest"), Signature: []byte("signature"), - DecayStartTimeStamp: big.NewInt(199), - DecayEndTimeStamp: big.NewInt(299), + DecayStartTimeStamp: 199, + DecayEndTimeStamp: 299, }, status: providerapiv1.BidResponse_STATUS_REJECTED, }, { name: "invalid bid status", - bid: &preconfsigner.Bid{ + bid: &preconfpb.Bid{ TxHash: common.HexToHash("0x00003").Hex()[2:], // remove 0x - BidAmt: big.NewInt(1000000000000000000), - BlockNumber: big.NewInt(1), + BidAmount: "1000000000000000000", + BlockNumber: 1, Digest: []byte("digest"), Signature: []byte("signature"), - DecayStartTimeStamp: big.NewInt(199), - DecayEndTimeStamp: big.NewInt(299), + DecayStartTimeStamp: 199, + DecayEndTimeStamp: 299, }, status: providerapiv1.BidResponse_STATUS_UNSPECIFIED, noStatus: true, }, { name: "invalid bid txHash", - bid: &preconfsigner.Bid{ + bid: &preconfpb.Bid{ TxHash: "asdf", - BidAmt: big.NewInt(1000000000000000000), - BlockNumber: big.NewInt(1), + BidAmount: "1000000000000000000", + BlockNumber: 1, Digest: []byte("digest"), Signature: []byte("signature"), - DecayStartTimeStamp: big.NewInt(199), - DecayEndTimeStamp: big.NewInt(299), + DecayStartTimeStamp: 199, + DecayEndTimeStamp: 299, }, processErr: "tx_hashes: tx_hashes must be a valid array of transaction hashes", }, { name: "invalid bid amount", - bid: &preconfsigner.Bid{ + bid: &preconfpb.Bid{ TxHash: common.HexToHash("0x00004").Hex()[2:], // remove 0x - BidAmt: big.NewInt(0000000000000000000), - BlockNumber: big.NewInt(1), + BidAmount: "0000000000000000000", + BlockNumber: 1, Digest: []byte("digest"), Signature: []byte("signature"), - DecayStartTimeStamp: big.NewInt(199), - DecayEndTimeStamp: big.NewInt(299), + DecayStartTimeStamp: 199, + DecayEndTimeStamp: 299, }, processErr: "bid_amount: bid_amount must be a valid integer", }, { name: "invalid bid block number", - bid: &preconfsigner.Bid{ + bid: &preconfpb.Bid{ TxHash: common.HexToHash("0x00004").Hex()[2:], // remove 0x - BidAmt: big.NewInt(1000000000000000000), - BlockNumber: big.NewInt(0), + BidAmount: "1000000000000000000", + BlockNumber: 0, Digest: []byte("digest"), Signature: []byte("signature"), - DecayStartTimeStamp: big.NewInt(199), - DecayEndTimeStamp: big.NewInt(299), + DecayStartTimeStamp: 199, + DecayEndTimeStamp: 299, }, processErr: "block_number: value must be greater than 0", }, @@ -298,11 +298,11 @@ func TestBidHandling(t *testing.T) { t.Errorf("expected tx hash %v to be %v, got %v", i, sentBidHash, bid.TxHashes[i]) } } - if bid.BidAmount != tc.bid.BidAmt.String() { - t.Errorf("expected bid amount to be %v, got %v", tc.bid.BidAmt.String(), bid.BidAmount) + if bid.BidAmount != tc.bid.BidAmount { + t.Errorf("expected bid amount to be %v, got %v", tc.bid.BidAmount, bid.BidAmount) } - if bid.BlockNumber != tc.bid.BlockNumber.Int64() { - t.Errorf("expected block number to be %v, got %v", tc.bid.BlockNumber.Int64(), bid.BlockNumber) + if bid.BlockNumber != tc.bid.BlockNumber { + t.Errorf("expected block number to be %v, got %v", tc.bid.BlockNumber, bid.BlockNumber) } bidCh <- bid } diff --git a/pkg/signer/preconfsigner/export_test.go b/pkg/signer/preconfsigner/export_test.go index fd334a1a..5492a797 100644 --- a/pkg/signer/preconfsigner/export_test.go +++ b/pkg/signer/preconfsigner/export_test.go @@ -5,11 +5,12 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" + preconfpb "github.com/primevprotocol/mev-commit/gen/go/preconfirmation/v1" ) var EIPVerify = eipVerify -func (p *privateKeySigner) BidOriginator(bid *Bid) (*common.Address, *ecdsa.PublicKey, error) { +func (p *privateKeySigner) BidOriginator(bid *preconfpb.Bid) (*common.Address, *ecdsa.PublicKey, error) { _, err := p.VerifyBid(bid) if err != nil { return nil, nil, err @@ -32,7 +33,7 @@ func (p *privateKeySigner) BidOriginator(bid *Bid) (*common.Address, *ecdsa.Publ } func (p *privateKeySigner) PreConfirmationOriginator( - c *PreConfirmation, + c *preconfpb.PreConfirmation, ) (*common.Address, *ecdsa.PublicKey, error) { _, err := p.VerifyPreConfirmation(c) if err != nil { diff --git a/pkg/signer/preconfsigner/signer.go b/pkg/signer/preconfsigner/signer.go index b96159e7..320fd7e9 100644 --- a/pkg/signer/preconfsigner/signer.go +++ b/pkg/signer/preconfsigner/signer.go @@ -4,13 +4,12 @@ import ( "bytes" "encoding/hex" "errors" - "fmt" "math/big" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/signer/core/apitypes" + preconfpb "github.com/primevprotocol/mev-commit/gen/go/preconfirmation/v1" "github.com/primevprotocol/mev-commit/pkg/keysigner" ) @@ -22,50 +21,11 @@ var ( ErrAlreadySignedPreConfirmation = errors.New("preConfirmation is already hashed or signed") ) -// PreConfBid represents the bid data. -// Adds blocknumber for pre-conf bid - Will need to manage -// how to reciever acts on a bid / TTL is the blocknumber -type Bid struct { - TxHash string `json:"txn_hash"` - BidAmt *big.Int `json:"bid_amt"` - BlockNumber *big.Int `json:"block_number"` - - // The format for these timestamps is unix timestamp in milliseconds - DecayStartTimeStamp *big.Int `json:"decay_start_timestamp"` - DecayEndTimeStamp *big.Int `json:"decay_end_timestamp"` - - Digest []byte `json:"bid_digest"` // TODO(@ckaritk): name better - Signature []byte `json:"bid_signature"` -} - -func (b Bid) String() string { - return fmt.Sprintf( - "TxHash: %s, BidAmt: %s, BlockNumber: %s, Digest: %s, Signature: %s, DecayStartTimeStamp: %d, DecayEndTimeStamp: %d", - b.TxHash, b.BidAmt, b.BlockNumber, hex.EncodeToString(b.Digest), hex.EncodeToString(b.Signature), b.DecayStartTimeStamp, b.DecayEndTimeStamp, - ) -} - -type PreConfirmation struct { - Bid Bid `json:"bid"` - - Digest []byte `json:"digest"` - Signature []byte `json:"signature"` - - ProviderAddress common.Address `json:"provider_address"` -} - -func (p PreConfirmation) String() string { - return fmt.Sprintf( - "Bid: %s, Digest: %s, Signature: %s", - p.Bid, hex.EncodeToString(p.Digest), hex.EncodeToString(p.Signature), - ) -} - type Signer interface { - ConstructSignedBid(string, *big.Int, *big.Int, *big.Int, *big.Int) (*Bid, error) - ConstructPreConfirmation(*Bid) (*PreConfirmation, error) - VerifyBid(*Bid) (*common.Address, error) - VerifyPreConfirmation(*PreConfirmation) (*common.Address, error) + ConstructSignedBid(string, string, int64, int64, int64) (*preconfpb.Bid, error) + ConstructPreConfirmation(*preconfpb.Bid) (*preconfpb.PreConfirmation, error) + VerifyBid(*preconfpb.Bid) (*common.Address, error) + VerifyPreConfirmation(*preconfpb.PreConfirmation) (*common.Address, error) } type privateKeySigner struct { @@ -80,21 +40,17 @@ func NewSigner(keySigner keysigner.KeySigner) *privateKeySigner { func (p *privateKeySigner) ConstructSignedBid( txHash string, - bidAmt *big.Int, - blockNumber *big.Int, - decayStartTimeStamp *big.Int, - decayEndTimeStamp *big.Int, -) (*Bid, error) { - if txHash == "" || bidAmt == nil || blockNumber == nil { + bidAmt string, + blockNumber int64, + decayStartTimeStamp int64, + decayEndTimeStamp int64, +) (*preconfpb.Bid, error) { + if txHash == "" || bidAmt == "" || blockNumber == 0 { return nil, errors.New("missing required fields") } - if decayEndTimeStamp.Cmp(decayStartTimeStamp) != 1 { - return nil, errors.New("decay end timestamp must be after decay start timestamp") - } - - bid := &Bid{ - BidAmt: bidAmt, + bid := &preconfpb.Bid{ + BidAmount: bidAmt, TxHash: txHash, BlockNumber: blockNumber, DecayStartTimeStamp: decayStartTimeStamp, @@ -121,14 +77,14 @@ func (p *privateKeySigner) ConstructSignedBid( return bid, nil } -func (p *privateKeySigner) ConstructPreConfirmation(bid *Bid) (*PreConfirmation, error) { +func (p *privateKeySigner) ConstructPreConfirmation(bid *preconfpb.Bid) (*preconfpb.PreConfirmation, error) { _, err := p.VerifyBid(bid) if err != nil { return nil, err } - preConfirmation := &PreConfirmation{ - Bid: *bid, + preConfirmation := &preconfpb.PreConfirmation{ + Bid: bid, } preConfirmationHash, err := GetPreConfirmationHash(preConfirmation) @@ -151,7 +107,7 @@ func (p *privateKeySigner) ConstructPreConfirmation(bid *Bid) (*PreConfirmation, return preConfirmation, nil } -func (p *privateKeySigner) VerifyBid(bid *Bid) (*common.Address, error) { +func (p *privateKeySigner) VerifyBid(bid *preconfpb.Bid) (*common.Address, error) { if bid.Digest == nil || bid.Signature == nil { return nil, ErrMissingHashSignature } @@ -170,12 +126,12 @@ func (p *privateKeySigner) VerifyBid(bid *Bid) (*common.Address, error) { // VerifyPreConfirmation verifies the preconfirmation message, and returns the address of the provider // that signed the preconfirmation. -func (p *privateKeySigner) VerifyPreConfirmation(c *PreConfirmation) (*common.Address, error) { +func (p *privateKeySigner) VerifyPreConfirmation(c *preconfpb.PreConfirmation) (*common.Address, error) { if c.Digest == nil || c.Signature == nil { return nil, ErrMissingHashSignature } - _, err := p.VerifyBid(&c.Bid) + _, err := p.VerifyBid(c.Bid) if err != nil { return nil, err } @@ -223,7 +179,7 @@ func eipVerify( // GetBidHash returns the hash of the bid message. This is done manually to match the // Solidity implementation. If the types change, this will need to be updated. -func GetBidHash(bid *Bid) ([]byte, error) { +func GetBidHash(bid *preconfpb.Bid) ([]byte, error) { // DOMAIN_SEPARATOR_BID var ( domainTypeHash = crypto.Keccak256Hash( @@ -236,6 +192,11 @@ func GetBidHash(bid *Bid) ([]byte, error) { ) ) + bidAmt, ok := big.NewInt(0).SetString(bid.BidAmount, 10) + if !ok { + return nil, errors.New("invalid bid amount") + } + // EIP712_MESSAGE_TYPEHASH eip712MessageTypeHash := crypto.Keccak256Hash( []byte("PreConfBid(string txnHash,uint64 bid,uint64 blockNumber,uint64 decayStartTimeStamp,uint64 decayEndTimeStamp)"), @@ -248,10 +209,10 @@ func GetBidHash(bid *Bid) ([]byte, error) { // The reason we use math.U256Bytes is because we want to encode the uint64 as a 32 byte array // The EVM does this for values due via padding to 32 bytes, as that's the base size of a word in the EVM data := append(eip712MessageTypeHash.Bytes(), txnHashHash.Bytes()...) - data = append(data, math.U256Bytes(bid.BidAmt)...) - data = append(data, math.U256Bytes(bid.BlockNumber)...) - data = append(data, math.U256Bytes(bid.DecayStartTimeStamp)...) - data = append(data, math.U256Bytes(bid.DecayEndTimeStamp)...) + data = append(data, math.U256Bytes(bidAmt)...) + data = append(data, math.U256Bytes(big.NewInt(bid.BlockNumber))...) + data = append(data, math.U256Bytes(big.NewInt(bid.DecayStartTimeStamp))...) + data = append(data, math.U256Bytes(big.NewInt(bid.DecayEndTimeStamp))...) dataHash := crypto.Keccak256Hash(data) rawData := append([]byte("\x19\x01"), append(domainSeparatorBid.Bytes(), dataHash.Bytes()...)...) @@ -261,7 +222,7 @@ func GetBidHash(bid *Bid) ([]byte, error) { // GetPreConfirmationHash returns the hash of the preconfirmation message. This is done manually to match the // Solidity implementation. If the types change, this will need to be updated. -func GetPreConfirmationHash(c *PreConfirmation) ([]byte, error) { +func GetPreConfirmationHash(c *preconfpb.PreConfirmation) ([]byte, error) { // DOMAIN_SEPARATOR_BID var ( domainTypeHash = crypto.Keccak256Hash( @@ -274,6 +235,11 @@ func GetPreConfirmationHash(c *PreConfirmation) ([]byte, error) { ) ) + bidAmt, ok := big.NewInt(0).SetString(c.Bid.BidAmount, 10) + if !ok { + return nil, errors.New("invalid bid amount") + } + // EIP712_MESSAGE_TYPEHASH eip712MessageTypeHash := crypto.Keccak256Hash( []byte("PreConfCommitment(string txnHash,uint64 bid,uint64 blockNumber,uint64 decayStartTimeStamp,uint64 decayEndTimeStamp,string bidHash,string signature)"), @@ -286,10 +252,10 @@ func GetPreConfirmationHash(c *PreConfirmation) ([]byte, error) { // Encode values similar to Solidity's abi.encode data := append(eip712MessageTypeHash.Bytes(), txnHashHash.Bytes()...) - data = append(data, math.U256Bytes(c.Bid.BidAmt)...) - data = append(data, math.U256Bytes(c.Bid.BlockNumber)...) - data = append(data, math.U256Bytes(c.Bid.DecayStartTimeStamp)...) - data = append(data, math.U256Bytes(c.Bid.DecayEndTimeStamp)...) + data = append(data, math.U256Bytes(bidAmt)...) + data = append(data, math.U256Bytes(big.NewInt(c.Bid.BlockNumber))...) + data = append(data, math.U256Bytes(big.NewInt(c.Bid.DecayStartTimeStamp))...) + data = append(data, math.U256Bytes(big.NewInt(c.Bid.DecayEndTimeStamp))...) data = append(data, bidDigestHash.Bytes()...) data = append(data, bidSigHash.Bytes()...) dataHash := crypto.Keccak256Hash(data) @@ -298,83 +264,3 @@ func GetPreConfirmationHash(c *PreConfirmation) ([]byte, error) { // Create the final hash return crypto.Keccak256Hash(rawData).Bytes(), nil } - -// Constructs the EIP712 formatted bid -// nolint:unused -func constructPreConfirmationPayload( - txHash string, - bid *big.Int, - blockNumber *big.Int, - decayStartTimeStamp *big.Int, - decayEndTimeStamp *big.Int, - bidHash []byte, - signature []byte, -) apitypes.TypedData { - signerData := apitypes.TypedData{ - Types: apitypes.Types{ - "PreConfPreConfirmation": []apitypes.Type{ - {Name: "txHash", Type: "string"}, - {Name: "bid", Type: "uint64"}, - {Name: "blockNumber", Type: "uint64"}, - {Name: "decayStartTimeStamp", Type: "uint64"}, - {Name: "decayEndTimeStamp", Type: "uint64"}, - {Name: "bidHash", Type: "string"}, // Hex Encoded Hash - {Name: "signature", Type: "string"}, // Hex Encoded Signature - }, - "EIP712Domain": []apitypes.Type{ - {Name: "name", Type: "string"}, - {Name: "version", Type: "string"}, - }, - }, - PrimaryType: "PreConfPreConfirmation", - Domain: apitypes.TypedDataDomain{ - Name: "PreConfPreConfirmation", - Version: "1", - }, - Message: apitypes.TypedDataMessage{ - "txHash": txHash, - "bid": bid, - "blockNumber": blockNumber, - "decayStartTimeStamp": decayStartTimeStamp, - "decayEndTimeStamp": decayEndTimeStamp, - "bidHash": hex.EncodeToString(bidHash), - "signature": hex.EncodeToString(signature), - }, - } - - return signerData -} - -// Constructs the EIP712 formatted bid -// nolint:unused -func constructBidPayload(txHash string, bid *big.Int, blockNumber *big.Int, decayStartTimeStamp *big.Int, decayEndTimeStamp *big.Int) apitypes.TypedData { - signerData := apitypes.TypedData{ - Types: apitypes.Types{ - "PreConfBid": []apitypes.Type{ - {Name: "txHash", Type: "string"}, - {Name: "bid", Type: "uint64"}, - {Name: "blockNumber", Type: "uint64"}, - {Name: "decayStartTimeStamp", Type: "uint64"}, - {Name: "decayEndTimeStamp", Type: "uint64"}, - }, - "EIP712Domain": []apitypes.Type{ - {Name: "name", Type: "string"}, - {Name: "version", Type: "string"}, - }, - }, - PrimaryType: "PreConfBid", - Domain: apitypes.TypedDataDomain{ - Name: "PreConfBid", - Version: "1", - }, - Message: apitypes.TypedDataMessage{ - "txHash": txHash, - "bid": bid, - "blockNumber": blockNumber, - "decayStartTimeStamp": decayStartTimeStamp, - "decayEndTimeStamp": decayEndTimeStamp, - }, - } - - return signerData -} diff --git a/pkg/signer/preconfsigner/signer_test.go b/pkg/signer/preconfsigner/signer_test.go index 4ed35faa..c0455588 100644 --- a/pkg/signer/preconfsigner/signer_test.go +++ b/pkg/signer/preconfsigner/signer_test.go @@ -7,6 +7,7 @@ import ( "time" "github.com/ethereum/go-ethereum/crypto" + preconfpb "github.com/primevprotocol/mev-commit/gen/go/preconfirmation/v1" mockkeysigner "github.com/primevprotocol/mev-commit/pkg/keysigner/mock" "github.com/primevprotocol/mev-commit/pkg/signer/preconfsigner" "github.com/stretchr/testify/assert" @@ -26,7 +27,7 @@ func TestBids(t *testing.T) { start := time.Now().UnixMilli() end := start + 100000 - bid, err := signer.ConstructSignedBid("0xkartik", big.NewInt(10), big.NewInt(2), big.NewInt(start), big.NewInt(end)) + bid, err := signer.ConstructSignedBid("0xkartik", "10", 2, start, end) if err != nil { t.Fatal(err) } @@ -63,7 +64,7 @@ func TestBids(t *testing.T) { keySigner = mockkeysigner.NewMockKeySigner(providerKey, crypto.PubkeyToAddress(providerKey.PublicKey)) providerSigner := preconfsigner.NewSigner(keySigner) - bid, err := bidderSigner.ConstructSignedBid("0xkartik", big.NewInt(10), big.NewInt(2), big.NewInt(1), big.NewInt(2)) + bid, err := bidderSigner.ConstructSignedBid("0xkartik", "10", 2, 1, 2) if err != nil { t.Fatal(err) } @@ -86,12 +87,12 @@ func TestHashing(t *testing.T) { t.Parallel() t.Run("bid", func(t *testing.T) { - bid := &preconfsigner.Bid{ + bid := &preconfpb.Bid{ TxHash: "0xkartik", - BidAmt: big.NewInt(200), - BlockNumber: big.NewInt(3000), - DecayStartTimeStamp: big.NewInt(10), - DecayEndTimeStamp: big.NewInt(30), + BidAmount: "2", + BlockNumber: 2, + DecayStartTimeStamp: 10, + DecayEndTimeStamp: 30, } hash, err := preconfsigner.GetBidHash(bid) @@ -120,18 +121,18 @@ func TestHashing(t *testing.T) { t.Fatal(err) } - bid := &preconfsigner.Bid{ + bid := &preconfpb.Bid{ TxHash: "0xkartik", - BidAmt: big.NewInt(2), - BlockNumber: big.NewInt(2), - DecayStartTimeStamp: big.NewInt(10), - DecayEndTimeStamp: big.NewInt(20), + BidAmount: "2", + BlockNumber: 2, + DecayStartTimeStamp: 10, + DecayEndTimeStamp: 20, Digest: bidHashBytes, Signature: bidSigBytes, } - preConfirmation := &preconfsigner.PreConfirmation{ - Bid: *bid, + preConfirmation := &preconfpb.PreConfirmation{ + Bid: bid, } hash, err := preconfsigner.GetPreConfirmationHash(preConfirmation) diff --git a/rpc/bidderapi/v1/bidderapi.proto b/rpc/bidderapi/v1/bidderapi.proto index d2896773..09a7cd3c 100644 --- a/rpc/bidderapi/v1/bidderapi.proto +++ b/rpc/bidderapi/v1/bidderapi.proto @@ -132,7 +132,7 @@ message Commitment { description: "Hex string encoding of the hash of the transaction that the bidder wants to include in the block." pattern: "[a-fA-F0-9]{64}" }]; - int64 bid_amount = 2 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + string bid_amount = 2 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { description: "Amount of ETH that the bidder has agreed to pay to the provider for including the transaction in the block." }]; int64 block_number = 3 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { From aeb81b2600424a6f1209f56406271869bf5a8b3e Mon Sep 17 00:00:00 2001 From: Alok Date: Thu, 14 Mar 2024 23:34:19 +0530 Subject: [PATCH 04/14] feat: bump protocol versions --- pkg/discovery/discovery.go | 2 +- pkg/p2p/libp2p/internal/handshake/handshake.go | 2 +- pkg/preconfirmation/preconfirmation.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/discovery/discovery.go b/pkg/discovery/discovery.go index fbc789a3..d2e1c473 100644 --- a/pkg/discovery/discovery.go +++ b/pkg/discovery/discovery.go @@ -14,7 +14,7 @@ import ( const ( ProtocolName = "discovery" - ProtocolVersion = "1.0.0" + ProtocolVersion = "2.0.0" checkWorkers = 10 ) diff --git a/pkg/p2p/libp2p/internal/handshake/handshake.go b/pkg/p2p/libp2p/internal/handshake/handshake.go index b9545ecc..6be47768 100644 --- a/pkg/p2p/libp2p/internal/handshake/handshake.go +++ b/pkg/p2p/libp2p/internal/handshake/handshake.go @@ -18,7 +18,7 @@ import ( const ( ProtocolName = "handshake" - ProtocolVersion = "1.0.0" + ProtocolVersion = "2.0.0" StreamName = "handshake" ) diff --git a/pkg/preconfirmation/preconfirmation.go b/pkg/preconfirmation/preconfirmation.go index 46c83e18..16b11512 100644 --- a/pkg/preconfirmation/preconfirmation.go +++ b/pkg/preconfirmation/preconfirmation.go @@ -21,7 +21,7 @@ import ( const ( ProtocolName = "preconfirmation" - ProtocolVersion = "1.0.0" + ProtocolVersion = "2.0.0" ) type Preconfirmation struct { From 4b5941b09714f3fad1c5bcc645a1173d81ac7ae4 Mon Sep 17 00:00:00 2001 From: Alok Date: Fri, 15 Mar 2024 00:35:46 +0530 Subject: [PATCH 05/14] fix: lint --- pkg/discovery/discovery.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkg/discovery/discovery.go b/pkg/discovery/discovery.go index d2e1c473..b6b56e64 100644 --- a/pkg/discovery/discovery.go +++ b/pkg/discovery/discovery.go @@ -66,10 +66,6 @@ func (d *Discovery) Streams() []p2p.StreamDesc { return []p2p.StreamDesc{d.peerListStream()} } -type peersList struct { - Peers []p2p.PeerInfo -} - func (d *Discovery) handlePeersList(ctx context.Context, peer p2p.Peer, s p2p.Stream) error { peers := new(discoverypb.PeerList) err := s.ReadMsg(ctx, peers) From 984b94312fee55431215f2cb40ecc4f0638d621c Mon Sep 17 00:00:00 2001 From: Alok Date: Fri, 15 Mar 2024 01:54:38 +0530 Subject: [PATCH 06/14] fix: header function doesnt return error --- pkg/p2p/libp2p/libp2p.go | 13 +------------ pkg/p2p/p2p.go | 2 +- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/pkg/p2p/libp2p/libp2p.go b/pkg/p2p/libp2p/libp2p.go index 62510420..8e9eaf35 100644 --- a/pkg/p2p/libp2p/libp2p.go +++ b/pkg/p2p/libp2p/libp2p.go @@ -313,18 +313,7 @@ func (s *Service) AddStreamHandlers(streams ...p2p.StreamDesc) { respHdrs := p2p.Header{} if ss.Header != nil { - respHdrs, err = ss.Header(ctx, p, headers) - if err != nil { - s.logger.Error("handling headers", "err", err) - retErr, _ := status.FromError(err) - err = mtdtStream.WriteError(ctx, retErr) - if err != nil { - s.logger.Error("writing error", "err", err) - _ = streamlibp2p.Reset() - return - } - return - } + respHdrs = ss.Header(ctx, p, headers) } err = mtdtStream.WriteHeader(ctx, respHdrs) diff --git a/pkg/p2p/p2p.go b/pkg/p2p/p2p.go index 469edf43..af4c3d7b 100644 --- a/pkg/p2p/p2p.go +++ b/pkg/p2p/p2p.go @@ -92,7 +92,7 @@ type Header map[string]*structpb.Value type HandlerFunc func(ctx context.Context, peer Peer, stream Stream) error // HeaderFunc is a function that handles a header. -type HeaderFunc func(ctx context.Context, peer Peer, hdr Header) (Header, error) +type HeaderFunc func(ctx context.Context, peer Peer, hdr Header) Header // StreamDesc describes a stream handler. type StreamDesc struct { From f1519cdda35d8acdadcb0032383769c6e0281f89 Mon Sep 17 00:00:00 2001 From: Alok Date: Tue, 19 Mar 2024 01:57:49 +0530 Subject: [PATCH 07/14] chore: comments and more tests --- pkg/p2p/libp2p/export_test.go | 5 + .../libp2p/internal/handshake/handshake.go | 32 +-- pkg/p2p/libp2p/libp2p.go | 27 +- pkg/p2p/libp2p/libp2p_test.go | 71 +++++- pkg/p2p/libp2p/peers.go | 20 +- pkg/p2p/libp2p/stream.go | 45 ++-- pkg/p2p/libp2p/stream_test.go | 241 ++++++++++++++++++ 7 files changed, 380 insertions(+), 61 deletions(-) create mode 100644 pkg/p2p/libp2p/stream_test.go diff --git a/pkg/p2p/libp2p/export_test.go b/pkg/p2p/libp2p/export_test.go index c72c7dae..ab9c9c97 100644 --- a/pkg/p2p/libp2p/export_test.go +++ b/pkg/p2p/libp2p/export_test.go @@ -5,6 +5,11 @@ import ( "github.com/primevprotocol/mev-commit/pkg/p2p" ) +var ( + NewStream = newStream + NewMetadataStream = newMetadataStream +) + func (s *Service) Addrs() ([]byte, error) { info := s.host.Peerstore().PeerInfo(s.host.ID()) return info.MarshalJSON() diff --git a/pkg/p2p/libp2p/internal/handshake/handshake.go b/pkg/p2p/libp2p/internal/handshake/handshake.go index 6be47768..98a1b77a 100644 --- a/pkg/p2p/libp2p/internal/handshake/handshake.go +++ b/pkg/p2p/libp2p/internal/handshake/handshake.go @@ -159,17 +159,17 @@ func (h *Service) Handle( ctx context.Context, stream p2p.Stream, peerID core.PeerID, -) (p2p.Peer, error) { +) (*p2p.Peer, error) { req := new(handshakepb.HandshakeReq) err := stream.ReadMsg(ctx, req) if err != nil { - return p2p.Peer{}, err + return nil, err } ethAddress, err := h.verifyReq(req, peerID) if err != nil { - return p2p.Peer{}, err + return nil, err } resp := &handshakepb.HandshakeResp{ @@ -178,25 +178,25 @@ func (h *Service) Handle( } if err := stream.WriteMsg(ctx, resp); err != nil { - return p2p.Peer{}, err + return nil, err } err = stream.WriteMsg(ctx, h.handshakeReq) if err != nil { - return p2p.Peer{}, err + return nil, err } ack := new(handshakepb.HandshakeResp) err = stream.ReadMsg(ctx, ack) if err != nil { - return p2p.Peer{}, err + return nil, err } if err := h.verifyResp(ack); err != nil { - return p2p.Peer{}, err + return nil, err } - return p2p.Peer{ + return &p2p.Peer{ EthAddress: ethAddress, Type: p2p.FromString(req.PeerType), }, nil @@ -206,31 +206,31 @@ func (h *Service) Handshake( ctx context.Context, peerID core.PeerID, stream p2p.Stream, -) (p2p.Peer, error) { +) (*p2p.Peer, error) { if err := stream.WriteMsg(ctx, h.handshakeReq); err != nil { - return p2p.Peer{}, err + return nil, err } resp := new(handshakepb.HandshakeResp) err := stream.ReadMsg(ctx, resp) if err != nil { - return p2p.Peer{}, err + return nil, err } if err := h.verifyResp(resp); err != nil { - return p2p.Peer{}, err + return nil, err } ack := new(handshakepb.HandshakeReq) err = stream.ReadMsg(ctx, ack) if err != nil { - return p2p.Peer{}, err + return nil, err } ethAddress, err := h.verifyReq(ack, peerID) if err != nil { - return p2p.Peer{}, err + return nil, err } err = stream.WriteMsg(ctx, &handshakepb.HandshakeResp{ @@ -238,10 +238,10 @@ func (h *Service) Handshake( PeerType: ack.PeerType, }) if err != nil { - return p2p.Peer{}, err + return nil, err } - return p2p.Peer{ + return &p2p.Peer{ EthAddress: ethAddress, Type: p2p.FromString(ack.PeerType), }, nil diff --git a/pkg/p2p/libp2p/libp2p.go b/pkg/p2p/libp2p/libp2p.go index 8e9eaf35..4d2da34c 100644 --- a/pkg/p2p/libp2p/libp2p.go +++ b/pkg/p2p/libp2p/libp2p.go @@ -238,7 +238,7 @@ func (s *Service) handleConnectReq(streamlibp2p network.Stream) { } if s.notifier != nil { - s.notifier.Connected(peer) + s.notifier.Connected(*peer) } s.logger.Info("peer connected (inbound)", "peer", peer) @@ -259,25 +259,26 @@ func (s *Service) Self() map[string]interface{} { } } -func matchProtocolIDWithSemver(protoID string, supportedVersion string) bool { +func matchProtocolIDWithSemver(protoID string, supportedVersion string) (bool, error) { // Extract the version part from the protocol ID. parts := strings.Split(protoID, "/") if len(parts) != 3 { - return false + return false, fmt.Errorf("invalid protocol ID: %s", protoID) } protocolVersion := parts[2] // Parse the supported version and the protocol version. supportedSemver, err := semver.NewVersion(supportedVersion) if err != nil { - return false + return false, err } protoSemver, err := semver.NewVersion(protocolVersion) if err != nil { - return false + return false, fmt.Errorf("invalid protocol version: %s", protocolVersion) } - return supportedSemver.Major() == protoSemver.Major() && supportedSemver.Minor() >= protoSemver.Minor() + // Major version bumps in the protocols are not backward compatible. Minor version bumps are backward compatible. + return supportedSemver.Major() == protoSemver.Major() && supportedSemver.Minor() >= protoSemver.Minor(), nil } func (s *Service) AddStreamHandlers(streams ...p2p.StreamDesc) { @@ -287,7 +288,11 @@ func (s *Service) AddStreamHandlers(streams ...p2p.StreamDesc) { s.host.SetStreamHandlerMatch( protocol.ID(ss.Name), func(p protocol.ID) bool { - return matchProtocolIDWithSemver(string(p), ss.Version) + matched, err := matchProtocolIDWithSemver(string(p), ss.Version) + if err != nil { + s.logger.Error("matching protocol ID with semver", "err", err) + } + return matched }, func(streamlibp2p network.Stream) { peerID := streamlibp2p.Conn().RemotePeer() @@ -313,7 +318,7 @@ func (s *Service) AddStreamHandlers(streams ...p2p.StreamDesc) { respHdrs := p2p.Header{} if ss.Header != nil { - respHdrs = ss.Header(ctx, p, headers) + respHdrs = ss.Header(ctx, *p, headers) } err = mtdtStream.WriteHeader(ctx, respHdrs) @@ -325,7 +330,7 @@ func (s *Service) AddStreamHandlers(streams ...p2p.StreamDesc) { stream := newStream(streamlibp2p, headers, respHdrs) - err = ss.Handler(ctx, p, stream) + err = ss.Handler(ctx, *p, stream) if err != nil { s.logger.Error("stream handler", "err", err) retErr, _ := status.FromError(err) @@ -385,7 +390,7 @@ func (s *Service) Connect(ctx context.Context, info []byte) (p2p.Peer, error) { } if p, found := s.peers.isConnected(addrInfo.ID); found { - return p, nil + return *p, nil } if err := s.host.Connect(ctx, addrInfo); err != nil { @@ -420,7 +425,7 @@ func (s *Service) Connect(ctx context.Context, info []byte) (p2p.Peer, error) { s.host.Peerstore().AddAddrs(addrInfo.ID, addrInfo.Addrs, peerstore.PermanentAddrTTL) s.logger.Info("peer connected (outbound)", "peer", p) - return p, nil + return *p, nil } func (s *Service) GetPeerInfo(p p2p.Peer) ([]byte, error) { diff --git a/pkg/p2p/libp2p/libp2p_test.go b/pkg/p2p/libp2p/libp2p_test.go index 00314a5c..e5d3e079 100644 --- a/pkg/p2p/libp2p/libp2p_test.go +++ b/pkg/p2p/libp2p/libp2p_test.go @@ -16,6 +16,9 @@ import ( mockkeysigner "github.com/primevprotocol/mev-commit/pkg/keysigner/mock" "github.com/primevprotocol/mev-commit/pkg/p2p" "github.com/primevprotocol/mev-commit/pkg/p2p/libp2p" + "github.com/stretchr/testify/assert" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" "google.golang.org/protobuf/types/known/wrapperspb" ) @@ -91,10 +94,10 @@ func TestP2PService(t *testing.T) { Name: "test", Version: "1.0.0", Handler: func(ctx context.Context, peer p2p.Peer, str p2p.Stream) error { - if peer.EthAddress.Hex() != client.Peer().EthAddress.Hex() { + if peer.EthAddress.Cmp(client.Peer().EthAddress) != 0 { t.Fatalf( "expected eth address %s, got %s", - client.Peer().EthAddress.Hex(), peer.EthAddress.Hex(), + client.Peer().EthAddress, peer.EthAddress, ) } @@ -298,3 +301,67 @@ func TestBootstrap(t *testing.T) { time.Sleep(100 * time.Millisecond) } } + +func TestHandlerError(t *testing.T) { + svc := newTestService(t) + client := newTestService(t) + + t.Cleanup(func() { + err := errors.Join(svc.Close(), client.Close()) + if err != nil { + t.Fatal(err) + } + }) + + stream := p2p.StreamDesc{ + Name: "test", + Version: "1.0.0", + Handler: func(ctx context.Context, peer p2p.Peer, str p2p.Stream) error { + return status.Error(codes.Internal, "test error") + }, + } + + svc.AddStreamHandlers(stream) + + svAddr, err := svc.Addrs() + if err != nil { + t.Fatal(err) + } + + p, err := client.Connect(context.Background(), svAddr) + if err != nil { + t.Fatal(err) + } + + if p.EthAddress.Hex() != svc.Peer().EthAddress.Hex() { + t.Fatalf( + "expected eth address %s, got %s", + svc.Peer().EthAddress.Hex(), p.EthAddress.Hex(), + ) + } + + if p.Type != svc.Peer().Type { + t.Fatalf( + "expected peer type %s, got %s", + svc.Peer().Type.String(), p.Type.String(), + ) + } + + str, err := client.NewStream(context.Background(), p, nil, stream) + if err != nil { + t.Fatal(err) + } + + err = str.WriteMsg(context.Background(), &wrapperspb.StringValue{Value: "test"}) + if err != nil { + t.Fatal(err) + } + + err = str.ReadMsg(context.Background(), &wrapperspb.StringValue{}) + if err == nil { + t.Fatal("expected error, got nil") + } + + assert.Equal(t, codes.Internal, status.Convert(err).Code()) + assert.Equal(t, "test error", status.Convert(err).Message()) +} diff --git a/pkg/p2p/libp2p/peers.go b/pkg/p2p/libp2p/peers.go index a0dc7b62..edfbcb7f 100644 --- a/pkg/p2p/libp2p/peers.go +++ b/pkg/p2p/libp2p/peers.go @@ -12,7 +12,7 @@ import ( type peerRegistry struct { // overlays maps peer IDs to peer info relevant to the primev client - overlays map[core.PeerID]p2p.Peer + overlays map[core.PeerID]*p2p.Peer // underlays maps Ethereum addresses to peer IDs used by libp2p underlays map[common.Address]core.PeerID // connections maps peer IDs to their open connections, this is used to @@ -34,7 +34,7 @@ type disconnector interface { func newPeerRegistry() *peerRegistry { return &peerRegistry{ - overlays: make(map[core.PeerID]p2p.Peer), + overlays: make(map[core.PeerID]*p2p.Peer), underlays: make(map[common.Address]core.PeerID), connections: make(map[core.PeerID]map[network.Conn]struct{}), streams: make(map[core.PeerID]map[network.Stream]context.CancelFunc), @@ -69,10 +69,10 @@ func (r *peerRegistry) Disconnected(_ network.Network, c network.Conn) { cancel() } delete(r.streams, peerID) - r.disconnector.disconnected(peerInfo) + r.disconnector.disconnected(*peerInfo) } -func (r *peerRegistry) addPeer(c network.Conn, p p2p.Peer) (exists bool) { +func (r *peerRegistry) addPeer(c network.Conn, p *p2p.Peer) (exists bool) { r.mu.Lock() defer r.mu.Unlock() @@ -91,7 +91,7 @@ func (r *peerRegistry) addPeer(c network.Conn, p p2p.Peer) (exists bool) { return false } -func (r *peerRegistry) removePeer(peer p2p.Peer) (found bool, peerID core.PeerID) { //nolint:unused +func (r *peerRegistry) removePeer(peer *p2p.Peer) (found bool, peerID core.PeerID) { //nolint:unused r.mu.Lock() defer r.mu.Unlock() @@ -106,7 +106,7 @@ func (r *peerRegistry) removePeer(peer p2p.Peer) (found bool, peerID core.PeerID return } -func (r *peerRegistry) getPeer(peerID core.PeerID) (p2p.Peer, bool) { +func (r *peerRegistry) getPeer(peerID core.PeerID) (*p2p.Peer, bool) { r.mu.RLock() defer r.mu.RUnlock() @@ -122,11 +122,11 @@ func (r *peerRegistry) getPeerID(ethAddress common.Address) (core.PeerID, bool) return peerID, ok } -func (r *peerRegistry) getPeers() []p2p.Peer { //nolint:unused +func (r *peerRegistry) getPeers() []*p2p.Peer { //nolint:unused r.mu.RLock() defer r.mu.RUnlock() - peers := make([]p2p.Peer, 0, len(r.overlays)) + peers := make([]*p2p.Peer, 0, len(r.overlays)) for _, peer := range r.overlays { peers = append(peers, peer) } @@ -166,13 +166,13 @@ func (r *peerRegistry) removeStream(peerID core.PeerID, stream network.Stream) { delete(r.streams[peerID], stream) } -func (r *peerRegistry) isConnected(peerID core.PeerID) (p2p.Peer, bool) { +func (r *peerRegistry) isConnected(peerID core.PeerID) (*p2p.Peer, bool) { r.mu.RLock() defer r.mu.RUnlock() peer, ok := r.overlays[peerID] if !ok { - return p2p.Peer{}, false + return nil, false } _, ok = r.connections[peerID] diff --git a/pkg/p2p/libp2p/stream.go b/pkg/p2p/libp2p/stream.go index 45b7ec61..d716f3b2 100644 --- a/pkg/p2p/libp2p/stream.go +++ b/pkg/p2p/libp2p/stream.go @@ -3,8 +3,8 @@ package libp2p import ( "context" "fmt" + "io" - "github.com/libp2p/go-libp2p/core/network" "github.com/libp2p/go-msgio" streammsgv1 "github.com/primevprotocol/mev-commit/gen/go/streammsg/v1" "github.com/primevprotocol/mev-commit/pkg/p2p" @@ -12,20 +12,23 @@ import ( "google.golang.org/protobuf/proto" ) -func newStream(libp2pstream network.Stream, hdrs, respHdrs p2p.Header) p2p.Stream { +type networkStream interface { + io.ReadWriteCloser + Reset() error +} + +func newStream(libp2pstream networkStream, hdrs, respHdrs p2p.Header) p2p.Stream { return &stream{ - Stream: libp2pstream, - reader: msgio.NewVarintReaderSize(libp2pstream, network.MessageSizeMax), - writer: msgio.NewVarintWriter(libp2pstream), - hdrs: hdrs, - respHdrs: respHdrs, + networkStream: libp2pstream, + rw: msgio.NewReadWriter(libp2pstream), + hdrs: hdrs, + respHdrs: respHdrs, } } type stream struct { - network.Stream - reader msgio.Reader - writer msgio.Writer + networkStream + rw msgio.ReadWriter hdrs p2p.Header respHdrs p2p.Header } @@ -38,7 +41,7 @@ type result struct { func (s *stream) ReadMsg(ctx context.Context, m proto.Message) error { ch := make(chan result, 1) go func() { - sMsgBuf, err := s.reader.ReadMsg() + sMsgBuf, err := s.rw.ReadMsg() ch <- result{sMsgBuf, err} }() @@ -88,7 +91,7 @@ func (s *stream) WriteMsg(ctx context.Context, m proto.Message) error { errC := make(chan error, 1) go func() { - errC <- s.writer.WriteMsg(sMsgBuf) + errC <- s.rw.WriteMsg(sMsgBuf) }() select { @@ -100,23 +103,21 @@ func (s *stream) WriteMsg(ctx context.Context, m proto.Message) error { } type metadataStream struct { - network.Stream - reader msgio.Reader - writer msgio.Writer + networkStream + rw msgio.ReadWriter } -func newMetadataStream(libp2pstream network.Stream) p2p.MetadataStream { +func newMetadataStream(libp2pstream networkStream) p2p.MetadataStream { return &metadataStream{ - Stream: libp2pstream, - reader: msgio.NewVarintReaderSize(libp2pstream, network.MessageSizeMax), - writer: msgio.NewVarintWriter(libp2pstream), + networkStream: libp2pstream, + rw: msgio.NewReadWriter(libp2pstream), } } func (s *metadataStream) ReadHeader(ctx context.Context) (p2p.Header, error) { ch := make(chan result, 1) go func() { - sMsgBuf, err := s.reader.ReadMsg() + sMsgBuf, err := s.rw.ReadMsg() ch <- result{sMsgBuf, err} }() @@ -148,7 +149,7 @@ func (s *metadataStream) WriteHeader(ctx context.Context, hdr p2p.Header) error errC := make(chan error, 1) go func() { - errC <- s.writer.WriteMsg(sMsgBuf) + errC <- s.rw.WriteMsg(sMsgBuf) }() select { @@ -173,7 +174,7 @@ func (s *metadataStream) WriteError(ctx context.Context, st *status.Status) erro errC := make(chan error, 1) go func() { - errC <- s.writer.WriteMsg(buf) + errC <- s.rw.WriteMsg(buf) }() select { diff --git a/pkg/p2p/libp2p/stream_test.go b/pkg/p2p/libp2p/stream_test.go new file mode 100644 index 00000000..e2239188 --- /dev/null +++ b/pkg/p2p/libp2p/stream_test.go @@ -0,0 +1,241 @@ +package libp2p_test + +import ( + "bytes" + "context" + "sync" + "testing" + "time" + + streammsgv1 "github.com/primevprotocol/mev-commit/gen/go/streammsg/v1" + "github.com/primevprotocol/mev-commit/pkg/p2p/libp2p" + "github.com/stretchr/testify/assert" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/types/known/structpb" +) + +type bufferStream struct { + mu sync.Mutex + buf *bytes.Buffer +} + +func newBufferStream() *bufferStream { + return &bufferStream{ + buf: bytes.NewBuffer(nil), + } +} + +func (bs *bufferStream) Read(b []byte) (n int, err error) { + bs.mu.Lock() + defer bs.mu.Unlock() + + return bs.buf.Read(b) +} + +func (bs *bufferStream) Write(b []byte) (n int, err error) { + bs.mu.Lock() + defer bs.mu.Unlock() + + return bs.buf.Write(b) +} + +func (bs *bufferStream) Close() error { + return nil +} + +func (bs *bufferStream) Reset() error { + bs.buf = bytes.NewBuffer(nil) + return nil +} + +func TestStream_ReadMsg_WriteMsg(t *testing.T) { + // Prepare a StreamMsg + msg := &streammsgv1.StreamMsg{ + Body: &streammsgv1.StreamMsg_Data{ + Data: []byte("test message"), + }, + } + + // Prepare a bufferStream + bs := newBufferStream() + + // Create a new stream + s := libp2p.NewStream(bs, nil, nil) + + // Prepare a context + ctx, cancel := context.WithTimeout(context.Background(), time.Second) + defer cancel() + + // Call WriteMsg + err := s.WriteMsg(ctx, msg) + + // Assert no error + assert.NoError(t, err) + + // Prepare a proto.Message to hold the result + result := &streammsgv1.StreamMsg{} + + // Call ReadMsg + err = s.ReadMsg(ctx, result) + + // Assert no error + assert.NoError(t, err) + + // Assert the message was correctly read + assert.Equal(t, msg.GetData(), result.GetData()) +} + +func TestStream_ReadMsg_WriteMsg_ContextCancellation(t *testing.T) { + // Prepare a StreamMsg + msg := &streammsgv1.StreamMsg{ + Body: &streammsgv1.StreamMsg_Data{ + Data: []byte("test message"), + }, + } + + // Prepare a bufferStream + bs := newBufferStream() + + // Create a new stream + s := libp2p.NewStream(bs, nil, nil) + + ctx, cancel := context.WithCancel(context.Background()) + cancel() + // Call WriteMsg + err := s.WriteMsg(ctx, msg) + + // Assert context cancellation error + assert.Error(t, err) + assert.Equal(t, context.Canceled, err) + + // Prepare a proto.Message to hold the result + result := &streammsgv1.StreamMsg{} + + // Call ReadMsg with a cancelled context + ctx, cancel = context.WithCancel(context.Background()) + cancel() + err = s.ReadMsg(ctx, result) + + // Assert context cancellation error + assert.Error(t, err) + assert.Equal(t, context.Canceled, err) +} + +func TestStream_ReadMsg_InvalidMessage(t *testing.T) { + // Prepare a bufferStream + bs := newBufferStream() + + // Create a new stream + s := libp2p.NewStream(bs, nil, nil) + + // Prepare a context with a timeout + ctx, cancel := context.WithTimeout(context.Background(), time.Second) + defer cancel() + + // Prepare a StreamMsg + msg := &streammsgv1.StreamMsg{ + Body: &streammsgv1.StreamMsg_Data{ + Data: []byte("test message"), + }, + } + err := s.WriteMsg(ctx, msg) + assert.NoError(t, err) + + // Prepare a different proto.Message to hold the result + result := &streammsgv1.Header{} + + // Call ReadMsg + err = s.ReadMsg(ctx, result) + + // Assert error + assert.Error(t, err) +} + +func TestMetadataStream_ReadHeader_WriteHeader(t *testing.T) { + // Prepare a Header + header := map[string]*structpb.Value{ + "test": structpb.NewStringValue("test"), + } + + // Prepare a bufferStream + bs := newBufferStream() + + // Create a new stream + s := libp2p.NewMetadataStream(bs) + + // Prepare a context + ctx, cancel := context.WithTimeout(context.Background(), time.Second) + defer cancel() + + // Call WriteHeader + err := s.WriteHeader(ctx, header) + + // Assert no error + assert.NoError(t, err) + + // Call ReadHeader + result, err := s.ReadHeader(ctx) + + // Assert no error + assert.NoError(t, err) + + val1 := header["test"].GetStringValue() + val2 := result["test"].GetStringValue() + + assert.Equal(t, val1, val2) +} + +func TestMetadataStream_ReadHeader_WriteHeader_ContextCancellation(t *testing.T) { + // Prepare a Header + header := map[string]*structpb.Value{ + "test": structpb.NewStringValue("test"), + } + + // Prepare a bufferStream + bs := newBufferStream() + + // Create a new stream + s := libp2p.NewMetadataStream(bs) + + ctx, cancel := context.WithCancel(context.Background()) + cancel() + // Call WriteHeader + err := s.WriteHeader(ctx, header) + + // Assert context cancellation error + assert.Error(t, err) + assert.Equal(t, context.Canceled, err) + + // Call ReadHeader with a cancelled context + ctx, cancel = context.WithCancel(context.Background()) + cancel() + _, err = s.ReadHeader(ctx) + + // Assert context cancellation error + assert.Error(t, err) + assert.Equal(t, context.Canceled, err) +} + +func TestMetadataStream_WriteError(t *testing.T) { + // Prepare a bufferStream + bs := newBufferStream() + + // Create a new stream + s := libp2p.NewMetadataStream(bs) + + // Prepare a context with a timeout + ctx, cancel := context.WithTimeout(context.Background(), time.Second) + defer cancel() + + // Prepare an error + err := s.WriteError(ctx, status.New(codes.Internal, "test error")) + assert.NoError(t, err) + + dataStream := libp2p.NewStream(bs, nil, nil) + err = dataStream.ReadMsg(ctx, &streammsgv1.StreamMsg{}) + assert.Error(t, err) + + assert.Equal(t, codes.Internal, status.Convert(err).Code()) + assert.Equal(t, "test error", status.Convert(err).Message()) +} From 9f08af2d0de1725fc4b21af9231d960994dc7f44 Mon Sep 17 00:00:00 2001 From: Alok Date: Tue, 19 Mar 2024 17:38:19 +0530 Subject: [PATCH 08/14] chore: go mod tidy after update --- go.mod | 6 ++---- go.sum | 4 ---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 74f3dc93..50b4e811 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,7 @@ go 1.21.1 require ( buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.32.0-20240221180331-f05a6f4403ce.1 + github.com/Masterminds/semver/v3 v3.2.1 github.com/bufbuild/protovalidate-go v0.6.0 github.com/ethereum/go-ethereum v1.13.14 github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 @@ -16,11 +17,11 @@ require ( github.com/prometheus/client_golang v1.18.0 github.com/stretchr/testify v1.8.4 github.com/urfave/cli/v2 v2.27.1 - github.com/vmihailenco/msgpack/v5 v5.4.1 golang.org/x/crypto v0.21.0 golang.org/x/sync v0.6.0 golang.org/x/time v0.5.0 google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe + google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe google.golang.org/grpc v1.62.1 google.golang.org/protobuf v1.33.0 gopkg.in/yaml.v2 v2.4.0 @@ -28,7 +29,6 @@ require ( require ( github.com/BurntSushi/toml v1.3.2 // indirect - github.com/Masterminds/semver/v3 v3.2.1 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/StackExchange/wmi v1.2.1 // indirect github.com/antlr4-go/antlr/v4 v4.13.0 // indirect @@ -118,7 +118,6 @@ require ( github.com/supranational/blst v0.3.11 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect - github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect go.uber.org/dig v1.17.0 // indirect go.uber.org/fx v1.20.0 // indirect @@ -131,7 +130,6 @@ require ( golang.org/x/text v0.14.0 // indirect golang.org/x/tools v0.17.0 // indirect google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe // indirect gopkg.in/yaml.v3 v3.0.1 // indirect lukechampine.com/blake3 v1.2.1 // indirect rsc.io/tmplfunc v0.0.3 // indirect diff --git a/go.sum b/go.sum index d9e1a54e..5d064133 100644 --- a/go.sum +++ b/go.sum @@ -432,10 +432,6 @@ github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho= github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU= github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM= -github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8= -github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok= -github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= -github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= From 9a1a36ed7edfea6be08ab2f48788a6e53b421ffb Mon Sep 17 00:00:00 2001 From: Alok Date: Thu, 21 Mar 2024 19:29:51 +0530 Subject: [PATCH 09/14] fix: matching protocols --- pkg/p2p/libp2p/libp2p.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkg/p2p/libp2p/libp2p.go b/pkg/p2p/libp2p/libp2p.go index 4d2da34c..198f7304 100644 --- a/pkg/p2p/libp2p/libp2p.go +++ b/pkg/p2p/libp2p/libp2p.go @@ -259,14 +259,22 @@ func (s *Service) Self() map[string]interface{} { } } -func matchProtocolIDWithSemver(protoID string, supportedVersion string) (bool, error) { +func matchProtocolIDWithSemver( + incomingProto string, + protoID string, + supportedVersion string) (bool, error) { // Extract the version part from the protocol ID. - parts := strings.Split(protoID, "/") + parts := strings.Split(incomingProto, "/") if len(parts) != 3 { return false, fmt.Errorf("invalid protocol ID: %s", protoID) } + protocolName := parts[1] protocolVersion := parts[2] + if protocolName != protoID { + return false, nil + } + // Parse the supported version and the protocol version. supportedSemver, err := semver.NewVersion(supportedVersion) if err != nil { @@ -288,7 +296,7 @@ func (s *Service) AddStreamHandlers(streams ...p2p.StreamDesc) { s.host.SetStreamHandlerMatch( protocol.ID(ss.Name), func(p protocol.ID) bool { - matched, err := matchProtocolIDWithSemver(string(p), ss.Version) + matched, err := matchProtocolIDWithSemver(string(p), ss.Name, ss.Version) if err != nil { s.logger.Error("matching protocol ID with semver", "err", err) } From 12aad0a3fe182f8fc3cf9b10e8962b435e3f5de0 Mon Sep 17 00:00:00 2001 From: Alok Date: Fri, 22 Mar 2024 02:40:41 +0530 Subject: [PATCH 10/14] fix: add more errors --- pkg/p2p/libp2p/internal/handshake/handshake.go | 2 +- pkg/preconfirmation/preconfirmation.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/p2p/libp2p/internal/handshake/handshake.go b/pkg/p2p/libp2p/internal/handshake/handshake.go index 98a1b77a..9e3dd77c 100644 --- a/pkg/p2p/libp2p/internal/handshake/handshake.go +++ b/pkg/p2p/libp2p/internal/handshake/handshake.go @@ -69,7 +69,7 @@ func New( } func ProtocolID() protocol.ID { - return protocol.ID(fmt.Sprintf("%s/%s", ProtocolName, ProtocolVersion)) + return protocol.ID(fmt.Sprintf("/%s/%s", ProtocolName, ProtocolVersion)) } type HandshakeReq struct { diff --git a/pkg/preconfirmation/preconfirmation.go b/pkg/preconfirmation/preconfirmation.go index 16b11512..eedc92e1 100644 --- a/pkg/preconfirmation/preconfirmation.go +++ b/pkg/preconfirmation/preconfirmation.go @@ -204,7 +204,7 @@ func (p *Preconfirmation) handleBid( if !p.us.CheckBidderAllowance(ctx, *ethAddress) { p.logger.Error("bidder does not have enough allowance", "ethAddress", ethAddress) - return status.Errorf(codes.PermissionDenied, "bidder not allowed") + return status.Errorf(codes.FailedPrecondition, "bidder not allowed") } bidAmt, _ := new(big.Int).SetString(bid.BidAmount, 10) @@ -220,14 +220,14 @@ func (p *Preconfirmation) handleBid( select { case <-ctx.Done(): return ctx.Err() - case status := <-statusC: - switch status { + case st := <-statusC: + switch st { case providerapiv1.BidResponse_STATUS_REJECTED: return errors.New("bid rejected") case providerapiv1.BidResponse_STATUS_ACCEPTED: preConfirmation, err := p.signer.ConstructPreConfirmation(bid) if err != nil { - return err + return status.Errorf(codes.Internal, "failed to construct preconfirmation: %v", err) } p.logger.Info("sending preconfirmation", "preConfirmation", preConfirmation) err = p.commitmentDA.StoreCommitment( @@ -242,7 +242,7 @@ func (p *Preconfirmation) handleBid( ) if err != nil { p.logger.Error("storing commitment", "error", err) - return err + return status.Errorf(codes.Internal, "failed to store commitment: %v", err) } return stream.WriteMsg(ctx, preConfirmation) } From 1c7048fe342c2b5efb034d22fa7c877983607762 Mon Sep 17 00:00:00 2001 From: Alok Date: Fri, 22 Mar 2024 03:33:01 +0530 Subject: [PATCH 11/14] fix: conflicts --- gen/go/bidderapi/v1/bidderapi.pb.go | 174 ++++++++++++------ .../preconfirmation/v1/preconfirmation.pb.go | 86 +++++---- gen/go/providerapi/v1/providerapi.pb.go | 52 +++++- .../preconfirmation/v1/preconfirmation.proto | 2 + pkg/preconfirmation/preconfirmation.go | 4 +- pkg/preconfirmation/preconfirmation_test.go | 22 +-- pkg/rpc/bidder/service_test.go | 4 +- pkg/rpc/provider/service.go | 4 +- pkg/rpc/provider/service_test.go | 24 +-- pkg/signer/preconfsigner/signer.go | 12 +- pkg/signer/preconfsigner/signer_test.go | 15 +- 11 files changed, 263 insertions(+), 136 deletions(-) diff --git a/gen/go/bidderapi/v1/bidderapi.pb.go b/gen/go/bidderapi/v1/bidderapi.pb.go index badc0a64..b4cc9573 100644 --- a/gen/go/bidderapi/v1/bidderapi.pb.go +++ b/gen/go/bidderapi/v1/bidderapi.pb.go @@ -160,9 +160,11 @@ type Bid struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - TxHashes []string `protobuf:"bytes,1,rep,name=tx_hashes,json=txHashes,proto3" json:"tx_hashes,omitempty"` - Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` - BlockNumber int64 `protobuf:"varint,3,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + TxHashes []string `protobuf:"bytes,1,rep,name=tx_hashes,json=txHashes,proto3" json:"tx_hashes,omitempty"` + Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` + BlockNumber int64 `protobuf:"varint,3,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + DecayStartTimestamp int64 `protobuf:"varint,4,opt,name=decay_start_timestamp,json=decayStartTimestamp,proto3" json:"decay_start_timestamp,omitempty"` + DecayEndTimestamp int64 `protobuf:"varint,5,opt,name=decay_end_timestamp,json=decayEndTimestamp,proto3" json:"decay_end_timestamp,omitempty"` } func (x *Bid) Reset() { @@ -218,6 +220,20 @@ func (x *Bid) GetBlockNumber() int64 { return 0 } +func (x *Bid) GetDecayStartTimestamp() int64 { + if x != nil { + return x.DecayStartTimestamp + } + return 0 +} + +func (x *Bid) GetDecayEndTimestamp() int64 { + if x != nil { + return x.DecayEndTimestamp + } + return 0 +} + type Commitment struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -231,6 +247,8 @@ type Commitment struct { CommitmentDigest string `protobuf:"bytes,6,opt,name=commitment_digest,json=commitmentDigest,proto3" json:"commitment_digest,omitempty"` CommitmentSignature string `protobuf:"bytes,7,opt,name=commitment_signature,json=commitmentSignature,proto3" json:"commitment_signature,omitempty"` ProviderAddress string `protobuf:"bytes,8,opt,name=provider_address,json=providerAddress,proto3" json:"provider_address,omitempty"` + DecayStartTimestamp int64 `protobuf:"varint,9,opt,name=decay_start_timestamp,json=decayStartTimestamp,proto3" json:"decay_start_timestamp,omitempty"` + DecayEndTimestamp int64 `protobuf:"varint,10,opt,name=decay_end_timestamp,json=decayEndTimestamp,proto3" json:"decay_end_timestamp,omitempty"` } func (x *Commitment) Reset() { @@ -321,6 +339,20 @@ func (x *Commitment) GetProviderAddress() string { return "" } +func (x *Commitment) GetDecayStartTimestamp() int64 { + if x != nil { + return x.DecayStartTimestamp + } + return 0 +} + +func (x *Commitment) GetDecayEndTimestamp() int64 { + if x != nil { + return x.DecayEndTimestamp + } + return 0 +} + var File_bidderapi_v1_bidderapi_proto protoreflect.FileDescriptor var file_bidderapi_v1_bidderapi_proto_rawDesc = []byte{ @@ -364,7 +396,7 @@ var file_bidderapi_v1_bidderapi_proto_rawDesc = []byte{ 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x20, 0x7d, 0x22, 0x0e, 0x0a, 0x0c, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xa2, - 0x08, 0x0a, 0x03, 0x42, 0x69, 0x64, 0x12, 0xa3, 0x02, 0x0a, 0x09, 0x74, 0x78, 0x5f, 0x68, 0x61, + 0x0b, 0x0a, 0x03, 0x42, 0x69, 0x64, 0x12, 0xa3, 0x02, 0x0a, 0x09, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x85, 0x02, 0x92, 0x41, 0x78, 0x32, 0x64, 0x48, 0x65, 0x78, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x68, 0x61, 0x73, @@ -409,7 +441,31 @@ var file_bidderapi_v1_bidderapi_proto_rawDesc = []byte{ 0x65, 0x72, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x2e, 0x1a, 0x0e, 0x75, 0x69, 0x6e, 0x74, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, 0x3e, 0x20, 0x30, 0x52, 0x0b, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x3a, 0xc8, 0x02, 0x92, 0x41, 0xc4, 0x02, 0x0a, + 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0xc2, 0x01, 0x0a, 0x15, 0x64, 0x65, 0x63, + 0x61, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x8d, 0x01, 0x92, 0x41, 0x2d, 0x32, 0x2b, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x61, 0x74, 0x20, 0x77, 0x68, 0x69, + 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x73, 0x20, 0x64, 0x65, 0x63, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x2e, 0xba, 0x48, 0x5a, 0xba, 0x01, + 0x57, 0x0a, 0x15, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2e, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, + 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, + 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x2e, 0x1a, 0x0e, 0x75, 0x69, 0x6e, 0x74, 0x28, 0x74, + 0x68, 0x69, 0x73, 0x29, 0x20, 0x3e, 0x20, 0x30, 0x52, 0x13, 0x64, 0x65, 0x63, 0x61, 0x79, 0x53, + 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0xb8, 0x01, + 0x0a, 0x13, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x42, 0x87, 0x01, 0x92, 0x41, + 0x2b, 0x32, 0x29, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x61, 0x74, 0x20, + 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x20, 0x65, 0x6e, + 0x64, 0x73, 0x20, 0x64, 0x65, 0x63, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x2e, 0xba, 0x48, 0x56, 0xba, + 0x01, 0x53, 0x0a, 0x13, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2c, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x65, + 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x6d, 0x75, 0x73, + 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x69, 0x6e, 0x74, + 0x65, 0x67, 0x65, 0x72, 0x2e, 0x1a, 0x0e, 0x75, 0x69, 0x6e, 0x74, 0x28, 0x74, 0x68, 0x69, 0x73, + 0x29, 0x20, 0x3e, 0x20, 0x30, 0x52, 0x11, 0x64, 0x65, 0x63, 0x61, 0x79, 0x45, 0x6e, 0x64, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x3a, 0xc8, 0x02, 0x92, 0x41, 0xc4, 0x02, 0x0a, 0x71, 0x2a, 0x0b, 0x42, 0x69, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x40, 0x55, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x69, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, @@ -430,7 +486,7 @@ var file_bidderapi_v1_bidderapi_proto_rawDesc = []byte{ 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x2c, 0x20, 0x22, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x3a, 0x20, 0x31, 0x32, 0x33, 0x34, - 0x35, 0x36, 0x7d, 0x22, 0xb1, 0x08, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, + 0x35, 0x36, 0x7d, 0x22, 0xf7, 0x09, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x95, 0x01, 0x0a, 0x09, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x78, 0x92, 0x41, 0x75, 0x32, 0x61, 0x48, 0x65, 0x78, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, @@ -497,54 +553,66 @@ var file_bidderapi_v1_bidderapi_proto_rawDesc = []byte{ 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x32, 0xae, 0x03, 0x0a, 0x06, 0x42, 0x69, 0x64, 0x64, - 0x65, 0x72, 0x12, 0x53, 0x0a, 0x07, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x69, 0x64, 0x12, 0x11, 0x2e, - 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x69, 0x64, - 0x1a, 0x18, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x69, 0x64, 0x64, 0x65, - 0x72, 0x2f, 0x62, 0x69, 0x64, 0x30, 0x01, 0x12, 0x70, 0x0a, 0x0f, 0x50, 0x72, 0x65, 0x70, 0x61, - 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x62, 0x69, 0x64, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x64, 0x0a, 0x15, 0x64, 0x65, 0x63, 0x61, 0x79, + 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x42, 0x30, 0x92, 0x41, 0x2d, 0x32, 0x2b, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x61, 0x74, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x20, 0x64, + 0x65, 0x63, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x2e, 0x52, 0x13, 0x64, 0x65, 0x63, 0x61, 0x79, 0x53, + 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x5e, 0x0a, + 0x13, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x42, 0x2e, 0x92, 0x41, 0x2b, 0x32, + 0x29, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x61, 0x74, 0x20, 0x77, 0x68, + 0x69, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x20, 0x65, 0x6e, 0x64, 0x73, + 0x20, 0x64, 0x65, 0x63, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x2e, 0x52, 0x11, 0x64, 0x65, 0x63, 0x61, + 0x79, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x32, 0xae, 0x03, + 0x0a, 0x06, 0x42, 0x69, 0x64, 0x64, 0x65, 0x72, 0x12, 0x53, 0x0a, 0x07, 0x53, 0x65, 0x6e, 0x64, + 0x42, 0x69, 0x64, 0x12, 0x11, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x42, 0x69, 0x64, 0x1a, 0x18, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, + 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x76, 0x31, + 0x2f, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x2f, 0x62, 0x69, 0x64, 0x30, 0x01, 0x12, 0x70, 0x0a, + 0x0f, 0x50, 0x72, 0x65, 0x70, 0x61, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, + 0x12, 0x1b, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x72, 0x65, 0x70, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, + 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, + 0x70, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x1c, 0x22, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x2f, + 0x70, 0x72, 0x65, 0x70, 0x61, 0x79, 0x2f, 0x7b, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x7d, 0x12, + 0x6a, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, + 0x1a, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x1c, 0x2e, 0x62, 0x69, + 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x70, 0x61, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1a, 0x12, 0x18, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x2f, 0x67, 0x65, + 0x74, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x71, 0x0a, 0x0f, 0x47, + 0x65, 0x74, 0x4d, 0x69, 0x6e, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1a, + 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x1c, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x22, 0x1a, 0x2f, - 0x76, 0x31, 0x2f, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x65, 0x70, 0x61, 0x79, - 0x2f, 0x7b, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x7d, 0x12, 0x6a, 0x0a, 0x0c, 0x47, 0x65, 0x74, - 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1a, 0x2e, 0x62, 0x69, 0x64, 0x64, - 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x1c, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x76, 0x31, - 0x2f, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, - 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x71, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x6e, 0x41, - 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1a, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, - 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x1a, 0x1c, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x76, 0x31, 0x2f, - 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x61, - 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x42, 0xb6, 0x02, 0x92, 0x41, 0x7a, 0x12, 0x78, - 0x0a, 0x0a, 0x42, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x41, 0x50, 0x49, 0x2a, 0x5d, 0x0a, 0x1b, - 0x42, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, - 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x31, 0x2e, 0x31, 0x12, 0x3e, 0x68, 0x74, 0x74, - 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x70, 0x72, 0x69, 0x6d, 0x65, 0x76, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x6d, - 0x65, 0x76, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, - 0x61, 0x69, 0x6e, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, 0x0b, 0x31, 0x2e, 0x30, - 0x2e, 0x30, 0x2d, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x69, - 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x42, 0x69, 0x64, 0x64, - 0x65, 0x72, 0x61, 0x70, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x65, 0x76, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x6d, 0x65, 0x76, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, - 0x76, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x42, 0x69, 0x64, 0x64, 0x65, - 0x72, 0x61, 0x70, 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x42, 0x69, 0x64, 0x64, 0x65, 0x72, - 0x61, 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x42, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, - 0x70, 0x69, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x0d, 0x42, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, + 0x12, 0x1c, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x74, + 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x42, 0xb6, + 0x02, 0x92, 0x41, 0x7a, 0x12, 0x78, 0x0a, 0x0a, 0x42, 0x69, 0x64, 0x64, 0x65, 0x72, 0x20, 0x41, + 0x50, 0x49, 0x2a, 0x5d, 0x0a, 0x1b, 0x42, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x20, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x31, 0x2e, + 0x31, 0x12, 0x3e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x65, 0x76, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x6d, 0x65, 0x76, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x2f, + 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x69, 0x6e, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, + 0x45, 0x32, 0x0b, 0x31, 0x2e, 0x30, 0x2e, 0x30, 0x2d, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x0a, 0x10, + 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x42, 0x0e, 0x42, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, + 0x72, 0x69, 0x6d, 0x65, 0x76, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x6d, 0x65, + 0x76, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, + 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x62, 0x69, 0x64, + 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x58, 0x58, 0xaa, 0x02, + 0x0c, 0x42, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, + 0x42, 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x42, + 0x69, 0x64, 0x64, 0x65, 0x72, 0x61, 0x70, 0x69, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x42, 0x69, 0x64, 0x64, 0x65, 0x72, + 0x61, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/gen/go/preconfirmation/v1/preconfirmation.pb.go b/gen/go/preconfirmation/v1/preconfirmation.pb.go index 2696dbea..2fc47e87 100644 --- a/gen/go/preconfirmation/v1/preconfirmation.pb.go +++ b/gen/go/preconfirmation/v1/preconfirmation.pb.go @@ -25,11 +25,13 @@ type Bid struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - TxHash string `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` - BidAmount string `protobuf:"bytes,2,opt,name=bid_amount,json=bidAmount,proto3" json:"bid_amount,omitempty"` - BlockNumber int64 `protobuf:"varint,3,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` - Digest []byte `protobuf:"bytes,4,opt,name=digest,proto3" json:"digest,omitempty"` - Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"` + TxHash string `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + BidAmount string `protobuf:"bytes,2,opt,name=bid_amount,json=bidAmount,proto3" json:"bid_amount,omitempty"` + BlockNumber int64 `protobuf:"varint,3,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + Digest []byte `protobuf:"bytes,4,opt,name=digest,proto3" json:"digest,omitempty"` + Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"` + DecayStartTimestamp int64 `protobuf:"varint,6,opt,name=decay_start_timestamp,json=decayStartTimestamp,proto3" json:"decay_start_timestamp,omitempty"` + DecayEndTimestamp int64 `protobuf:"varint,7,opt,name=decay_end_timestamp,json=decayEndTimestamp,proto3" json:"decay_end_timestamp,omitempty"` } func (x *Bid) Reset() { @@ -99,6 +101,20 @@ func (x *Bid) GetSignature() []byte { return nil } +func (x *Bid) GetDecayStartTimestamp() int64 { + if x != nil { + return x.DecayStartTimestamp + } + return 0 +} + +func (x *Bid) GetDecayEndTimestamp() int64 { + if x != nil { + return x.DecayEndTimestamp + } + return 0 +} + type PreConfirmation struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -176,7 +192,7 @@ var file_preconfirmation_v1_preconfirmation_proto_rawDesc = []byte{ 0x0a, 0x28, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x70, 0x72, 0x65, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x22, 0x96, + 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x22, 0xfa, 0x01, 0x0a, 0x03, 0x42, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x69, 0x64, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, @@ -186,32 +202,38 @@ var file_preconfirmation_v1_preconfirmation_proto_rawDesc = []byte{ 0x72, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x9d, 0x01, 0x0a, 0x0f, 0x50, 0x72, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x03, 0x62, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x65, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x69, - 0x64, 0x52, 0x03, 0x62, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x1c, - 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x29, 0x0a, 0x10, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0xe9, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, - 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x76, 0x31, 0x42, 0x14, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x50, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x65, 0x76, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x6d, 0x65, 0x76, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, - 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x72, 0x65, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x50, - 0x58, 0x58, 0xaa, 0x02, 0x12, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x50, - 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, - 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x64, 0x65, 0x63, 0x61, 0x79, + 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x64, 0x65, 0x63, 0x61, 0x79, 0x53, 0x74, 0x61, + 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2e, 0x0a, 0x13, 0x64, + 0x65, 0x63, 0x61, 0x79, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x64, 0x65, 0x63, 0x61, 0x79, 0x45, + 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x9d, 0x01, 0x0a, 0x0f, + 0x50, 0x72, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x29, 0x0a, 0x03, 0x62, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, + 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x42, 0x69, 0x64, 0x52, 0x03, 0x62, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, + 0x67, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, + 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0xe9, 0x01, 0x0a, 0x16, + 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x14, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x50, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x65, + 0x76, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x6d, 0x65, 0x76, 0x2d, 0x63, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x65, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x70, + 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x50, 0x58, 0x58, 0xaa, 0x02, 0x12, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x50, 0x72, + 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x1e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x13, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/gen/go/providerapi/v1/providerapi.pb.go b/gen/go/providerapi/v1/providerapi.pb.go index 1824f790..3d4d89d0 100644 --- a/gen/go/providerapi/v1/providerapi.pb.go +++ b/gen/go/providerapi/v1/providerapi.pb.go @@ -209,10 +209,12 @@ type Bid struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - TxHashes []string `protobuf:"bytes,1,rep,name=tx_hashes,json=txHashes,proto3" json:"tx_hashes,omitempty"` - BidAmount string `protobuf:"bytes,2,opt,name=bid_amount,json=bidAmount,proto3" json:"bid_amount,omitempty"` - BlockNumber int64 `protobuf:"varint,3,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` - BidDigest []byte `protobuf:"bytes,4,opt,name=bid_digest,json=bidDigest,proto3" json:"bid_digest,omitempty"` + TxHashes []string `protobuf:"bytes,1,rep,name=tx_hashes,json=txHashes,proto3" json:"tx_hashes,omitempty"` + BidAmount string `protobuf:"bytes,2,opt,name=bid_amount,json=bidAmount,proto3" json:"bid_amount,omitempty"` + BlockNumber int64 `protobuf:"varint,3,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + BidDigest []byte `protobuf:"bytes,4,opt,name=bid_digest,json=bidDigest,proto3" json:"bid_digest,omitempty"` + DecayStartTimestamp int64 `protobuf:"varint,5,opt,name=decay_start_timestamp,json=decayStartTimestamp,proto3" json:"decay_start_timestamp,omitempty"` + DecayEndTimestamp int64 `protobuf:"varint,6,opt,name=decay_end_timestamp,json=decayEndTimestamp,proto3" json:"decay_end_timestamp,omitempty"` } func (x *Bid) Reset() { @@ -275,6 +277,20 @@ func (x *Bid) GetBidDigest() []byte { return nil } +func (x *Bid) GetDecayStartTimestamp() int64 { + if x != nil { + return x.DecayStartTimestamp + } + return 0 +} + +func (x *Bid) GetDecayEndTimestamp() int64 { + if x != nil { + return x.DecayEndTimestamp + } + return 0 +} + type BidResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -578,7 +594,7 @@ var file_providerapi_v1_providerapi_proto_rawDesc = []byte{ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x32, 0x22, 0x7b, 0x22, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x20, 0x7d, 0x22, 0x0e, 0x0a, 0x0c, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xb1, 0x09, 0x0a, 0x03, 0x42, 0x69, + 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xb1, 0x0c, 0x0a, 0x03, 0x42, 0x69, 0x64, 0x12, 0xa3, 0x02, 0x0a, 0x09, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x85, 0x02, 0x92, 0x41, 0x78, 0x32, 0x64, 0x48, 0x65, 0x78, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, @@ -626,7 +642,31 @@ var file_providerapi_v1_providerapi_proto_rawDesc = []byte{ 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, 0x2e, 0xba, 0x48, 0x06, 0x7a, 0x04, 0x10, 0x01, 0x18, 0x40, 0x52, - 0x09, 0x62, 0x69, 0x64, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x3a, 0xb0, 0x03, 0x92, 0x41, 0xac, + 0x09, 0x62, 0x69, 0x64, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0xc2, 0x01, 0x0a, 0x15, 0x64, + 0x65, 0x63, 0x61, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x42, 0x8d, 0x01, 0x92, 0x41, 0x2d, + 0x32, 0x2b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x61, 0x74, 0x20, 0x77, + 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x20, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x73, 0x20, 0x64, 0x65, 0x63, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x2e, 0xba, 0x48, 0x5a, + 0xba, 0x01, 0x57, 0x0a, 0x15, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2e, 0x64, 0x65, 0x63, 0x61, + 0x79, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x2e, 0x1a, 0x0e, 0x75, 0x69, 0x6e, 0x74, + 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, 0x3e, 0x20, 0x30, 0x52, 0x13, 0x64, 0x65, 0x63, 0x61, + 0x79, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, + 0xb8, 0x01, 0x0a, 0x13, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x42, 0x87, 0x01, + 0x92, 0x41, 0x2b, 0x32, 0x29, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x61, + 0x74, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x64, 0x20, + 0x65, 0x6e, 0x64, 0x73, 0x20, 0x64, 0x65, 0x63, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x2e, 0xba, 0x48, + 0x56, 0xba, 0x01, 0x53, 0x0a, 0x13, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x65, 0x6e, 0x64, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2c, 0x64, 0x65, 0x63, 0x61, 0x79, + 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x6d, + 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x69, + 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x2e, 0x1a, 0x0e, 0x75, 0x69, 0x6e, 0x74, 0x28, 0x74, 0x68, + 0x69, 0x73, 0x29, 0x20, 0x3e, 0x20, 0x30, 0x52, 0x11, 0x64, 0x65, 0x63, 0x61, 0x79, 0x45, 0x6e, + 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x3a, 0xb0, 0x03, 0x92, 0x41, 0xac, 0x03, 0x0a, 0x70, 0x2a, 0x0b, 0x42, 0x69, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x30, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x69, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x62, 0x69, 0x64, 0x64, 0x65, 0x72, diff --git a/messages/preconfirmation/v1/preconfirmation.proto b/messages/preconfirmation/v1/preconfirmation.proto index 4fbcb820..4c82f050 100644 --- a/messages/preconfirmation/v1/preconfirmation.proto +++ b/messages/preconfirmation/v1/preconfirmation.proto @@ -8,6 +8,8 @@ message Bid { int64 block_number = 3; bytes digest = 4; bytes signature = 5; + int64 decay_start_timestamp = 6; + int64 decay_end_timestamp = 7; }; message PreConfirmation { diff --git a/pkg/preconfirmation/preconfirmation.go b/pkg/preconfirmation/preconfirmation.go index eedc92e1..f57c1a22 100644 --- a/pkg/preconfirmation/preconfirmation.go +++ b/pkg/preconfirmation/preconfirmation.go @@ -235,8 +235,8 @@ func (p *Preconfirmation) handleBid( bidAmt, uint64(preConfirmation.Bid.BlockNumber), preConfirmation.Bid.TxHash, - uint64(preConfirmation.Bid.DecayStartTimeStamp), - uint64(preConfirmation.Bid.DecayEndTimeStamp), + uint64(preConfirmation.Bid.DecayStartTimestamp), + uint64(preConfirmation.Bid.DecayEndTimestamp), preConfirmation.Bid.Signature, preConfirmation.Signature, ) diff --git a/pkg/preconfirmation/preconfirmation_test.go b/pkg/preconfirmation/preconfirmation_test.go index 88326e88..81a77740 100644 --- a/pkg/preconfirmation/preconfirmation_test.go +++ b/pkg/preconfirmation/preconfirmation_test.go @@ -39,11 +39,7 @@ type testSigner struct { preConfirmationSigner common.Address } -<<<<<<< HEAD -func (t *testSigner) ConstructSignedBid(_ string, _ *big.Int, _ *big.Int, _ *big.Int, _ *big.Int) (*preconfsigner.Bid, error) { -======= -func (t *testSigner) ConstructSignedBid(_ string, _ string, _ int64) (*preconfpb.Bid, error) { ->>>>>>> d4e267e (feat: integrate new libp2p messages) +func (t *testSigner) ConstructSignedBid(_ string, _ string, _ int64, _ int64, _ int64) (*preconfpb.Bid, error) { return t.bid, nil } @@ -114,13 +110,13 @@ func TestPreconfBidSubmission(t *testing.T) { } bid := &preconfpb.Bid{ - TxHash: "test", - BidAmount: "10", - BlockNumber: 10, - DecayStartTimeStamp: time.Now().UnixMilli() - 10000*time.Millisecond.Milliseconds(), - DecayEndTimeStamp: time.Now().UnixMilli(), - Digest: []byte("test"), - Signature: []byte("test"), + TxHash: "test", + BidAmount: "10", + BlockNumber: 10, + DecayStartTimestamp: time.Now().UnixMilli() - 10000*time.Millisecond.Milliseconds(), + DecayEndTimestamp: time.Now().UnixMilli(), + Digest: []byte("test"), + Signature: []byte("test"), } preConfirmation := &preconfpb.PreConfirmation{ @@ -157,7 +153,7 @@ func TestPreconfBidSubmission(t *testing.T) { svc.SetPeerHandler(server, p.Streams()[0]) - respC, err := p.SendBid(context.Background(), bid.TxHash, bid.BidAmt, bid.BlockNumber, bid.DecayStartTimeStamp, bid.DecayEndTimeStamp) + respC, err := p.SendBid(context.Background(), bid.TxHash, bid.BidAmount, bid.BlockNumber, bid.DecayStartTimestamp, bid.DecayEndTimestamp) if err != nil { t.Fatal(err) } diff --git a/pkg/rpc/bidder/service_test.go b/pkg/rpc/bidder/service_test.go index 97a2a054..9fed9da1 100644 --- a/pkg/rpc/bidder/service_test.go +++ b/pkg/rpc/bidder/service_test.go @@ -58,8 +58,8 @@ func (s *testSender) SendBid( TxHash: txHex, BidAmount: amount, BlockNumber: blockNum, - DecayStartTimeStamp: decayStartTimestamp, - DecayEndTimeStamp: decayEndTimestamp, + DecayStartTimestamp: decayStartTimestamp, + DecayEndTimestamp: decayEndTimestamp, Digest: []byte("digest"), Signature: []byte("signature"), }, diff --git a/pkg/rpc/provider/service.go b/pkg/rpc/provider/service.go index 53924495..ce94817a 100644 --- a/pkg/rpc/provider/service.go +++ b/pkg/rpc/provider/service.go @@ -73,8 +73,8 @@ func (s *Service) ProcessBid( BidAmount: bid.BidAmount, BlockNumber: bid.BlockNumber, BidDigest: bid.Digest, - DecayStartTimestamp: bid.DecayStartTimeStamp, - DecayEndTimestamp: bid.DecayEndTimeStamp, + DecayStartTimestamp: bid.DecayStartTimestamp, + DecayEndTimestamp: bid.DecayEndTimestamp, } err := s.validator.Validate(bidMsg) diff --git a/pkg/rpc/provider/service_test.go b/pkg/rpc/provider/service_test.go index ef09db5b..4866ac9d 100644 --- a/pkg/rpc/provider/service_test.go +++ b/pkg/rpc/provider/service_test.go @@ -201,8 +201,8 @@ func TestBidHandling(t *testing.T) { BlockNumber: 1, Digest: []byte("digest"), Signature: []byte("signature"), - DecayStartTimeStamp: 199, - DecayEndTimeStamp: 299, + DecayStartTimestamp: 199, + DecayEndTimestamp: 299, }, status: providerapiv1.BidResponse_STATUS_ACCEPTED, }, @@ -214,8 +214,8 @@ func TestBidHandling(t *testing.T) { BlockNumber: 1, Digest: []byte("digest"), Signature: []byte("signature"), - DecayStartTimeStamp: 199, - DecayEndTimeStamp: 299, + DecayStartTimestamp: 199, + DecayEndTimestamp: 299, }, status: providerapiv1.BidResponse_STATUS_REJECTED, }, @@ -227,8 +227,8 @@ func TestBidHandling(t *testing.T) { BlockNumber: 1, Digest: []byte("digest"), Signature: []byte("signature"), - DecayStartTimeStamp: 199, - DecayEndTimeStamp: 299, + DecayStartTimestamp: 199, + DecayEndTimestamp: 299, }, status: providerapiv1.BidResponse_STATUS_UNSPECIFIED, noStatus: true, @@ -241,8 +241,8 @@ func TestBidHandling(t *testing.T) { BlockNumber: 1, Digest: []byte("digest"), Signature: []byte("signature"), - DecayStartTimeStamp: 199, - DecayEndTimeStamp: 299, + DecayStartTimestamp: 199, + DecayEndTimestamp: 299, }, processErr: "tx_hashes: tx_hashes must be a valid array of transaction hashes", }, @@ -254,8 +254,8 @@ func TestBidHandling(t *testing.T) { BlockNumber: 1, Digest: []byte("digest"), Signature: []byte("signature"), - DecayStartTimeStamp: 199, - DecayEndTimeStamp: 299, + DecayStartTimestamp: 199, + DecayEndTimestamp: 299, }, processErr: "bid_amount: bid_amount must be a valid integer", }, @@ -267,8 +267,8 @@ func TestBidHandling(t *testing.T) { BlockNumber: 0, Digest: []byte("digest"), Signature: []byte("signature"), - DecayStartTimeStamp: 199, - DecayEndTimeStamp: 299, + DecayStartTimestamp: 199, + DecayEndTimestamp: 299, }, processErr: "block_number: value must be greater than 0", }, diff --git a/pkg/signer/preconfsigner/signer.go b/pkg/signer/preconfsigner/signer.go index 320fd7e9..a5e0b2f2 100644 --- a/pkg/signer/preconfsigner/signer.go +++ b/pkg/signer/preconfsigner/signer.go @@ -53,8 +53,8 @@ func (p *privateKeySigner) ConstructSignedBid( BidAmount: bidAmt, TxHash: txHash, BlockNumber: blockNumber, - DecayStartTimeStamp: decayStartTimeStamp, - DecayEndTimeStamp: decayEndTimeStamp, + DecayStartTimestamp: decayStartTimeStamp, + DecayEndTimestamp: decayEndTimeStamp, } bidHash, err := GetBidHash(bid) @@ -211,8 +211,8 @@ func GetBidHash(bid *preconfpb.Bid) ([]byte, error) { data := append(eip712MessageTypeHash.Bytes(), txnHashHash.Bytes()...) data = append(data, math.U256Bytes(bidAmt)...) data = append(data, math.U256Bytes(big.NewInt(bid.BlockNumber))...) - data = append(data, math.U256Bytes(big.NewInt(bid.DecayStartTimeStamp))...) - data = append(data, math.U256Bytes(big.NewInt(bid.DecayEndTimeStamp))...) + data = append(data, math.U256Bytes(big.NewInt(bid.DecayStartTimestamp))...) + data = append(data, math.U256Bytes(big.NewInt(bid.DecayEndTimestamp))...) dataHash := crypto.Keccak256Hash(data) rawData := append([]byte("\x19\x01"), append(domainSeparatorBid.Bytes(), dataHash.Bytes()...)...) @@ -254,8 +254,8 @@ func GetPreConfirmationHash(c *preconfpb.PreConfirmation) ([]byte, error) { data := append(eip712MessageTypeHash.Bytes(), txnHashHash.Bytes()...) data = append(data, math.U256Bytes(bidAmt)...) data = append(data, math.U256Bytes(big.NewInt(c.Bid.BlockNumber))...) - data = append(data, math.U256Bytes(big.NewInt(c.Bid.DecayStartTimeStamp))...) - data = append(data, math.U256Bytes(big.NewInt(c.Bid.DecayEndTimeStamp))...) + data = append(data, math.U256Bytes(big.NewInt(c.Bid.DecayStartTimestamp))...) + data = append(data, math.U256Bytes(big.NewInt(c.Bid.DecayEndTimestamp))...) data = append(data, bidDigestHash.Bytes()...) data = append(data, bidSigHash.Bytes()...) dataHash := crypto.Keccak256Hash(data) diff --git a/pkg/signer/preconfsigner/signer_test.go b/pkg/signer/preconfsigner/signer_test.go index c0455588..79efb4d1 100644 --- a/pkg/signer/preconfsigner/signer_test.go +++ b/pkg/signer/preconfsigner/signer_test.go @@ -2,7 +2,6 @@ package preconfsigner_test import ( "encoding/hex" - "math/big" "testing" "time" @@ -89,10 +88,10 @@ func TestHashing(t *testing.T) { t.Run("bid", func(t *testing.T) { bid := &preconfpb.Bid{ TxHash: "0xkartik", - BidAmount: "2", - BlockNumber: 2, - DecayStartTimeStamp: 10, - DecayEndTimeStamp: 30, + BidAmount: "200", + BlockNumber: 3000, + DecayStartTimestamp: 10, + DecayEndTimestamp: 30, } hash, err := preconfsigner.GetBidHash(bid) @@ -125,8 +124,8 @@ func TestHashing(t *testing.T) { TxHash: "0xkartik", BidAmount: "2", BlockNumber: 2, - DecayStartTimeStamp: 10, - DecayEndTimeStamp: 20, + DecayStartTimestamp: 10, + DecayEndTimestamp: 20, Digest: bidHashBytes, Signature: bidSigBytes, } @@ -158,7 +157,7 @@ func TestSignature(t *testing.T) { keySigner := mockkeysigner.NewMockKeySigner(pkey, crypto.PubkeyToAddress(pkey.PublicKey)) bidder := preconfsigner.NewSigner(keySigner) - bid, err := bidder.ConstructSignedBid("0xkartik", big.NewInt(2), big.NewInt(2), big.NewInt(10), big.NewInt(20)) + bid, err := bidder.ConstructSignedBid("0xkartik", "2", 2, 10, 20) if err != nil { t.Fatal(err) } From f265d16a1a3c3c654530d7e5bf1d83b8ec8e946d Mon Sep 17 00:00:00 2001 From: Alok Date: Fri, 22 Mar 2024 03:38:02 +0530 Subject: [PATCH 12/14] fix: conflicts --- pkg/rpc/bidder/service.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/rpc/bidder/service.go b/pkg/rpc/bidder/service.go index b251c3ee..9642d88d 100644 --- a/pkg/rpc/bidder/service.go +++ b/pkg/rpc/bidder/service.go @@ -90,6 +90,8 @@ func (s *Service) SendBid( CommitmentDigest: hex.EncodeToString(resp.Digest), CommitmentSignature: hex.EncodeToString(resp.Signature), ProviderAddress: common.Bytes2Hex(resp.ProviderAddress), + DecayStartTimestamp: b.DecayStartTimestamp, + DecayEndTimestamp: b.DecayEndTimestamp, }) if err != nil { s.logger.Error("sending preConfirmation", "error", err) From f69627dbcb2b3ee0447ac5e52c5edbe15f090a17 Mon Sep 17 00:00:00 2001 From: Alok Date: Fri, 22 Mar 2024 03:53:10 +0530 Subject: [PATCH 13/14] temp: changes for integration teseet --- integrationtest/.env | 6 +++--- integrationtest/provider/main.go | 2 +- mev-commit-cli.sh | 7 ++++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/integrationtest/.env b/integrationtest/.env index 9dcd01d3..65303591 100644 --- a/integrationtest/.env +++ b/integrationtest/.env @@ -1,6 +1,6 @@ -BIDDER_REGISTRY=0x5340b92E261141D6B4D0DC6F847667E5e4A63544 -PROVIDER_REGISTRY=0xeA73E67c2E34C4E02A2f3c5D416F59B76e7617fC -PRECONF_CONTRACT=0x451656c1E7eDf82397EBE04f38819c9970AA3658 +BIDDER_REGISTRY=0x02CcEcB19c6D7EFe583C8b97022cB4b4C0B65608 +PROVIDER_REGISTRY=0x070cE6161AD79a3BC7aEa222FdfC6AD171Ca83F3 +PRECONF_CONTRACT=0x4DfF34f74aE5C48a5050eb54e7cEDAb9DEF03715 RPC_URL=http://sl-bootnode:8545 PRIVATE_KEY=ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 L1_RPC_URL=https://sepolia.infura.io/v3/09eaedaa8dda43bc89e0ccd9c6991c51 diff --git a/integrationtest/provider/main.go b/integrationtest/provider/main.go index 6da37557..a6250431 100644 --- a/integrationtest/provider/main.go +++ b/integrationtest/provider/main.go @@ -55,7 +55,7 @@ var ( ) errorProbability = flag.Int( errorProbabilityFlagName, - 0, + 20, "The probability of returning an error when sending a bid response", ) ) diff --git a/mev-commit-cli.sh b/mev-commit-cli.sh index 962bc42e..00e60158 100755 --- a/mev-commit-cli.sh +++ b/mev-commit-cli.sh @@ -148,9 +148,10 @@ start_mev_commit_e2e() { # Create or overwrite the .env file cat > "$MEV_COMMIT_PATH/integrationtest/.env" < Date: Fri, 22 Mar 2024 04:20:53 +0530 Subject: [PATCH 14/14] fix: internal error --- pkg/preconfirmation/preconfirmation.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/preconfirmation/preconfirmation.go b/pkg/preconfirmation/preconfirmation.go index f57c1a22..c68d1a8b 100644 --- a/pkg/preconfirmation/preconfirmation.go +++ b/pkg/preconfirmation/preconfirmation.go @@ -223,7 +223,7 @@ func (p *Preconfirmation) handleBid( case st := <-statusC: switch st { case providerapiv1.BidResponse_STATUS_REJECTED: - return errors.New("bid rejected") + return status.Errorf(codes.Internal, "bid rejected") case providerapiv1.BidResponse_STATUS_ACCEPTED: preConfirmation, err := p.signer.ConstructPreConfirmation(bid) if err != nil {