diff --git a/pkg/capabilities/v2/chain-capabilities/consensus/ocr3/types/generate.go b/pkg/capabilities/v2/chain-capabilities/consensus/ocr3/types/generate.go new file mode 100644 index 000000000..866bac973 --- /dev/null +++ b/pkg/capabilities/v2/chain-capabilities/consensus/ocr3/types/generate.go @@ -0,0 +1,3 @@ +package types + +//go:generate protoc --go_out=. --go_opt=paths=source_relative -I. ocr3_chain_capabilities_config_types.proto diff --git a/pkg/capabilities/v2/chain-capabilities/consensus/ocr3/types/ocr3_chain_capabilities_config_types.pb.go b/pkg/capabilities/v2/chain-capabilities/consensus/ocr3/types/ocr3_chain_capabilities_config_types.pb.go new file mode 100644 index 000000000..b6f98ffa4 --- /dev/null +++ b/pkg/capabilities/v2/chain-capabilities/consensus/ocr3/types/ocr3_chain_capabilities_config_types.pb.go @@ -0,0 +1,169 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.7 +// protoc v5.29.3 +// source: ocr3_chain_capabilities_config_types.proto + +package types + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ReportingPluginConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // These fields are shadowing the `ReportingPluginLimits` fields. + // See: https://github.com/smartcontractkit/libocr/blob/master/offchainreporting2plus/ocr3types/plugin.go#L296 + MaxQueryLengthBytes uint32 `protobuf:"varint,1,opt,name=maxQueryLengthBytes,proto3" json:"maxQueryLengthBytes,omitempty"` + MaxObservationLengthBytes uint32 `protobuf:"varint,2,opt,name=maxObservationLengthBytes,proto3" json:"maxObservationLengthBytes,omitempty"` + MaxOutcomeLengthBytes uint32 `protobuf:"varint,3,opt,name=maxOutcomeLengthBytes,proto3" json:"maxOutcomeLengthBytes,omitempty"` + MaxReportLengthBytes uint32 `protobuf:"varint,4,opt,name=maxReportLengthBytes,proto3" json:"maxReportLengthBytes,omitempty"` + MaxReportCount uint32 `protobuf:"varint,5,opt,name=maxReportCount,proto3" json:"maxReportCount,omitempty"` + MaxBatchSize uint32 `protobuf:"varint,6,opt,name=maxBatchSize,proto3" json:"maxBatchSize,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ReportingPluginConfig) Reset() { + *x = ReportingPluginConfig{} + mi := &file_ocr3_chain_capabilities_config_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ReportingPluginConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReportingPluginConfig) ProtoMessage() {} + +func (x *ReportingPluginConfig) ProtoReflect() protoreflect.Message { + mi := &file_ocr3_chain_capabilities_config_types_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReportingPluginConfig.ProtoReflect.Descriptor instead. +func (*ReportingPluginConfig) Descriptor() ([]byte, []int) { + return file_ocr3_chain_capabilities_config_types_proto_rawDescGZIP(), []int{0} +} + +func (x *ReportingPluginConfig) GetMaxQueryLengthBytes() uint32 { + if x != nil { + return x.MaxQueryLengthBytes + } + return 0 +} + +func (x *ReportingPluginConfig) GetMaxObservationLengthBytes() uint32 { + if x != nil { + return x.MaxObservationLengthBytes + } + return 0 +} + +func (x *ReportingPluginConfig) GetMaxOutcomeLengthBytes() uint32 { + if x != nil { + return x.MaxOutcomeLengthBytes + } + return 0 +} + +func (x *ReportingPluginConfig) GetMaxReportLengthBytes() uint32 { + if x != nil { + return x.MaxReportLengthBytes + } + return 0 +} + +func (x *ReportingPluginConfig) GetMaxReportCount() uint32 { + if x != nil { + return x.MaxReportCount + } + return 0 +} + +func (x *ReportingPluginConfig) GetMaxBatchSize() uint32 { + if x != nil { + return x.MaxBatchSize + } + return 0 +} + +var File_ocr3_chain_capabilities_config_types_proto protoreflect.FileDescriptor + +const file_ocr3_chain_capabilities_config_types_proto_rawDesc = "" + + "\n" + + "*ocr3_chain_capabilities_config_types.proto\x12$chain_capabilities_ocr3_config_types\"\xbd\x02\n" + + "\x15ReportingPluginConfig\x120\n" + + "\x13maxQueryLengthBytes\x18\x01 \x01(\rR\x13maxQueryLengthBytes\x12<\n" + + "\x19maxObservationLengthBytes\x18\x02 \x01(\rR\x19maxObservationLengthBytes\x124\n" + + "\x15maxOutcomeLengthBytes\x18\x03 \x01(\rR\x15maxOutcomeLengthBytes\x122\n" + + "\x14maxReportLengthBytes\x18\x04 \x01(\rR\x14maxReportLengthBytes\x12&\n" + + "\x0emaxReportCount\x18\x05 \x01(\rR\x0emaxReportCount\x12\"\n" + + "\fmaxBatchSize\x18\x06 \x01(\rR\fmaxBatchSizeB9Z7capabilities/v2/chain-capabilities/consensus/ocr3/typesb\x06proto3" + +var ( + file_ocr3_chain_capabilities_config_types_proto_rawDescOnce sync.Once + file_ocr3_chain_capabilities_config_types_proto_rawDescData []byte +) + +func file_ocr3_chain_capabilities_config_types_proto_rawDescGZIP() []byte { + file_ocr3_chain_capabilities_config_types_proto_rawDescOnce.Do(func() { + file_ocr3_chain_capabilities_config_types_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_ocr3_chain_capabilities_config_types_proto_rawDesc), len(file_ocr3_chain_capabilities_config_types_proto_rawDesc))) + }) + return file_ocr3_chain_capabilities_config_types_proto_rawDescData +} + +var file_ocr3_chain_capabilities_config_types_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_ocr3_chain_capabilities_config_types_proto_goTypes = []any{ + (*ReportingPluginConfig)(nil), // 0: chain_capabilities_ocr3_config_types.ReportingPluginConfig +} +var file_ocr3_chain_capabilities_config_types_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_ocr3_chain_capabilities_config_types_proto_init() } +func file_ocr3_chain_capabilities_config_types_proto_init() { + if File_ocr3_chain_capabilities_config_types_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_ocr3_chain_capabilities_config_types_proto_rawDesc), len(file_ocr3_chain_capabilities_config_types_proto_rawDesc)), + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_ocr3_chain_capabilities_config_types_proto_goTypes, + DependencyIndexes: file_ocr3_chain_capabilities_config_types_proto_depIdxs, + MessageInfos: file_ocr3_chain_capabilities_config_types_proto_msgTypes, + }.Build() + File_ocr3_chain_capabilities_config_types_proto = out.File + file_ocr3_chain_capabilities_config_types_proto_goTypes = nil + file_ocr3_chain_capabilities_config_types_proto_depIdxs = nil +} diff --git a/pkg/capabilities/v2/chain-capabilities/consensus/ocr3/types/ocr3_chain_capabilities_config_types.proto b/pkg/capabilities/v2/chain-capabilities/consensus/ocr3/types/ocr3_chain_capabilities_config_types.proto new file mode 100644 index 000000000..854372b76 --- /dev/null +++ b/pkg/capabilities/v2/chain-capabilities/consensus/ocr3/types/ocr3_chain_capabilities_config_types.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; + +option go_package = "capabilities/v2/chain-capabilities/consensus/ocr3/types"; + +package chain_capabilities_ocr3_config_types; + +message ReportingPluginConfig { + // These fields are shadowing the `ReportingPluginLimits` fields. + // See: https://github.com/smartcontractkit/libocr/blob/master/offchainreporting2plus/ocr3types/plugin.go#L296 + uint32 maxQueryLengthBytes = 1; + uint32 maxObservationLengthBytes = 2; + uint32 maxOutcomeLengthBytes = 3; + uint32 maxReportLengthBytes = 4; + uint32 maxReportCount = 5; + + uint32 maxBatchSize = 6; +} \ No newline at end of file