Documentation ¶
Index ¶
- Constants
- Variables
- func BuildSamplePayload(report []byte, reportCtx ocrtypes.ReportContext, ...) []byte
- func FeedIDFromReport(report ocrtypes.Report) (feedID utils.FeedID, err error)
- func FilterName(addr common.Address, feedID common.Hash) string
- func MustHexToConfigDigest(s string) (cd ocrtypes.ConfigDigest)
- func NewTransmitter(lggr logger.Logger, cfg TransmitterConfig, clients map[string]wsrpc.Client, ...) *mercuryTransmitter
- type ConfigPoller
- func (cp *ConfigPoller) Close() error
- func (cp *ConfigPoller) LatestBlockHeight(ctx context.Context) (blockHeight uint64, err error)
- func (cp *ConfigPoller) LatestConfig(ctx context.Context, changedInBlock uint64) (ocrtypes.ContractConfig, error)
- func (cp *ConfigPoller) LatestConfigDetails(ctx context.Context) (changedInBlock uint64, configDigest ocrtypes.ConfigDigest, err error)
- func (cp *ConfigPoller) Notify() <-chan struct{}
- func (cp *ConfigPoller) Replay(ctx context.Context, fromBlock int64) error
- func (cp *ConfigPoller) Start()
- type ConfigTracker
- type FullConfigFromLog
- type ORM
- type OffchainConfigDigester
- type PersistenceManager
- func (pm *PersistenceManager) AsyncDelete(req *pb.TransmitRequest)
- func (pm *PersistenceManager) Close() error
- func (pm *PersistenceManager) Delete(ctx context.Context, req *pb.TransmitRequest) error
- func (pm *PersistenceManager) Insert(ctx context.Context, req *pb.TransmitRequest, reportCtx ocrtypes.ReportContext) error
- func (pm *PersistenceManager) Load(ctx context.Context) ([]*Transmission, error)
- func (pm *PersistenceManager) Start(ctx context.Context) error
- type Transmission
- type TransmitQueue
- type Transmitter
- type TransmitterConfig
- type TransmitterReportDecoder
Constants ¶
View Source
const (
// Mercury server error codes
DuplicateReport = 2
)
Variables ¶
View Source
var FeedScopedConfigSet common.Hash
FeedScopedConfigSet ConfigSet with FeedID for use with mercury (and multi-config DON)
View Source
var PayloadTypes = getPayloadTypes()
Functions ¶
func BuildSamplePayload ¶ added in v2.5.0
func BuildSamplePayload(report []byte, reportCtx ocrtypes.ReportContext, sigs []ocrtypes.AttributedOnchainSignature) []byte
func FeedIDFromReport ¶ added in v2.5.0
func MustHexToConfigDigest ¶ added in v2.5.0
func MustHexToConfigDigest(s string) (cd ocrtypes.ConfigDigest)
func NewTransmitter ¶
func NewTransmitter(lggr logger.Logger, cfg TransmitterConfig, clients map[string]wsrpc.Client, fromAccount ed25519.PublicKey, jobID int32, feedID [32]byte, orm ORM, codec TransmitterReportDecoder, triggerCapability *triggers.MercuryTriggerService) *mercuryTransmitter
Types ¶
type ConfigPoller ¶
type ConfigPoller struct {
// contains filtered or unexported fields
}
ConfigPoller defines the Mercury Config Poller
func NewConfigPoller ¶
func NewConfigPoller(ctx context.Context, lggr logger.Logger, destChainPoller logpoller.LogPoller, addr common.Address, feedId common.Hash) (*ConfigPoller, error)
NewConfigPoller creates a new Mercury ConfigPoller
func (*ConfigPoller) Close ¶ added in v2.3.0
func (cp *ConfigPoller) Close() error
func (*ConfigPoller) LatestBlockHeight ¶
func (cp *ConfigPoller) LatestBlockHeight(ctx context.Context) (blockHeight uint64, err error)
LatestBlockHeight returns the latest block height from the logs
func (*ConfigPoller) LatestConfig ¶
func (cp *ConfigPoller) LatestConfig(ctx context.Context, changedInBlock uint64) (ocrtypes.ContractConfig, error)
LatestConfig returns the latest config from the logs on a certain block
func (*ConfigPoller) LatestConfigDetails ¶
func (cp *ConfigPoller) LatestConfigDetails(ctx context.Context) (changedInBlock uint64, configDigest ocrtypes.ConfigDigest, err error)
LatestConfigDetails returns the latest config details from the logs
func (*ConfigPoller) Notify ¶
func (cp *ConfigPoller) Notify() <-chan struct{}
func (*ConfigPoller) Replay ¶
func (cp *ConfigPoller) Replay(ctx context.Context, fromBlock int64) error
Replay abstracts the logpoller.LogPoller Replay() implementation
func (*ConfigPoller) Start ¶ added in v2.3.0
func (cp *ConfigPoller) Start()
type ConfigTracker ¶
type FullConfigFromLog ¶
type FullConfigFromLog struct { ocrtypes.ContractConfig // contains filtered or unexported fields }
FullConfigFromLog defines the contract config with the feedID
type ORM ¶ added in v2.4.0
type ORM interface { InsertTransmitRequest(ctx context.Context, serverURLs []string, req *pb.TransmitRequest, jobID int32, reportCtx ocrtypes.ReportContext) error DeleteTransmitRequests(ctx context.Context, serverURL string, reqs []*pb.TransmitRequest) error GetTransmitRequests(ctx context.Context, serverURL string, jobID int32) ([]*Transmission, error) PruneTransmitRequests(ctx context.Context, serverURL string, jobID int32, maxSize int) error LatestReport(ctx context.Context, feedID [32]byte) (report []byte, err error) }
func NewORM ¶ added in v2.4.0
func NewORM(ds sqlutil.DataSource) ORM
type OffchainConfigDigester ¶
type OffchainConfigDigester struct { FeedID utils.FeedID ChainID *big.Int ContractAddress common.Address }
func (OffchainConfigDigester) ConfigDigest ¶
func (d OffchainConfigDigester) ConfigDigest(cc ocrtypes.ContractConfig) (ocrtypes.ConfigDigest, error)
func (OffchainConfigDigester) ConfigDigestPrefix ¶
func (d OffchainConfigDigester) ConfigDigestPrefix() (ocrtypes.ConfigDigestPrefix, error)
type PersistenceManager ¶ added in v2.4.0
type PersistenceManager struct {
// contains filtered or unexported fields
}
func NewPersistenceManager ¶ added in v2.4.0
func (*PersistenceManager) AsyncDelete ¶ added in v2.4.0
func (pm *PersistenceManager) AsyncDelete(req *pb.TransmitRequest)
func (*PersistenceManager) Close ¶ added in v2.4.0
func (pm *PersistenceManager) Close() error
func (*PersistenceManager) Delete ¶ added in v2.4.0
func (pm *PersistenceManager) Delete(ctx context.Context, req *pb.TransmitRequest) error
func (*PersistenceManager) Insert ¶ added in v2.4.0
func (pm *PersistenceManager) Insert(ctx context.Context, req *pb.TransmitRequest, reportCtx ocrtypes.ReportContext) error
func (*PersistenceManager) Load ¶ added in v2.4.0
func (pm *PersistenceManager) Load(ctx context.Context) ([]*Transmission, error)
type Transmission ¶ added in v2.2.0
type Transmission struct { Req *pb.TransmitRequest // the payload to transmit ReportCtx ocrtypes.ReportContext // contains priority information (latest epoch/round wins) }
type TransmitQueue ¶ added in v2.2.0
type TransmitQueue interface { services.Service BlockingPop() (t *Transmission) Push(req *pb.TransmitRequest, reportCtx ocrtypes.ReportContext) (ok bool) Init(transmissions []*Transmission) IsEmpty() bool }
func NewTransmitQueue ¶ added in v2.2.0
func NewTransmitQueue(lggr logger.Logger, serverURL, feedID string, maxlen int, asyncDeleter asyncDeleter) TransmitQueue
maxlen controls how many items will be stored in the queue 0 means unlimited - be careful, this can cause memory leaks
type Transmitter ¶
type Transmitter interface { mercury.Transmitter services.Service }
type TransmitterConfig ¶ added in v2.12.0
type TransmitterConfig interface { TransmitQueueMaxSize() uint32 TransmitTimeout() commonconfig.Duration }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.