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 ¶
var AllNodesHaveSameHead = types.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.
var DepositedValidatorsAreActive = types.Evaluator{
Name: "deposited_validators_are_active_epoch_%d",
Policy: afterNthEpoch(12),
Evaluation: depositedValidatorsAreActive,
}
DepositedValidatorsAreActive ensures the expected amount of validators are active after their deposits are processed.
var FinalizationOccurs = types.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.
var FinishedSyncing = types.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.
var HealthzCheck = types.Evaluator{
Name: "healthz_check_epoch_%d",
Policy: afterNthEpoch(0),
Evaluation: healthzCheck,
}
HealthzCheck pings healthz and errors if it doesn't have the expected OK status.
var InjectDoubleVote = types.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.
var MetricsCheck = types.Evaluator{
Name: "metrics_check_epoch_%d",
Policy: 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.
var PeersConnect = types.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.
var ProcessesDepositedValidators = types.Evaluator{
Name: "processes_deposit_validators_epoch_%d",
Policy: isBetweenEpochs(8, 12),
Evaluation: processesDepositedValidators,
}
ProcessesDepositedValidators ensures the expected amount of validator deposits are processed into the state.
var SlashedValidatorsLoseBalance = types.Evaluator{
Name: "slashed_validators_lose_valance_epoch_%d",
Policy: afterNthEpoch(0),
Evaluation: validatorsLoseBalance,
}
SlashedValidatorsLoseBalance checks if the validators slashed lose the right balance.
var ValidatorsAreActive = types.Evaluator{
Name: "validators_active_epoch_%d",
Policy: allEpochs,
Evaluation: validatorsAreActive,
}
ValidatorsAreActive ensures the expected amount of validators are active.
var ValidatorsParticipating = types.Evaluator{
Name: "validators_participating_epoch_%d",
Policy: afterNthEpoch(2),
Evaluation: validatorsParticipating,
}
ValidatorsParticipating ensures the expected amount of validators are active.
var ValidatorsSlashed = types.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 ¶
This section is empty.