Documentation ¶
Index ¶
- Variables
- func CalcEligibleLayer(epochNumber types.EpochID, layersPerEpoch uint32, vrfSig types.VrfSignature) types.LayerID
- func ComputeWeightPerEligibility(cdb *datastore.CachedDB, ballot *types.Ballot) (*big.Rat, error)
- func GetLegacyNumEligible(lid types.LayerID, weight, minWeight, totalWeight uint64, ...) (uint32, error)
- func GetNumEligibleSlots(weight, minWeight, totalWeight uint64, committeeSize, layersPerEpoch uint32) (uint32, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrZeroTotalWeight is returned when zero total epoch weight is used when calculating eligible slots. ErrZeroTotalWeight = errors.New("zero total weight not allowed") ErrBadBallotData = errors.New("bad ballot data") )
Functions ¶
func CalcEligibleLayer ¶
func CalcEligibleLayer(epochNumber types.EpochID, layersPerEpoch uint32, vrfSig types.VrfSignature) types.LayerID
CalcEligibleLayer calculates the eligible layer from the VRF signature.
func ComputeWeightPerEligibility ¶
func ComputeWeightPerEligibility( cdb *datastore.CachedDB, ballot *types.Ballot, ) (*big.Rat, error)
ComputeWeightPerEligibility computes the ballot weight per eligibility w.r.t the active set recorded in its reference ballot.
func GetLegacyNumEligible ¶ added in v1.0.12
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.