Documentation
¶
Index ¶
- Constants
- Variables
- type AggregationOutcome
- func (*AggregationOutcome) Descriptor() ([]byte, []int)deprecated
- func (x *AggregationOutcome) GetEncodableOutcome() *pb.Map
- func (x *AggregationOutcome) GetEncoderConfig() *pb.Map
- func (x *AggregationOutcome) GetEncoderName() string
- func (x *AggregationOutcome) GetLastSeenAt() uint64
- func (x *AggregationOutcome) GetMetadata() []byte
- func (x *AggregationOutcome) GetShouldReport() bool
- func (x *AggregationOutcome) GetTimestamp() *timestamppb.Timestamp
- func (*AggregationOutcome) ProtoMessage()
- func (x *AggregationOutcome) ProtoReflect() protoreflect.Message
- func (x *AggregationOutcome) Reset()
- func (x *AggregationOutcome) String() string
- type Aggregator
- type AggregatorFactory
- type Encoder
- type EncoderFactory
- type Id
- func (*Id) Descriptor() ([]byte, []int)deprecated
- func (x *Id) GetKeyId() string
- func (x *Id) GetReportId() string
- func (x *Id) GetWorkflowDonConfigVersion() uint32
- func (x *Id) GetWorkflowDonId() uint32
- func (x *Id) GetWorkflowExecutionId() string
- func (x *Id) GetWorkflowId() string
- func (x *Id) GetWorkflowName() string
- func (x *Id) GetWorkflowOwner() string
- func (*Id) ProtoMessage()
- func (x *Id) ProtoReflect() protoreflect.Message
- func (x *Id) Reset()
- func (x *Id) String() string
- type Metadata
- type Observation
- func (*Observation) Descriptor() ([]byte, []int)deprecated
- func (x *Observation) GetId() *Id
- func (x *Observation) GetObservations() *pb.List
- func (x *Observation) GetOverriddenEncoderConfig() *pb.Map
- func (x *Observation) GetOverriddenEncoderName() string
- func (*Observation) ProtoMessage()
- func (x *Observation) ProtoReflect() protoreflect.Message
- func (x *Observation) Reset()
- func (x *Observation) String() string
- type Observations
- func (*Observations) Descriptor() ([]byte, []int)deprecated
- func (x *Observations) GetObservations() []*Observation
- func (x *Observations) GetRegisteredWorkflowIds() []string
- func (x *Observations) GetTimestamp() *timestamppb.Timestamp
- func (*Observations) ProtoMessage()
- func (x *Observations) ProtoReflect() protoreflect.Message
- func (x *Observations) Reset()
- func (x *Observations) String() string
- type Outcome
- func (*Outcome) Descriptor() ([]byte, []int)deprecated
- func (x *Outcome) GetCurrentReports() []*Report
- func (x *Outcome) GetOutcomes() map[string]*AggregationOutcome
- func (*Outcome) ProtoMessage()
- func (x *Outcome) ProtoReflect() protoreflect.Message
- func (x *Outcome) Reset()
- func (x *Outcome) String() string
- type Query
- type Report
- type ReportInfo
- type ReportingPluginConfig
- func (*ReportingPluginConfig) Descriptor() ([]byte, []int)deprecated
- func (x *ReportingPluginConfig) GetMaxBatchSize() uint32
- func (x *ReportingPluginConfig) GetMaxObservationLengthBytes() uint32
- func (x *ReportingPluginConfig) GetMaxOutcomeLengthBytes() uint32
- func (x *ReportingPluginConfig) GetMaxQueryLengthBytes() uint32
- func (x *ReportingPluginConfig) GetMaxReportCount() uint32
- func (x *ReportingPluginConfig) GetMaxReportLengthBytes() uint32
- func (x *ReportingPluginConfig) GetOutcomePruningThreshold() uint64
- func (x *ReportingPluginConfig) GetRequestTimeout() *durationpb.Duration
- func (*ReportingPluginConfig) ProtoMessage()
- func (x *ReportingPluginConfig) ProtoReflect() protoreflect.Message
- func (x *ReportingPluginConfig) Reset()
- func (x *ReportingPluginConfig) String() string
- type SignedReport
Constants ¶
View Source
const MetadataFieldName = "INTERNAL_METADATA"
Variables ¶
View Source
var File_capabilities_consensus_ocr3_types_ocr3_config_types_proto protoreflect.FileDescriptor
View Source
var File_capabilities_consensus_ocr3_types_ocr3_types_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type AggregationOutcome ¶
type AggregationOutcome struct {
EncodableOutcome *pb.Map `protobuf:"bytes,1,opt,name=encodableOutcome,proto3" json:"encodableOutcome,omitempty"` // passed to encoders
Metadata []byte `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` // internal to the aggregator
ShouldReport bool `protobuf:"varint,3,opt,name=shouldReport,proto3" json:"shouldReport,omitempty"`
LastSeenAt uint64 `protobuf:"varint,4,opt,name=lastSeenAt,proto3" json:"lastSeenAt,omitempty"` // this is the equivalent of a SeqNr
Timestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // current time of the node
EncoderName string `protobuf:"bytes,6,opt,name=encoderName,proto3" json:"encoderName,omitempty"` // optional dynamic encoder override
EncoderConfig *pb.Map `protobuf:"bytes,7,opt,name=encoderConfig,proto3" json:"encoderConfig,omitempty"` // optional dynamic encoder config
// contains filtered or unexported fields
}
per-workflow aggregation outcome
func AppendMetadata ¶
func AppendMetadata(outcome *AggregationOutcome, meta *Metadata) (*AggregationOutcome, error)
func (*AggregationOutcome) Descriptor
deprecated
func (*AggregationOutcome) Descriptor() ([]byte, []int)
Deprecated: Use AggregationOutcome.ProtoReflect.Descriptor instead.
func (*AggregationOutcome) GetEncodableOutcome ¶
func (x *AggregationOutcome) GetEncodableOutcome() *pb.Map
func (*AggregationOutcome) GetEncoderConfig ¶ added in v0.3.0
func (x *AggregationOutcome) GetEncoderConfig() *pb.Map
func (*AggregationOutcome) GetEncoderName ¶ added in v0.3.0
func (x *AggregationOutcome) GetEncoderName() string
func (*AggregationOutcome) GetLastSeenAt ¶
func (x *AggregationOutcome) GetLastSeenAt() uint64
func (*AggregationOutcome) GetMetadata ¶
func (x *AggregationOutcome) GetMetadata() []byte
func (*AggregationOutcome) GetShouldReport ¶
func (x *AggregationOutcome) GetShouldReport() bool
func (*AggregationOutcome) GetTimestamp ¶ added in v0.2.2
func (x *AggregationOutcome) GetTimestamp() *timestamppb.Timestamp
func (*AggregationOutcome) ProtoMessage ¶
func (*AggregationOutcome) ProtoMessage()
func (*AggregationOutcome) ProtoReflect ¶
func (x *AggregationOutcome) ProtoReflect() protoreflect.Message
func (*AggregationOutcome) Reset ¶
func (x *AggregationOutcome) Reset()
func (*AggregationOutcome) String ¶
func (x *AggregationOutcome) String() string
type Aggregator ¶
type Aggregator interface {
// Called by the Outcome() phase of OCR reporting.
// The inner array of observations corresponds to elements listed in "inputs.observations" section.
Aggregate(lggr logger.Logger, previousOutcome *AggregationOutcome, observations map[ocrcommon.OracleID][]values.Value, f int) (*AggregationOutcome, error)
}
type AggregatorFactory ¶
type EncoderFactory ¶
type Id ¶
type Id struct {
WorkflowExecutionId string `protobuf:"bytes,1,opt,name=workflowExecutionId,proto3" json:"workflowExecutionId,omitempty"`
WorkflowId string `protobuf:"bytes,2,opt,name=workflowId,proto3" json:"workflowId,omitempty"`
WorkflowOwner string `protobuf:"bytes,3,opt,name=workflowOwner,proto3" json:"workflowOwner,omitempty"`
WorkflowName string `protobuf:"bytes,4,opt,name=workflowName,proto3" json:"workflowName,omitempty"`
ReportId string `protobuf:"bytes,6,opt,name=reportId,proto3" json:"reportId,omitempty"`
WorkflowDonId uint32 `protobuf:"varint,7,opt,name=workflowDonId,proto3" json:"workflowDonId,omitempty"`
WorkflowDonConfigVersion uint32 `protobuf:"varint,8,opt,name=workflowDonConfigVersion,proto3" json:"workflowDonConfigVersion,omitempty"`
KeyId string `protobuf:"bytes,9,opt,name=keyId,proto3" json:"keyId,omitempty"`
// contains filtered or unexported fields
}
func (*Id) Descriptor
deprecated
func (*Id) GetReportId ¶
func (*Id) GetWorkflowDonConfigVersion ¶
func (*Id) GetWorkflowDonId ¶
func (*Id) GetWorkflowExecutionId ¶
func (*Id) GetWorkflowId ¶
func (*Id) GetWorkflowName ¶
func (*Id) GetWorkflowOwner ¶
func (*Id) ProtoMessage ¶
func (*Id) ProtoMessage()
func (*Id) ProtoReflect ¶
func (x *Id) ProtoReflect() protoreflect.Message
type Metadata ¶
type Metadata struct {
Version uint32 // 1 byte
ExecutionID string // 32 hex bytes (string len = 64)
Timestamp uint32 // 4 bytes
DONID uint32 // 4 bytes
DONConfigVersion uint32 // 4 bytes
WorkflowID string // 32 hex bytes (string len = 64)
WorkflowName string // 10 hex bytes (string len = 20)
WorkflowOwner string // 20 hex bytes (string len = 40)
ReportID string // 2 hex bytes (string len = 4)
}
type Observation ¶
type Observation struct {
Id *Id `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// list of observations defined in inputs.observations
Observations *pb.List `protobuf:"bytes,4,opt,name=observations,proto3" json:"observations,omitempty"`
OverriddenEncoderName string `protobuf:"bytes,5,opt,name=overriddenEncoderName,proto3" json:"overriddenEncoderName,omitempty"`
OverriddenEncoderConfig *pb.Map `protobuf:"bytes,6,opt,name=overriddenEncoderConfig,proto3" json:"overriddenEncoderConfig,omitempty"`
// contains filtered or unexported fields
}
func (*Observation) Descriptor
deprecated
func (*Observation) Descriptor() ([]byte, []int)
Deprecated: Use Observation.ProtoReflect.Descriptor instead.
func (*Observation) GetId ¶
func (x *Observation) GetId() *Id
func (*Observation) GetObservations ¶
func (x *Observation) GetObservations() *pb.List
func (*Observation) GetOverriddenEncoderConfig ¶ added in v0.4.0
func (x *Observation) GetOverriddenEncoderConfig() *pb.Map
func (*Observation) GetOverriddenEncoderName ¶ added in v0.4.0
func (x *Observation) GetOverriddenEncoderName() string
func (*Observation) ProtoMessage ¶
func (*Observation) ProtoMessage()
func (*Observation) ProtoReflect ¶
func (x *Observation) ProtoReflect() protoreflect.Message
func (*Observation) Reset ¶
func (x *Observation) Reset()
func (*Observation) String ¶
func (x *Observation) String() string
type Observations ¶
type Observations struct {
// batched observations for multiple workflow execution IDs
Observations []*Observation `protobuf:"bytes,1,rep,name=observations,proto3" json:"observations,omitempty"`
// the workflow IDs that are registered in the node
RegisteredWorkflowIds []string `protobuf:"bytes,2,rep,name=registeredWorkflowIds,proto3" json:"registeredWorkflowIds,omitempty"`
// the node's current current time
Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// contains filtered or unexported fields
}
func (*Observations) Descriptor
deprecated
func (*Observations) Descriptor() ([]byte, []int)
Deprecated: Use Observations.ProtoReflect.Descriptor instead.
func (*Observations) GetObservations ¶
func (x *Observations) GetObservations() []*Observation
func (*Observations) GetRegisteredWorkflowIds ¶
func (x *Observations) GetRegisteredWorkflowIds() []string
func (*Observations) GetTimestamp ¶ added in v0.2.2
func (x *Observations) GetTimestamp() *timestamppb.Timestamp
func (*Observations) ProtoMessage ¶
func (*Observations) ProtoMessage()
func (*Observations) ProtoReflect ¶
func (x *Observations) ProtoReflect() protoreflect.Message
func (*Observations) Reset ¶
func (x *Observations) Reset()
func (*Observations) String ¶
func (x *Observations) String() string
type Outcome ¶
type Outcome struct {
Outcomes map[string]*AggregationOutcome `` /* 143-byte string literal not displayed */
CurrentReports []*Report `protobuf:"bytes,2,rep,name=current_reports,json=currentReports,proto3" json:"current_reports,omitempty"`
// contains filtered or unexported fields
}
func (*Outcome) Descriptor
deprecated
func (*Outcome) GetCurrentReports ¶
func (*Outcome) GetOutcomes ¶
func (x *Outcome) GetOutcomes() map[string]*AggregationOutcome
func (*Outcome) ProtoMessage ¶
func (*Outcome) ProtoMessage()
func (*Outcome) ProtoReflect ¶
func (x *Outcome) ProtoReflect() protoreflect.Message
type Query ¶
type Query struct {
// the requests to get consensus on.
Ids []*Id `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
// contains filtered or unexported fields
}
func (*Query) Descriptor
deprecated
func (*Query) ProtoMessage ¶
func (*Query) ProtoMessage()
func (*Query) ProtoReflect ¶
func (x *Query) ProtoReflect() protoreflect.Message
type Report ¶
type Report struct {
Id *Id `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Outcome *AggregationOutcome `protobuf:"bytes,2,opt,name=outcome,proto3" json:"outcome,omitempty"`
// contains filtered or unexported fields
}
func (*Report) Descriptor
deprecated
func (*Report) GetOutcome ¶
func (x *Report) GetOutcome() *AggregationOutcome
func (*Report) ProtoMessage ¶
func (*Report) ProtoMessage()
func (*Report) ProtoReflect ¶
func (x *Report) ProtoReflect() protoreflect.Message
type ReportInfo ¶
type ReportInfo struct {
Id *Id `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
ShouldReport bool `protobuf:"varint,2,opt,name=should_report,json=shouldReport,proto3" json:"should_report,omitempty"`
// contains filtered or unexported fields
}
func (*ReportInfo) Descriptor
deprecated
func (*ReportInfo) Descriptor() ([]byte, []int)
Deprecated: Use ReportInfo.ProtoReflect.Descriptor instead.
func (*ReportInfo) GetId ¶
func (x *ReportInfo) GetId() *Id
func (*ReportInfo) GetShouldReport ¶
func (x *ReportInfo) GetShouldReport() bool
func (*ReportInfo) ProtoMessage ¶
func (*ReportInfo) ProtoMessage()
func (*ReportInfo) ProtoReflect ¶
func (x *ReportInfo) ProtoReflect() protoreflect.Message
func (*ReportInfo) Reset ¶
func (x *ReportInfo) Reset()
func (*ReportInfo) String ¶
func (x *ReportInfo) String() string
type ReportingPluginConfig ¶ added in v0.5.0
type ReportingPluginConfig struct {
// 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"`
OutcomePruningThreshold uint64 `protobuf:"varint,7,opt,name=outcomePruningThreshold,proto3" json:"outcomePruningThreshold,omitempty"`
RequestTimeout *durationpb.Duration `protobuf:"bytes,8,opt,name=requestTimeout,proto3" json:"requestTimeout,omitempty"`
// contains filtered or unexported fields
}
func (*ReportingPluginConfig) Descriptor
deprecated
added in
v0.5.0
func (*ReportingPluginConfig) Descriptor() ([]byte, []int)
Deprecated: Use ReportingPluginConfig.ProtoReflect.Descriptor instead.
func (*ReportingPluginConfig) GetMaxBatchSize ¶ added in v0.5.0
func (x *ReportingPluginConfig) GetMaxBatchSize() uint32
func (*ReportingPluginConfig) GetMaxObservationLengthBytes ¶ added in v0.5.0
func (x *ReportingPluginConfig) GetMaxObservationLengthBytes() uint32
func (*ReportingPluginConfig) GetMaxOutcomeLengthBytes ¶ added in v0.5.0
func (x *ReportingPluginConfig) GetMaxOutcomeLengthBytes() uint32
func (*ReportingPluginConfig) GetMaxQueryLengthBytes ¶ added in v0.5.0
func (x *ReportingPluginConfig) GetMaxQueryLengthBytes() uint32
func (*ReportingPluginConfig) GetMaxReportCount ¶ added in v0.5.0
func (x *ReportingPluginConfig) GetMaxReportCount() uint32
func (*ReportingPluginConfig) GetMaxReportLengthBytes ¶ added in v0.5.0
func (x *ReportingPluginConfig) GetMaxReportLengthBytes() uint32
func (*ReportingPluginConfig) GetOutcomePruningThreshold ¶ added in v0.5.0
func (x *ReportingPluginConfig) GetOutcomePruningThreshold() uint64
func (*ReportingPluginConfig) GetRequestTimeout ¶ added in v0.5.0
func (x *ReportingPluginConfig) GetRequestTimeout() *durationpb.Duration
func (*ReportingPluginConfig) ProtoMessage ¶ added in v0.5.0
func (*ReportingPluginConfig) ProtoMessage()
func (*ReportingPluginConfig) ProtoReflect ¶ added in v0.5.0
func (x *ReportingPluginConfig) ProtoReflect() protoreflect.Message
func (*ReportingPluginConfig) Reset ¶ added in v0.5.0
func (x *ReportingPluginConfig) Reset()
func (*ReportingPluginConfig) String ¶ added in v0.5.0
func (x *ReportingPluginConfig) String() string
type SignedReport ¶
type SignedReport struct {
Report []byte
// Report context is appended to the report before signing by libOCR.
// It contains config digest + round/epoch/sequence numbers (currently 96 bytes).
// Has to be appended to the report before validating signatures.
Context []byte
// Always exactly F+1 signatures.
Signatures [][]byte
// Report ID defined in the workflow spec (2 bytes).
ID []byte
}
Click to show internal directories.
Click to hide internal directories.