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 ¶
Package shim contains implementations of internal types in terms of the external types
Index ¶
- func NewKeyValueDatabaseWithMetrics(kvDb ocr3_1types.KeyValueDatabase, metricsRegisterer prometheus.Registerer, ...) ocr3_1types.KeyValueDatabase
- 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 LimitCheckOCR3_1ReportingPlugin
- func (rp LimitCheckOCR3_1ReportingPlugin[RI]) Close() error
- func (rp LimitCheckOCR3_1ReportingPlugin[RI]) Committed(ctx context.Context, seqNr uint64, ...) error
- func (rp LimitCheckOCR3_1ReportingPlugin[RI]) Observation(ctx context.Context, seqNr uint64, aq types.AttributedQuery, ...) (types.Observation, error)
- func (rp LimitCheckOCR3_1ReportingPlugin[RI]) ObservationQuorum(ctx context.Context, seqNr uint64, aq types.AttributedQuery, ...) (bool, error)
- func (rp LimitCheckOCR3_1ReportingPlugin[RI]) Query(ctx context.Context, seqNr uint64, kvReader ocr3_1types.KeyValueStateReader, ...) (types.Query, error)
- func (rp LimitCheckOCR3_1ReportingPlugin[RI]) Reports(ctx context.Context, seqNr uint64, ...) ([]ocr3types.ReportPlus[RI], error)
- func (rp LimitCheckOCR3_1ReportingPlugin[RI]) ShouldAcceptAttestedReport(ctx context.Context, seqNr uint64, report ocr3types.ReportWithInfo[RI]) (bool, error)
- func (rp LimitCheckOCR3_1ReportingPlugin[RI]) ShouldTransmitAcceptedReport(ctx context.Context, seqNr uint64, report ocr3types.ReportWithInfo[RI]) (bool, error)
- func (rp LimitCheckOCR3_1ReportingPlugin[RI]) StateTransition(ctx context.Context, seqNr uint64, aq types.AttributedQuery, ...) (ocr3_1types.ReportsPlusPrecursor, error)
- func (rp LimitCheckOCR3_1ReportingPlugin[RI]) ValidateObservation(ctx context.Context, seqNr uint64, aq types.AttributedQuery, ...) 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
- func (ts *OCR2TelemetrySender) EpochStarted(configDigest types.ConfigDigest, epoch uint32, leader commontypes.OracleID)
- func (ts *OCR2TelemetrySender) RoundStarted(reportTimestamp types.ReportTimestamp, leader commontypes.OracleID)
- func (ts *OCR2TelemetrySender) TransmissionScheduleComputed(reportTimestamp types.ReportTimestamp, now time.Time, ...)
- func (ts *OCR2TelemetrySender) TransmissionShouldAcceptFinalizedReportComputed(reportTimestamp types.ReportTimestamp, result bool, ok bool)
- func (ts *OCR2TelemetrySender) TransmissionShouldTransmitAcceptedReportComputed(reportTimestamp types.ReportTimestamp, result bool, ok bool)
- 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
- func (ts *OCR3TelemetrySender) EpochStarted(configDigest types.ConfigDigest, epoch uint64, leader commontypes.OracleID)
- func (ts *OCR3TelemetrySender) RoundStarted(configDigest types.ConfigDigest, epoch uint64, seqNr uint64, round uint64, ...)
- func (ts *OCR3TelemetrySender) TransmissionScheduleComputed(configDigest types.ConfigDigest, seqNr uint64, index int, now time.Time, ...)
- func (ts *OCR3TelemetrySender) TransmissionShouldAcceptAttestedReportComputed(configDigest types.ConfigDigest, seqNr uint64, index int, result bool, ok bool)
- func (ts *OCR3TelemetrySender) TransmissionShouldTransmitAcceptedReportComputed(configDigest types.ConfigDigest, seqNr uint64, index int, result bool, ok bool)
- type OCR3_1SerializingEndpoint
- func (n *OCR3_1SerializingEndpoint[RI]) Broadcast(msg protocol.Message[RI])
- func (n *OCR3_1SerializingEndpoint[RI]) Close() error
- func (n *OCR3_1SerializingEndpoint[RI]) Receive() <-chan protocol.MessageWithSender[RI]
- func (n *OCR3_1SerializingEndpoint[RI]) SendTo(msg protocol.Message[RI], to commontypes.OracleID)
- func (n *OCR3_1SerializingEndpoint[RI]) Start() error
- type OCR3_1TelemetrySender
- func (ts *OCR3_1TelemetrySender) EpochStarted(configDigest types.ConfigDigest, epoch uint64, leader commontypes.OracleID)
- func (ts *OCR3_1TelemetrySender) RoundStarted(configDigest types.ConfigDigest, epoch uint64, seqNr uint64, round uint64, ...)
- func (ts *OCR3_1TelemetrySender) TransmissionScheduleComputed(configDigest types.ConfigDigest, seqNr uint64, index int, now time.Time, ...)
- func (ts *OCR3_1TelemetrySender) TransmissionShouldAcceptAttestedReportComputed(configDigest types.ConfigDigest, seqNr uint64, index int, result bool, ok bool)
- func (ts *OCR3_1TelemetrySender) TransmissionShouldTransmitAcceptedReportComputed(configDigest types.ConfigDigest, seqNr uint64, index int, result bool, ok bool)
- type SemanticOCR3_1KeyValueDatabase
- func (s *SemanticOCR3_1KeyValueDatabase) Close() error
- func (s *SemanticOCR3_1KeyValueDatabase) HighestCommittedSeqNr() (uint64, error)
- func (s *SemanticOCR3_1KeyValueDatabase) NewReadTransaction(postSeqNr uint64) (protocol.KeyValueDatabaseReadTransaction, error)
- func (s *SemanticOCR3_1KeyValueDatabase) NewReadTransactionUnchecked() (protocol.KeyValueDatabaseReadTransaction, error)
- func (s *SemanticOCR3_1KeyValueDatabase) NewSerializedReadWriteTransaction(postSeqNr uint64) (protocol.KeyValueDatabaseReadWriteTransaction, error)
- func (s *SemanticOCR3_1KeyValueDatabase) NewSerializedReadWriteTransactionUnchecked() (protocol.KeyValueDatabaseReadWriteTransaction, error)
- func (s *SemanticOCR3_1KeyValueDatabase) NewUnserializedReadWriteTransactionUnchecked() (protocol.KeyValueDatabaseReadWriteTransaction, error)
- type SemanticOCR3_1KeyValueDatabaseReadTransaction
- func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) Discard()
- func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ExistsStaleBlobIndex(staleBlob protocol.StaleBlob) (bool, error)
- func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ExistsUnattestedStateTransitionBlock(seqNr uint64, stateTransitionInputsDigest protocol.StateTransitionInputsDigest) (bool, error)
- func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) Read(key []byte) ([]byte, error)
- func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadAttestedStateTransitionBlock(seqNr uint64) (protocol.AttestedStateTransitionBlock, error)
- func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadAttestedStateTransitionBlocks(minSeqNr uint64, maxItems int) (blocks []protocol.AttestedStateTransitionBlock, more bool, err error)
- func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadBlobChunk(blobDigest protocol.BlobDigest, chunkIndex uint64) ([]byte, error)
- func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadBlobDigestExpirySeqNrs(minBlobDigest blobtypes.BlobDigest, maxItems int) ([]protocol.BlobDigestExpirySeqNr, bool, error)
- func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadBlobMeta(blobDigest protocol.BlobDigest) (*protocol.BlobMeta, error)
- func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadBlobPayload(blobDigest protocol.BlobDigest) ([]byte, error)
- func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadBlobQuotaStats(blobQuotaStatsType protocol.BlobQuotaStatsType, submitter commontypes.OracleID) (protocol.BlobQuotaStats, error)
- func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadHighestCommittedSeqNr() (uint64, error)
- func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadLowestPersistedSeqNr() (uint64, error)
- func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadNode(nodeKey jmt.NodeKey) (jmt.Node, error)
- func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadPrevInstanceGenesisStateTransitionBlock() (*protocol.GenesisStateTransitionBlock, error)
- func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadReportsPlusPrecursor(seqNr uint64, reportsPlusPrecursorDigest protocol.ReportsPlusPrecursorDigest) (*ocr3_1types.ReportsPlusPrecursor, error)
- func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadRoot(version jmt.Version) (jmt.NodeKey, error)
- func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadRootVersions(minRootVersion uint64, maxItems int) ([]uint64, bool, error)
- func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadStaleBlobIndex(maxStaleSinceSeqNr uint64, limit int) ([]protocol.StaleBlob, error)
- func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadTreeSyncChunk(toSeqNr uint64, startIndex jmt.Digest, requestEndInclIndex jmt.Digest, ...) (endInclIndex jmt.Digest, boundingLeaves []jmt.BoundingLeaf, ...)
- func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadTreeSyncStatus() (protocol.TreeSyncStatus, error)
- func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadUnattestedStateTransitionBlock(seqNr uint64, stateTransitionInputsDigest protocol.StateTransitionInputsDigest) (*protocol.StateTransitionBlock, error)
- type SemanticOCR3_1KeyValueDatabaseReadWriteTransaction
- func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) ApplyWriteSet(writeSet []protocol.KeyValuePairWithDeletions) (protocol.StateRootDigest, error)
- func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) CloseWriteSet() (protocol.StateRootDigest, error)
- func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) Commit() error
- func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) Delete(key []byte) error
- func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteAttestedStateTransitionBlocks(maxSeqNrToDelete uint64, maxItems int) (done bool, err error)
- func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteBlobChunk(blobDigest protocol.BlobDigest, chunkIndex uint64) error
- func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteBlobMeta(blobDigest protocol.BlobDigest) error
- func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteReportsPlusPrecursors(minSeqNrToKeep uint64, maxItems int) (done bool, err error)
- func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteRoots(minVersionToKeep jmt.Version, maxItems int) (done bool, err error)
- func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteStaleBlobIndex(staleBlob protocol.StaleBlob) error
- func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteStaleNodes(maxStaleSinceVersion jmt.Version, maxItems int) (done bool, err error)
- func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteUnattestedStateTransitionBlocks(maxSeqNrToDelete uint64, maxItems int) (done bool, err error)
- func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DestructiveDestroyForTreeSync(n int) (done bool, err error)
- func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) Discard()
- func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) GetWriteSet() ([]protocol.KeyValuePairWithDeletions, error)
- func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) VerifyAndWriteTreeSyncChunk(targetRootDigest protocol.StateRootDigest, targetSeqNr uint64, ...) (protocol.VerifyAndWriteTreeSyncChunkResult, error)
- func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) Write(key []byte, value []byte) error
- func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteAttestedStateTransitionBlock(seqNr uint64, block protocol.AttestedStateTransitionBlock) error
- func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteBlobChunk(blobDigest protocol.BlobDigest, chunkIndex uint64, chunk []byte) error
- func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteBlobMeta(blobDigest protocol.BlobDigest, blobMeta protocol.BlobMeta) error
- func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteBlobQuotaStats(blobQuotaStatsType protocol.BlobQuotaStatsType, submitter commontypes.OracleID, ...) error
- func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteHighestCommittedSeqNr(seqNr uint64) error
- func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteLowestPersistedSeqNr(seqNr uint64) error
- func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteNode(nodeKey jmt.NodeKey, nodeOrNil jmt.Node) error
- func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WritePrevInstanceGenesisStateTransitionBlock(genesisStateTransitionBlock protocol.GenesisStateTransitionBlock) error
- func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteReportsPlusPrecursor(seqNr uint64, reportsPlusPrecursorDigest protocol.ReportsPlusPrecursorDigest, ...) error
- func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteRoot(version jmt.Version, nodeKey jmt.NodeKey) error
- func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteStaleBlobIndex(staleBlob protocol.StaleBlob) error
- func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteStaleNode(staleNode jmt.StaleNode) error
- func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteTreeSyncStatus(status protocol.TreeSyncStatus) error
- func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteUnattestedStateTransitionBlock(seqNr uint64, stateTransitionInputsDigest protocol.StateTransitionInputsDigest, ...) error
- type SemanticOCR3_1KeyValueDatabaseReadWriteTransactionWithPreCommitHook
- 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
- type SerializingOCR3_1Database
- func (db *SerializingOCR3_1Database) ReadCert(ctx context.Context, configDigest types.ConfigDigest) (protocol.CertifiedPrepareOrCommit, error)
- func (db *SerializingOCR3_1Database) ReadConfig(ctx context.Context) (*types.ContractConfig, error)
- func (db *SerializingOCR3_1Database) ReadPacemakerState(ctx context.Context, configDigest types.ConfigDigest) (protocol.PacemakerState, error)
- func (db *SerializingOCR3_1Database) WriteCert(ctx context.Context, configDigest types.ConfigDigest, ...) error
- func (db *SerializingOCR3_1Database) WriteConfig(ctx context.Context, config types.ContractConfig) error
- func (db *SerializingOCR3_1Database) WritePacemakerState(ctx context.Context, configDigest types.ConfigDigest, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewKeyValueDatabaseWithMetrics ¶
func NewKeyValueDatabaseWithMetrics( kvDb ocr3_1types.KeyValueDatabase, metricsRegisterer prometheus.Registerer, logger commontypes.Logger, ) ocr3_1types.KeyValueDatabase
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 LimitCheckOCR3_1ReportingPlugin ¶
type LimitCheckOCR3_1ReportingPlugin[RI any] struct { Plugin ocr3_1types.ReportingPlugin[RI] Limits ocr3_1types.ReportingPluginLimits }
LimitCheckOCR3_1ReportingPlugin 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 (LimitCheckOCR3_1ReportingPlugin[RI]) Close ¶
func (rp LimitCheckOCR3_1ReportingPlugin[RI]) Close() error
func (LimitCheckOCR3_1ReportingPlugin[RI]) Committed ¶
func (rp LimitCheckOCR3_1ReportingPlugin[RI]) Committed(ctx context.Context, seqNr uint64, keyValueReader ocr3_1types.KeyValueStateReader) error
func (LimitCheckOCR3_1ReportingPlugin[RI]) Observation ¶
func (rp LimitCheckOCR3_1ReportingPlugin[RI]) Observation(ctx context.Context, seqNr uint64, aq types.AttributedQuery, kvReader ocr3_1types.KeyValueStateReader, blobBroadcastFetcher ocr3_1types.BlobBroadcastFetcher) (types.Observation, error)
func (LimitCheckOCR3_1ReportingPlugin[RI]) ObservationQuorum ¶
func (rp LimitCheckOCR3_1ReportingPlugin[RI]) ObservationQuorum(ctx context.Context, seqNr uint64, aq types.AttributedQuery, aos []types.AttributedObservation, kvReader ocr3_1types.KeyValueStateReader, blobFetcher ocr3_1types.BlobFetcher) (bool, error)
func (LimitCheckOCR3_1ReportingPlugin[RI]) Query ¶
func (rp LimitCheckOCR3_1ReportingPlugin[RI]) Query(ctx context.Context, seqNr uint64, kvReader ocr3_1types.KeyValueStateReader, blobBroadcastFetcher ocr3_1types.BlobBroadcastFetcher) (types.Query, error)
func (LimitCheckOCR3_1ReportingPlugin[RI]) Reports ¶
func (rp LimitCheckOCR3_1ReportingPlugin[RI]) Reports(ctx context.Context, seqNr uint64, reportsPlusPrecursor ocr3_1types.ReportsPlusPrecursor) ([]ocr3types.ReportPlus[RI], error)
func (LimitCheckOCR3_1ReportingPlugin[RI]) ShouldAcceptAttestedReport ¶
func (rp LimitCheckOCR3_1ReportingPlugin[RI]) ShouldAcceptAttestedReport(ctx context.Context, seqNr uint64, report ocr3types.ReportWithInfo[RI]) (bool, error)
func (LimitCheckOCR3_1ReportingPlugin[RI]) ShouldTransmitAcceptedReport ¶
func (rp LimitCheckOCR3_1ReportingPlugin[RI]) ShouldTransmitAcceptedReport(ctx context.Context, seqNr uint64, report ocr3types.ReportWithInfo[RI]) (bool, error)
func (LimitCheckOCR3_1ReportingPlugin[RI]) StateTransition ¶
func (rp LimitCheckOCR3_1ReportingPlugin[RI]) StateTransition(ctx context.Context, seqNr uint64, aq types.AttributedQuery, aos []types.AttributedObservation, kvReadWriter ocr3_1types.KeyValueStateReadWriter, blobFetcher ocr3_1types.BlobFetcher) (ocr3_1types.ReportsPlusPrecursor, error)
func (LimitCheckOCR3_1ReportingPlugin[RI]) ValidateObservation ¶
func (rp LimitCheckOCR3_1ReportingPlugin[RI]) ValidateObservation(ctx context.Context, seqNr uint64, aq types.AttributedQuery, ao types.AttributedObservation, kvReader ocr3_1types.KeyValueStateReader, blobFetcher ocr3_1types.BlobFetcher) 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, n int, reportingPluginLimits types.ReportingPluginLimits, ) (*OCR2SerializingEndpoint, error)
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 NewOCR2TelemetrySender ¶
func NewOCR2TelemetrySender(chTelemetry chan<- *serialization.TelemetryWrapper, logger commontypes.Logger, enableTransmissionTelemetry bool) *OCR2TelemetrySender
func (*OCR2TelemetrySender) EpochStarted ¶
func (ts *OCR2TelemetrySender) EpochStarted( configDigest types.ConfigDigest, epoch uint32, leader commontypes.OracleID, )
func (*OCR2TelemetrySender) RoundStarted ¶
func (ts *OCR2TelemetrySender) RoundStarted( reportTimestamp types.ReportTimestamp, leader commontypes.OracleID, )
func (*OCR2TelemetrySender) TransmissionScheduleComputed ¶
func (ts *OCR2TelemetrySender) TransmissionScheduleComputed( reportTimestamp types.ReportTimestamp, now time.Time, schedule map[commontypes.OracleID]time.Duration, )
func (*OCR2TelemetrySender) TransmissionShouldAcceptFinalizedReportComputed ¶
func (ts *OCR2TelemetrySender) TransmissionShouldAcceptFinalizedReportComputed( reportTimestamp types.ReportTimestamp, result bool, ok bool, )
func (*OCR2TelemetrySender) TransmissionShouldTransmitAcceptedReportComputed ¶
func (ts *OCR2TelemetrySender) TransmissionShouldTransmitAcceptedReportComputed( reportTimestamp types.ReportTimestamp, result bool, ok bool, )
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], error)
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 NewOCR3TelemetrySender ¶
func NewOCR3TelemetrySender(chTelemetry chan<- *serialization.TelemetryWrapper, logger commontypes.Logger, enableTransmissionTelemetry bool) *OCR3TelemetrySender
func (*OCR3TelemetrySender) EpochStarted ¶
func (ts *OCR3TelemetrySender) EpochStarted( configDigest types.ConfigDigest, epoch uint64, leader commontypes.OracleID, )
func (*OCR3TelemetrySender) RoundStarted ¶
func (ts *OCR3TelemetrySender) RoundStarted( configDigest types.ConfigDigest, epoch uint64, seqNr uint64, round uint64, leader commontypes.OracleID, )
func (*OCR3TelemetrySender) TransmissionScheduleComputed ¶
func (ts *OCR3TelemetrySender) TransmissionScheduleComputed( configDigest types.ConfigDigest, seqNr uint64, index int, now time.Time, isOverride bool, schedule map[commontypes.OracleID]time.Duration, ok bool, )
func (*OCR3TelemetrySender) TransmissionShouldAcceptAttestedReportComputed ¶
func (ts *OCR3TelemetrySender) TransmissionShouldAcceptAttestedReportComputed( configDigest types.ConfigDigest, seqNr uint64, index int, result bool, ok bool, )
func (*OCR3TelemetrySender) TransmissionShouldTransmitAcceptedReportComputed ¶
func (ts *OCR3TelemetrySender) TransmissionShouldTransmitAcceptedReportComputed( configDigest types.ConfigDigest, seqNr uint64, index int, result bool, ok bool, )
type OCR3_1SerializingEndpoint ¶
type OCR3_1SerializingEndpoint[RI any] struct { // contains filtered or unexported fields }
func NewOCR3_1SerializingEndpoint ¶
func NewOCR3_1SerializingEndpoint[RI any]( chTelemetry chan<- *serialization.TelemetryWrapper, configDigest types.ConfigDigest, endpoint types.BinaryNetworkEndpoint2, maxSigLen int, logger commontypes.Logger, metricsRegisterer prometheus.Registerer, pluginLimits ocr3_1types.ReportingPluginLimits, publicConfig ocr3_1config.PublicConfig, serializedLengthLimits limits.OCR3_1SerializedLengthLimits, ) (*OCR3_1SerializingEndpoint[RI], error)
func (*OCR3_1SerializingEndpoint[RI]) Broadcast ¶
func (n *OCR3_1SerializingEndpoint[RI]) Broadcast(msg protocol.Message[RI])
func (*OCR3_1SerializingEndpoint[RI]) Close ¶
func (n *OCR3_1SerializingEndpoint[RI]) Close() error
Close closes the SerializingEndpoint. It will also close the underlying endpoint.
func (*OCR3_1SerializingEndpoint[RI]) Receive ¶
func (n *OCR3_1SerializingEndpoint[RI]) Receive() <-chan protocol.MessageWithSender[RI]
func (*OCR3_1SerializingEndpoint[RI]) SendTo ¶
func (n *OCR3_1SerializingEndpoint[RI]) SendTo(msg protocol.Message[RI], to commontypes.OracleID)
func (*OCR3_1SerializingEndpoint[RI]) Start ¶
func (n *OCR3_1SerializingEndpoint[RI]) Start() error
Start starts the SerializingEndpoint. It will also start the underlying endpoint.
type OCR3_1TelemetrySender ¶
type OCR3_1TelemetrySender struct {
// contains filtered or unexported fields
}
func NewOCR3_1TelemetrySender ¶
func NewOCR3_1TelemetrySender(chTelemetry chan<- *serialization.TelemetryWrapper, logger commontypes.Logger, enableTransmissionTelemetry bool) *OCR3_1TelemetrySender
func (*OCR3_1TelemetrySender) EpochStarted ¶
func (ts *OCR3_1TelemetrySender) EpochStarted( configDigest types.ConfigDigest, epoch uint64, leader commontypes.OracleID, )
func (*OCR3_1TelemetrySender) RoundStarted ¶
func (ts *OCR3_1TelemetrySender) RoundStarted( configDigest types.ConfigDigest, epoch uint64, seqNr uint64, round uint64, leader commontypes.OracleID, )
func (*OCR3_1TelemetrySender) TransmissionScheduleComputed ¶
func (ts *OCR3_1TelemetrySender) TransmissionScheduleComputed( configDigest types.ConfigDigest, seqNr uint64, index int, now time.Time, isOverride bool, schedule map[commontypes.OracleID]time.Duration, ok bool, )
func (*OCR3_1TelemetrySender) TransmissionShouldAcceptAttestedReportComputed ¶
func (ts *OCR3_1TelemetrySender) TransmissionShouldAcceptAttestedReportComputed( configDigest types.ConfigDigest, seqNr uint64, index int, result bool, ok bool, )
func (*OCR3_1TelemetrySender) TransmissionShouldTransmitAcceptedReportComputed ¶
func (ts *OCR3_1TelemetrySender) TransmissionShouldTransmitAcceptedReportComputed( configDigest types.ConfigDigest, seqNr uint64, index int, result bool, ok bool, )
type SemanticOCR3_1KeyValueDatabase ¶
type SemanticOCR3_1KeyValueDatabase struct {
KeyValueDatabase ocr3_1types.KeyValueDatabase
Limits ocr3_1types.ReportingPluginLimits
// contains filtered or unexported fields
}
func NewSemanticOCR3_1KeyValueDatabase ¶
func NewSemanticOCR3_1KeyValueDatabase( keyValueDatabase ocr3_1types.KeyValueDatabase, limits ocr3_1types.ReportingPluginLimits, config ocr3_1config.PublicConfig, logger commontypes.Logger, metricsRegisterer prometheus.Registerer, ) (*SemanticOCR3_1KeyValueDatabase, error)
func (*SemanticOCR3_1KeyValueDatabase) Close ¶
func (s *SemanticOCR3_1KeyValueDatabase) Close() error
SemanticOCR3_1KeyValueDatabase does not manage the lifetime of the underlying database, and is expected to be closed first, before the database is closed.
func (*SemanticOCR3_1KeyValueDatabase) HighestCommittedSeqNr ¶
func (s *SemanticOCR3_1KeyValueDatabase) HighestCommittedSeqNr() (uint64, error)
func (*SemanticOCR3_1KeyValueDatabase) NewReadTransaction ¶
func (s *SemanticOCR3_1KeyValueDatabase) NewReadTransaction(postSeqNr uint64) (protocol.KeyValueDatabaseReadTransaction, error)
func (*SemanticOCR3_1KeyValueDatabase) NewReadTransactionUnchecked ¶
func (s *SemanticOCR3_1KeyValueDatabase) NewReadTransactionUnchecked() (protocol.KeyValueDatabaseReadTransaction, error)
func (*SemanticOCR3_1KeyValueDatabase) NewSerializedReadWriteTransaction ¶
func (s *SemanticOCR3_1KeyValueDatabase) NewSerializedReadWriteTransaction(postSeqNr uint64) (protocol.KeyValueDatabaseReadWriteTransaction, error)
func (*SemanticOCR3_1KeyValueDatabase) NewSerializedReadWriteTransactionUnchecked ¶
func (s *SemanticOCR3_1KeyValueDatabase) NewSerializedReadWriteTransactionUnchecked() (protocol.KeyValueDatabaseReadWriteTransaction, error)
func (*SemanticOCR3_1KeyValueDatabase) NewUnserializedReadWriteTransactionUnchecked ¶
func (s *SemanticOCR3_1KeyValueDatabase) NewUnserializedReadWriteTransactionUnchecked() (protocol.KeyValueDatabaseReadWriteTransaction, error)
type SemanticOCR3_1KeyValueDatabaseReadTransaction ¶
type SemanticOCR3_1KeyValueDatabaseReadTransaction struct {
// contains filtered or unexported fields
}
func (*SemanticOCR3_1KeyValueDatabaseReadTransaction) Discard ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) Discard()
func (*SemanticOCR3_1KeyValueDatabaseReadTransaction) ExistsStaleBlobIndex ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ExistsStaleBlobIndex(staleBlob protocol.StaleBlob) (bool, error)
func (*SemanticOCR3_1KeyValueDatabaseReadTransaction) ExistsUnattestedStateTransitionBlock ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ExistsUnattestedStateTransitionBlock(seqNr uint64, stateTransitionInputsDigest protocol.StateTransitionInputsDigest) (bool, error)
func (*SemanticOCR3_1KeyValueDatabaseReadTransaction) Read ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) Read(key []byte) ([]byte, error)
func (*SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadAttestedStateTransitionBlock ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadAttestedStateTransitionBlock(seqNr uint64) (protocol.AttestedStateTransitionBlock, error)
func (*SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadAttestedStateTransitionBlocks ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadAttestedStateTransitionBlocks(minSeqNr uint64, maxItems int) (blocks []protocol.AttestedStateTransitionBlock, more bool, err error)
func (*SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadBlobChunk ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadBlobChunk(blobDigest protocol.BlobDigest, chunkIndex uint64) ([]byte, error)
func (*SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadBlobDigestExpirySeqNrs ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadBlobDigestExpirySeqNrs(minBlobDigest blobtypes.BlobDigest, maxItems int) ([]protocol.BlobDigestExpirySeqNr, bool, error)
func (*SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadBlobMeta ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadBlobMeta(blobDigest protocol.BlobDigest) (*protocol.BlobMeta, error)
func (*SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadBlobPayload ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadBlobPayload(blobDigest protocol.BlobDigest) ([]byte, error)
func (*SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadBlobQuotaStats ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadBlobQuotaStats(blobQuotaStatsType protocol.BlobQuotaStatsType, submitter commontypes.OracleID) (protocol.BlobQuotaStats, error)
func (*SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadHighestCommittedSeqNr ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadHighestCommittedSeqNr() (uint64, error)
func (*SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadLowestPersistedSeqNr ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadLowestPersistedSeqNr() (uint64, error)
func (*SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadPrevInstanceGenesisStateTransitionBlock ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadPrevInstanceGenesisStateTransitionBlock() (*protocol.GenesisStateTransitionBlock, error)
func (*SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadReportsPlusPrecursor ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadReportsPlusPrecursor(seqNr uint64, reportsPlusPrecursorDigest protocol.ReportsPlusPrecursorDigest) (*ocr3_1types.ReportsPlusPrecursor, error)
func (*SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadRootVersions ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadRootVersions(minRootVersion uint64, maxItems int) ([]uint64, bool, error)
ReadRootVersions returns up to maxItems version numbers of tree roots at or above minRootVersion, in ascending order.
func (*SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadStaleBlobIndex ¶
func (*SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadTreeSyncChunk ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadTreeSyncChunk( toSeqNr uint64, startIndex jmt.Digest, requestEndInclIndex jmt.Digest, maxCumulativeKeysPlusValuesBytes int, ) ( endInclIndex jmt.Digest, boundingLeaves []jmt.BoundingLeaf, keyValues []protocol.KeyValuePair, err error, )
func (*SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadTreeSyncStatus ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadTreeSyncStatus() (protocol.TreeSyncStatus, error)
func (*SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadUnattestedStateTransitionBlock ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadUnattestedStateTransitionBlock(seqNr uint64, stateTransitionInputsDigest protocol.StateTransitionInputsDigest) (*protocol.StateTransitionBlock, error)
type SemanticOCR3_1KeyValueDatabaseReadWriteTransaction ¶
type SemanticOCR3_1KeyValueDatabaseReadWriteTransaction struct {
SemanticOCR3_1KeyValueDatabaseReadTransaction // inherit all read implementations
// contains filtered or unexported fields
}
func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) ApplyWriteSet ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) ApplyWriteSet(writeSet []protocol.KeyValuePairWithDeletions) (protocol.StateRootDigest, error)
func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) CloseWriteSet ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) CloseWriteSet() (protocol.StateRootDigest, error)
CloseWriteSet updates the state tree according to the write set and returns the root. After this function is invoked the transaction for writing: any future attempts for Writes or Deletes on this transaction will fail.
func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) Commit ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) Commit() error
func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) Delete ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) Delete(key []byte) error
func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteAttestedStateTransitionBlocks ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteAttestedStateTransitionBlocks(maxSeqNrToDelete uint64, maxItems int) (done bool, err error)
func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteBlobChunk ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteBlobChunk(blobDigest protocol.BlobDigest, chunkIndex uint64) error
func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteBlobMeta ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteBlobMeta(blobDigest protocol.BlobDigest) error
func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteReportsPlusPrecursors ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteReportsPlusPrecursors(minSeqNrToKeep uint64, maxItems int) (done bool, err error)
func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteRoots ¶
func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteStaleBlobIndex ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteStaleBlobIndex(staleBlob protocol.StaleBlob) error
func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteStaleNodes ¶
func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteUnattestedStateTransitionBlocks ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteUnattestedStateTransitionBlocks(maxSeqNrToDelete uint64, maxItems int) (done bool, err error)
func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DestructiveDestroyForTreeSync ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DestructiveDestroyForTreeSync(n int) (done bool, err error)
Caller must ensure to make committed state inaccessible to other transactions until completed. Must be reinvoked until done=true.
func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) Discard ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) Discard()
func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) GetWriteSet ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) GetWriteSet() ([]protocol.KeyValuePairWithDeletions, error)
GetWriteSet returns sorted list of key-value pairs that have been modified as part of this transaction.
func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) VerifyAndWriteTreeSyncChunk ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) VerifyAndWriteTreeSyncChunk( targetRootDigest protocol.StateRootDigest, targetSeqNr uint64, startIndex jmt.Digest, requestEndInclIndex jmt.Digest, endInclIndex jmt.Digest, boundingLeaves []jmt.BoundingLeaf, keyValues []protocol.KeyValuePair, ) (protocol.VerifyAndWriteTreeSyncChunkResult, error)
func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) Write ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) Write(key []byte, value []byte) error
func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteAttestedStateTransitionBlock ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteAttestedStateTransitionBlock(seqNr uint64, block protocol.AttestedStateTransitionBlock) error
func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteBlobChunk ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteBlobChunk(blobDigest protocol.BlobDigest, chunkIndex uint64, chunk []byte) error
func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteBlobMeta ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteBlobMeta(blobDigest protocol.BlobDigest, blobMeta protocol.BlobMeta) error
func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteBlobQuotaStats ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteBlobQuotaStats(blobQuotaStatsType protocol.BlobQuotaStatsType, submitter commontypes.OracleID, blobQuotaStats protocol.BlobQuotaStats) error
func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteHighestCommittedSeqNr ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteHighestCommittedSeqNr(seqNr uint64) error
func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteLowestPersistedSeqNr ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteLowestPersistedSeqNr(seqNr uint64) error
func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WritePrevInstanceGenesisStateTransitionBlock ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WritePrevInstanceGenesisStateTransitionBlock(genesisStateTransitionBlock protocol.GenesisStateTransitionBlock) error
func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteReportsPlusPrecursor ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteReportsPlusPrecursor(seqNr uint64, reportsPlusPrecursorDigest protocol.ReportsPlusPrecursorDigest, reportsPlusPrecursor ocr3_1types.ReportsPlusPrecursor) error
func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteStaleBlobIndex ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteStaleBlobIndex(staleBlob protocol.StaleBlob) error
func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteStaleNode ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteStaleNode(staleNode jmt.StaleNode) error
func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteTreeSyncStatus ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteTreeSyncStatus(status protocol.TreeSyncStatus) error
func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteUnattestedStateTransitionBlock ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteUnattestedStateTransitionBlock(seqNr uint64, stateTransitionInputsDigest protocol.StateTransitionInputsDigest, stb protocol.StateTransitionBlock) error
type SemanticOCR3_1KeyValueDatabaseReadWriteTransactionWithPreCommitHook ¶
type SemanticOCR3_1KeyValueDatabaseReadWriteTransactionWithPreCommitHook struct {
protocol.KeyValueDatabaseReadWriteTransaction
// contains filtered or unexported fields
}
func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransactionWithPreCommitHook) Commit ¶
func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransactionWithPreCommitHook) Commit() error
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
type SerializingOCR3_1Database ¶
type SerializingOCR3_1Database struct {
BinaryDb ocr3_1types.Database
}
func (*SerializingOCR3_1Database) ReadCert ¶
func (db *SerializingOCR3_1Database) ReadCert(ctx context.Context, configDigest types.ConfigDigest) (protocol.CertifiedPrepareOrCommit, error)
func (*SerializingOCR3_1Database) ReadConfig ¶
func (db *SerializingOCR3_1Database) ReadConfig(ctx context.Context) (*types.ContractConfig, error)
func (*SerializingOCR3_1Database) ReadPacemakerState ¶
func (db *SerializingOCR3_1Database) ReadPacemakerState(ctx context.Context, configDigest types.ConfigDigest) (protocol.PacemakerState, error)
func (*SerializingOCR3_1Database) WriteCert ¶
func (db *SerializingOCR3_1Database) WriteCert(ctx context.Context, configDigest types.ConfigDigest, cert protocol.CertifiedPrepareOrCommit) error
Writing with an empty value is the same as deleting.
func (*SerializingOCR3_1Database) WriteConfig ¶
func (db *SerializingOCR3_1Database) WriteConfig(ctx context.Context, config types.ContractConfig) error
func (*SerializingOCR3_1Database) WritePacemakerState ¶
func (db *SerializingOCR3_1Database) WritePacemakerState(ctx context.Context, configDigest types.ConfigDigest, state protocol.PacemakerState) error
Source Files
¶
- metrics.go
- ocr2_serializing_endpoint.go
- ocr2_telemetry_sender.go
- ocr3_1_database.go
- ocr3_1_key_value_database_with_metrics.go
- ocr3_1_key_value_store.go
- ocr3_1_reporting_plugin.go
- ocr3_1_serializing_endpoint.go
- ocr3_1_telemetry_sender.go
- ocr3_database.go
- ocr3_reporting_plugin.go
- ocr3_serializing_endpoint.go
- ocr3_telemetry_sender.go
- reporting_plugin.go