evaluators

package
v0.0.0-...-ab12051 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FinalizationOccurs = Evaluator{
	Name:       "finalizes_at_epoch_%d",
	Policy:     afterNthEpoch(3),
	Evaluation: finalizationOccurs,
}

FinalizationOccurs is an evaluator to make sure finalization is performing as it should. Requires to be run after at least 4 epochs have passed.

View Source
var ValidatorsAreActive = Evaluator{
	Name:       "validators_active_epoch_%d",
	Policy:     afterNthEpoch(1),
	Evaluation: validatorsAreActive,
}

ValidatorsAreActive ensures the expected amount of validators are active.

View Source
var ValidatorsParticipating = Evaluator{
	Name:       "validators_participating_epoch_%d",
	Policy:     afterNthEpoch(2),
	Evaluation: validatorsParticipating,
}

ValidatorsParticipating ensures the expected amount of validators are active.

Functions

func AllChainsHaveSameHead

func AllChainsHaveSameHead(beaconNodes []*BeaconNodeInfo) error

AllChainsHaveSameHead connects to all RPC ports in the passed in array and ensures they have the same head epoch. Checks finality and justification as well. Not checking head block root as it may change irregularly for the validator connected nodes.

func FinishedSyncing

func FinishedSyncing(rpcPort uint64) error

FinishedSyncing returns whether the beacon node with the given rpc port has finished syncing.

func PeersConnect

func PeersConnect(beaconNodes []*BeaconNodeInfo) error

PeersConnect checks all beacon nodes and returns whether they are connected to each other as peers.

Types

type BeaconNodeInfo

type BeaconNodeInfo struct {
	ProcessID   int
	DataDir     string
	RPCPort     uint64
	MonitorPort uint64
	GRPCPort    uint64
	MultiAddr   string
}

BeaconNodeInfo contains the info of ports and other required information needed to communicate with the beacon node it represents.

type Evaluator

type Evaluator struct {
	Name       string
	Policy     func(currentEpoch uint64) bool
	Evaluation func(client eth.BeaconChainClient) error
}

Evaluator defines the structure of the evaluators used to conduct the current beacon state during the E2E.

Jump to

Keyboard shortcuts

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