llo

package
v2.15.0-beta0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: MIT Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Mercury server error codes
	DuplicateReport = 2
)

Variables

View Source
var PayloadTypes = getPayloadTypes()

Functions

func NewDelegate

func NewDelegate(cfg DelegateConfig) (job.ServiceCtx, error)

func NewStaticChannelDefinitionCache

func NewStaticChannelDefinitionCache(lggr logger.Logger, dfnstr string) (llotypes.ChannelDefinitionCache, error)

Types

type ChannelDefinitionCacheFactory

type ChannelDefinitionCacheFactory interface {
	NewCache(cfg lloconfig.PluginConfig) (llotypes.ChannelDefinitionCache, error)
}

type ChannelDefinitionCacheORM

type ChannelDefinitionCacheORM interface {
	// TODO: What about delete/cleanup?
	// https://smartcontract-it.atlassian.net/browse/MERC-3653
	LoadChannelDefinitions(ctx context.Context, addr common.Address) (dfns llotypes.ChannelDefinitions, blockNum int64, err error)
	StoreChannelDefinitions(ctx context.Context, addr common.Address, dfns llotypes.ChannelDefinitions, blockNum int64) (err error)
}

type Closer

type Closer interface {
	Close() error
}

type DelegateConfig

type DelegateConfig struct {
	Logger     logger.Logger
	DataSource sqlutil.DataSource
	Runner     streams.Runner
	Registry   Registry
	JobName    null.String

	// LLO
	ChannelDefinitionCache llotypes.ChannelDefinitionCache
	ReportingPluginConfig  llo.Config

	// OCR3
	BinaryNetworkEndpointFactory ocr2types.BinaryNetworkEndpointFactory
	V2Bootstrappers              []ocrcommontypes.BootstrapperLocator
	ContractConfigTracker        ocr2types.ContractConfigTracker
	ContractTransmitter          ocr3types.ContractTransmitter[llotypes.ReportInfo]
	Database                     ocr3types.Database
	OCRLogger                    ocrcommontypes.Logger
	MonitoringEndpoint           ocrcommontypes.MonitoringEndpoint
	OffchainConfigDigester       ocr2types.OffchainConfigDigester
	OffchainKeyring              ocr2types.OffchainKeyring
	OnchainKeyring               ocr3types.OnchainKeyring[llotypes.ReportInfo]
	LocalConfig                  ocr2types.LocalConfig
}

type ErrObservationFailed added in v2.15.0

type ErrObservationFailed struct {
	// contains filtered or unexported fields
}

func (*ErrObservationFailed) Error added in v2.15.0

func (e *ErrObservationFailed) Error() string

func (*ErrObservationFailed) String added in v2.15.0

func (e *ErrObservationFailed) String() string

func (*ErrObservationFailed) Unwrap added in v2.15.0

func (e *ErrObservationFailed) Unwrap() error

type JSONOnchainConfigCodec added in v2.14.0

type JSONOnchainConfigCodec struct{}

TODO: Replace this with protobuf, if it is actually used for something

func (*JSONOnchainConfigCodec) Decode added in v2.14.0

func (*JSONOnchainConfigCodec) Encode added in v2.14.0

type Key

type Key interface {
	Sign3(digest ocrtypes.ConfigDigest, seqNr uint64, r ocrtypes.Report) (signature []byte, err error)
	Verify3(publicKey ocrtypes.OnchainPublicKey, cd ocrtypes.ConfigDigest, seqNr uint64, r ocrtypes.Report, signature []byte) bool
	PublicKey() ocrtypes.OnchainPublicKey
	MaxSignatureLength() int
}

type LLOOnchainKeyring

type LLOOnchainKeyring ocr3types.OnchainKeyring[llotypes.ReportInfo]

func NewOnchainKeyring

func NewOnchainKeyring(lggr logger.Logger, keys map[llotypes.ReportFormat]Key) LLOOnchainKeyring

type ORM

type ORM interface {
	ChannelDefinitionCacheORM
}

func NewORM

func NewORM(ds sqlutil.DataSource, evmChainID *big.Int) ORM

type OffchainConfigDigester

type OffchainConfigDigester struct {
	ChainID         *big.Int
	ContractAddress common.Address
}

func NewOffchainConfigDigester

func NewOffchainConfigDigester(chainID *big.Int, contractAddress common.Address) OffchainConfigDigester

func (OffchainConfigDigester) ConfigDigest

func (OffchainConfigDigester) ConfigDigestPrefix

func (d OffchainConfigDigester) ConfigDigestPrefix() (ocrtypes.ConfigDigestPrefix, error)

type OnchainConfig added in v2.14.0

type OnchainConfig struct{}

type OnchainConfigCodec added in v2.14.0

type OnchainConfigCodec interface {
	Encode(OnchainConfig) ([]byte, error)
	Decode([]byte) (OnchainConfig, error)
}

type Registry

type Registry interface {
	Get(streamID streams.StreamID) (strm streams.Stream, exists bool)
}

type Transmitter

type Transmitter interface {
	llotypes.Transmitter
	services.Service
}

func NewTransmitter

func NewTransmitter(lggr logger.Logger, rpcClient wsrpc.Client, fromAccount ed25519.PublicKey) Transmitter

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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