Versions in this module Expand all Collapse all v1 v1.10.17 Oct 18, 2021 Changes in this version + func MinimumPollingInterval(c Config) time.Duration type Config + EvmGasLimitDefault func() uint64 + EvmMaxQueuedTransactions func() uint64 + MinimumContractPayment func() *assets.Link v1.10.16 Oct 18, 2021 Changes in this version + const DefaultHibernationPollPeriod + const MinFundedRounds + const PriorityAnswerUpdatedLog + const PriorityFlagChangedLog + const PriorityNewRoundLog + var ErrNotEligible = errors.New("not eligible to submit") + var ErrPaymentTooLow = errors.New("round payment amount < minimum contract payment") + var ErrUnderfunded = errors.New("aggregator is underfunded") + var FluxAggregatorABI = eth.MustGetABI(flux_aggregator_wrapper.FluxAggregatorABI) + func NewORM(db *gorm.DB, txm transmitter, strategy bulletprooftxmanager.TxStrategy) *orm + func ValidatedFluxMonitorSpec(config ValidationConfig, ts string) (job.Job, error) + type Config struct + DefaultHTTPTimeout time.Duration + EthGasLimit uint64 + EthMaxQueuedTransactions uint64 + FMDefaultTransactionQueueDepth uint32 + FlagsContractAddress string + MinContractPayment *assets.Link + func (c *Config) MinimumPollingInterval() time.Duration + type ContractFlags struct + func (f *ContractFlags) Contract() flags_wrapper.FlagsInterface + func (f *ContractFlags) ContractExists() bool + func (f *ContractFlags) IsLowered(contractAddr common.Address) (bool, error) + type ContractSubmitter interface + Submit func(db *gorm.DB, roundID *big.Int, submission *big.Int) error + type Delegate struct + func NewDelegate(txm transmitter, ethKeyStore *keystore.Eth, jobORM job.ORM, ...) *Delegate + func (Delegate) AfterJobCreated(spec job.Job) + func (Delegate) BeforeJobDeleted(spec job.Job) + func (d *Delegate) JobType() job.Type + func (d *Delegate) ServicesForSpec(spec job.Job) (services []job.Service, err error) + type DeviationChecker struct + Thresholds DeviationThresholds + func NewDeviationChecker(rel, abs float64) *DeviationChecker + func NewZeroDeviationChecker() *DeviationChecker + func (c *DeviationChecker) OutsideDeviation(curAnswer, nextAnswer decimal.Decimal) bool + type DeviationThresholds struct + Abs float64 + Rel float64 + type Flags interface + Address func() common.Address + ContractExists func() bool + IsLowered func(contractAddr common.Address) (bool, error) + ParseLog func(log types.Log) (generated.AbigenLog, error) + func NewFlags(addrHex string, ethClient eth.Client) (Flags, error) + type FluxAggregatorContractSubmitter struct + func NewFluxAggregatorContractSubmitter(contract flux_aggregator_wrapper.FluxAggregatorInterface, orm ORM, ...) *FluxAggregatorContractSubmitter + func (c *FluxAggregatorContractSubmitter) Submit(db *gorm.DB, roundID *big.Int, submission *big.Int) error + type FluxMonitor struct + func NewFluxMonitor(pipelineRunner pipeline.Runner, jobSpec job.Job, spec pipeline.Spec, ...) (*FluxMonitor, error) + func NewFromJobSpec(jobSpec job.Job, db *gorm.DB, orm ORM, jobORM job.ORM, ...) (*FluxMonitor, error) + func (fm *FluxMonitor) Close() error + func (fm *FluxMonitor) HandleLog(broadcast log.Broadcast) + func (fm *FluxMonitor) IsHibernating() bool + func (fm *FluxMonitor) IsV2Job() bool + func (fm *FluxMonitor) JobID() models.JobID + func (fm *FluxMonitor) JobIDV2() int32 + func (fm *FluxMonitor) SetOracleAddress() error + func (fm *FluxMonitor) Start() error + type FluxMonitorRoundStatsV2 struct + Aggregator common.Address + ID uint64 + NumNewRoundLogs uint64 + NumSubmissions uint64 + PipelineRunID null.Int64 + RoundID uint32 + type KeyStore struct + func NewKeyStore(ks keystore.EthKeyStoreInterface) *KeyStore + type KeyStoreInterface interface + GetRoundRobinAddress func(...common.Address) (common.Address, error) + SendingKeys func() ([]ethkey.Key, error) + type ORM interface + CreateEthTransaction func(db *gorm.DB, fromAddress, toAddress common.Address, payload []byte, ...) error + DeleteFluxMonitorRoundsBackThrough func(aggregator common.Address, roundID uint32) error + FindOrCreateFluxMonitorRoundStats func(aggregator common.Address, roundID uint32) (FluxMonitorRoundStatsV2, error) + MostRecentFluxMonitorRoundID func(aggregator common.Address) (uint32, error) + UpdateFluxMonitorRoundStats func(db *gorm.DB, aggregator common.Address, roundID uint32, runID int64) error + type PaymentChecker struct + MinContractPayment *assets.Link + MinJobPayment *assets.Link + func NewPaymentChecker(minContractPayment, minJobPayment *assets.Link) *PaymentChecker + func (c *PaymentChecker) SufficientFunds(availableFunds *big.Int, paymentAmount *big.Int, oracleCount uint8) bool + func (c *PaymentChecker) SufficientPayment(payment *big.Int) bool + type PollManager struct + func NewPollManager(cfg PollManagerConfig, logger *logger.Logger) (*PollManager, error) + func (pm *PollManager) Awaken(roundState flux_aggregator_wrapper.OracleRoundState) + func (pm *PollManager) DrumbeatTicks() <-chan time.Time + func (pm *PollManager) Hibernate() + func (pm *PollManager) HibernationTimerTicks() <-chan time.Time + func (pm *PollManager) IdleTimerTicks() <-chan time.Time + func (pm *PollManager) Poll() <-chan PollRequest + func (pm *PollManager) PollTickerTicks() <-chan time.Time + func (pm *PollManager) Reset(roundState flux_aggregator_wrapper.OracleRoundState) + func (pm *PollManager) ResetIdleTimer(roundStartedAtUTC uint64) + func (pm *PollManager) RetryTickerTicks() <-chan time.Time + func (pm *PollManager) RoundTimerTicks() <-chan time.Time + func (pm *PollManager) ShouldPerformInitialPoll() bool + func (pm *PollManager) Start(hibernate bool, roundState flux_aggregator_wrapper.OracleRoundState) + func (pm *PollManager) StartRetryTicker() bool + func (pm *PollManager) Stop() + func (pm *PollManager) StopRetryTicker() + type PollManagerConfig struct + DrumbeatEnabled bool + DrumbeatRandomDelay time.Duration + DrumbeatSchedule string + HibernationPollPeriod time.Duration + IdleTimerDisabled bool + IdleTimerPeriod time.Duration + IsHibernating bool + MaxRetryBackoffDuration time.Duration + MinRetryBackoffDuration time.Duration + PollTickerDisabled bool + PollTickerInterval time.Duration + type PollRequest struct + Timestamp time.Time + Type PollRequestType + type PollRequestType int + const PollRequestTypeAwaken + const PollRequestTypeDrumbeat + const PollRequestTypeHibernation + const PollRequestTypeIdle + const PollRequestTypeInitial + const PollRequestTypePoll + const PollRequestTypeRetry + const PollRequestTypeRound + const PollRequestTypeUnknown + type SubmissionChecker struct + Max decimal.Decimal + Min decimal.Decimal + func NewSubmissionChecker(min *big.Int, max *big.Int) *SubmissionChecker + func (c *SubmissionChecker) IsValid(answer decimal.Decimal) bool + type ValidationConfig interface + DefaultHTTPTimeout func() models.Duration