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 ¶
Types ¶
type BeaconNode ¶
type BeaconNode struct { e2etypes.ComponentRunner // contains filtered or unexported fields }
BeaconNode represents beacon node.
func NewBeaconNode ¶
func NewBeaconNode(config *e2etypes.E2EConfig, index int, enr string) *BeaconNode
NewBeaconNode creates and returns a beacon node.
func (*BeaconNode) Start ¶
func (node *BeaconNode) Start(ctx context.Context) error
Start starts a fresh beacon node, connecting to all passed in beacon nodes.
func (*BeaconNode) Started ¶
func (node *BeaconNode) Started() <-chan struct{}
Started checks whether beacon node is started and ready to be queried.
type BeaconNodeSet ¶
type BeaconNodeSet struct { e2etypes.ComponentRunner // contains filtered or unexported fields }
BeaconNodeSet represents set of beacon nodes.
func NewBeaconNodes ¶
func NewBeaconNodes(config *e2etypes.E2EConfig) *BeaconNodeSet
NewBeaconNodes creates and returns a set of beacon nodes.
func (*BeaconNodeSet) SetENR ¶
func (s *BeaconNodeSet) SetENR(enr string)
SetENR assigns ENR to the set of beacon nodes.
func (*BeaconNodeSet) Start ¶
func (s *BeaconNodeSet) Start(ctx context.Context) error
Start starts all the beacon nodes in set.
func (*BeaconNodeSet) Started ¶
func (s *BeaconNodeSet) Started() <-chan struct{}
Started checks whether beacon node set is started and all nodes are ready to be queried.
type BootNode ¶
type BootNode struct { e2etypes.ComponentRunner // contains filtered or unexported fields }
BootNode represents boot node.
type Eth1Node ¶
type Eth1Node struct { e2etypes.ComponentRunner // contains filtered or unexported fields }
Eth1Node represents ETH1 node.
func (*Eth1Node) KeystorePath ¶
KeystorePath exposes node's keystore path.
type TracingSink ¶
type TracingSink struct {
// contains filtered or unexported fields
}
TracingSink to capture HTTP requests from opentracing pushes. This is meant to capture all opentracing spans from Prysm during an end-to-end test. Spans are normally sent to a jaeger (https://www.jaegertracing.io/docs/1.25/getting-started/) endpoint, but here we instead replace that with our own http request sink. The request sink receives any requests, raw marshals them and base64-encodes them, then writes them newline-delimited into a file.
The output file from this component can then be used by tools/replay-http in the Prysm repository to replay requests to a jaeger collector endpoint. This can then be used to visualize the spans themselves in the jaeger UI.
func NewTracingSink ¶
func NewTracingSink(endpoint string) *TracingSink
NewTracingSink initializes the tracing sink component.
func (*TracingSink) Start ¶
func (ts *TracingSink) Start(_ context.Context) error
Start the tracing sink.
func (*TracingSink) Started ¶
func (ts *TracingSink) Started() <-chan struct{}
Started checks whether a tracing sink is started and ready to be queried.
type ValidatorNode ¶
type ValidatorNode struct { e2etypes.ComponentRunner // contains filtered or unexported fields }
ValidatorNode represents a validator node.
func NewValidatorNode ¶
func NewValidatorNode(config *e2etypes.E2EConfig, validatorNum, index, offset int) *ValidatorNode
NewValidatorNode creates and returns a validator node.
func (*ValidatorNode) Start ¶
func (v *ValidatorNode) Start(ctx context.Context) error
Start starts a validator client.
func (*ValidatorNode) Started ¶
func (v *ValidatorNode) Started() <-chan struct{}
Started checks whether validator node is started and ready to be queried.
type ValidatorNodeSet ¶
type ValidatorNodeSet struct { e2etypes.ComponentRunner // contains filtered or unexported fields }
ValidatorNodeSet represents set of validator nodes.
func NewValidatorNodeSet ¶
func NewValidatorNodeSet(config *e2etypes.E2EConfig) *ValidatorNodeSet
NewValidatorNodeSet creates and returns a set of validator nodes.
func (*ValidatorNodeSet) Start ¶
func (s *ValidatorNodeSet) Start(ctx context.Context) error
Start starts the configured amount of validators, also sending and mining their deposits.
func (*ValidatorNodeSet) Started ¶
func (s *ValidatorNodeSet) Started() <-chan struct{}
Started checks whether validator node set is started and all nodes are ready to be queried.