Versions in this module Expand all Collapse all v0 v0.1.1 Oct 20, 2022 v0.1.0 Oct 19, 2022 Changes in this version + func AttestedCurrentEpoch(s state.ReadOnlyBeaconState, a *ethpb.PendingAttestation) (bool, bool, error) + func AttestedPrevEpoch(s state.ReadOnlyBeaconState, a *ethpb.PendingAttestation) (bool, bool, bool, error) + func EligibleForRewards(v *Validator) bool + func New(ctx context.Context, s state.BeaconState) ([]*Validator, *Balance, error) + func ProcessAttestations(ctx context.Context, state state.ReadOnlyBeaconState, vp []*Validator, ...) ([]*Validator, *Balance, error) + func ProcessJustificationAndFinalizationPreCompute(state state.BeaconState, pBal *Balance) (state.BeaconState, error) + func SameHead(state state.ReadOnlyBeaconState, a *ethpb.PendingAttestation) (bool, error) + func SameTarget(state state.ReadOnlyBeaconState, a *ethpb.PendingAttestation, e types.Epoch) (bool, error) + func UnrealizedCheckpoints(st state.BeaconState) (*ethpb.Checkpoint, *ethpb.Checkpoint, error) + type Balance struct + ActiveCurrentEpoch uint64 + ActivePrevEpoch uint64 + CurrentEpochAttested uint64 + CurrentEpochTargetAttested uint64 + PrevEpochAttested uint64 + PrevEpochHeadAttested uint64 + PrevEpochTargetAttested uint64 + func EnsureBalancesLowerBound(bBal *Balance) *Balance + func UpdateBalance(vp []*Validator, bBal *Balance, stateVersion int) *Balance + type Validator struct + AfterEpochTransitionBalance uint64 + BeforeEpochTransitionBalance uint64 + CurrentEpochEffectiveBalance uint64 + FinalityDelayIncome int64 + HeadAttestationIncome int64 + InactivityScore uint64 + InclusionDistance types.Slot + InclusionSlot types.Slot + IsActiveCurrentEpoch bool + IsActivePrevEpoch bool + IsCurrentEpochAttester bool + IsCurrentEpochTargetAttester bool + IsPrevEpochAttester bool + IsPrevEpochHeadAttester bool + IsPrevEpochSourceAttester bool + IsPrevEpochTargetAttester bool + IsSlashed bool + IsWithdrawableCurrentEpoch bool + ProposerIndex types.ValidatorIndex + SourceAttestationIncome int64 + TargetAttestationIncome int64 + func UpdateValidator(vp []*Validator, record *Validator, indices []uint64, ...) []*Validator