diff --git a/pkg/loop/internal/chain_reader.go b/pkg/loop/internal/chain_reader.go index fc0ce32c82..13bb0e6d9e 100644 --- a/pkg/loop/internal/chain_reader.go +++ b/pkg/loop/internal/chain_reader.go @@ -143,6 +143,24 @@ func (c *chainReaderClient) Decode(ctx context.Context, raw []byte, into any, it return decodeVersionedBytes(into, resp.RetVal) } +func (c *chainReaderClient) GetMaxEncodingSize(ctx context.Context, n int, itemType string) (int, error) { + res, err := c.grpc.GetMaxSize(ctx, &pb.GetMaxSizeRequest{N: int32(n), ItemType: itemType, ForEncoding: true}) + if err != nil { + return 0, unwrapClientError(err) + } + + return int(res.SizeInBytes), nil +} + +func (c *chainReaderClient) GetMaxDecodingSize(ctx context.Context, n int, itemType string) (int, error) { + res, err := c.grpc.GetMaxSize(ctx, &pb.GetMaxSizeRequest{N: int32(n), ItemType: itemType, ForEncoding: false}) + if err != nil { + return 0, unwrapClientError(err) + } + + return int(res.SizeInBytes), nil +} + var _ pb.ChainReaderServer = (*chainReaderServer)(nil) type chainReaderServer struct { @@ -216,6 +234,21 @@ func (c *chainReaderServer) GetDecoding(ctx context.Context, req *pb.GetDecoding return &pb.GetDecodingResponse{RetVal: versionBytes}, err } +func (c *chainReaderServer) GetMaxSize(ctx context.Context, req *pb.GetMaxSizeRequest) (*pb.GetMaxSizeResponse, error) { + var sizeFn func(context.Context, int, string) (int, error) + if req.ForEncoding { + sizeFn = c.impl.GetMaxEncodingSize + } else { + sizeFn = c.impl.GetMaxDecodingSize + } + + maxSize, err := sizeFn(ctx, int(req.N), req.ItemType) + if err != nil { + return nil, err + } + return &pb.GetMaxSizeResponse{SizeInBytes: int32(maxSize)}, nil +} + func (c *chainReaderServer) RegisterEventFilter(ctx context.Context, in *pb.RegisterEventFilterRequest) (*pb.RegisterEventFilterReply, error) { return nil, nil } diff --git a/pkg/loop/internal/chain_reader_test.go b/pkg/loop/internal/chain_reader_test.go index 4ebc34e258..61b0903aa4 100644 --- a/pkg/loop/internal/chain_reader_test.go +++ b/pkg/loop/internal/chain_reader_test.go @@ -1,6 +1,7 @@ package internal import ( + "context" "errors" "net" "sync" @@ -13,8 +14,6 @@ import ( "github.com/smartcontractkit/chainlink-relay/pkg/loop/internal/pb" - "context" - "github.com/fxamacker/cbor/v2" "github.com/mitchellh/mapstructure" ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" @@ -104,6 +103,16 @@ func TestChainReaderClient(t *testing.T) { err := client.GetLatestValue(ctx, types.BoundContract{}, "method", "anything", "anything") assert.IsType(t, errorType, err) }) + + t.Run("GetMaxEncodingSize unwraps errors from server "+errorType.Error(), func(t *testing.T) { + _, err := client.GetMaxEncodingSize(ctx, 1, "anything") + assert.IsType(t, errorType, err) + }) + + t.Run("GetMaxEncodingSize unwraps errors from server "+errorType.Error(), func(t *testing.T) { + _, err := client.GetMaxDecodingSize(ctx, 1, "anything") + assert.IsType(t, errorType, err) + }) } // make sure that errors come from client directly @@ -204,6 +213,18 @@ type fakeCodecServer struct { lock *sync.Mutex } +func (f *fakeCodecServer) GetMaxDecodingSize(ctx context.Context, n int, itemType string) (int, error) { + return f.GetMaxEncodingSize(ctx, n, itemType) +} + +func (f *fakeCodecServer) GetMaxEncodingSize(ctx context.Context, n int, itemType string) (int, error) { + switch itemType { + case TestItemType, TestItemSliceType, TestItemArray2Type, TestItemArray1Type: + return 1, nil + } + return 0, types.InvalidTypeError{} +} + func (f *fakeCodecServer) SetLatestValue(ts *TestStruct) { f.lock.Lock() defer f.lock.Unlock() @@ -275,6 +296,10 @@ func (e *errorServer) GetDecoding(context.Context, *pb.GetDecodingRequest) (*pb. return nil, e.err } +func (e *errorServer) GetMaxSize(context.Context, *pb.GetMaxSizeRequest) (*pb.GetMaxSizeResponse, error) { + return nil, e.err +} + func connFromLis(t *testing.T, lis *bufconn.Listener) *grpc.ClientConn { conn, err := grpc.Dial("bufnet", grpc.WithContextDialer(func(context.Context, string) (net.Conn, error) { return lis.Dial() }), diff --git a/pkg/loop/internal/pb/relayer.pb.go b/pkg/loop/internal/pb/relayer.pb.go index 1e0d6b96d9..07400b6785 100644 --- a/pkg/loop/internal/pb/relayer.pb.go +++ b/pkg/loop/internal/pb/relayer.pb.go @@ -2146,240 +2146,6 @@ func (x *FromAccountReply) GetAccount() string { return "" } -// TODO -type RegisterEventFilterRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RegisterEventFilterRequest) Reset() { - *x = RegisterEventFilterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_relayer_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RegisterEventFilterRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RegisterEventFilterRequest) ProtoMessage() {} - -func (x *RegisterEventFilterRequest) ProtoReflect() protoreflect.Message { - mi := &file_relayer_proto_msgTypes[40] - 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 RegisterEventFilterRequest.ProtoReflect.Descriptor instead. -func (*RegisterEventFilterRequest) Descriptor() ([]byte, []int) { - return file_relayer_proto_rawDescGZIP(), []int{40} -} - -// TODO -type RegisterEventFilterReply struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RegisterEventFilterReply) Reset() { - *x = RegisterEventFilterReply{} - if protoimpl.UnsafeEnabled { - mi := &file_relayer_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RegisterEventFilterReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RegisterEventFilterReply) ProtoMessage() {} - -func (x *RegisterEventFilterReply) ProtoReflect() protoreflect.Message { - mi := &file_relayer_proto_msgTypes[41] - 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 RegisterEventFilterReply.ProtoReflect.Descriptor instead. -func (*RegisterEventFilterReply) Descriptor() ([]byte, []int) { - return file_relayer_proto_rawDescGZIP(), []int{41} -} - -// TODO -type UnregisterEventFilterRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *UnregisterEventFilterRequest) Reset() { - *x = UnregisterEventFilterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_relayer_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UnregisterEventFilterRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UnregisterEventFilterRequest) ProtoMessage() {} - -func (x *UnregisterEventFilterRequest) ProtoReflect() protoreflect.Message { - mi := &file_relayer_proto_msgTypes[42] - 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 UnregisterEventFilterRequest.ProtoReflect.Descriptor instead. -func (*UnregisterEventFilterRequest) Descriptor() ([]byte, []int) { - return file_relayer_proto_rawDescGZIP(), []int{42} -} - -// TODO -type UnregisterEventFilterReply struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *UnregisterEventFilterReply) Reset() { - *x = UnregisterEventFilterReply{} - if protoimpl.UnsafeEnabled { - mi := &file_relayer_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UnregisterEventFilterReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UnregisterEventFilterReply) ProtoMessage() {} - -func (x *UnregisterEventFilterReply) ProtoReflect() protoreflect.Message { - mi := &file_relayer_proto_msgTypes[43] - 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 UnregisterEventFilterReply.ProtoReflect.Descriptor instead. -func (*UnregisterEventFilterReply) Descriptor() ([]byte, []int) { - return file_relayer_proto_rawDescGZIP(), []int{43} -} - -// TODO -type QueryEventsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryEventsRequest) Reset() { - *x = QueryEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_relayer_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryEventsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryEventsRequest) ProtoMessage() {} - -func (x *QueryEventsRequest) ProtoReflect() protoreflect.Message { - mi := &file_relayer_proto_msgTypes[44] - 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 QueryEventsRequest.ProtoReflect.Descriptor instead. -func (*QueryEventsRequest) Descriptor() ([]byte, []int) { - return file_relayer_proto_rawDescGZIP(), []int{44} -} - -// TODO -type QueryEventsReply struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryEventsReply) Reset() { - *x = QueryEventsReply{} - if protoimpl.UnsafeEnabled { - mi := &file_relayer_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryEventsReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryEventsReply) ProtoMessage() {} - -func (x *QueryEventsReply) ProtoReflect() protoreflect.Message { - mi := &file_relayer_proto_msgTypes[45] - 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 QueryEventsReply.ProtoReflect.Descriptor instead. -func (*QueryEventsReply) Descriptor() ([]byte, []int) { - return file_relayer_proto_rawDescGZIP(), []int{45} -} - type VersionedBytes struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2392,7 +2158,7 @@ type VersionedBytes struct { func (x *VersionedBytes) Reset() { *x = VersionedBytes{} if protoimpl.UnsafeEnabled { - mi := &file_relayer_proto_msgTypes[46] + mi := &file_relayer_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2405,7 +2171,7 @@ func (x *VersionedBytes) String() string { func (*VersionedBytes) ProtoMessage() {} func (x *VersionedBytes) ProtoReflect() protoreflect.Message { - mi := &file_relayer_proto_msgTypes[46] + mi := &file_relayer_proto_msgTypes[40] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2418,7 +2184,7 @@ func (x *VersionedBytes) ProtoReflect() protoreflect.Message { // Deprecated: Use VersionedBytes.ProtoReflect.Descriptor instead. func (*VersionedBytes) Descriptor() ([]byte, []int) { - return file_relayer_proto_rawDescGZIP(), []int{46} + return file_relayer_proto_rawDescGZIP(), []int{40} } func (x *VersionedBytes) GetVersion() uint32 { @@ -2449,7 +2215,7 @@ type GetLatestValueRequest struct { func (x *GetLatestValueRequest) Reset() { *x = GetLatestValueRequest{} if protoimpl.UnsafeEnabled { - mi := &file_relayer_proto_msgTypes[47] + mi := &file_relayer_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2462,7 +2228,7 @@ func (x *GetLatestValueRequest) String() string { func (*GetLatestValueRequest) ProtoMessage() {} func (x *GetLatestValueRequest) ProtoReflect() protoreflect.Message { - mi := &file_relayer_proto_msgTypes[47] + mi := &file_relayer_proto_msgTypes[41] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2475,7 +2241,7 @@ func (x *GetLatestValueRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetLatestValueRequest.ProtoReflect.Descriptor instead. func (*GetLatestValueRequest) Descriptor() ([]byte, []int) { - return file_relayer_proto_rawDescGZIP(), []int{47} + return file_relayer_proto_rawDescGZIP(), []int{41} } func (x *GetLatestValueRequest) GetBc() *BoundContract { @@ -2511,7 +2277,7 @@ type GetLatestValueReply struct { func (x *GetLatestValueReply) Reset() { *x = GetLatestValueReply{} if protoimpl.UnsafeEnabled { - mi := &file_relayer_proto_msgTypes[48] + mi := &file_relayer_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2524,7 +2290,7 @@ func (x *GetLatestValueReply) String() string { func (*GetLatestValueReply) ProtoMessage() {} func (x *GetLatestValueReply) ProtoReflect() protoreflect.Message { - mi := &file_relayer_proto_msgTypes[48] + mi := &file_relayer_proto_msgTypes[42] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2537,7 +2303,7 @@ func (x *GetLatestValueReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetLatestValueReply.ProtoReflect.Descriptor instead. func (*GetLatestValueReply) Descriptor() ([]byte, []int) { - return file_relayer_proto_rawDescGZIP(), []int{48} + return file_relayer_proto_rawDescGZIP(), []int{42} } func (x *GetLatestValueReply) GetRetVal() *VersionedBytes { @@ -2559,7 +2325,7 @@ type GetEncodingRequest struct { func (x *GetEncodingRequest) Reset() { *x = GetEncodingRequest{} if protoimpl.UnsafeEnabled { - mi := &file_relayer_proto_msgTypes[49] + mi := &file_relayer_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2572,7 +2338,7 @@ func (x *GetEncodingRequest) String() string { func (*GetEncodingRequest) ProtoMessage() {} func (x *GetEncodingRequest) ProtoReflect() protoreflect.Message { - mi := &file_relayer_proto_msgTypes[49] + mi := &file_relayer_proto_msgTypes[43] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2585,7 +2351,7 @@ func (x *GetEncodingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetEncodingRequest.ProtoReflect.Descriptor instead. func (*GetEncodingRequest) Descriptor() ([]byte, []int) { - return file_relayer_proto_rawDescGZIP(), []int{49} + return file_relayer_proto_rawDescGZIP(), []int{43} } func (x *GetEncodingRequest) GetParams() *VersionedBytes { @@ -2613,7 +2379,7 @@ type GetEncodingResponse struct { func (x *GetEncodingResponse) Reset() { *x = GetEncodingResponse{} if protoimpl.UnsafeEnabled { - mi := &file_relayer_proto_msgTypes[50] + mi := &file_relayer_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2626,7 +2392,7 @@ func (x *GetEncodingResponse) String() string { func (*GetEncodingResponse) ProtoMessage() {} func (x *GetEncodingResponse) ProtoReflect() protoreflect.Message { - mi := &file_relayer_proto_msgTypes[50] + mi := &file_relayer_proto_msgTypes[44] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2639,7 +2405,7 @@ func (x *GetEncodingResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetEncodingResponse.ProtoReflect.Descriptor instead. func (*GetEncodingResponse) Descriptor() ([]byte, []int) { - return file_relayer_proto_rawDescGZIP(), []int{50} + return file_relayer_proto_rawDescGZIP(), []int{44} } func (x *GetEncodingResponse) GetRetVal() []byte { @@ -2662,7 +2428,7 @@ type GetDecodingRequest struct { func (x *GetDecodingRequest) Reset() { *x = GetDecodingRequest{} if protoimpl.UnsafeEnabled { - mi := &file_relayer_proto_msgTypes[51] + mi := &file_relayer_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2675,7 +2441,7 @@ func (x *GetDecodingRequest) String() string { func (*GetDecodingRequest) ProtoMessage() {} func (x *GetDecodingRequest) ProtoReflect() protoreflect.Message { - mi := &file_relayer_proto_msgTypes[51] + mi := &file_relayer_proto_msgTypes[45] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2688,7 +2454,7 @@ func (x *GetDecodingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetDecodingRequest.ProtoReflect.Descriptor instead. func (*GetDecodingRequest) Descriptor() ([]byte, []int) { - return file_relayer_proto_rawDescGZIP(), []int{51} + return file_relayer_proto_rawDescGZIP(), []int{45} } func (x *GetDecodingRequest) GetEncoded() []byte { @@ -2723,7 +2489,7 @@ type GetDecodingResponse struct { func (x *GetDecodingResponse) Reset() { *x = GetDecodingResponse{} if protoimpl.UnsafeEnabled { - mi := &file_relayer_proto_msgTypes[52] + mi := &file_relayer_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2736,7 +2502,7 @@ func (x *GetDecodingResponse) String() string { func (*GetDecodingResponse) ProtoMessage() {} func (x *GetDecodingResponse) ProtoReflect() protoreflect.Message { - mi := &file_relayer_proto_msgTypes[52] + mi := &file_relayer_proto_msgTypes[46] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2749,7 +2515,7 @@ func (x *GetDecodingResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetDecodingResponse.ProtoReflect.Descriptor instead. func (*GetDecodingResponse) Descriptor() ([]byte, []int) { - return file_relayer_proto_rawDescGZIP(), []int{52} + return file_relayer_proto_rawDescGZIP(), []int{46} } func (x *GetDecodingResponse) GetRetVal() *VersionedBytes { @@ -2759,6 +2525,116 @@ func (x *GetDecodingResponse) GetRetVal() *VersionedBytes { return nil } +type GetMaxSizeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + N int32 `protobuf:"varint,1,opt,name=n,proto3" json:"n,omitempty"` + ItemType string `protobuf:"bytes,2,opt,name=itemType,proto3" json:"itemType,omitempty"` + ForEncoding bool `protobuf:"varint,3,opt,name=forEncoding,proto3" json:"forEncoding,omitempty"` +} + +func (x *GetMaxSizeRequest) Reset() { + *x = GetMaxSizeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_relayer_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetMaxSizeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMaxSizeRequest) ProtoMessage() {} + +func (x *GetMaxSizeRequest) ProtoReflect() protoreflect.Message { + mi := &file_relayer_proto_msgTypes[47] + 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 GetMaxSizeRequest.ProtoReflect.Descriptor instead. +func (*GetMaxSizeRequest) Descriptor() ([]byte, []int) { + return file_relayer_proto_rawDescGZIP(), []int{47} +} + +func (x *GetMaxSizeRequest) GetN() int32 { + if x != nil { + return x.N + } + return 0 +} + +func (x *GetMaxSizeRequest) GetItemType() string { + if x != nil { + return x.ItemType + } + return "" +} + +func (x *GetMaxSizeRequest) GetForEncoding() bool { + if x != nil { + return x.ForEncoding + } + return false +} + +type GetMaxSizeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SizeInBytes int32 `protobuf:"varint,1,opt,name=sizeInBytes,proto3" json:"sizeInBytes,omitempty"` +} + +func (x *GetMaxSizeResponse) Reset() { + *x = GetMaxSizeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_relayer_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetMaxSizeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMaxSizeResponse) ProtoMessage() {} + +func (x *GetMaxSizeResponse) ProtoReflect() protoreflect.Message { + mi := &file_relayer_proto_msgTypes[48] + 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 GetMaxSizeResponse.ProtoReflect.Descriptor instead. +func (*GetMaxSizeResponse) Descriptor() ([]byte, []int) { + return file_relayer_proto_rawDescGZIP(), []int{48} +} + +func (x *GetMaxSizeResponse) GetSizeInBytes() int32 { + if x != nil { + return x.SizeInBytes + } + return 0 +} + // BoundContract represents a [github.com/smartcontractkit/chainlink-relay/pkg/types.BoundContract]. type BoundContract struct { state protoimpl.MessageState @@ -2773,7 +2649,7 @@ type BoundContract struct { func (x *BoundContract) Reset() { *x = BoundContract{} if protoimpl.UnsafeEnabled { - mi := &file_relayer_proto_msgTypes[53] + mi := &file_relayer_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2786,7 +2662,7 @@ func (x *BoundContract) String() string { func (*BoundContract) ProtoMessage() {} func (x *BoundContract) ProtoReflect() protoreflect.Message { - mi := &file_relayer_proto_msgTypes[53] + mi := &file_relayer_proto_msgTypes[49] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2799,7 +2675,7 @@ func (x *BoundContract) ProtoReflect() protoreflect.Message { // Deprecated: Use BoundContract.ProtoReflect.Descriptor instead. func (*BoundContract) Descriptor() ([]byte, []int) { - return file_relayer_proto_rawDescGZIP(), []int{53} + return file_relayer_proto_rawDescGZIP(), []int{49} } func (x *BoundContract) GetAddress() string { @@ -2835,7 +2711,7 @@ type NameReply struct { func (x *NameReply) Reset() { *x = NameReply{} if protoimpl.UnsafeEnabled { - mi := &file_relayer_proto_msgTypes[54] + mi := &file_relayer_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2848,7 +2724,7 @@ func (x *NameReply) String() string { func (*NameReply) ProtoMessage() {} func (x *NameReply) ProtoReflect() protoreflect.Message { - mi := &file_relayer_proto_msgTypes[54] + mi := &file_relayer_proto_msgTypes[50] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2861,7 +2737,7 @@ func (x *NameReply) ProtoReflect() protoreflect.Message { // Deprecated: Use NameReply.ProtoReflect.Descriptor instead. func (*NameReply) Descriptor() ([]byte, []int) { - return file_relayer_proto_rawDescGZIP(), []int{54} + return file_relayer_proto_rawDescGZIP(), []int{50} } func (x *NameReply) GetName() string { @@ -2883,7 +2759,7 @@ type HealthReportReply struct { func (x *HealthReportReply) Reset() { *x = HealthReportReply{} if protoimpl.UnsafeEnabled { - mi := &file_relayer_proto_msgTypes[55] + mi := &file_relayer_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2896,7 +2772,7 @@ func (x *HealthReportReply) String() string { func (*HealthReportReply) ProtoMessage() {} func (x *HealthReportReply) ProtoReflect() protoreflect.Message { - mi := &file_relayer_proto_msgTypes[55] + mi := &file_relayer_proto_msgTypes[51] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2909,7 +2785,7 @@ func (x *HealthReportReply) ProtoReflect() protoreflect.Message { // Deprecated: Use HealthReportReply.ProtoReflect.Descriptor instead. func (*HealthReportReply) Descriptor() ([]byte, []int) { - return file_relayer_proto_rawDescGZIP(), []int{55} + return file_relayer_proto_rawDescGZIP(), []int{51} } func (x *HealthReportReply) GetHealthReport() map[string]string { @@ -2932,7 +2808,7 @@ type BigInt struct { func (x *BigInt) Reset() { *x = BigInt{} if protoimpl.UnsafeEnabled { - mi := &file_relayer_proto_msgTypes[56] + mi := &file_relayer_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2945,7 +2821,7 @@ func (x *BigInt) String() string { func (*BigInt) ProtoMessage() {} func (x *BigInt) ProtoReflect() protoreflect.Message { - mi := &file_relayer_proto_msgTypes[56] + mi := &file_relayer_proto_msgTypes[52] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2958,7 +2834,7 @@ func (x *BigInt) ProtoReflect() protoreflect.Message { // Deprecated: Use BigInt.ProtoReflect.Descriptor instead. func (*BigInt) Descriptor() ([]byte, []int) { - return file_relayer_proto_rawDescGZIP(), []int{56} + return file_relayer_proto_rawDescGZIP(), []int{52} } func (x *BigInt) GetNegative() bool { @@ -2987,7 +2863,7 @@ type StarknetSignature struct { func (x *StarknetSignature) Reset() { *x = StarknetSignature{} if protoimpl.UnsafeEnabled { - mi := &file_relayer_proto_msgTypes[57] + mi := &file_relayer_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3000,7 +2876,7 @@ func (x *StarknetSignature) String() string { func (*StarknetSignature) ProtoMessage() {} func (x *StarknetSignature) ProtoReflect() protoreflect.Message { - mi := &file_relayer_proto_msgTypes[57] + mi := &file_relayer_proto_msgTypes[53] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3013,7 +2889,7 @@ func (x *StarknetSignature) ProtoReflect() protoreflect.Message { // Deprecated: Use StarknetSignature.ProtoReflect.Descriptor instead. func (*StarknetSignature) Descriptor() ([]byte, []int) { - return file_relayer_proto_rawDescGZIP(), []int{57} + return file_relayer_proto_rawDescGZIP(), []int{53} } func (x *StarknetSignature) GetX() *BigInt { @@ -3041,7 +2917,7 @@ type StarknetMessageHash struct { func (x *StarknetMessageHash) Reset() { *x = StarknetMessageHash{} if protoimpl.UnsafeEnabled { - mi := &file_relayer_proto_msgTypes[58] + mi := &file_relayer_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3054,7 +2930,7 @@ func (x *StarknetMessageHash) String() string { func (*StarknetMessageHash) ProtoMessage() {} func (x *StarknetMessageHash) ProtoReflect() protoreflect.Message { - mi := &file_relayer_proto_msgTypes[58] + mi := &file_relayer_proto_msgTypes[54] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3067,7 +2943,7 @@ func (x *StarknetMessageHash) ProtoReflect() protoreflect.Message { // Deprecated: Use StarknetMessageHash.ProtoReflect.Descriptor instead. func (*StarknetMessageHash) Descriptor() ([]byte, []int) { - return file_relayer_proto_rawDescGZIP(), []int{58} + return file_relayer_proto_rawDescGZIP(), []int{54} } func (x *StarknetMessageHash) GetHash() *BigInt { @@ -3288,221 +3164,208 @@ var file_relayer_proto_rawDesc = []byte{ 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x2c, 0x0a, 0x10, 0x46, 0x72, 0x6f, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0x1c, 0x0a, 0x1a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x22, 0x1a, 0x0a, 0x18, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1e, 0x0a, - 0x1c, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x1c, 0x0a, - 0x1a, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x14, 0x0a, 0x12, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x22, 0x12, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, - 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x3e, 0x0a, 0x0e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x82, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, - 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x23, 0x0a, 0x02, 0x62, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, - 0x52, 0x02, 0x62, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x2c, 0x0a, 0x06, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x42, 0x79, 0x74, - 0x65, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x43, 0x0a, 0x13, 0x47, 0x65, - 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x70, 0x6c, - 0x79, 0x12, 0x2c, 0x0a, 0x06, 0x72, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x06, 0x72, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x22, - 0x5e, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x22, - 0x2d, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x74, 0x56, 0x61, 0x6c, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x72, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x22, 0x6a, - 0x0a, 0x12, 0x47, 0x65, 0x74, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x12, 0x1a, - 0x0a, 0x08, 0x69, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x69, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x6f, - 0x72, 0x63, 0x65, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, - 0x66, 0x6f, 0x72, 0x63, 0x65, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x22, 0x43, 0x0a, 0x13, 0x47, 0x65, - 0x74, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x2c, 0x0a, 0x06, 0x72, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x06, 0x72, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x22, - 0x57, 0x0a, 0x0d, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, - 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, - 0x0a, 0x07, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x07, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x1f, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, - 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xa3, 0x01, 0x0a, 0x11, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, - 0x4d, 0x0a, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x2e, 0x48, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0x3f, - 0x0a, 0x11, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, - 0x3a, 0x0a, 0x06, 0x42, 0x69, 0x67, 0x49, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x65, 0x67, - 0x61, 0x74, 0x69, 0x76, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6e, 0x65, 0x67, - 0x61, 0x74, 0x69, 0x76, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4b, 0x0a, 0x11, 0x53, - 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x12, 0x1a, 0x0a, 0x01, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x2e, 0x42, 0x69, 0x67, 0x49, 0x6e, 0x74, 0x52, 0x01, 0x78, 0x12, 0x1a, 0x0a, 0x01, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x42, - 0x69, 0x67, 0x49, 0x6e, 0x74, 0x52, 0x01, 0x79, 0x22, 0x37, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x72, - 0x6b, 0x6e, 0x65, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x61, 0x73, 0x68, 0x12, - 0x20, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x42, 0x69, 0x67, 0x49, 0x6e, 0x74, 0x52, 0x04, 0x68, 0x61, 0x73, - 0x68, 0x32, 0x4f, 0x0a, 0x0d, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x6c, 0x61, 0x79, - 0x65, 0x72, 0x12, 0x3e, 0x0a, 0x0a, 0x4e, 0x65, 0x77, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4e, 0x65, 0x77, 0x52, 0x65, 0x6c, 0x61, 0x79, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x2e, 0x4e, 0x65, 0x77, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, - 0x22, 0x00, 0x32, 0x73, 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x39, - 0x0a, 0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x2c, 0x0a, 0x04, 0x53, 0x69, 0x67, - 0x6e, 0x12, 0x11, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x53, 0x69, 0x67, 0x6e, - 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x32, 0x91, 0x03, 0x0a, 0x07, 0x52, 0x65, 0x6c, 0x61, - 0x79, 0x65, 0x72, 0x12, 0x53, 0x0a, 0x11, 0x4e, 0x65, 0x77, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, - 0x4e, 0x65, 0x77, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, - 0x4e, 0x65, 0x77, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x11, 0x4e, 0x65, 0x77, 0x50, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x1e, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4e, 0x65, 0x77, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x50, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4e, 0x65, 0x77, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x50, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x4a, 0x0a, - 0x0e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x10, 0x4c, 0x69, 0x73, - 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x12, 0x1d, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x08, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x12, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x32, 0x43, 0x0a, 0x0a, 0x44, - 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x4f, 0x62, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x12, 0x14, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4f, 0x62, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, - 0x32, 0xb6, 0x01, 0x0a, 0x16, 0x4f, 0x66, 0x66, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x0c, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x19, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, - 0x00, 0x12, 0x56, 0x0a, 0x12, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, - 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x50, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x32, 0x8d, 0x02, 0x0a, 0x15, 0x43, 0x6f, - 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x54, 0x72, 0x61, 0x63, - 0x6b, 0x65, 0x72, 0x12, 0x59, 0x0a, 0x13, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x65, - 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x44, - 0x0a, 0x0c, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x19, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x70, - 0x6c, 0x79, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x11, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x32, 0x82, 0x02, 0x0a, 0x13, 0x43, 0x6f, - 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x74, 0x65, - 0x72, 0x12, 0x38, 0x0a, 0x08, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x12, 0x15, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x6e, 0x0a, 0x1a, 0x4c, - 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, - 0x74, 0x41, 0x6e, 0x64, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x27, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x75, 0x6e, 0x74, 0x22, 0x3e, 0x0a, 0x0e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x64, + 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x22, 0x82, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, + 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, + 0x02, 0x62, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x02, + 0x62, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x2c, 0x0a, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, + 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x43, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4c, + 0x61, 0x74, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, + 0x2c, 0x0a, 0x06, 0x72, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x64, + 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x06, 0x72, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x22, 0x5e, 0x0a, + 0x12, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x22, 0x2d, 0x0a, + 0x13, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x72, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x22, 0x6a, 0x0a, 0x12, + 0x47, 0x65, 0x74, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, + 0x69, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x69, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x6f, 0x72, 0x63, + 0x65, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x66, 0x6f, + 0x72, 0x63, 0x65, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x22, 0x43, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x44, + 0x65, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x2c, 0x0a, 0x06, 0x72, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x64, + 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x06, 0x72, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x22, 0x5f, 0x0a, + 0x11, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x0c, 0x0a, 0x01, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x6e, + 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x69, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, + 0x66, 0x6f, 0x72, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0b, 0x66, 0x6f, 0x72, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x36, + 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x69, 0x7a, 0x65, 0x49, 0x6e, 0x42, 0x79, + 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x73, 0x69, 0x7a, 0x65, 0x49, + 0x6e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x57, 0x0a, 0x0d, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x22, + 0x1f, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x22, 0xa3, 0x01, 0x0a, 0x11, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x4d, 0x0a, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0x3f, 0x0a, 0x11, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3a, 0x0a, 0x06, 0x42, 0x69, 0x67, 0x49, 0x6e, 0x74, + 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x08, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x22, 0x4b, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1a, 0x0a, 0x01, 0x78, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x42, 0x69, 0x67, 0x49, 0x6e, 0x74, + 0x52, 0x01, 0x78, 0x12, 0x1a, 0x0a, 0x01, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x42, 0x69, 0x67, 0x49, 0x6e, 0x74, 0x52, 0x01, 0x79, 0x22, + 0x37, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x48, 0x61, 0x73, 0x68, 0x12, 0x20, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x42, 0x69, 0x67, 0x49, + 0x6e, 0x74, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x32, 0x4f, 0x0a, 0x0d, 0x50, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x3e, 0x0a, 0x0a, 0x4e, 0x65, 0x77, + 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4e, + 0x65, 0x77, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4e, 0x65, 0x77, 0x52, 0x65, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x32, 0x73, 0x0a, 0x08, 0x4b, 0x65, 0x79, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x39, 0x0a, 0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, + 0x12, 0x2c, 0x0a, 0x04, 0x53, 0x69, 0x67, 0x6e, 0x12, 0x11, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, + 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x32, 0x91, + 0x03, 0x0a, 0x07, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x53, 0x0a, 0x11, 0x4e, 0x65, + 0x77, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, + 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4e, 0x65, 0x77, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4e, 0x65, 0x77, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, + 0x53, 0x0a, 0x11, 0x4e, 0x65, 0x77, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4e, 0x65, 0x77, 0x50, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4e, 0x65, 0x77, 0x50, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x47, 0x65, + 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, + 0x61, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, + 0x12, 0x50, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, + 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, + 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x08, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x12, 0x18, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x22, 0x00, 0x32, 0x43, 0x0a, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x12, 0x35, 0x0a, 0x07, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x12, 0x14, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x12, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x32, 0xb6, 0x01, 0x0a, 0x16, 0x4f, 0x66, 0x66, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, + 0x65, 0x72, 0x12, 0x44, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, + 0x73, 0x74, 0x12, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, + 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x56, 0x0a, 0x12, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x1f, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, + 0x73, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, + 0x65, 0x73, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, + 0x32, 0x8d, 0x02, 0x0a, 0x15, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x12, 0x59, 0x0a, 0x13, 0x4c, 0x61, + 0x74, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, + 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x0c, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, 0x61, 0x74, + 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x11, 0x4c, + 0x61, 0x74, 0x65, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x12, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, + 0x32, 0x82, 0x02, 0x0a, 0x13, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x08, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x6d, 0x69, 0x74, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, + 0x22, 0x00, 0x12, 0x6e, 0x0a, 0x1a, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x41, 0x6e, 0x64, 0x45, 0x70, 0x6f, 0x63, 0x68, + 0x12, 0x27, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x41, 0x6e, 0x64, 0x45, 0x70, 0x6f, + 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, - 0x65, 0x73, 0x74, 0x41, 0x6e, 0x64, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x41, 0x6e, 0x64, 0x45, - 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x0b, 0x46, - 0x72, 0x6f, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x2e, 0x46, 0x72, 0x6f, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x46, 0x72, 0x6f, 0x6d, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x32, 0xde, - 0x03, 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x59, - 0x0a, 0x13, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x52, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x52, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x15, 0x55, 0x6e, 0x72, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x52, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x0b, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x0e, 0x47, - 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x45, 0x6e, - 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x47, 0x65, - 0x74, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x6f, 0x64, - 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0b, 0x47, - 0x65, 0x74, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x44, - 0x65, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, - 0xf5, 0x01, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0f, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x39, - 0x0a, 0x05, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x05, 0x52, 0x65, 0x61, - 0x64, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x65, 0x73, 0x74, 0x41, 0x6e, 0x64, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x70, 0x6c, 0x79, + 0x22, 0x00, 0x12, 0x41, 0x0a, 0x0b, 0x46, 0x72, 0x6f, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x46, 0x72, 0x6f, 0x6d, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x2e, 0x46, 0x72, 0x6f, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, + 0x70, 0x6c, 0x79, 0x22, 0x00, 0x32, 0xa2, 0x02, 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, + 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x47, + 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x4c, + 0x61, 0x74, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, + 0x00, 0x12, 0x42, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, + 0x12, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x6f, 0x64, + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x44, 0x65, 0x63, 0x6f, + 0x64, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x44, + 0x65, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x0a, 0x47, 0x65, 0x74, + 0x4d, 0x61, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x47, + 0x65, 0x74, 0x4d, 0x61, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x78, 0x53, 0x69, + 0x7a, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf5, 0x01, 0x0a, 0x07, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4e, 0x61, + 0x6d, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x05, 0x43, 0x6c, 0x6f, + 0x73, 0x65, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x17, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x42, 0x43, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6d, 0x61, 0x72, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x61, 0x63, 0x74, 0x6b, 0x69, 0x74, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, - 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, - 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x79, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x05, 0x52, 0x65, 0x61, 0x64, 0x79, 0x12, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, + 0x41, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x48, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, + 0x22, 0x00, 0x42, 0x43, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x73, 0x6d, 0x61, 0x72, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6b, 0x69, + 0x74, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3517,7 +3380,7 @@ func file_relayer_proto_rawDescGZIP() []byte { return file_relayer_proto_rawDescData } -var file_relayer_proto_msgTypes = make([]protoimpl.MessageInfo, 60) +var file_relayer_proto_msgTypes = make([]protoimpl.MessageInfo, 56) var file_relayer_proto_goTypes = []interface{}{ (*NewRelayerRequest)(nil), // 0: loop.NewRelayerRequest (*NewRelayerReply)(nil), // 1: loop.NewRelayerReply @@ -3559,27 +3422,23 @@ var file_relayer_proto_goTypes = []interface{}{ (*LatestConfigDigestAndEpochReply)(nil), // 37: loop.LatestConfigDigestAndEpochReply (*FromAccountRequest)(nil), // 38: loop.FromAccountRequest (*FromAccountReply)(nil), // 39: loop.FromAccountReply - (*RegisterEventFilterRequest)(nil), // 40: loop.RegisterEventFilterRequest - (*RegisterEventFilterReply)(nil), // 41: loop.RegisterEventFilterReply - (*UnregisterEventFilterRequest)(nil), // 42: loop.UnregisterEventFilterRequest - (*UnregisterEventFilterReply)(nil), // 43: loop.UnregisterEventFilterReply - (*QueryEventsRequest)(nil), // 44: loop.QueryEventsRequest - (*QueryEventsReply)(nil), // 45: loop.QueryEventsReply - (*VersionedBytes)(nil), // 46: loop.VersionedBytes - (*GetLatestValueRequest)(nil), // 47: loop.GetLatestValueRequest - (*GetLatestValueReply)(nil), // 48: loop.GetLatestValueReply - (*GetEncodingRequest)(nil), // 49: loop.GetEncodingRequest - (*GetEncodingResponse)(nil), // 50: loop.GetEncodingResponse - (*GetDecodingRequest)(nil), // 51: loop.GetDecodingRequest - (*GetDecodingResponse)(nil), // 52: loop.GetDecodingResponse - (*BoundContract)(nil), // 53: loop.BoundContract - (*NameReply)(nil), // 54: loop.NameReply - (*HealthReportReply)(nil), // 55: loop.HealthReportReply - (*BigInt)(nil), // 56: loop.BigInt - (*StarknetSignature)(nil), // 57: loop.StarknetSignature - (*StarknetMessageHash)(nil), // 58: loop.StarknetMessageHash - nil, // 59: loop.HealthReportReply.HealthReportEntry - (*emptypb.Empty)(nil), // 60: google.protobuf.Empty + (*VersionedBytes)(nil), // 40: loop.VersionedBytes + (*GetLatestValueRequest)(nil), // 41: loop.GetLatestValueRequest + (*GetLatestValueReply)(nil), // 42: loop.GetLatestValueReply + (*GetEncodingRequest)(nil), // 43: loop.GetEncodingRequest + (*GetEncodingResponse)(nil), // 44: loop.GetEncodingResponse + (*GetDecodingRequest)(nil), // 45: loop.GetDecodingRequest + (*GetDecodingResponse)(nil), // 46: loop.GetDecodingResponse + (*GetMaxSizeRequest)(nil), // 47: loop.GetMaxSizeRequest + (*GetMaxSizeResponse)(nil), // 48: loop.GetMaxSizeResponse + (*BoundContract)(nil), // 49: loop.BoundContract + (*NameReply)(nil), // 50: loop.NameReply + (*HealthReportReply)(nil), // 51: loop.HealthReportReply + (*BigInt)(nil), // 52: loop.BigInt + (*StarknetSignature)(nil), // 53: loop.StarknetSignature + (*StarknetMessageHash)(nil), // 54: loop.StarknetMessageHash + nil, // 55: loop.HealthReportReply.HealthReportEntry + (*emptypb.Empty)(nil), // 56: google.protobuf.Empty } var file_relayer_proto_depIdxs = []int32{ 5, // 0: loop.NewPluginProviderRequest.relayArgs:type_name -> loop.RelayArgs @@ -3587,25 +3446,25 @@ var file_relayer_proto_depIdxs = []int32{ 5, // 2: loop.NewConfigProviderRequest.relayArgs:type_name -> loop.RelayArgs 13, // 3: loop.GetChainStatusReply.chain:type_name -> loop.ChainStatus 16, // 4: loop.ListNodeStatusesReply.nodes:type_name -> loop.NodeStatus - 56, // 5: loop.TransactionRequest.amount:type_name -> loop.BigInt + 52, // 5: loop.TransactionRequest.amount:type_name -> loop.BigInt 31, // 6: loop.ObserveRequest.reportTimestamp:type_name -> loop.ReportTimestamp - 56, // 7: loop.ObserveReply.value:type_name -> loop.BigInt + 52, // 7: loop.ObserveReply.value:type_name -> loop.BigInt 20, // 8: loop.ConfigDigestRequest.contractConfig:type_name -> loop.ContractConfig 20, // 9: loop.LatestConfigReply.contractConfig:type_name -> loop.ContractConfig 31, // 10: loop.ReportContext.reportTimestamp:type_name -> loop.ReportTimestamp 32, // 11: loop.TransmitRequest.reportContext:type_name -> loop.ReportContext 33, // 12: loop.TransmitRequest.attributedOnchainSignatures:type_name -> loop.AttributedOnchainSignature - 53, // 13: loop.GetLatestValueRequest.bc:type_name -> loop.BoundContract - 46, // 14: loop.GetLatestValueRequest.params:type_name -> loop.VersionedBytes - 46, // 15: loop.GetLatestValueReply.retVal:type_name -> loop.VersionedBytes - 46, // 16: loop.GetEncodingRequest.params:type_name -> loop.VersionedBytes - 46, // 17: loop.GetDecodingResponse.retVal:type_name -> loop.VersionedBytes - 59, // 18: loop.HealthReportReply.healthReport:type_name -> loop.HealthReportReply.HealthReportEntry - 56, // 19: loop.StarknetSignature.x:type_name -> loop.BigInt - 56, // 20: loop.StarknetSignature.y:type_name -> loop.BigInt - 56, // 21: loop.StarknetMessageHash.hash:type_name -> loop.BigInt + 49, // 13: loop.GetLatestValueRequest.bc:type_name -> loop.BoundContract + 40, // 14: loop.GetLatestValueRequest.params:type_name -> loop.VersionedBytes + 40, // 15: loop.GetLatestValueReply.retVal:type_name -> loop.VersionedBytes + 40, // 16: loop.GetEncodingRequest.params:type_name -> loop.VersionedBytes + 40, // 17: loop.GetDecodingResponse.retVal:type_name -> loop.VersionedBytes + 55, // 18: loop.HealthReportReply.healthReport:type_name -> loop.HealthReportReply.HealthReportEntry + 52, // 19: loop.StarknetSignature.x:type_name -> loop.BigInt + 52, // 20: loop.StarknetSignature.y:type_name -> loop.BigInt + 52, // 21: loop.StarknetMessageHash.hash:type_name -> loop.BigInt 0, // 22: loop.PluginRelayer.NewRelayer:input_type -> loop.NewRelayerRequest - 60, // 23: loop.Keystore.Accounts:input_type -> google.protobuf.Empty + 56, // 23: loop.Keystore.Accounts:input_type -> google.protobuf.Empty 3, // 24: loop.Keystore.Sign:input_type -> loop.SignRequest 9, // 25: loop.Relayer.NewConfigProvider:input_type -> loop.NewConfigProviderRequest 7, // 26: loop.Relayer.NewPluginProvider:input_type -> loop.NewPluginProviderRequest @@ -3621,45 +3480,41 @@ var file_relayer_proto_depIdxs = []int32{ 34, // 36: loop.ContractTransmitter.Transmit:input_type -> loop.TransmitRequest 36, // 37: loop.ContractTransmitter.LatestConfigDigestAndEpoch:input_type -> loop.LatestConfigDigestAndEpochRequest 38, // 38: loop.ContractTransmitter.FromAccount:input_type -> loop.FromAccountRequest - 40, // 39: loop.ChainReader.RegisterEventFilter:input_type -> loop.RegisterEventFilterRequest - 42, // 40: loop.ChainReader.UnregisterEventFilter:input_type -> loop.UnregisterEventFilterRequest - 44, // 41: loop.ChainReader.QueryEvents:input_type -> loop.QueryEventsRequest - 47, // 42: loop.ChainReader.GetLatestValue:input_type -> loop.GetLatestValueRequest - 49, // 43: loop.ChainReader.GetEncoding:input_type -> loop.GetEncodingRequest - 51, // 44: loop.ChainReader.GetDecoding:input_type -> loop.GetDecodingRequest - 60, // 45: loop.Service.Name:input_type -> google.protobuf.Empty - 60, // 46: loop.Service.Close:input_type -> google.protobuf.Empty - 60, // 47: loop.Service.Ready:input_type -> google.protobuf.Empty - 60, // 48: loop.Service.HealthReport:input_type -> google.protobuf.Empty - 1, // 49: loop.PluginRelayer.NewRelayer:output_type -> loop.NewRelayerReply - 2, // 50: loop.Keystore.Accounts:output_type -> loop.AccountsReply - 4, // 51: loop.Keystore.Sign:output_type -> loop.SignReply - 10, // 52: loop.Relayer.NewConfigProvider:output_type -> loop.NewConfigProviderReply - 8, // 53: loop.Relayer.NewPluginProvider:output_type -> loop.NewPluginProviderReply - 12, // 54: loop.Relayer.GetChainStatus:output_type -> loop.GetChainStatusReply - 15, // 55: loop.Relayer.ListNodeStatuses:output_type -> loop.ListNodeStatusesReply - 60, // 56: loop.Relayer.Transact:output_type -> google.protobuf.Empty - 19, // 57: loop.DataSource.Observe:output_type -> loop.ObserveReply - 22, // 58: loop.OffchainConfigDigester.ConfigDigest:output_type -> loop.ConfigDigestReply - 24, // 59: loop.OffchainConfigDigester.ConfigDigestPrefix:output_type -> loop.ConfigDigestPrefixReply - 26, // 60: loop.ContractConfigTracker.LatestConfigDetails:output_type -> loop.LatestConfigDetailsReply - 28, // 61: loop.ContractConfigTracker.LatestConfig:output_type -> loop.LatestConfigReply - 30, // 62: loop.ContractConfigTracker.LatestBlockHeight:output_type -> loop.LatestBlockHeightReply - 35, // 63: loop.ContractTransmitter.Transmit:output_type -> loop.TransmitReply - 37, // 64: loop.ContractTransmitter.LatestConfigDigestAndEpoch:output_type -> loop.LatestConfigDigestAndEpochReply - 39, // 65: loop.ContractTransmitter.FromAccount:output_type -> loop.FromAccountReply - 41, // 66: loop.ChainReader.RegisterEventFilter:output_type -> loop.RegisterEventFilterReply - 41, // 67: loop.ChainReader.UnregisterEventFilter:output_type -> loop.RegisterEventFilterReply - 45, // 68: loop.ChainReader.QueryEvents:output_type -> loop.QueryEventsReply - 48, // 69: loop.ChainReader.GetLatestValue:output_type -> loop.GetLatestValueReply - 50, // 70: loop.ChainReader.GetEncoding:output_type -> loop.GetEncodingResponse - 52, // 71: loop.ChainReader.GetDecoding:output_type -> loop.GetDecodingResponse - 54, // 72: loop.Service.Name:output_type -> loop.NameReply - 60, // 73: loop.Service.Close:output_type -> google.protobuf.Empty - 60, // 74: loop.Service.Ready:output_type -> google.protobuf.Empty - 55, // 75: loop.Service.HealthReport:output_type -> loop.HealthReportReply - 49, // [49:76] is the sub-list for method output_type - 22, // [22:49] is the sub-list for method input_type + 41, // 39: loop.ChainReader.GetLatestValue:input_type -> loop.GetLatestValueRequest + 43, // 40: loop.ChainReader.GetEncoding:input_type -> loop.GetEncodingRequest + 45, // 41: loop.ChainReader.GetDecoding:input_type -> loop.GetDecodingRequest + 47, // 42: loop.ChainReader.GetMaxSize:input_type -> loop.GetMaxSizeRequest + 56, // 43: loop.Service.Name:input_type -> google.protobuf.Empty + 56, // 44: loop.Service.Close:input_type -> google.protobuf.Empty + 56, // 45: loop.Service.Ready:input_type -> google.protobuf.Empty + 56, // 46: loop.Service.HealthReport:input_type -> google.protobuf.Empty + 1, // 47: loop.PluginRelayer.NewRelayer:output_type -> loop.NewRelayerReply + 2, // 48: loop.Keystore.Accounts:output_type -> loop.AccountsReply + 4, // 49: loop.Keystore.Sign:output_type -> loop.SignReply + 10, // 50: loop.Relayer.NewConfigProvider:output_type -> loop.NewConfigProviderReply + 8, // 51: loop.Relayer.NewPluginProvider:output_type -> loop.NewPluginProviderReply + 12, // 52: loop.Relayer.GetChainStatus:output_type -> loop.GetChainStatusReply + 15, // 53: loop.Relayer.ListNodeStatuses:output_type -> loop.ListNodeStatusesReply + 56, // 54: loop.Relayer.Transact:output_type -> google.protobuf.Empty + 19, // 55: loop.DataSource.Observe:output_type -> loop.ObserveReply + 22, // 56: loop.OffchainConfigDigester.ConfigDigest:output_type -> loop.ConfigDigestReply + 24, // 57: loop.OffchainConfigDigester.ConfigDigestPrefix:output_type -> loop.ConfigDigestPrefixReply + 26, // 58: loop.ContractConfigTracker.LatestConfigDetails:output_type -> loop.LatestConfigDetailsReply + 28, // 59: loop.ContractConfigTracker.LatestConfig:output_type -> loop.LatestConfigReply + 30, // 60: loop.ContractConfigTracker.LatestBlockHeight:output_type -> loop.LatestBlockHeightReply + 35, // 61: loop.ContractTransmitter.Transmit:output_type -> loop.TransmitReply + 37, // 62: loop.ContractTransmitter.LatestConfigDigestAndEpoch:output_type -> loop.LatestConfigDigestAndEpochReply + 39, // 63: loop.ContractTransmitter.FromAccount:output_type -> loop.FromAccountReply + 42, // 64: loop.ChainReader.GetLatestValue:output_type -> loop.GetLatestValueReply + 44, // 65: loop.ChainReader.GetEncoding:output_type -> loop.GetEncodingResponse + 46, // 66: loop.ChainReader.GetDecoding:output_type -> loop.GetDecodingResponse + 48, // 67: loop.ChainReader.GetMaxSize:output_type -> loop.GetMaxSizeResponse + 50, // 68: loop.Service.Name:output_type -> loop.NameReply + 56, // 69: loop.Service.Close:output_type -> google.protobuf.Empty + 56, // 70: loop.Service.Ready:output_type -> google.protobuf.Empty + 51, // 71: loop.Service.HealthReport:output_type -> loop.HealthReportReply + 47, // [47:72] is the sub-list for method output_type + 22, // [22:47] is the sub-list for method input_type 22, // [22:22] is the sub-list for extension type_name 22, // [22:22] is the sub-list for extension extendee 0, // [0:22] is the sub-list for field type_name @@ -4152,7 +4007,7 @@ func file_relayer_proto_init() { } } file_relayer_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegisterEventFilterRequest); i { + switch v := v.(*VersionedBytes); i { case 0: return &v.state case 1: @@ -4164,7 +4019,7 @@ func file_relayer_proto_init() { } } file_relayer_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegisterEventFilterReply); i { + switch v := v.(*GetLatestValueRequest); i { case 0: return &v.state case 1: @@ -4176,7 +4031,7 @@ func file_relayer_proto_init() { } } file_relayer_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnregisterEventFilterRequest); i { + switch v := v.(*GetLatestValueReply); i { case 0: return &v.state case 1: @@ -4188,7 +4043,7 @@ func file_relayer_proto_init() { } } file_relayer_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnregisterEventFilterReply); i { + switch v := v.(*GetEncodingRequest); i { case 0: return &v.state case 1: @@ -4200,7 +4055,7 @@ func file_relayer_proto_init() { } } file_relayer_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryEventsRequest); i { + switch v := v.(*GetEncodingResponse); i { case 0: return &v.state case 1: @@ -4212,7 +4067,7 @@ func file_relayer_proto_init() { } } file_relayer_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryEventsReply); i { + switch v := v.(*GetDecodingRequest); i { case 0: return &v.state case 1: @@ -4224,7 +4079,7 @@ func file_relayer_proto_init() { } } file_relayer_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VersionedBytes); i { + switch v := v.(*GetDecodingResponse); i { case 0: return &v.state case 1: @@ -4236,7 +4091,7 @@ func file_relayer_proto_init() { } } file_relayer_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLatestValueRequest); i { + switch v := v.(*GetMaxSizeRequest); i { case 0: return &v.state case 1: @@ -4248,7 +4103,7 @@ func file_relayer_proto_init() { } } file_relayer_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLatestValueReply); i { + switch v := v.(*GetMaxSizeResponse); i { case 0: return &v.state case 1: @@ -4260,54 +4115,6 @@ func file_relayer_proto_init() { } } file_relayer_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetEncodingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relayer_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetEncodingResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relayer_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetDecodingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relayer_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetDecodingResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relayer_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BoundContract); i { case 0: return &v.state @@ -4319,7 +4126,7 @@ func file_relayer_proto_init() { return nil } } - file_relayer_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { + file_relayer_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*NameReply); i { case 0: return &v.state @@ -4331,7 +4138,7 @@ func file_relayer_proto_init() { return nil } } - file_relayer_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { + file_relayer_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HealthReportReply); i { case 0: return &v.state @@ -4343,7 +4150,7 @@ func file_relayer_proto_init() { return nil } } - file_relayer_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { + file_relayer_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BigInt); i { case 0: return &v.state @@ -4355,7 +4162,7 @@ func file_relayer_proto_init() { return nil } } - file_relayer_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { + file_relayer_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StarknetSignature); i { case 0: return &v.state @@ -4367,7 +4174,7 @@ func file_relayer_proto_init() { return nil } } - file_relayer_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { + file_relayer_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StarknetMessageHash); i { case 0: return &v.state @@ -4386,7 +4193,7 @@ func file_relayer_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_relayer_proto_rawDesc, NumEnums: 0, - NumMessages: 60, + NumMessages: 56, NumExtensions: 0, NumServices: 9, }, diff --git a/pkg/loop/internal/pb/relayer.proto b/pkg/loop/internal/pb/relayer.proto index 0e55c8631d..01f599a785 100644 --- a/pkg/loop/internal/pb/relayer.proto +++ b/pkg/loop/internal/pb/relayer.proto @@ -260,6 +260,7 @@ service ChainReader { rpc GetLatestValue (GetLatestValueRequest) returns (GetLatestValueReply) {} rpc GetEncoding(GetEncodingRequest) returns (GetEncodingResponse); rpc GetDecoding(GetDecodingRequest) returns (GetDecodingResponse); + rpc GetMaxSize(GetMaxSizeRequest) returns (GetMaxSizeResponse); } message VersionedBytes { @@ -298,6 +299,15 @@ message GetDecodingResponse { VersionedBytes retVal = 1; } +message GetMaxSizeRequest { + int32 n = 1; + string itemType = 2; + bool forEncoding = 3; +} + +message GetMaxSizeResponse { + int32 sizeInBytes = 1; +} // BoundContract represents a [github.com/smartcontractkit/chainlink-relay/pkg/types.BoundContract]. message BoundContract { diff --git a/pkg/loop/internal/pb/relayer_grpc.pb.go b/pkg/loop/internal/pb/relayer_grpc.pb.go index c4de3d06d1..a0a4ffce12 100644 --- a/pkg/loop/internal/pb/relayer_grpc.pb.go +++ b/pkg/loop/internal/pb/relayer_grpc.pb.go @@ -1021,24 +1021,20 @@ var ContractTransmitter_ServiceDesc = grpc.ServiceDesc{ } const ( - ChainReader_RegisterEventFilter_FullMethodName = "/loop.ChainReader/RegisterEventFilter" - ChainReader_UnregisterEventFilter_FullMethodName = "/loop.ChainReader/UnregisterEventFilter" - ChainReader_QueryEvents_FullMethodName = "/loop.ChainReader/QueryEvents" - ChainReader_GetLatestValue_FullMethodName = "/loop.ChainReader/GetLatestValue" - ChainReader_GetEncoding_FullMethodName = "/loop.ChainReader/GetEncoding" - ChainReader_GetDecoding_FullMethodName = "/loop.ChainReader/GetDecoding" + ChainReader_GetLatestValue_FullMethodName = "/loop.ChainReader/GetLatestValue" + ChainReader_GetEncoding_FullMethodName = "/loop.ChainReader/GetEncoding" + ChainReader_GetDecoding_FullMethodName = "/loop.ChainReader/GetDecoding" + ChainReader_GetMaxSize_FullMethodName = "/loop.ChainReader/GetMaxSize" ) // ChainReaderClient is the client API for ChainReader service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type ChainReaderClient interface { - RegisterEventFilter(ctx context.Context, in *RegisterEventFilterRequest, opts ...grpc.CallOption) (*RegisterEventFilterReply, error) - UnregisterEventFilter(ctx context.Context, in *UnregisterEventFilterRequest, opts ...grpc.CallOption) (*RegisterEventFilterReply, error) - QueryEvents(ctx context.Context, in *QueryEventsRequest, opts ...grpc.CallOption) (*QueryEventsReply, error) GetLatestValue(ctx context.Context, in *GetLatestValueRequest, opts ...grpc.CallOption) (*GetLatestValueReply, error) GetEncoding(ctx context.Context, in *GetEncodingRequest, opts ...grpc.CallOption) (*GetEncodingResponse, error) GetDecoding(ctx context.Context, in *GetDecodingRequest, opts ...grpc.CallOption) (*GetDecodingResponse, error) + GetMaxSize(ctx context.Context, in *GetMaxSizeRequest, opts ...grpc.CallOption) (*GetMaxSizeResponse, error) } type chainReaderClient struct { @@ -1049,33 +1045,6 @@ func NewChainReaderClient(cc grpc.ClientConnInterface) ChainReaderClient { return &chainReaderClient{cc} } -func (c *chainReaderClient) RegisterEventFilter(ctx context.Context, in *RegisterEventFilterRequest, opts ...grpc.CallOption) (*RegisterEventFilterReply, error) { - out := new(RegisterEventFilterReply) - err := c.cc.Invoke(ctx, ChainReader_RegisterEventFilter_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *chainReaderClient) UnregisterEventFilter(ctx context.Context, in *UnregisterEventFilterRequest, opts ...grpc.CallOption) (*RegisterEventFilterReply, error) { - out := new(RegisterEventFilterReply) - err := c.cc.Invoke(ctx, ChainReader_UnregisterEventFilter_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *chainReaderClient) QueryEvents(ctx context.Context, in *QueryEventsRequest, opts ...grpc.CallOption) (*QueryEventsReply, error) { - out := new(QueryEventsReply) - err := c.cc.Invoke(ctx, ChainReader_QueryEvents_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *chainReaderClient) GetLatestValue(ctx context.Context, in *GetLatestValueRequest, opts ...grpc.CallOption) (*GetLatestValueReply, error) { out := new(GetLatestValueReply) err := c.cc.Invoke(ctx, ChainReader_GetLatestValue_FullMethodName, in, out, opts...) @@ -1103,16 +1072,23 @@ func (c *chainReaderClient) GetDecoding(ctx context.Context, in *GetDecodingRequ return out, nil } +func (c *chainReaderClient) GetMaxSize(ctx context.Context, in *GetMaxSizeRequest, opts ...grpc.CallOption) (*GetMaxSizeResponse, error) { + out := new(GetMaxSizeResponse) + err := c.cc.Invoke(ctx, ChainReader_GetMaxSize_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ChainReaderServer is the server API for ChainReader service. // All implementations must embed UnimplementedChainReaderServer // for forward compatibility type ChainReaderServer interface { - RegisterEventFilter(context.Context, *RegisterEventFilterRequest) (*RegisterEventFilterReply, error) - UnregisterEventFilter(context.Context, *UnregisterEventFilterRequest) (*RegisterEventFilterReply, error) - QueryEvents(context.Context, *QueryEventsRequest) (*QueryEventsReply, error) GetLatestValue(context.Context, *GetLatestValueRequest) (*GetLatestValueReply, error) GetEncoding(context.Context, *GetEncodingRequest) (*GetEncodingResponse, error) GetDecoding(context.Context, *GetDecodingRequest) (*GetDecodingResponse, error) + GetMaxSize(context.Context, *GetMaxSizeRequest) (*GetMaxSizeResponse, error) mustEmbedUnimplementedChainReaderServer() } @@ -1120,15 +1096,6 @@ type ChainReaderServer interface { type UnimplementedChainReaderServer struct { } -func (UnimplementedChainReaderServer) RegisterEventFilter(context.Context, *RegisterEventFilterRequest) (*RegisterEventFilterReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method RegisterEventFilter not implemented") -} -func (UnimplementedChainReaderServer) UnregisterEventFilter(context.Context, *UnregisterEventFilterRequest) (*RegisterEventFilterReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnregisterEventFilter not implemented") -} -func (UnimplementedChainReaderServer) QueryEvents(context.Context, *QueryEventsRequest) (*QueryEventsReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method QueryEvents not implemented") -} func (UnimplementedChainReaderServer) GetLatestValue(context.Context, *GetLatestValueRequest) (*GetLatestValueReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetLatestValue not implemented") } @@ -1138,6 +1105,9 @@ func (UnimplementedChainReaderServer) GetEncoding(context.Context, *GetEncodingR func (UnimplementedChainReaderServer) GetDecoding(context.Context, *GetDecodingRequest) (*GetDecodingResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetDecoding not implemented") } +func (UnimplementedChainReaderServer) GetMaxSize(context.Context, *GetMaxSizeRequest) (*GetMaxSizeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetMaxSize not implemented") +} func (UnimplementedChainReaderServer) mustEmbedUnimplementedChainReaderServer() {} // UnsafeChainReaderServer may be embedded to opt out of forward compatibility for this service. @@ -1151,60 +1121,6 @@ func RegisterChainReaderServer(s grpc.ServiceRegistrar, srv ChainReaderServer) { s.RegisterService(&ChainReader_ServiceDesc, srv) } -func _ChainReader_RegisterEventFilter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RegisterEventFilterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ChainReaderServer).RegisterEventFilter(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ChainReader_RegisterEventFilter_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ChainReaderServer).RegisterEventFilter(ctx, req.(*RegisterEventFilterRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ChainReader_UnregisterEventFilter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UnregisterEventFilterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ChainReaderServer).UnregisterEventFilter(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ChainReader_UnregisterEventFilter_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ChainReaderServer).UnregisterEventFilter(ctx, req.(*UnregisterEventFilterRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ChainReader_QueryEvents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryEventsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ChainReaderServer).QueryEvents(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ChainReader_QueryEvents_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ChainReaderServer).QueryEvents(ctx, req.(*QueryEventsRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _ChainReader_GetLatestValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetLatestValueRequest) if err := dec(in); err != nil { @@ -1259,6 +1175,24 @@ func _ChainReader_GetDecoding_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _ChainReader_GetMaxSize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetMaxSizeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChainReaderServer).GetMaxSize(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ChainReader_GetMaxSize_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChainReaderServer).GetMaxSize(ctx, req.(*GetMaxSizeRequest)) + } + return interceptor(ctx, in, info, handler) +} + // ChainReader_ServiceDesc is the grpc.ServiceDesc for ChainReader service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -1266,18 +1200,6 @@ var ChainReader_ServiceDesc = grpc.ServiceDesc{ ServiceName: "loop.ChainReader", HandlerType: (*ChainReaderServer)(nil), Methods: []grpc.MethodDesc{ - { - MethodName: "RegisterEventFilter", - Handler: _ChainReader_RegisterEventFilter_Handler, - }, - { - MethodName: "UnregisterEventFilter", - Handler: _ChainReader_UnregisterEventFilter_Handler, - }, - { - MethodName: "QueryEvents", - Handler: _ChainReader_QueryEvents_Handler, - }, { MethodName: "GetLatestValue", Handler: _ChainReader_GetLatestValue_Handler, @@ -1290,6 +1212,10 @@ var ChainReader_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetDecoding", Handler: _ChainReader_GetDecoding_Handler, }, + { + MethodName: "GetMaxSize", + Handler: _ChainReader_GetMaxSize_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "relayer.proto", diff --git a/pkg/loop/internal/test/config.go b/pkg/loop/internal/test/config.go index caf423f0a3..6f71c3420a 100644 --- a/pkg/loop/internal/test/config.go +++ b/pkg/loop/internal/test/config.go @@ -91,6 +91,14 @@ func (s staticContractTransmitter) FromAccount() (libocr.Account, error) { type staticChainReader struct{} +func (c staticChainReader) GetMaxEncodingSize(ctx context.Context, n int, itemType string) (int, error) { + return 0, errors.New("not used for these test") +} + +func (c staticChainReader) GetMaxDecodingSize(ctx context.Context, n int, itemType string) (int, error) { + return 0, errors.New("not used for these test") +} + func (c staticChainReader) Encode(ctx context.Context, item any, itemType string) (libocr.Report, error) { return nil, errors.New("not used for these test") } diff --git a/pkg/types/codec.go b/pkg/types/codec.go index 4c33b57494..ed81700b66 100644 --- a/pkg/types/codec.go +++ b/pkg/types/codec.go @@ -8,10 +8,20 @@ import ( type Encoder interface { Encode(ctx context.Context, item any, itemType string) (types.Report, error) + // GetMaxEncodingSize returns the max size in bytes if n elements are supplied for all top level dynamically sized elements. + // If no elements are dynamically sized, the returned value will be the same for all n. + // If there are multiple levels of dynamically sized elements, or itemType cannot be found, + // InvalidTypeError will be returned. + GetMaxEncodingSize(ctx context.Context, n int, itemType string) (int, error) } type Decoder interface { Decode(ctx context.Context, raw []byte, into any, itemType string) error + // GetMaxDecodingSize returns the max size in bytes if n elements are supplied for all top level dynamically sized elements. + // If no elements are dynamically sized, the returned value will be the same for all n. + // If there are multiple levels of dynamically sized elements, or itemType cannot be found, + // InvalidTypeError will be returned. + GetMaxDecodingSize(ctx context.Context, n int, itemType string) (int, error) } type Codec interface { diff --git a/pkg/types/interfacetests/codec_interface_tests.go b/pkg/types/interfacetests/codec_interface_tests.go index 7634a70c4e..c582acccfa 100644 --- a/pkg/types/interfacetests/codec_interface_tests.go +++ b/pkg/types/interfacetests/codec_interface_tests.go @@ -181,6 +181,11 @@ func RunChainReaderInterfaceTests(t *testing.T, tester ChainReaderInterfaceTeste require.NoError(t, cr.GetLatestValue(ctx, bc, method, params, actual)) assert.Equal(t, &secondItem, actual) }, + "GetMaxEncodingSize returns errors for unknown types": func(t *testing.T) { + cr := tester.GetChainReader(t) + _, err := cr.GetMaxEncodingSize(ctx, 10, "not"+TestItemType) + assert.IsType(t, types.InvalidTypeError{}, err) + }, } runTests(t, tester, tests) diff --git a/pkg/types/map_decoder.go b/pkg/types/map_decoder.go index 7e24a17caa..f872b200c0 100644 --- a/pkg/types/map_decoder.go +++ b/pkg/types/map_decoder.go @@ -5,4 +5,9 @@ import "context" type MapDecoder interface { DecodeSingle(ctx context.Context, raw []byte, itemType string) (map[string]any, error) DecodeMany(ctx context.Context, raw []byte, itemType string) ([]map[string]any, error) + // GetMaxDecodingSize returns the max size in bytes if n elements are supplied for all top level dynamically sized elements. + // If no elements are dynamically sized, the returned value will be the same for all n. + // If there are multiple levels of dynamically sized elements, or itemType cannot be found, + // InvalidTypeError will be returned. + GetMaxDecodingSize(ctx context.Context, n int, itemType string) (int, error) } diff --git a/pkg/utils/map_decoder.go b/pkg/utils/map_decoder.go index 2960b5e335..b7d4bd6eb1 100644 --- a/pkg/utils/map_decoder.go +++ b/pkg/utils/map_decoder.go @@ -30,6 +30,10 @@ type mapDecoder struct { hooks []mapstructure.DecodeHookFunc } +func (m *mapDecoder) GetMaxDecodingSize(ctx context.Context, n int, itemType string) (int, error) { + return m.decoder.GetMaxDecodingSize(ctx, n, itemType) +} + func (m *mapDecoder) Decode(ctx context.Context, raw []byte, into any, itemType string) error { rInto := reflect.ValueOf(into) if rInto.Kind() != reflect.Pointer { diff --git a/pkg/utils/map_decoder_test.go b/pkg/utils/map_decoder_test.go index 189fc79daa..a0bc9cc377 100644 --- a/pkg/utils/map_decoder_test.go +++ b/pkg/utils/map_decoder_test.go @@ -16,7 +16,11 @@ import ( "github.com/smartcontractkit/chainlink-relay/pkg/utils" ) -const anyItemTypeForMapDecoder = "anything" +const ( + anyItemTypeForMapDecoder = "anything" + anyNElementsForMapDecoder = 10 + anyDecodingSizeForMapDecoder = 200 +) var anyRawBytes = []byte("raw") @@ -73,6 +77,16 @@ func TestMapDecoder(t *testing.T) { _, err := utils.DecoderFromMapDecoder(nil) assert.Error(t, err) }) + + t.Run("GetMaxDecodingSize delegates", func(t *testing.T) { + tmd := &testMapDecoder{} + decoder, err := utils.DecoderFromMapDecoder(tmd) + require.NoError(t, err) + + maxSize, err := decoder.GetMaxDecodingSize(context.Background(), anyNElementsForMapDecoder, anyItemTypeForMapDecoder) + assert.NoError(t, err) + assert.Equal(t, anyDecodingSizeForMapDecoder, maxSize) + }) } func TestVerifyFieldMaps(t *testing.T) { @@ -231,6 +245,7 @@ type testMapDecoder struct { resultMany []map[string]any correctRaw bool correctItem bool + correctN bool } func (t *testMapDecoder) DecodeSingle(ctx context.Context, raw []byte, itemType string) (map[string]any, error) { @@ -245,6 +260,12 @@ func (t *testMapDecoder) DecodeMany(ctx context.Context, raw []byte, itemType st return t.resultMany, nil } +func (t *testMapDecoder) GetMaxDecodingSize(ctx context.Context, n int, itemType string) (int, error) { + t.correctN = anyNElementsForMapDecoder == n + t.correctItem = itemType == anyItemTypeForMapDecoder + return anyDecodingSizeForMapDecoder, nil +} + type mapTestType struct { Field1 string Field2 int