shim

package
v0.0.0-...-c101335 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2026 License: MIT Imports: 29 Imported by: 0

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

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 (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 (LimitCheckOCR3ReportingPlugin[RI]) Query

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

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 (LimitCheckOCR3_1ReportingPlugin[RI]) ObservationQuorum

func (LimitCheckOCR3_1ReportingPlugin[RI]) Query

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 (LimitCheckOCR3_1ReportingPlugin[RI]) ValidateObservation

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 (LimitCheckReportingPlugin) Query

func (LimitCheckReportingPlugin) Report

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 (*OCR2SerializingEndpoint) SendTo

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

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 (*SemanticOCR3_1KeyValueDatabase) NewReadTransactionUnchecked

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 (*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 (*SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadAttestedStateTransitionBlock

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 (*SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadBlobPayload

func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadBlobPayload(blobDigest protocol.BlobDigest) ([]byte, error)

func (*SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadBlobQuotaStats

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) ReadNode

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) ReadRoot

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 (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadStaleBlobIndex(maxStaleSinceSeqNr uint64, limit int) ([]protocol.StaleBlob, error)

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 (*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 (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) CloseWriteSet

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 (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) Delete

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 (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteReportsPlusPrecursors

func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteReportsPlusPrecursors(minSeqNrToKeep uint64, maxItems int) (done bool, err error)

func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteRoots

func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteRoots(minVersionToKeep jmt.Version, maxItems int) (done bool, err error)

func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteStaleBlobIndex

func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteStaleNodes

func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteStaleNodes(maxStaleSinceVersion jmt.Version, maxItems int) (done bool, err error)

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 (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) GetWriteSet

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 (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteAttestedStateTransitionBlock

func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteBlobChunk

func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteBlobChunk(blobDigest protocol.BlobDigest, chunkIndex uint64, chunk []byte) error

func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteBlobMeta

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) WriteNode

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) WriteRoot

func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteStaleBlobIndex

func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteStaleNode

func (*SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteTreeSyncStatus

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

type SerializingOCR3Database

type SerializingOCR3Database struct {
	BinaryDb ocr3types.Database
}

func (*SerializingOCR3Database) ReadCert

func (*SerializingOCR3Database) ReadConfig

func (*SerializingOCR3Database) ReadPacemakerState

func (db *SerializingOCR3Database) ReadPacemakerState(ctx context.Context, configDigest types.ConfigDigest) (protocol.PacemakerState, error)

func (*SerializingOCR3Database) WriteCert

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 (*SerializingOCR3_1Database) ReadConfig

func (*SerializingOCR3_1Database) ReadPacemakerState

func (db *SerializingOCR3_1Database) ReadPacemakerState(ctx context.Context, configDigest types.ConfigDigest) (protocol.PacemakerState, error)

func (*SerializingOCR3_1Database) WriteCert

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL