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 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.
var AllNodesHaveSameHead = e2etypes.Evaluator{ Name: "all_nodes_have_same_head_%d", 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.
var AltairForkTransition = types.Evaluator{ Name: "altair_fork_transition_%d", Policy: func(e primitives.Epoch) bool { altair := policies.OnEpoch(params.BeaconConfig().AltairForkEpoch) if startingFork == version.Phase0 { return altair(e) } return false }, Evaluation: altairForkOccurs, }
AltairForkTransition ensures that the Altair hard fork has occurred successfully.
var BellatrixForkTransition = types.Evaluator{ Name: "bellatrix_fork_transition_%d", Policy: func(e primitives.Epoch) bool { fEpoch := params.BeaconConfig().BellatrixForkEpoch return policies.OnEpoch(fEpoch)(e) }, Evaluation: bellatrixForkOccurs, }
BellatrixForkTransition ensures that the Bellatrix hard fork has occurred successfully.
var BuilderIsActive = e2etypes.Evaluator{ Name: "builder_is_active_at_epoch_%d", Policy: func(e primitives.Epoch) bool { fEpoch := params.BeaconConfig().BellatrixForkEpoch return policies.OnwardsNthEpoch(fEpoch)(e) }, Evaluation: builderActive, }
BuilderIsActive checks that the builder is indeed producing the respective payloads
var CapellaForkTransition = types.Evaluator{ Name: "capella_fork_transition_%d", Policy: func(e primitives.Epoch) bool { fEpoch := params.BeaconConfig().CapellaForkEpoch return policies.OnEpoch(fEpoch)(e) }, Evaluation: capellaForkOccurs, }
CapellaForkTransition ensures that the Capella hard fork has occurred successfully.
var ColdStateCheckpoint = e2etypes.Evaluator{ Name: "cold_state_assignments_from_epoch_%d", Policy: func(currentEpoch primitives.Epoch) bool { return currentEpoch == epochToCheck }, Evaluation: checkColdStateCheckpoint, }
ColdStateCheckpoint checks data from the database using cold state storage.
var DenebForkTransition = types.Evaluator{ Name: "deneb_fork_transition_%d", Policy: func(e primitives.Epoch) bool { fEpoch := params.BeaconConfig().DenebForkEpoch return policies.OnEpoch(fEpoch)(e) }, Evaluation: denebForkOccurs, }
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.
var FeeRecipientIsPresent = types.Evaluator{ Name: "fee_recipient_is_present_%d", Policy: func(e primitives.Epoch) bool { fEpoch := params.BeaconConfig().BellatrixForkEpoch return policies.AfterNthEpoch(fEpoch)(e) }, Evaluation: feeRecipientIsPresent, }
var FinalizationOccurs = func(epoch primitives.Epoch) types.Evaluator { return types.Evaluator{ Name: "finalizes_at_epoch_%d", Policy: policies.AfterNthEpoch(epoch), 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 = e2etypes.Evaluator{ Name: "finished_syncing_%d", Policy: policies.AllEpochs, Evaluation: finishedSyncing, }
FinishedSyncing returns whether the beacon node with the given rpc port has finished syncing.
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.
var InjectDoubleBlockOnEpoch = func(n primitives.Epoch) e2eTypes.Evaluator { return e2eTypes.Evaluator{ Name: "inject_double_block_%d", Policy: policies.OnEpoch(n), Evaluation: proposeDoubleBlock, } }
InjectDoubleBlockOnEpoch proposes a double block to the beacon node for the slasher to detect.
var InjectDoubleVoteOnEpoch = func(n primitives.Epoch) e2eTypes.Evaluator { return e2eTypes.Evaluator{ Name: "inject_double_vote_%d", Policy: policies.OnEpoch(n), Evaluation: insertDoubleAttestationIntoPool, } }
InjectDoubleVoteOnEpoch broadcasts a double vote into the beacon node pool for the slasher to detect.
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.
var OptimisticSyncEnabled = types.Evaluator{ Name: "optimistic_sync_at_epoch_%d", Policy: policies.AllEpochs, Evaluation: optimisticSyncEnabled, }
OptimisticSyncEnabled checks that the node is in an optimistic state.
var PeersCheck = types.Evaluator{ Name: "peers_check_epoch_%d", Policy: policies.AfterNthEpoch(0), Evaluation: peersTest, }
PeersCheck performs a check on peer data to ensure that any connected peers are not publishing invalid data.
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.
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.
var ProposeVoluntaryExit = e2etypes.Evaluator{ Name: "propose_voluntary_exit_epoch_%d", Policy: policies.OnEpoch(exitSubmissionEpoch), Evaluation: proposeVoluntaryExit, }
ProposeVoluntaryExit sends a voluntary exit from randomly selected validator in the genesis set.
var SlashedValidatorsLoseBalanceAfterEpoch = func(n primitives.Epoch) e2eTypes.Evaluator { return e2eTypes.Evaluator{ Name: "slashed_validators_lose_balance_epoch_%d", Policy: policies.AfterNthEpoch(n), Evaluation: validatorsLoseBalance, } }
SlashedValidatorsLoseBalanceAfterEpoch checks if the validators slashed lose the right balance.
var SubmitWithdrawal = e2etypes.Evaluator{ Name: "submit_withdrawal_epoch_%d", Policy: func(currentEpoch primitives.Epoch) bool { fEpoch := params.BeaconConfig().CapellaForkEpoch return policies.BetweenEpochs(fEpoch-2, fEpoch+1)(currentEpoch) }, Evaluation: submitWithdrawal, }
SubmitWithdrawal sends a withdrawal from a previously exited validator.
var ValidatorSyncParticipation = types.Evaluator{ Name: "validator_sync_participation_%d", Policy: func(e primitives.Epoch) bool { fEpoch := params.BeaconConfig().AltairForkEpoch return policies.OnwardsNthEpoch(fEpoch)(e) }, Evaluation: validatorsSyncParticipation, }
ValidatorSyncParticipation ensures the expected amount of sync committee participants are active.
var ValidatorsAreActive = types.Evaluator{ Name: "validators_active_epoch_%d", Policy: policies.AllEpochs, Evaluation: validatorsAreActive, }
ValidatorsAreActive ensures the expected amount of validators are active.
var ValidatorsHaveExited = e2etypes.Evaluator{ Name: "voluntary_has_exited_%d", Policy: policies.OnEpoch(8), Evaluation: validatorsHaveExited, }
ValidatorsHaveExited checks the beacon state for the exited validator and ensures its marked as exited.
var ValidatorsHaveWithdrawn = e2etypes.Evaluator{ Name: "validator_has_withdrawn_%d", Policy: func(currentEpoch primitives.Epoch) bool { if params.BeaconConfig().ConfigName != params.EndToEndName { return false } validWithdrawnEpoch := params.BeaconConfig().CapellaForkEpoch + 1 requiredPolicy := policies.OnEpoch(validWithdrawnEpoch) return requiredPolicy(currentEpoch) }, Evaluation: validatorsAreWithdrawn, }
ValidatorsHaveWithdrawn checks the beacon state for the withdrawn validator and ensures it has been withdrawn.
var ValidatorsParticipatingAtEpoch = func(epoch primitives.Epoch) types.Evaluator { return types.Evaluator{ Name: "validators_participating_epoch_%d", Policy: policies.AfterNthEpoch(epoch), Evaluation: validatorsParticipating, } }
ValidatorsParticipatingAtEpoch ensures the expected amount of validators are participating.
var ValidatorsSlashedAfterEpoch = func(n primitives.Epoch) e2eTypes.Evaluator { return e2eTypes.Evaluator{ Name: "validators_slashed_epoch_%d", Policy: policies.AfterNthEpoch(n), Evaluation: validatorsSlashed, } }
ValidatorsSlashedAfterEpoch ensures the expected amount of validators are slashed.
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.
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.