Versions in this module Expand all Collapse all v0 v0.0.4 Jan 15, 2025 v0.0.1 Jan 15, 2025 Changes in this version + func AttestationsDelta(state state.ReadOnlyBeaconState, pBal *Balance, vp []*Validator) ([]uint64, []uint64, error) + 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 ProcessRewardsAndPenaltiesPrecompute(state state.BeaconState, pBal *Balance, vp []*Validator, ...) (state.BeaconState, error) + func ProcessSlashingsPrecompute(s state.BeaconState, pBal *Balance) error + func ProposersDelta(state state.ReadOnlyBeaconState, pBal *Balance, vp []*Validator) ([]uint64, error) + func SameHead(state state.ReadOnlyBeaconState, a *ethpb.PendingAttestation) (bool, error) + func SameTarget(state state.ReadOnlyBeaconState, a *ethpb.PendingAttestation, ...) (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 + InactivityScore uint64 + InclusionDistance primitives.Slot + InclusionSlot primitives.Slot + IsActiveCurrentEpoch bool + IsActivePrevEpoch bool + IsCurrentEpochAttester bool + IsCurrentEpochTargetAttester bool + IsPrevEpochAttester bool + IsPrevEpochHeadAttester bool + IsPrevEpochSourceAttester bool + IsPrevEpochTargetAttester bool + IsSlashed bool + IsWithdrawableCurrentEpoch bool + ProposerIndex primitives.ValidatorIndex + func UpdateValidator(vp []*Validator, record *Validator, indices []uint64, ...) []*Validator