Documentation
¶
Index ¶
- func NewNeverShouldRetireCache() llotypes.ShouldRetireCache
- func NewPluginScopedRetirementReportCache(rrc RetirementReportCacheReader, verifier RetirementReportVerifier, ...) llocommon.PredecessorRetirementReportCache
- type Config
- type NullRetirementReportCache
- func (n *NullRetirementReportCache) AttestedRetirementReport(predecessorConfigDigest ocr2types.ConfigDigest) ([]byte, error)
- func (n *NullRetirementReportCache) CheckAttestedRetirementReport(predecessorConfigDigest ocr2types.ConfigDigest, ...) (llocommon.RetirementReport, error)
- func (n *NullRetirementReportCache) StoreAttestedRetirementReport(ctx context.Context, cd ocr2types.ConfigDigest, retirementReport []byte, ...) error
- func (n *NullRetirementReportCache) StoreConfig(ctx context.Context, cd ocr2types.ConfigDigest, signers [][]byte, f uint8) error
- type RetirementReportCache
- type RetirementReportCacheORM
- type RetirementReportCacheReader
- type RetirementReportVerifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewNeverShouldRetireCache ¶
func NewNeverShouldRetireCache() llotypes.ShouldRetireCache
func NewPluginScopedRetirementReportCache ¶
func NewPluginScopedRetirementReportCache(rrc RetirementReportCacheReader, verifier RetirementReportVerifier, codec llocommon.RetirementReportCodec) llocommon.PredecessorRetirementReportCache
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
}
Click to show internal directories.
Click to hide internal directories.