duties

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDutyExecuteMsg added in v0.4.7

func CreateDutyExecuteMsg(duty *spectypes.Duty, pubKey *bls.PublicKey) (*spectypes.SSVMessage, error)

CreateDutyExecuteMsg returns ssvMsg with event type of duty execute

Types

type ControllerOptions

type ControllerOptions struct {
	Ctx                 context.Context
	BeaconClient        beaconprotocol.Beacon
	EthNetwork          beaconprotocol.Network
	ValidatorController validator.Controller
	Executor            DutyExecutor
	DutyLimit           uint64
	ForkVersion         forksprotocol.ForkVersion
	Ticker              slot_ticker.Ticker
}

ControllerOptions holds the needed dependencies

type DutyController

type DutyController interface {
	Start(logger *zap.Logger)
}

DutyController interface for dispatching duties execution according to slot ticker

func NewDutyController

func NewDutyController(logger *zap.Logger, opts *ControllerOptions) DutyController

NewDutyController creates a new instance of DutyController

type DutyExecutor added in v0.1.8

type DutyExecutor interface {
	ExecuteDuty(logger *zap.Logger, duty *spectypes.Duty) error
}

DutyExecutor represents the component that executes duties

func NewReadOnlyExecutor added in v0.1.8

func NewReadOnlyExecutor() DutyExecutor

NewReadOnlyExecutor creates a dummy executor that is used to run in read mode

type DutyFetcher

type DutyFetcher interface {
	GetDuties(logger *zap.Logger, slot phase0.Slot) ([]spectypes.Duty, error)
	SyncCommitteeDuties(logger *zap.Logger, epoch phase0.Epoch, indices []phase0.ValidatorIndex) ([]*eth2apiv1.SyncCommitteeDuty, error)
	eth2client.EventsProvider
}

DutyFetcher represents the component that manages duties

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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