Documentation ¶
Overview ¶
Package shim contains implementations of internal types in terms of the external types
Package shim contains implementations of internal types in terms of the external types
Index ¶
- type LimitCheckOCR3ReportingPlugin
- func (rp LimitCheckOCR3ReportingPlugin[RI]) Close() error
- func (rp LimitCheckOCR3ReportingPlugin[RI]) Observation(ctx context.Context, outctx ocr3types.OutcomeContext, query types.Query) (types.Observation, error)
- func (rp LimitCheckOCR3ReportingPlugin[RI]) ObservationQuorum(ctx context.Context, outctx ocr3types.OutcomeContext, query types.Query, ...) (bool, error)
- func (rp LimitCheckOCR3ReportingPlugin[RI]) Outcome(ctx context.Context, outctx ocr3types.OutcomeContext, query types.Query, ...) (ocr3types.Outcome, error)
- func (rp LimitCheckOCR3ReportingPlugin[RI]) Query(ctx context.Context, outctx ocr3types.OutcomeContext) (types.Query, error)
- func (rp LimitCheckOCR3ReportingPlugin[RI]) Reports(ctx context.Context, seqNr uint64, outcome ocr3types.Outcome) ([]ocr3types.ReportPlus[RI], error)
- func (rp LimitCheckOCR3ReportingPlugin[RI]) ShouldAcceptAttestedReport(ctx context.Context, seqNr uint64, report ocr3types.ReportWithInfo[RI]) (bool, error)
- func (rp LimitCheckOCR3ReportingPlugin[RI]) ShouldTransmitAcceptedReport(ctx context.Context, seqNr uint64, report ocr3types.ReportWithInfo[RI]) (bool, error)
- func (rp LimitCheckOCR3ReportingPlugin[RI]) ValidateObservation(ctx context.Context, outctx ocr3types.OutcomeContext, query types.Query, ...) error
- type LimitCheckReportingPlugin
- func (rp LimitCheckReportingPlugin) Close() error
- func (rp LimitCheckReportingPlugin) Observation(ctx context.Context, ts types.ReportTimestamp, query types.Query) (types.Observation, error)
- func (rp LimitCheckReportingPlugin) Query(ctx context.Context, ts types.ReportTimestamp) (types.Query, error)
- func (rp LimitCheckReportingPlugin) Report(ctx context.Context, ts types.ReportTimestamp, query types.Query, ...) (bool, types.Report, error)
- func (rp LimitCheckReportingPlugin) ShouldAcceptFinalizedReport(ctx context.Context, ts types.ReportTimestamp, report types.Report) (bool, error)
- func (rp LimitCheckReportingPlugin) ShouldTransmitAcceptedReport(ctx context.Context, ts types.ReportTimestamp, report types.Report) (bool, error)
- type OCR2SerializingEndpoint
- func (n *OCR2SerializingEndpoint) Broadcast(msg protocol.Message)
- func (n *OCR2SerializingEndpoint) Close() error
- func (n *OCR2SerializingEndpoint) Receive() <-chan protocol.MessageWithSender
- func (n *OCR2SerializingEndpoint) SendTo(msg protocol.Message, to commontypes.OracleID)
- func (n *OCR2SerializingEndpoint) Start() error
- type OCR2TelemetrySender
- type OCR3SerializingEndpoint
- func (n *OCR3SerializingEndpoint[RI]) Broadcast(msg protocol.Message[RI])
- func (n *OCR3SerializingEndpoint[RI]) Close() error
- func (n *OCR3SerializingEndpoint[RI]) Receive() <-chan protocol.MessageWithSender[RI]
- func (n *OCR3SerializingEndpoint[RI]) SendTo(msg protocol.Message[RI], to commontypes.OracleID)
- func (n *OCR3SerializingEndpoint[RI]) Start() error
- type OCR3TelemetrySender
- type SerializingOCR3Database
- func (db *SerializingOCR3Database) ReadCert(ctx context.Context, configDigest types.ConfigDigest) (protocol.CertifiedPrepareOrCommit, error)
- func (db *SerializingOCR3Database) ReadConfig(ctx context.Context) (*types.ContractConfig, error)
- func (db *SerializingOCR3Database) ReadPacemakerState(ctx context.Context, configDigest types.ConfigDigest) (protocol.PacemakerState, error)
- func (db *SerializingOCR3Database) WriteCert(ctx context.Context, configDigest types.ConfigDigest, ...) error
- func (db *SerializingOCR3Database) WriteConfig(ctx context.Context, config types.ContractConfig) error
- func (db *SerializingOCR3Database) WritePacemakerState(ctx context.Context, configDigest types.ConfigDigest, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LimitCheckOCR3ReportingPlugin ¶
type LimitCheckOCR3ReportingPlugin[RI any] struct { Plugin ocr3types.ReportingPlugin[RI] Limits ocr3types.ReportingPluginLimits }
LimitCheckOCR3ReportingPlugin wraps another plugin and checks that its outputs respect limits. We use it to surface violations to authors of plugins as early as possible.
It does not check inputs since those are checked by the SerializingEndpoint.
func (LimitCheckOCR3ReportingPlugin[RI]) Close ¶
func (rp LimitCheckOCR3ReportingPlugin[RI]) Close() error
func (LimitCheckOCR3ReportingPlugin[RI]) Observation ¶
func (rp LimitCheckOCR3ReportingPlugin[RI]) Observation(ctx context.Context, outctx ocr3types.OutcomeContext, query types.Query) (types.Observation, error)
func (LimitCheckOCR3ReportingPlugin[RI]) ObservationQuorum ¶
func (rp LimitCheckOCR3ReportingPlugin[RI]) ObservationQuorum(ctx context.Context, outctx ocr3types.OutcomeContext, query types.Query, aos []types.AttributedObservation) (bool, error)
func (LimitCheckOCR3ReportingPlugin[RI]) Outcome ¶
func (rp LimitCheckOCR3ReportingPlugin[RI]) Outcome(ctx context.Context, outctx ocr3types.OutcomeContext, query types.Query, aos []types.AttributedObservation) (ocr3types.Outcome, error)
func (LimitCheckOCR3ReportingPlugin[RI]) Query ¶
func (rp LimitCheckOCR3ReportingPlugin[RI]) Query(ctx context.Context, outctx ocr3types.OutcomeContext) (types.Query, error)
func (LimitCheckOCR3ReportingPlugin[RI]) Reports ¶
func (rp LimitCheckOCR3ReportingPlugin[RI]) Reports(ctx context.Context, seqNr uint64, outcome ocr3types.Outcome) ([]ocr3types.ReportPlus[RI], error)
func (LimitCheckOCR3ReportingPlugin[RI]) ShouldAcceptAttestedReport ¶
func (rp LimitCheckOCR3ReportingPlugin[RI]) ShouldAcceptAttestedReport(ctx context.Context, seqNr uint64, report ocr3types.ReportWithInfo[RI]) (bool, error)
func (LimitCheckOCR3ReportingPlugin[RI]) ShouldTransmitAcceptedReport ¶
func (rp LimitCheckOCR3ReportingPlugin[RI]) ShouldTransmitAcceptedReport(ctx context.Context, seqNr uint64, report ocr3types.ReportWithInfo[RI]) (bool, error)
func (LimitCheckOCR3ReportingPlugin[RI]) ValidateObservation ¶
func (rp LimitCheckOCR3ReportingPlugin[RI]) ValidateObservation(ctx context.Context, outctx ocr3types.OutcomeContext, query types.Query, ao types.AttributedObservation) error
type LimitCheckReportingPlugin ¶
type LimitCheckReportingPlugin struct { Plugin types.ReportingPlugin Limits types.ReportingPluginLimits }
LimitCheckReportingPlugin wraps another ReportingPlugin and checks that its outputs respect limits. We use it to surface violations to authors of ReportingPlugins as early as possible.
It does not check inputs since those are checked by the SerializingEndpoint.
func (LimitCheckReportingPlugin) Close ¶
func (rp LimitCheckReportingPlugin) Close() error
func (LimitCheckReportingPlugin) Observation ¶
func (rp LimitCheckReportingPlugin) Observation(ctx context.Context, ts types.ReportTimestamp, query types.Query) (types.Observation, error)
func (LimitCheckReportingPlugin) Query ¶
func (rp LimitCheckReportingPlugin) Query(ctx context.Context, ts types.ReportTimestamp) (types.Query, error)
func (LimitCheckReportingPlugin) Report ¶
func (rp LimitCheckReportingPlugin) Report(ctx context.Context, ts types.ReportTimestamp, query types.Query, aos []types.AttributedObservation) (bool, types.Report, error)
func (LimitCheckReportingPlugin) ShouldAcceptFinalizedReport ¶
func (rp LimitCheckReportingPlugin) ShouldAcceptFinalizedReport(ctx context.Context, ts types.ReportTimestamp, report types.Report) (bool, error)
func (LimitCheckReportingPlugin) ShouldTransmitAcceptedReport ¶
func (rp LimitCheckReportingPlugin) ShouldTransmitAcceptedReport(ctx context.Context, ts types.ReportTimestamp, report types.Report) (bool, error)
type OCR2SerializingEndpoint ¶
type OCR2SerializingEndpoint struct {
// contains filtered or unexported fields
}
func NewOCR2SerializingEndpoint ¶
func NewOCR2SerializingEndpoint( chTelemetry chan<- *serialization.TelemetryWrapper, configDigest types.ConfigDigest, endpoint commontypes.BinaryNetworkEndpoint, logger commontypes.Logger, metricsRegisterer prometheus.Registerer, reportingPluginLimits types.ReportingPluginLimits, ) *OCR2SerializingEndpoint
func (*OCR2SerializingEndpoint) Broadcast ¶
func (n *OCR2SerializingEndpoint) Broadcast(msg protocol.Message)
func (*OCR2SerializingEndpoint) Close ¶
func (n *OCR2SerializingEndpoint) Close() error
Close closes the SerializingEndpoint. It will also close the underlying endpoint.
func (*OCR2SerializingEndpoint) Receive ¶
func (n *OCR2SerializingEndpoint) Receive() <-chan protocol.MessageWithSender
func (*OCR2SerializingEndpoint) SendTo ¶
func (n *OCR2SerializingEndpoint) SendTo(msg protocol.Message, to commontypes.OracleID)
func (*OCR2SerializingEndpoint) Start ¶
func (n *OCR2SerializingEndpoint) Start() error
Start starts the SerializingEndpoint. It will also start the underlying endpoint.
type OCR2TelemetrySender ¶
type OCR2TelemetrySender struct {
// contains filtered or unexported fields
}
func MakeOCR2TelemetrySender ¶
func MakeOCR2TelemetrySender(chTelemetry chan<- *serialization.TelemetryWrapper, logger commontypes.Logger) OCR2TelemetrySender
func (OCR2TelemetrySender) RoundStarted ¶
func (ts OCR2TelemetrySender) RoundStarted( configDigest types.ConfigDigest, epoch uint32, round uint8, leader commontypes.OracleID, )
type OCR3SerializingEndpoint ¶
type OCR3SerializingEndpoint[RI any] struct { // contains filtered or unexported fields }
func NewOCR3SerializingEndpoint ¶
func NewOCR3SerializingEndpoint[RI any]( chTelemetry chan<- *serialization.TelemetryWrapper, configDigest types.ConfigDigest, endpoint commontypes.BinaryNetworkEndpoint, maxSigLen int, logger commontypes.Logger, metricsRegisterer prometheus.Registerer, pluginLimits ocr3types.ReportingPluginLimits, n, f int, ) *OCR3SerializingEndpoint[RI]
func (*OCR3SerializingEndpoint[RI]) Broadcast ¶
func (n *OCR3SerializingEndpoint[RI]) Broadcast(msg protocol.Message[RI])
func (*OCR3SerializingEndpoint[RI]) Close ¶
func (n *OCR3SerializingEndpoint[RI]) Close() error
Close closes the SerializingEndpoint. It will also close the underlying endpoint.
func (*OCR3SerializingEndpoint[RI]) Receive ¶
func (n *OCR3SerializingEndpoint[RI]) Receive() <-chan protocol.MessageWithSender[RI]
func (*OCR3SerializingEndpoint[RI]) SendTo ¶
func (n *OCR3SerializingEndpoint[RI]) SendTo(msg protocol.Message[RI], to commontypes.OracleID)
func (*OCR3SerializingEndpoint[RI]) Start ¶
func (n *OCR3SerializingEndpoint[RI]) Start() error
Start starts the SerializingEndpoint. It will also start the underlying endpoint.
type OCR3TelemetrySender ¶
type OCR3TelemetrySender struct {
// contains filtered or unexported fields
}
func MakeOCR3TelemetrySender ¶
func MakeOCR3TelemetrySender(chTelemetry chan<- *serialization.TelemetryWrapper, logger commontypes.Logger) OCR3TelemetrySender
func (OCR3TelemetrySender) RoundStarted ¶
func (ts OCR3TelemetrySender) RoundStarted( configDigest types.ConfigDigest, epoch uint64, seqNr uint64, round uint64, leader commontypes.OracleID, )
type SerializingOCR3Database ¶
func (*SerializingOCR3Database) ReadCert ¶
func (db *SerializingOCR3Database) ReadCert(ctx context.Context, configDigest types.ConfigDigest) (protocol.CertifiedPrepareOrCommit, error)
func (*SerializingOCR3Database) ReadConfig ¶
func (db *SerializingOCR3Database) ReadConfig(ctx context.Context) (*types.ContractConfig, error)
func (*SerializingOCR3Database) ReadPacemakerState ¶
func (db *SerializingOCR3Database) ReadPacemakerState(ctx context.Context, configDigest types.ConfigDigest) (protocol.PacemakerState, error)
func (*SerializingOCR3Database) WriteCert ¶
func (db *SerializingOCR3Database) WriteCert(ctx context.Context, configDigest types.ConfigDigest, cert protocol.CertifiedPrepareOrCommit) error
Writing with an empty value is the same as deleting.
func (*SerializingOCR3Database) WriteConfig ¶
func (db *SerializingOCR3Database) WriteConfig(ctx context.Context, config types.ContractConfig) error
func (*SerializingOCR3Database) WritePacemakerState ¶
func (db *SerializingOCR3Database) WritePacemakerState(ctx context.Context, configDigest types.ConfigDigest, state protocol.PacemakerState) error