use of tech.pegasys.teku.spec.logic.common.statetransition.epoch.status.ValidatorStatuses in project teku by ConsenSys.
the class RewardsTestExecutorAltair method runTest.
@Override
public void runTest(final TestDefinition testDefinition) throws Throwable {
final BeaconState preState = loadStateFromSsz(testDefinition, "pre.ssz_snappy");
final ValidatorStatusFactory statusFactory = testDefinition.getSpec().getGenesisSpec().getValidatorStatusFactory();
final ValidatorStatuses validatorStatuses = statusFactory.createValidatorStatuses(preState);
final SpecVersion spec = testDefinition.getSpec().getGenesisSpec();
final RewardsAndPenaltiesCalculatorAltair calculator = createRewardsAndPenaltiesCalculator(preState, validatorStatuses, spec);
runTest(testDefinition, calculator, validatorStatuses);
}
use of tech.pegasys.teku.spec.logic.common.statetransition.epoch.status.ValidatorStatuses in project teku by ConsenSys.
the class RewardsTestExecutorPhase0 method runTest.
@Override
public void runTest(final TestDefinition testDefinition) throws Throwable {
final BeaconState preState = loadStateFromSsz(testDefinition, "pre.ssz_snappy");
final ValidatorStatusFactory statusFactory = testDefinition.getSpec().getGenesisSpec().getValidatorStatusFactory();
final ValidatorStatuses validatorStatuses = statusFactory.createValidatorStatuses(preState);
final SpecVersion spec = testDefinition.getSpec().getGenesisSpec();
final RewardsAndPenaltiesCalculatorPhase0 calculator = new RewardsAndPenaltiesCalculatorPhase0(spec.getConfig(), preState, validatorStatuses, spec.miscHelpers(), spec.beaconStateAccessors());
runTest(testDefinition, calculator);
}
use of tech.pegasys.teku.spec.logic.common.statetransition.epoch.status.ValidatorStatuses in project teku by ConsenSys.
the class AbstractEpochProcessor method processEpoch.
protected void processEpoch(final BeaconState preState, final MutableBeaconState state) throws EpochProcessingException {
final ValidatorStatuses validatorStatuses = validatorStatusFactory.createValidatorStatuses(preState);
processJustificationAndFinalization(state, validatorStatuses.getTotalBalances());
processInactivityUpdates(state, validatorStatuses);
processRewardsAndPenalties(state, validatorStatuses);
processRegistryUpdates(state, validatorStatuses.getStatuses());
processSlashings(state, validatorStatuses.getTotalBalances().getCurrentEpochActiveValidators());
processEth1DataReset(state);
processEffectiveBalanceUpdates(state);
processSlashingsReset(state);
processRandaoMixesReset(state);
processHistoricalRootsUpdate(state);
processParticipationUpdates(state);
processSyncCommitteeUpdates(state);
}
Aggregations