retirement

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNeverShouldRetireCache

func NewNeverShouldRetireCache() llotypes.ShouldRetireCache

Types

type Config

type Config struct {
	Digest  [32]byte      `db:"config_digest"`
	Signers pq.ByteaArray `db:"signers"`
	F       uint8         `db:"f"`
}

type NullRetirementReportCache

type NullRetirementReportCache struct{}

func (*NullRetirementReportCache) AttestedRetirementReport

func (n *NullRetirementReportCache) AttestedRetirementReport(predecessorConfigDigest ocr2types.ConfigDigest) ([]byte, error)

func (*NullRetirementReportCache) CheckAttestedRetirementReport

func (n *NullRetirementReportCache) CheckAttestedRetirementReport(predecessorConfigDigest ocr2types.ConfigDigest, attestedRetirementReport []byte) (llocommon.RetirementReport, error)

func (*NullRetirementReportCache) StoreAttestedRetirementReport

func (n *NullRetirementReportCache) StoreAttestedRetirementReport(ctx context.Context, cd ocr2types.ConfigDigest, retirementReport []byte, sigs []types.AttributedOnchainSignature) error

func (*NullRetirementReportCache) StoreConfig

func (n *NullRetirementReportCache) StoreConfig(ctx context.Context, cd ocr2types.ConfigDigest, signers [][]byte, f uint8) error

type RetirementReportCache

type RetirementReportCache interface {
	services.Service
	StoreAttestedRetirementReport(ctx context.Context, cd ocrtypes.ConfigDigest, seqNr uint64, retirementReport []byte, sigs []types.AttributedOnchainSignature) error
	StoreConfig(ctx context.Context, cd ocr2types.ConfigDigest, signers [][]byte, f uint8) error
	RetirementReportCacheReader
}

RetirementReportCache is intended to be a global singleton that is wrapped by a PluginScopedRetirementReportCache for a given plugin

func NewRetirementReportCache

func NewRetirementReportCache(lggr logger.Logger, ds sqlutil.DataSource) RetirementReportCache

type RetirementReportCacheORM

type RetirementReportCacheORM interface {
	StoreAttestedRetirementReport(ctx context.Context, cd ocr2types.ConfigDigest, attestedRetirementReport []byte) error
	LoadAttestedRetirementReports(ctx context.Context) (map[ocr2types.ConfigDigest][]byte, error)
	StoreConfig(ctx context.Context, cd ocr2types.ConfigDigest, signers [][]byte, f uint8) error
	LoadConfigs(ctx context.Context) ([]Config, error)
}

type RetirementReportCacheReader

type RetirementReportCacheReader interface {
	AttestedRetirementReport(cd ocr2types.ConfigDigest) ([]byte, bool)
	Config(cd ocr2types.ConfigDigest) (Config, bool)
}

RetirementReportCacheReader is used by the plugin-scoped RetirementReportCache

type RetirementReportVerifier

type RetirementReportVerifier interface {
	Verify(key types.OnchainPublicKey, digest types.ConfigDigest, seqNr uint64, r ocr3types.ReportWithInfo[llotypes.ReportInfo], signature []byte) bool
}

Jump to

Keyboard shortcuts

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