Documentation ¶
Index ¶
- func BytesToUint(data []byte) uint64
- func ComputeShuffledIndex(spec *consensus.ChainSpec, index uint64, indexCount uint64, seed [32]byte, ...) (uint64, error)
- func GetAttesterDuties(spec *consensus.ChainSpec, state *BeaconState, epoch phase0.Epoch) ([][][]ActiveIndiceIndex, error)
- func GetRandaoMix(spec *consensus.ChainSpec, state *BeaconState, epoch phase0.Epoch) phase0.Hash32
- func GetSeed(spec *consensus.ChainSpec, state *BeaconState, epoch phase0.Epoch, ...) phase0.Hash32
- func Hash(data []byte) phase0.Hash32
- func SlotCommitteeCount(spec *consensus.ChainSpec, activeValidatorCount uint64) uint64
- func SplitOffset(listSize, chunks, index uint64) uint64
- func UintToBytes(data any) []byte
- type ActiveIndiceIndex
- func GetProposerIndex(spec *consensus.ChainSpec, state *BeaconState, slot phase0.Slot) (ActiveIndiceIndex, error)
- func ShuffleList(spec *consensus.ChainSpec, input []ActiveIndiceIndex, seed [32]byte) ([]ActiveIndiceIndex, error)
- func UnshuffleList(spec *consensus.ChainSpec, input []ActiveIndiceIndex, seed [32]byte) ([]ActiveIndiceIndex, error)
- type BeaconState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToUint ¶
func ComputeShuffledIndex ¶
func GetAttesterDuties ¶
func GetAttesterDuties(spec *consensus.ChainSpec, state *BeaconState, epoch phase0.Epoch) ([][][]ActiveIndiceIndex, error)
func GetRandaoMix ¶
func GetSeed ¶
func GetSeed(spec *consensus.ChainSpec, state *BeaconState, epoch phase0.Epoch, domainType phase0.DomainType) phase0.Hash32
func SlotCommitteeCount ¶
func SplitOffset ¶
func UintToBytes ¶
Types ¶
type ActiveIndiceIndex ¶
type ActiveIndiceIndex uint32
func GetProposerIndex ¶
func GetProposerIndex(spec *consensus.ChainSpec, state *BeaconState, slot phase0.Slot) (ActiveIndiceIndex, error)
func ShuffleList ¶
func ShuffleList(spec *consensus.ChainSpec, input []ActiveIndiceIndex, seed [32]byte) ([]ActiveIndiceIndex, error)
func UnshuffleList ¶
func UnshuffleList(spec *consensus.ChainSpec, input []ActiveIndiceIndex, seed [32]byte) ([]ActiveIndiceIndex, error)
UnshuffleList un-shuffles the list by running backwards through the round count.
Click to show internal directories.
Click to hide internal directories.