Versions in this module Expand all Collapse all v1 v1.0.0 Oct 28, 2022 Changes in this version + type AltairMetrics struct + func NewAltairMetrics(nextBstate fork_state.ForkStateContentBase, ...) AltairMetrics + func (p AltairMetrics) GetBaseReward(valIdx uint64, effectiveBalance uint64, totalEffectiveBalance uint64) uint64 + func (p AltairMetrics) GetBaseRewardPerInc(totalEffectiveBalance uint64) uint64 + func (p AltairMetrics) GetMaxAttestationReward(valIdx uint64) uint64 + func (p AltairMetrics) GetMaxProposerAttReward(valIdx uint64) (uint64, int64) + func (p AltairMetrics) GetMaxProposerSyncReward(valIdx uint64, valPubKey phase0.BLSPubKey, valEffectiveBalance uint64, ...) int64 + func (p AltairMetrics) GetMaxReward(valIdx uint64) (ValidatorSepRewards, error) + func (p AltairMetrics) GetMaxSyncComReward(valIdx uint64) uint64 + func (p AltairMetrics) GetMetricsBase() StateMetricsBase + type Phase0Metrics struct + func NewPhase0Metrics(nextBstate fork_state.ForkStateContentBase, ...) Phase0Metrics + func (p *Phase0Metrics) CalculateAttestingVals() + func (p Phase0Metrics) GetBaseReward(valEffectiveBalance uint64) uint64 + func (p Phase0Metrics) GetMaxProposerReward(valIdx uint64, baseReward uint64) (uint64, int64) + func (p Phase0Metrics) GetMaxReward(valIdx uint64) (ValidatorSepRewards, error) + func (p Phase0Metrics) GetMetricsBase() StateMetricsBase + func (p Phase0Metrics) IsCorrectHead(attestation phase0.PendingAttestation) bool + func (p Phase0Metrics) IsCorrectSource() bool + func (p Phase0Metrics) IsCorrectTarget(attestation phase0.PendingAttestation) bool + type StateMetrics interface + GetMaxReward func(valIdx uint64) (ValidatorSepRewards, error) + GetMetricsBase func() StateMetricsBase + func StateMetricsByForkVersion(nextBstate fork_state.ForkStateContentBase, ...) (StateMetrics, error) + type StateMetricsBase struct + CurrentState fork_state.ForkStateContentBase + NextState fork_state.ForkStateContentBase + PrevState fork_state.ForkStateContentBase + func (p StateMetricsBase) EpochReward(valIdx uint64) int64 + func (p StateMetricsBase) GetAttInclusionSlot(valIdx uint64) int64 + func (p StateMetricsBase) GetAttSlot(valIdx uint64) uint64 + type ValidatorSepRewards struct + Attestation uint64 + BaseReward uint64 + FlagIndex uint64 + InSyncCommittee bool + InclusionDelay uint64 + MaxReward uint64 + ProposerSlot int64 + SyncCommittee uint64