node

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: GPL-3.0 Imports: 15 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 starts the SSV node
	Start() error
}

Node represents the behavior of SSV node

func New

func New(opts Options) Node

New is the constructor of ssvNode

type Options

type Options struct {
	ETHNetwork *core.Network
	Beacon     *beacon.Beacon
	Context    context.Context
	Logger     *zap.Logger
	Eth1Client eth1.Client
	DB         basedb.IDb

	// genesis epoch
	GenesisEpoch uint64 `yaml:"GenesisEpoch" env:"GENESIS_EPOCH" env-description:"Genesis Epoch SSV node will start"`
	// max slots for duty to wait
	//TODO switch to time frame?
	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"`
}

Options contains options to create the node

type Storage added in v0.0.3

type Storage interface {
	// SaveSyncOffset saves the offset (block number)
	SaveSyncOffset(offset *SyncOffset) error
	// GetSyncOffset returns the sync offset
	GetSyncOffset() (*SyncOffset, error)
}

Storage represents the interface for ssv node storage

func NewSSVNodeStorage added in v0.0.3

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

NewSSVNodeStorage creates a new instance of Storage

type SyncOffset added in v0.0.3

type SyncOffset = big.Int

SyncOffset is the type of variable used for passing around the offset

func DefaultSyncOffset added in v0.0.3

func DefaultSyncOffset() *SyncOffset

DefaultSyncOffset returns the default value (block number of the first event from the contract)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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