evaluators

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: 3

Documentation

Overview

Package evaluators defines functions which can peer into end to end tests to determine if a chain is running as required.

Index

Constants

This section is empty.

Variables

View Source
var ActivatesDepositedValidators = e2etypes.Evaluator{
	Name:       "processes_deposit_validators_epoch_%d",
	Policy:     policies.BetweenEpochs(depositActivationStartEpoch, depositEndEpoch),
	Evaluation: activatesDepositedValidators,
}

ActivatesDepositedValidators ensures the expected amount of validator deposits are activated into the state.

View Source
var AllNodesHaveSameHead = e2etypes.Evaluator{
	Name:       "all_nodes_have_same_head",
	Policy:     policies.AllEpochs,
	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 ApiVerifyValidators = e2etypes.Evaluator{
	Name:       "api_verify_validators_epoch_%d",
	Policy:     policies.OnEpoch(1),
	Evaluation: apiVerifyValidators,
}

ApiVerifyValidators ensures the Ethereum API returns correct validator data.

View Source
var ColdStateCheckpoint = e2etypes.Evaluator{
	Name: "cold_state_assignments_from_epoch_%d",
	Policy: func(currentEpoch types.Epoch) bool {
		return currentEpoch == epochToCheck
	},
	Evaluation: checkColdStateCheckpoint,
}

ColdStateCheckpoint checks data from the database using cold state storage.

View Source
var DepositedValidatorsAreActive = e2etypes.Evaluator{
	Name:       "deposited_validators_are_active_epoch_%d",
	Policy:     policies.AfterNthEpoch(depositEndEpoch),
	Evaluation: depositedValidatorsAreActive,
}

DepositedValidatorsAreActive ensures the expected amount of validators are active after their deposits are processed.

View Source
var FinalizationOccurs = types.Evaluator{
	Name:       "finalizes_at_epoch_%d",
	Policy:     policies.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 = e2etypes.Evaluator{
	Name:       "finished_syncing",
	Policy:     policies.AllEpochs,
	Evaluation: finishedSyncing,
}

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

View Source
var HealthzCheck = e2etypes.Evaluator{
	Name:       "healthz_check_epoch_%d",
	Policy:     policies.AfterNthEpoch(0),
	Evaluation: healthzCheck,
}

HealthzCheck pings healthz and errors if it doesn't have the expected OK status.

View Source
var InjectDoubleVote = e2eTypes.Evaluator{
	Name:       "inject_double_vote_%d",
	Policy:     policies.OnEpoch(1),
	Evaluation: insertDoubleAttestationIntoPool,
}

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

View Source
var MetricsCheck = types.Evaluator{
	Name:       "metrics_check_epoch_%d",
	Policy:     policies.AfterNthEpoch(0),
	Evaluation: metricsTest,
}

MetricsCheck performs a check on metrics to make sure caches are functioning, and overall health is good. Not checking the first epoch so the sample size isn't too small.

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

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

View Source
var ProcessesDepositsInBlocks = e2etypes.Evaluator{
	Name:       "processes_deposits_in_blocks_epoch_%d",
	Policy:     policies.OnEpoch(depositsInBlockStart),
	Evaluation: processesDepositsInBlocks,
}

ProcessesDepositsInBlocks ensures the expected amount of deposits are accepted into blocks.

View Source
var ProposeDoubleBlock = e2eTypes.Evaluator{
	Name:       "propose_double_block_%d",
	Policy:     policies.OnEpoch(1),
	Evaluation: proposeDoubleBlock,
}

ProposeDoubleBlock broadcasts a double block to the beacon node for the slasher to detect.

View Source
var ProposeVoluntaryExit = e2etypes.Evaluator{
	Name:       "propose_voluntary_exit_epoch_%d",
	Policy:     policies.OnEpoch(7),
	Evaluation: proposeVoluntaryExit,
}

ProposeVoluntaryExit sends a voluntary exit from randomly selected validator in the genesis set.

View Source
var SlashedValidatorsLoseBalance = e2eTypes.Evaluator{
	Name:       "slashed_validators_lose_valance_epoch_%d",
	Policy:     policies.AfterNthEpoch(1),
	Evaluation: validatorsLoseBalance,
}

SlashedValidatorsLoseBalance checks if the validators slashed lose the right balance.

View Source
var ValidatorHasExited = e2etypes.Evaluator{
	Name:       "voluntary_has_exited_%d",
	Policy:     policies.OnEpoch(8),
	Evaluation: validatorIsExited,
}

ValidatorHasExited checks the beacon state for the exited validator and ensures its marked as exited.

View Source
var ValidatorsAreActive = types.Evaluator{
	Name:       "validators_active_epoch_%d",
	Policy:     policies.AllEpochs,
	Evaluation: validatorsAreActive,
}

ValidatorsAreActive ensures the expected amount of validators are active.

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

ValidatorsParticipating ensures the expected amount of validators are active.

View Source
var ValidatorsSlashed = e2eTypes.Evaluator{
	Name:       "validators_slashed_epoch_%d",
	Policy:     policies.AfterNthEpoch(1),
	Evaluation: validatorsSlashed,
}

ValidatorsSlashed ensures the expected amount of validators are slashed.

View Source
var ValidatorsVoteWithTheMajority = e2etypes.Evaluator{
	Name:       "validators_vote_with_the_majority_%d",
	Policy:     policies.AfterNthEpoch(0),
	Evaluation: validatorsVoteWithTheMajority,
}

ValidatorsVoteWithTheMajority verifies whether validator vote for eth1data using the majority algorithm.

View Source
var VerifyBlockGraffiti = e2etypes.Evaluator{
	Name:       "verify_graffiti_in_blocks_epoch_%d",
	Policy:     policies.AfterNthEpoch(0),
	Evaluation: verifyGraffitiInBlocks,
}

VerifyBlockGraffiti ensures the block graffiti is one of the random list.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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