Documentation ¶
Overview ¶
Package components defines utilities to spin up actual beacon node and validator processes as needed by end to end tests.
Index ¶
- Constants
- func FeeRecipientFromPubkey(key string) string
- type BeaconNode
- type BeaconNodeSet
- func (s *BeaconNodeSet) ComponentAtIndex(i int) (e2etypes.ComponentRunner, error)
- func (s *BeaconNodeSet) Pause() error
- func (s *BeaconNodeSet) PauseAtIndex(i int) error
- func (s *BeaconNodeSet) Resume() error
- func (s *BeaconNodeSet) ResumeAtIndex(i int) error
- func (s *BeaconNodeSet) SetENR(enr string)
- func (s *BeaconNodeSet) Start(ctx context.Context) error
- func (s *BeaconNodeSet) Started() <-chan struct{}
- func (s *BeaconNodeSet) Stop() error
- func (s *BeaconNodeSet) StopAtIndex(i int) error
- type BootNode
- type Builder
- type BuilderSet
- func (s *BuilderSet) ComponentAtIndex(i int) (e2etypes.ComponentRunner, error)
- func (s *BuilderSet) Pause() error
- func (s *BuilderSet) PauseAtIndex(i int) error
- func (s *BuilderSet) Resume() error
- func (s *BuilderSet) ResumeAtIndex(i int) error
- func (s *BuilderSet) Start(ctx context.Context) error
- func (s *BuilderSet) Started() <-chan struct{}
- func (s *BuilderSet) Stop() error
- func (s *BuilderSet) StopAtIndex(i int) error
- type KeystoreGenerator
- type LighthouseBeaconNode
- type LighthouseBeaconNodeSet
- func (s *LighthouseBeaconNodeSet) ComponentAtIndex(i int) (e2etypes.ComponentRunner, error)
- func (s *LighthouseBeaconNodeSet) Pause() error
- func (s *LighthouseBeaconNodeSet) PauseAtIndex(i int) error
- func (s *LighthouseBeaconNodeSet) Resume() error
- func (s *LighthouseBeaconNodeSet) ResumeAtIndex(i int) error
- func (s *LighthouseBeaconNodeSet) SetENR(enr string)
- func (s *LighthouseBeaconNodeSet) Start(ctx context.Context) error
- func (s *LighthouseBeaconNodeSet) Started() <-chan struct{}
- func (s *LighthouseBeaconNodeSet) Stop() error
- func (s *LighthouseBeaconNodeSet) StopAtIndex(i int) error
- type LighthouseValidatorNode
- type LighthouseValidatorNodeSet
- func (s *LighthouseValidatorNodeSet) ComponentAtIndex(i int) (e2etypes.ComponentRunner, error)
- func (s *LighthouseValidatorNodeSet) Pause() error
- func (s *LighthouseValidatorNodeSet) PauseAtIndex(i int) error
- func (s *LighthouseValidatorNodeSet) Resume() error
- func (s *LighthouseValidatorNodeSet) ResumeAtIndex(i int) error
- func (s *LighthouseValidatorNodeSet) Start(ctx context.Context) error
- func (s *LighthouseValidatorNodeSet) Started() <-chan struct{}
- func (s *LighthouseValidatorNodeSet) Stop() error
- func (s *LighthouseValidatorNodeSet) StopAtIndex(i int) error
- type TracingSink
- type ValidatorNode
- type ValidatorNodeSet
- func (s *ValidatorNodeSet) ComponentAtIndex(i int) (e2etypes.ComponentRunner, error)
- func (s *ValidatorNodeSet) Pause() error
- func (s *ValidatorNodeSet) PauseAtIndex(i int) error
- func (s *ValidatorNodeSet) Resume() error
- func (s *ValidatorNodeSet) ResumeAtIndex(i int) error
- func (s *ValidatorNodeSet) Start(ctx context.Context) error
- func (s *ValidatorNodeSet) Started() <-chan struct{}
- func (s *ValidatorNodeSet) Stop() error
- func (s *ValidatorNodeSet) StopAtIndex(i int) error
- type Web3RemoteSigner
- func (w *Web3RemoteSigner) Pause() error
- func (w *Web3RemoteSigner) PublicKeys(ctx context.Context) ([]bls.PublicKey, error)
- func (w *Web3RemoteSigner) Resume() error
- func (w *Web3RemoteSigner) Start(ctx context.Context) error
- func (w *Web3RemoteSigner) Started() <-chan struct{}
- func (w *Web3RemoteSigner) Stop() error
- func (w *Web3RemoteSigner) UnderlyingProcess() *os.Process
Constants ¶
const DefaultFeeRecipientAddress = "0x099FB65722e7b2455043bfebF6177f1D2E9738d9"
const Web3RemoteSignerPort = 9000
Variables ¶
This section is empty.
Functions ¶
func FeeRecipientFromPubkey ¶
FeeRecipientFromPubkey slices, from the beginning of the hex-encoded pubkey string, the 2 character 0x preamble plus enough hex chars to fill out the fee_recipient byte value.
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) Pause ¶
func (node *BeaconNode) Pause() error
Pause pauses the component and its underlying process.
func (*BeaconNode) Resume ¶
func (node *BeaconNode) Resume() error
Resume resumes the component and its underlying process.
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.
func (*BeaconNode) Stop ¶
func (node *BeaconNode) Stop() error
Stop stops the component and its underlying process.
func (*BeaconNode) UnderlyingProcess ¶
func (node *BeaconNode) UnderlyingProcess() *os.Process
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) ComponentAtIndex ¶
func (s *BeaconNodeSet) ComponentAtIndex(i int) (e2etypes.ComponentRunner, error)
ComponentAtIndex returns the component at the provided index.
func (*BeaconNodeSet) Pause ¶
func (s *BeaconNodeSet) Pause() error
Pause pauses the component and its underlying process.
func (*BeaconNodeSet) PauseAtIndex ¶
func (s *BeaconNodeSet) PauseAtIndex(i int) error
PauseAtIndex pauses the component and its underlying process at the desired index.
func (*BeaconNodeSet) Resume ¶
func (s *BeaconNodeSet) Resume() error
Resume resumes the component and its underlying process.
func (*BeaconNodeSet) ResumeAtIndex ¶
func (s *BeaconNodeSet) ResumeAtIndex(i int) error
ResumeAtIndex resumes the component and its underlying process at the desired index.
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.
func (*BeaconNodeSet) Stop ¶
func (s *BeaconNodeSet) Stop() error
Stop stops the component and its underlying process.
func (*BeaconNodeSet) StopAtIndex ¶
func (s *BeaconNodeSet) StopAtIndex(i int) error
StopAtIndex stops the component and its underlying process at the desired index.
type BootNode ¶
type BootNode struct { e2etypes.ComponentRunner // contains filtered or unexported fields }
BootNode represents boot node.
type Builder ¶ added in v4.0.4
type Builder struct { e2etypes.ComponentRunner // contains filtered or unexported fields }
Builder represents a block builder.
func NewBuilder ¶ added in v4.0.4
NewBuilder creates and returns a builder.
type BuilderSet ¶ added in v4.0.4
type BuilderSet struct { e2etypes.ComponentRunner // contains filtered or unexported fields }
BuilderSet represents a set of builders for the validators running via a relay.
func NewBuilderSet ¶ added in v4.0.4
func NewBuilderSet() *BuilderSet
NewBuilderSet creates and returns a set of builders.
func (*BuilderSet) ComponentAtIndex ¶ added in v4.0.4
func (s *BuilderSet) ComponentAtIndex(i int) (e2etypes.ComponentRunner, error)
ComponentAtIndex returns the component at the provided index.
func (*BuilderSet) Pause ¶ added in v4.0.4
func (s *BuilderSet) Pause() error
Pause pauses the component and its underlying process.
func (*BuilderSet) PauseAtIndex ¶ added in v4.0.4
func (s *BuilderSet) PauseAtIndex(i int) error
PauseAtIndex pauses the component and its underlying process at the desired index.
func (*BuilderSet) Resume ¶ added in v4.0.4
func (s *BuilderSet) Resume() error
Resume resumes the component and its underlying process.
func (*BuilderSet) ResumeAtIndex ¶ added in v4.0.4
func (s *BuilderSet) ResumeAtIndex(i int) error
ResumeAtIndex resumes the component and its underlying process at the desired index.
func (*BuilderSet) Start ¶ added in v4.0.4
func (s *BuilderSet) Start(ctx context.Context) error
Start starts all the builders in set.
func (*BuilderSet) Started ¶ added in v4.0.4
func (s *BuilderSet) Started() <-chan struct{}
Started checks whether builder set is started and all builders are ready to be queried.
func (*BuilderSet) Stop ¶ added in v4.0.4
func (s *BuilderSet) Stop() error
Stop stops the component and its underlying process.
func (*BuilderSet) StopAtIndex ¶ added in v4.0.4
func (s *BuilderSet) StopAtIndex(i int) error
StopAtIndex stops the component and its underlying process at the desired index.
type KeystoreGenerator ¶
type KeystoreGenerator struct {
// contains filtered or unexported fields
}
func NewKeystoreGenerator ¶
func NewKeystoreGenerator() *KeystoreGenerator
func (*KeystoreGenerator) Pause ¶
func (k *KeystoreGenerator) Pause() error
Pause pauses the component and its underlying process.
func (*KeystoreGenerator) Resume ¶
func (k *KeystoreGenerator) Resume() error
Resume resumes the component and its underlying process.
func (*KeystoreGenerator) Started ¶
func (k *KeystoreGenerator) Started() <-chan struct{}
func (*KeystoreGenerator) Stop ¶
func (k *KeystoreGenerator) Stop() error
Stop stops the component and its underlying process.
func (*KeystoreGenerator) UnderlyingProcess ¶
func (k *KeystoreGenerator) UnderlyingProcess() *os.Process
type LighthouseBeaconNode ¶
type LighthouseBeaconNode struct { e2etypes.ComponentRunner // contains filtered or unexported fields }
LighthouseBeaconNode represents a lighthouse beacon node.
func NewLighthouseBeaconNode ¶
func NewLighthouseBeaconNode(config *e2etypes.E2EConfig, index int, enr string) *LighthouseBeaconNode
NewLighthouseBeaconNode creates and returns a lighthouse beacon node.
func (*LighthouseBeaconNode) Pause ¶
func (node *LighthouseBeaconNode) Pause() error
Pause pauses the component and its underlying process.
func (*LighthouseBeaconNode) Resume ¶
func (node *LighthouseBeaconNode) Resume() error
Resume resumes the component and its underlying process.
func (*LighthouseBeaconNode) Start ¶
func (node *LighthouseBeaconNode) Start(ctx context.Context) error
Start starts a fresh beacon node, connecting to all passed in beacon nodes.
func (*LighthouseBeaconNode) Started ¶
func (node *LighthouseBeaconNode) Started() <-chan struct{}
Started checks whether beacon node is started and ready to be queried.
func (*LighthouseBeaconNode) Stop ¶
func (node *LighthouseBeaconNode) Stop() error
Stop stops the component and its underlying process.
type LighthouseBeaconNodeSet ¶
type LighthouseBeaconNodeSet struct { e2etypes.ComponentRunner // contains filtered or unexported fields }
LighthouseBeaconNodeSet represents set of lighthouse beacon nodes.
func NewLighthouseBeaconNodes ¶
func NewLighthouseBeaconNodes(config *e2etypes.E2EConfig) *LighthouseBeaconNodeSet
NewLighthouseBeaconNodes creates and returns a set of lighthouse beacon nodes.
func (*LighthouseBeaconNodeSet) ComponentAtIndex ¶
func (s *LighthouseBeaconNodeSet) ComponentAtIndex(i int) (e2etypes.ComponentRunner, error)
ComponentAtIndex returns the component at the provided index.
func (*LighthouseBeaconNodeSet) Pause ¶
func (s *LighthouseBeaconNodeSet) Pause() error
Pause pauses the component and its underlying process.
func (*LighthouseBeaconNodeSet) PauseAtIndex ¶
func (s *LighthouseBeaconNodeSet) PauseAtIndex(i int) error
PauseAtIndex pauses the component and its underlying process at the desired index.
func (*LighthouseBeaconNodeSet) Resume ¶
func (s *LighthouseBeaconNodeSet) Resume() error
Resume resumes the component and its underlying process.
func (*LighthouseBeaconNodeSet) ResumeAtIndex ¶
func (s *LighthouseBeaconNodeSet) ResumeAtIndex(i int) error
ResumeAtIndex resumes the component and its underlying process at the desired index.
func (*LighthouseBeaconNodeSet) SetENR ¶
func (s *LighthouseBeaconNodeSet) SetENR(enr string)
SetENR assigns ENR to the set of beacon nodes.
func (*LighthouseBeaconNodeSet) Start ¶
func (s *LighthouseBeaconNodeSet) Start(ctx context.Context) error
Start starts all the beacon nodes in set.
func (*LighthouseBeaconNodeSet) Started ¶
func (s *LighthouseBeaconNodeSet) Started() <-chan struct{}
Started checks whether beacon node set is started and all nodes are ready to be queried.
func (*LighthouseBeaconNodeSet) Stop ¶
func (s *LighthouseBeaconNodeSet) Stop() error
Stop stops the component and its underlying process.
func (*LighthouseBeaconNodeSet) StopAtIndex ¶
func (s *LighthouseBeaconNodeSet) StopAtIndex(i int) error
StopAtIndex stops the component and its underlying process at the desired index.
type LighthouseValidatorNode ¶
type LighthouseValidatorNode struct { e2etypes.ComponentRunner // contains filtered or unexported fields }
LighthouseValidatorNode represents a lighthouse validator node.
func NewLighthouseValidatorNode ¶
func NewLighthouseValidatorNode(config *e2etypes.E2EConfig, validatorNum, index, offset int) *LighthouseValidatorNode
NewLighthouseValidatorNode creates and returns a lighthouse validator node.
func (*LighthouseValidatorNode) Pause ¶
func (v *LighthouseValidatorNode) Pause() error
Pause pauses the component and its underlying process.
func (*LighthouseValidatorNode) Resume ¶
func (v *LighthouseValidatorNode) Resume() error
Resume resumes the component and its underlying process.
func (*LighthouseValidatorNode) Start ¶
func (v *LighthouseValidatorNode) Start(ctx context.Context) error
Start starts a validator client.
func (*LighthouseValidatorNode) Started ¶
func (v *LighthouseValidatorNode) Started() <-chan struct{}
Started checks whether validator node is started and ready to be queried.
func (*LighthouseValidatorNode) Stop ¶
func (v *LighthouseValidatorNode) Stop() error
Stop stops the component and its underlying process.
type LighthouseValidatorNodeSet ¶
type LighthouseValidatorNodeSet struct { e2etypes.ComponentRunner // contains filtered or unexported fields }
LighthouseValidatorNodeSet represents set of lighthouse validator nodes.
func NewLighthouseValidatorNodeSet ¶
func NewLighthouseValidatorNodeSet(config *e2etypes.E2EConfig) *LighthouseValidatorNodeSet
NewLighthouseValidatorNodeSet creates and returns a set of lighthouse validator nodes.
func (*LighthouseValidatorNodeSet) ComponentAtIndex ¶
func (s *LighthouseValidatorNodeSet) ComponentAtIndex(i int) (e2etypes.ComponentRunner, error)
ComponentAtIndex returns the component at the provided index.
func (*LighthouseValidatorNodeSet) Pause ¶
func (s *LighthouseValidatorNodeSet) Pause() error
Pause pauses the component and its underlying process.
func (*LighthouseValidatorNodeSet) PauseAtIndex ¶
func (s *LighthouseValidatorNodeSet) PauseAtIndex(i int) error
PauseAtIndex pauses the component and its underlying process at the desired index.
func (*LighthouseValidatorNodeSet) Resume ¶
func (s *LighthouseValidatorNodeSet) Resume() error
Resume resumes the component and its underlying process.
func (*LighthouseValidatorNodeSet) ResumeAtIndex ¶
func (s *LighthouseValidatorNodeSet) ResumeAtIndex(i int) error
ResumeAtIndex resumes the component and its underlying process at the desired index.
func (*LighthouseValidatorNodeSet) Start ¶
func (s *LighthouseValidatorNodeSet) Start(ctx context.Context) error
Start starts the configured amount of validators, also sending and mining their deposits.
func (*LighthouseValidatorNodeSet) Started ¶
func (s *LighthouseValidatorNodeSet) Started() <-chan struct{}
Started checks whether validator node set is started and all nodes are ready to be queried.
func (*LighthouseValidatorNodeSet) Stop ¶
func (s *LighthouseValidatorNodeSet) Stop() error
Stop stops the component and its underlying process.
func (*LighthouseValidatorNodeSet) StopAtIndex ¶
func (s *LighthouseValidatorNodeSet) StopAtIndex(i int) error
StopAtIndex stops the component and its underlying process at the desired index.
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) Pause ¶
func (ts *TracingSink) Pause() error
Pause pauses the component and its underlying process.
func (*TracingSink) Resume ¶
func (ts *TracingSink) Resume() error
Resume resumes the component and its underlying process.
func (*TracingSink) Start ¶
func (ts *TracingSink) Start(ctx 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.
func (*TracingSink) Stop ¶
func (ts *TracingSink) Stop() error
Stop stops the component and its underlying process.
func (*TracingSink) UnderlyingProcess ¶
func (ts *TracingSink) UnderlyingProcess() *os.Process
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) Pause ¶
func (v *ValidatorNode) Pause() error
Pause pauses the component and its underlying process.
func (*ValidatorNode) Resume ¶
func (v *ValidatorNode) Resume() error
Resume resumes the component and its underlying process.
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.
func (*ValidatorNode) Stop ¶
func (v *ValidatorNode) Stop() error
Stop stops the component and its underlying process.
func (*ValidatorNode) UnderlyingProcess ¶
func (v *ValidatorNode) UnderlyingProcess() *os.Process
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) ComponentAtIndex ¶
func (s *ValidatorNodeSet) ComponentAtIndex(i int) (e2etypes.ComponentRunner, error)
ComponentAtIndex returns the component at the provided index.
func (*ValidatorNodeSet) Pause ¶
func (s *ValidatorNodeSet) Pause() error
Pause pauses the component and its underlying process.
func (*ValidatorNodeSet) PauseAtIndex ¶
func (s *ValidatorNodeSet) PauseAtIndex(i int) error
PauseAtIndex pauses the component and its underlying process at the desired index.
func (*ValidatorNodeSet) Resume ¶
func (s *ValidatorNodeSet) Resume() error
Resume resumes the component and its underlying process.
func (*ValidatorNodeSet) ResumeAtIndex ¶
func (s *ValidatorNodeSet) ResumeAtIndex(i int) error
ResumeAtIndex resumes the component and its underlying process at the desired index.
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.
func (*ValidatorNodeSet) Stop ¶
func (s *ValidatorNodeSet) Stop() error
Stop stops the component and its underlying process.
func (*ValidatorNodeSet) StopAtIndex ¶
func (s *ValidatorNodeSet) StopAtIndex(i int) error
StopAtIndex stops the component and its underlying process at the desired index.
type Web3RemoteSigner ¶
type Web3RemoteSigner struct {
// contains filtered or unexported fields
}
func NewWeb3RemoteSigner ¶
func NewWeb3RemoteSigner() *Web3RemoteSigner
func (*Web3RemoteSigner) Pause ¶
func (w *Web3RemoteSigner) Pause() error
Pause pauses the component and its underlying process.
func (*Web3RemoteSigner) PublicKeys ¶
PublicKeys queries the web3signer and returns the response keys.
func (*Web3RemoteSigner) Resume ¶
func (w *Web3RemoteSigner) Resume() error
Resume resumes the component and its underlying process.
func (*Web3RemoteSigner) Start ¶
func (w *Web3RemoteSigner) Start(ctx context.Context) error
Start the web3remotesigner component with a keystore populated with the deterministic validator keys.
func (*Web3RemoteSigner) Started ¶
func (w *Web3RemoteSigner) Started() <-chan struct{}
func (*Web3RemoteSigner) Stop ¶
func (w *Web3RemoteSigner) Stop() error
Stop stops the component and its underlying process.
func (*Web3RemoteSigner) UnderlyingProcess ¶
func (w *Web3RemoteSigner) UnderlyingProcess() *os.Process