operator

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node interface {
	Start() error
	StartEth1(syncOffset *eth1.SyncOffset) error
}

Node represents the behavior of SSV node

func New

func New(opts Options) Node

New is the constructor of operatorNode

type Options

type Options struct {
	ETHNetwork          *core.Network
	Beacon              beacon.Beacon
	Network             network.Network
	Context             context.Context
	Logger              *zap.Logger
	Eth1Client          eth1.Client
	DB                  basedb.IDb
	ValidatorController validator.IController
	// genesis epoch
	GenesisEpoch uint64 `yaml:"GenesisEpoch" env:"GENESIS_EPOCH" env-description:"Genesis Epoch SSV node will start"`
	// max slots for duty to wait
	DutyLimit        uint64                      `yaml:"DutyLimit" env:"DUTY_LIMIT" env-default:"32" env-description:"max slots to wait for duty to start"`
	ValidatorOptions validator.ControllerOptions `yaml:"ValidatorOptions"`
	Fork             forks.Fork
}

Options contains options to create the node

type Storage

type Storage interface {
	eth1.SyncOffsetStorage

	GetPrivateKey() (*rsa.PrivateKey, bool, error)
	SetupPrivateKey(operatorKey string) error
}

Storage represents the interface for ssv node storage

func NewOperatorNodeStorage

func NewOperatorNodeStorage(db basedb.IDb, logger *zap.Logger) Storage

NewOperatorNodeStorage creates a new instance of Storage

Directories

Path Synopsis
v0

Jump to

Keyboard shortcuts

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