mon

package
v1.7.4 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRootAgreement = errors.New("failed to check root agreement")
)

Functions

This section is empty.

Types

type BlockHashFetcher added in v1.6.1

type BlockHashFetcher func(ctx context.Context, number *big.Int) (common.Hash, error)

type BlockNumberFetcher added in v1.6.1

type BlockNumberFetcher func(ctx context.Context) (uint64, error)

type Bonds added in v1.7.2

type Bonds func(games []*types.EnrichedGameData)

type ClaimMetrics added in v1.7.3

type ClaimMetrics interface {
	RecordClaims(status metrics.ClaimStatus, count int)
	RecordUnexpectedClaimResolution(address common.Address, count int)
}

type ClaimMonitor added in v1.7.3

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

func NewClaimMonitor added in v1.7.3

func NewClaimMonitor(logger log.Logger, clock RClock, honestActors []common.Address, metrics ClaimMetrics) *ClaimMonitor

func (*ClaimMonitor) CheckClaims added in v1.7.3

func (c *ClaimMonitor) CheckClaims(games []*types.EnrichedGameData)

type Extract added in v1.7.0

type Extract func(ctx context.Context, blockHash common.Hash, minTimestamp uint64) ([]*types.EnrichedGameData, error)

type Forecast added in v1.6.1

type Forecast func(ctx context.Context, games []*types.EnrichedGameData)

type ForecastMetrics added in v1.6.1

type ForecastMetrics interface {
	RecordClaimResolutionDelayMax(delay float64)
	RecordGameAgreement(status metrics.GameAgreementStatus, count int)
}

type MonitorClaims added in v1.7.3

type MonitorClaims func(games []*types.EnrichedGameData)

type MonitorWithdrawals added in v1.7.3

type MonitorWithdrawals func(games []*types.EnrichedGameData)

type OutputMetrics added in v1.7.2

type OutputMetrics interface {
	RecordOutputFetchTime(float64)
}

type OutputRollupClient added in v1.6.1

type OutputRollupClient interface {
	OutputAtBlock(ctx context.Context, blockNum uint64) (*eth.OutputResponse, error)
	SafeHeadAtL1Block(ctx context.Context, blockNum uint64) (*eth.SafeHeadResponse, error)
}

type OutputValidator added in v1.6.1

type OutputValidator interface {
	CheckRootAgreement(ctx context.Context, l1HeadNum uint64, l2BlockNum uint64, root common.Hash) (bool, common.Hash, error)
}

type RClock added in v1.7.3

type RClock interface {
	Now() time.Time
}

type RecordClaimResolutionDelayMax added in v1.7.2

type RecordClaimResolutionDelayMax func([]*types.EnrichedGameData)

type ResolutionMetrics added in v1.7.3

type ResolutionMetrics interface {
	RecordGameResolutionStatus(complete bool, maxDurationReached bool, count int)
}

type ResolutionMonitor added in v1.7.3

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

func NewResolutionMonitor added in v1.7.3

func NewResolutionMonitor(logger log.Logger, metrics ResolutionMetrics, clock RClock) *ResolutionMonitor

func (*ResolutionMonitor) CheckResolutions added in v1.7.3

func (r *ResolutionMonitor) CheckResolutions(games []*types.EnrichedGameData)

type Resolutions added in v1.7.3

type Resolutions func(games []*types.EnrichedGameData)

type Service

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

func NewService

func NewService(ctx context.Context, logger log.Logger, cfg *config.Config) (*Service, error)

NewService creates a new Service.

func (*Service) Start

func (s *Service) Start(ctx context.Context) error

func (*Service) Stop

func (s *Service) Stop(ctx context.Context) error

func (*Service) Stopped

func (s *Service) Stopped() bool

type WithdrawalMetrics added in v1.7.3

type WithdrawalMetrics interface {
	RecordWithdrawalRequests(delayedWeth common.Address, matches bool, count int)
}

type WithdrawalMonitor added in v1.7.3

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

func NewWithdrawalMonitor added in v1.7.3

func NewWithdrawalMonitor(logger log.Logger, metrics WithdrawalMetrics) *WithdrawalMonitor

func (*WithdrawalMonitor) CheckWithdrawals added in v1.7.3

func (w *WithdrawalMonitor) CheckWithdrawals(games []*types.EnrichedGameData)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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