components

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: GPL-3.0 Imports: 30 Imported by: 0

Documentation

Overview

Package components defines utilities to spin up actual beacon node and validator processes as needed by end to end tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendAndMineDeposits added in v1.0.0

func SendAndMineDeposits(keystorePath string, validatorNum, offset int, partial bool) error

SendAndMineDeposits sends the requested amount of deposits and mines the chain after to ensure the deposits are seen.

Types

type BeaconNode added in v1.3.5

type BeaconNode struct {
	e2etypes.ComponentRunner
	// contains filtered or unexported fields
}

BeaconNode represents beacon node.

func NewBeaconNode added in v1.3.5

func NewBeaconNode(config *e2etypes.E2EConfig, index int, enr string) *BeaconNode

NewBeaconNode creates and returns a beacon node.

func (*BeaconNode) Start added in v1.3.5

func (node *BeaconNode) Start(ctx context.Context) error

Start starts a fresh beacon node, connecting to all passed in beacon nodes.

func (*BeaconNode) Started added in v1.3.5

func (node *BeaconNode) Started() <-chan struct{}

Started checks whether beacon node is started and ready to be queried.

type BeaconNodeSet added in v1.3.5

type BeaconNodeSet struct {
	e2etypes.ComponentRunner
	// contains filtered or unexported fields
}

BeaconNodeSet represents set of beacon nodes.

func NewBeaconNodes added in v1.3.5

func NewBeaconNodes(config *e2etypes.E2EConfig) *BeaconNodeSet

NewBeaconNodes creates and returns a set of beacon nodes.

func (*BeaconNodeSet) SetENR added in v1.3.5

func (s *BeaconNodeSet) SetENR(enr string)

SetENR assigns ENR to the set of beacon nodes.

func (*BeaconNodeSet) Start added in v1.3.5

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

Start starts all the beacon nodes in set.

func (*BeaconNodeSet) Started added in v1.3.5

func (s *BeaconNodeSet) Started() <-chan struct{}

Started checks whether beacon node set is started and all nodes are ready to be queried.

type BootNode added in v1.3.5

type BootNode struct {
	e2etypes.ComponentRunner
	// contains filtered or unexported fields
}

BootNode represents boot node.

func NewBootNode added in v1.3.5

func NewBootNode() *BootNode

NewBootNode creates and returns boot node.

func (*BootNode) ENR added in v1.3.5

func (node *BootNode) ENR() string

ENR exposes node's ENR.

func (*BootNode) Start added in v1.3.5

func (node *BootNode) Start(ctx context.Context) error

Start starts a bootnode blocks up until ctx is cancelled.

func (*BootNode) Started added in v1.3.5

func (node *BootNode) Started() <-chan struct{}

Started checks whether a boot node is started and ready to be queried.

type Eth1Node added in v1.3.5

type Eth1Node struct {
	e2etypes.ComponentRunner
	// contains filtered or unexported fields
}

Eth1Node represents ETH1 node.

func NewEth1Node added in v1.3.5

func NewEth1Node() *Eth1Node

NewEth1Node creates and returns ETH1 node.

func (*Eth1Node) KeystorePath added in v1.3.5

func (node *Eth1Node) KeystorePath() string

KeystorePath exposes node's keystore path.

func (*Eth1Node) Start added in v1.3.5

func (node *Eth1Node) Start(ctx context.Context) error

Start starts an ETH1 local dev chain and deploys a deposit contract.

func (*Eth1Node) Started added in v1.3.5

func (node *Eth1Node) Started() <-chan struct{}

Started checks whether ETH1 node is started and ready to be queried.

type SlasherNode added in v1.3.5

type SlasherNode struct {
	e2etypes.ComponentRunner
	// contains filtered or unexported fields
}

SlasherNode represents a slasher node.

func NewSlasherNode added in v1.3.5

func NewSlasherNode(_ *e2etypes.E2EConfig, index int) *SlasherNode

NewSlasherNode creates and returns slasher node.

func (*SlasherNode) Start added in v1.3.5

func (node *SlasherNode) Start(ctx context.Context) error

Start starts slasher clients for use within E2E, connected to all beacon nodes.

func (*SlasherNode) Started added in v1.3.5

func (node *SlasherNode) Started() <-chan struct{}

Started checks whether slasher node is started and ready to be queried.

type SlasherNodeSet added in v1.3.5

type SlasherNodeSet struct {
	e2etypes.ComponentRunner
	// contains filtered or unexported fields
}

SlasherNodeSet represents set of slasher nodes.

func NewSlasherNodeSet added in v1.3.5

func NewSlasherNodeSet(config *e2etypes.E2EConfig) *SlasherNodeSet

NewSlasherNodeSet creates and returns a set of slasher nodes.

func (*SlasherNodeSet) Start added in v1.3.5

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

Start starts all the slasher nodes in set.

func (*SlasherNodeSet) Started added in v1.3.5

func (s *SlasherNodeSet) Started() <-chan struct{}

Started checks whether beacon node set is started and all nodes are ready to be queried.

type ValidatorNode added in v1.3.5

type ValidatorNode struct {
	e2etypes.ComponentRunner
	// contains filtered or unexported fields
}

ValidatorNode represents a validator node.

func NewValidatorNode added in v1.3.5

func NewValidatorNode(config *e2etypes.E2EConfig, validatorNum, index, offset int) *ValidatorNode

NewValidatorNode creates and returns a validator node.

func (*ValidatorNode) Start added in v1.3.5

func (v *ValidatorNode) Start(ctx context.Context) error

Start starts a validator client.

func (*ValidatorNode) Started added in v1.3.5

func (v *ValidatorNode) Started() <-chan struct{}

Started checks whether validator node is started and ready to be queried.

type ValidatorNodeSet added in v1.3.5

type ValidatorNodeSet struct {
	e2etypes.ComponentRunner
	// contains filtered or unexported fields
}

ValidatorNodeSet represents set of validator nodes.

func NewValidatorNodeSet added in v1.3.5

func NewValidatorNodeSet(config *e2etypes.E2EConfig) *ValidatorNodeSet

NewValidatorNodeSet creates and returns a set of validator nodes.

func (*ValidatorNodeSet) Start added in v1.3.5

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

Start starts the configured amount of validators, also sending and mining their deposits.

func (*ValidatorNodeSet) Started added in v1.3.5

func (s *ValidatorNodeSet) Started() <-chan struct{}

Started checks whether validator node set is started and all nodes are ready to be queried.

Jump to

Keyboard shortcuts

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