package
5.2.0
Repository: https://github.com/prysmaticlabs/prysm.git
Documentation: pkg.go.dev

# Functions

ActivationExitChurnLimit for the current active balance, in gwei.
ActivationExitEpoch takes in epoch number and returns when the validator is eligible for activation and exit.
ActiveValidatorCount returns the number of active validators in the state at the given epoch.
ActiveValidatorIndices filters out active validators based on validator status and returns their indices in a list.
AttestationCommittees returns beacon state committees that reflect attestation's committee indices.
BalanceChurnLimit for the current active balance, in gwei.
BeaconCommittee returns the beacon committee of a given slot and committee index.
BeaconCommitteeFromState returns the crosslink committee of a given slot and committee index.
BeaconCommittees returns the list of all beacon committees for a given state at a given slot.
BeaconProposerIndex returns proposer index of a current slot.
BeaconProposerIndexAtSlot returns proposer index at the given slot from the point of view of the given state as head state.
BlockRoot returns the block root stored in the BeaconState for epoch start slot.
BlockRootAtSlot returns the block root stored in the BeaconState for a recent slot.
ClearCache clears the beacon committee cache and sync committee cache.
CommitteeAssignments calculates committee assignments for each validator during the specified epoch.
CommitteeIndices return beacon committee indices corresponding to bits that are set on the argument bitfield.
CompressCommitteeCache resizes the cache to a lower limit.
ComputeCommittee returns the requested shuffled committee out of the total committees using validator indices and seed.
ComputeProposerIndex returns the index sampled by effective balance, which is used to calculate proposer.
ComputeShuffledIndex returns the shuffled validator index corresponding to seed and index count.
ComputeSubnetForAttestation returns the subnet for which the provided attestation will be broadcasted to.
ComputeSubnetFromCommitteeAndSlot is a flattened version of ComputeSubnetForAttestation where we only pass in the relevant fields from the attestation as function arguments.
ComputeWeakSubjectivityPeriod returns weak subjectivity period for the active validator count and finalized epoch.
ConsolidationChurnLimit for the current active balance, in gwei.
CurrentPeriodSyncSubcommitteeIndices returns the subcommittee indices of the current period sync committee for input validator.
DecreaseBalance decreases validator with the given 'index' balance by 'delta' in Gwei.
DecreaseBalanceWithVal decreases validator with the given 'index' balance by 'delta' in Gwei.
ExpandCommitteeCache resizes the cache to a higher limit.
FinalityDelay returns the finality delay using the beacon state.
HasCompoundingWithdrawalCredential checks if the validator has a compounding withdrawal credential.
hasETH1WithdrawalCredential returns whether the validator has an ETH1 Withdrawal prefix.
HasExecutionWithdrawalCredentials checks if the validator has an execution withdrawal credential or compounding credential.
IncreaseBalance increases validator with the given 'index' balance by 'delta' in Gwei.
IncreaseBalanceWithVal increases validator with the given 'index' balance by 'delta' in Gwei.
IsActiveNonSlashedValidatorUsingTrie checks if a read only validator is active and not slashed.
IsActiveValidator returns the boolean value on whether the validator is active or not.
IsActiveValidatorUsingTrie checks if a read only validator is active.
IsAggregated returns true if the attestation is an aggregated attestation, false otherwise.
IsAggregator returns true if the signature is from the input validator.
IsCompoundingWithdrawalCredential checks if the credentials are a compounding withdrawal credential.
IsCurrentPeriodSyncCommittee returns true if the input validator index belongs in the current period sync committee along with the sync committee root.
IsEligibleForActivation checks if the validator is eligible for activation.
IsEligibleForActivationQueue checks if the validator is eligible to be placed into the activation queue.
IsEligibleForActivationUsingROVal checks if the validator is eligible for activation using the provided read only validator.
IsFullyWithdrawableValidator returns whether the validator is able to perform a full withdrawal.
IsInInactivityLeak returns true if the state is experiencing inactivity leak.
IsNextPeriodSyncCommittee returns true if the input validator index belongs in the next period sync committee along with the sync period boundary root.
IsPartiallyWithdrawableValidator returns whether the validator is able to perform a partial withdrawal.
IsSameWithdrawalCredentials returns true if both validators have the same withdrawal credentials.
IsSlashableValidator returns the boolean value on whether the validator is slashable or not.
IsSlashableValidatorUsingTrie checks if a read only validator is slashable.
IsWithinWeakSubjectivityPeriod verifies if a given weak subjectivity checkpoint is not stale i.e.
LastActivatedValidatorIndex provides the last activated validator given a state.
LatestWeakSubjectivityEpoch returns epoch of the most recent weak subjectivity checkpoint known to a node.
MinEpochsForBlockRequests computes the number of epochs of block history that we need to maintain, relative to the current epoch, per the p2p specs.
NextPeriodSyncSubcommitteeIndices returns the subcommittee indices of the next period sync committee for input validator.
ParseWeakSubjectivityInputString parses "blocks_root:epoch_number" string into a checkpoint.
PrecomputeProposerIndices computes proposer indices of the current epoch and returns a list of proposer indices, the index of the list represents the slot number.
ProposerAssignments calculates proposer assignments for each validator during the specified epoch.
ProposerIndexAtSlotFromCheckpoint returns the proposer index at the given slot from the cache at the given checkpoint.
RandaoMix returns the randao mix (xor'ed seed) of a given slot.
Seed returns the randao seed used for shuffling of a given epoch.
ShuffledIndex returns `p(index)` in a pseudorandom permutation `p` of `0...list_size - 1` with “seed“ as entropy.
ShuffledIndices uses input beacon state and returns the shuffled indices of the input epoch, the shuffled indices then can be used to break up into committees.
ShuffleList returns list of shuffled indexes in a pseudorandom permutation `p` of `0...list_size - 1` with “seed“ as entropy.
SlotCommitteeCount returns the number of beacon committees of a slot.
SplitIndices splits a list into n pieces.
StateRootAtSlot returns the cached state root at that particular slot.
SyncPeriodBoundaryRoot computes the current sync period boundary root by calculating sync period start epoch and calling `BlockRoot`.
TotalActiveBalance returns the total amount at stake in Gwei of active validators.
TotalBalance returns the total amount at stake in Gwei of input validators.
UnShuffledIndex returns the inverse of ShuffledIndex.
UnshuffleList un-shuffles the list by running backwards through the round count.
UpdateCachedCheckpointToStateRoot updates the map from checkpoints to state root in the proposer indices cache.
UpdateCommitteeCache gets called at the beginning of every epoch to cache the committee shuffled indices list with committee index and epoch number.
UpdateGenesisEth1Data updates eth1 data for genesis state.
UpdateProposerIndicesInCache updates proposer indices entry of the committee cache.
UpdateSyncCommitteeCache updates sync committee cache.
ValidateAttestationTime Validates that the incoming attestation is in the desired time range.
ValidateNilAttestation checks if any composite field of input attestation is nil.
ValidateSlotTargetEpoch checks if attestation data's epoch matches target checkpoint's epoch.
ValidatorActivationChurnLimit returns the maximum number of validators that can be activated in a slot.
ValidatorActivationChurnLimitDeneb returns the maximum number of validators that can be activated in a slot post Deneb.
ValidatorExitChurnLimit returns the maximum number of validators that can be exited in a slot.
ValidatorMaxEffectiveBalance returns the maximum effective balance for a validator.
VerifyBitfieldLength verifies that a bitfield length matches the given committee size.
VerifyCheckpointEpoch is within current epoch and previous epoch with respect to current time.

# Variables

# Structs

CommitteeAssignment represents committee list, committee index, and to be attested slot for a given epoch.