evaluators

package
v0.3.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllNodesHaveSameHead = Evaluator{
	Name:       "all_nodes_have_same_head",
	Policy:     func(currentEpoch uint64) bool { return true },
	Evaluation: allNodesHaveSameHead,
}

AllNodesHaveSameHead ensures all nodes 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.

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 FinishedSyncing = Evaluator{
	Name:       "finished_syncing",
	Policy:     func(currentEpoch uint64) bool { return true },
	Evaluation: finishedSyncing,
}

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

View Source
var InjectDoubleVote = Evaluator{
	Name:       "inject_double_vote_%d",
	Policy:     beforeEpoch(2),
	Evaluation: insertDoubleAttestationIntoPool,
}

InjectDoubleVote broadcasts a double vote into the beacon node pool for the slasher to detect.

View Source
var PeersConnect = Evaluator{
	Name:       "peers_connect_epoch_%d",
	Policy:     onEpoch(0),
	Evaluation: peersConnect,
}

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

View Source
var SlashedValidatorsLoseBalance = Evaluator{
	Name:       "slashed_validators_lose_valance_epoch_%d",
	Policy:     afterNthEpoch(0),
	Evaluation: validatorsLoseBalance,
}

SlashedValidatorsLoseBalance checks if the validators slashed lose the right balance.

View Source
var ValidatorsAreActive = Evaluator{
	Name:       "validators_active_epoch_%d",
	Policy:     allEpochs,
	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.

View Source
var ValidatorsSlashed = Evaluator{
	Name:       "validators_slashed_epoch_%d",
	Policy:     afterNthEpoch(0),
	Evaluation: validatorsSlashed,
}

ValidatorsSlashed ensures the expected amount of validators are slashed.

Functions

This section is empty.

Types

type BeaconNodeInfo added in v0.3.2

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(conn ...*grpc.ClientConn) 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