raw

package
v1.9.7-0...-8dbb83f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2025 License: LGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StateLeafSizeDeneb = 32
	StateLeafSize      = 37

	LeafInitValue  = 0
	LeafCleanValue = 1
	LeafDirtyValue = 2
)
View Source
const (
	BlockRootsLength = 8192
	StateRootsLength = 8192
	RandoMixesLength = 65536
	SlashingsLength  = 8192
)

Variables

View Source
var (
	ErrGetBlockRootAtSlotFuture = errors.New("GetBlockRootAtSlot: slot in the future")
)
View Source
var (
	// Error for missing validator
	ErrInvalidValidatorIndex = errors.New("invalid validator index")
)

Functions

This section is empty.

Types

type BeaconState

type BeaconState struct {
	// contains filtered or unexported fields
}

func GetTestState

func GetTestState() *BeaconState

func (*BeaconState) AddCurrentEpochAtteastation

func (b *BeaconState) AddCurrentEpochAtteastation(attestation *solid.PendingAttestation)

phase0 fields

func (*BeaconState) AddCurrentEpochParticipationFlags

func (b *BeaconState) AddCurrentEpochParticipationFlags(flags cltypes.ParticipationFlags)

func (*BeaconState) AddEth1DataVote

func (b *BeaconState) AddEth1DataVote(vote *cltypes.Eth1Data)

func (*BeaconState) AddHistoricalRoot

func (b *BeaconState) AddHistoricalRoot(root libcommon.Hash)

func (*BeaconState) AddHistoricalSummary

func (b *BeaconState) AddHistoricalSummary(summary *cltypes.HistoricalSummary)

func (*BeaconState) AddInactivityScore

func (b *BeaconState) AddInactivityScore(score uint64)

func (*BeaconState) AddPreviousEpochAttestation

func (b *BeaconState) AddPreviousEpochAttestation(attestation *solid.PendingAttestation)

func (*BeaconState) AddPreviousEpochParticipationAt

func (b *BeaconState) AddPreviousEpochParticipationAt(index int, delta byte)

func (*BeaconState) AddPreviousEpochParticipationFlags

func (b *BeaconState) AddPreviousEpochParticipationFlags(flags cltypes.ParticipationFlags)

func (*BeaconState) AddValidator

func (b *BeaconState) AddValidator(validator solid.Validator, balance uint64)

func (*BeaconState) AppendPendingConsolidation

func (b *BeaconState) AppendPendingConsolidation(consolidation *solid.PendingConsolidation)

func (*BeaconState) AppendPendingDeposit

func (b *BeaconState) AppendPendingDeposit(deposit *solid.PendingDeposit)

func (*BeaconState) AppendPendingPartialWithdrawal

func (b *BeaconState) AppendPendingPartialWithdrawal(withdrawal *solid.PendingPartialWithdrawal)

func (*BeaconState) AppendValidator

func (b *BeaconState) AppendValidator(in solid.Validator)

func (*BeaconState) Balances

func (b *BeaconState) Balances() solid.Uint64ListSSZ

func (*BeaconState) BeaconConfig

func (b *BeaconState) BeaconConfig() *clparams.BeaconChainConfig

func (*BeaconState) BlockRoot

func (b *BeaconState) BlockRoot() ([32]byte, error)

BlockRoot computes the block root for the state.

func (*BeaconState) BlockRoots

func (b *BeaconState) BlockRoots() solid.HashVectorSSZ

func (*BeaconState) Clone

func (b *BeaconState) Clone() clonable.Clonable

func (*BeaconState) ConsolidationBalanceToConsume

func (b *BeaconState) ConsolidationBalanceToConsume() uint64

func (*BeaconState) Copy

func (b *BeaconState) Copy() (*BeaconState, error)

func (*BeaconState) CopyInto

func (b *BeaconState) CopyInto(dst *BeaconState) error

func (*BeaconState) CurrentEpochAttestations

func (b *BeaconState) CurrentEpochAttestations() *solid.ListSSZ[*solid.PendingAttestation]

func (*BeaconState) CurrentEpochAttestationsLength

func (b *BeaconState) CurrentEpochAttestationsLength() int

func (*BeaconState) CurrentEpochParticipation

func (b *BeaconState) CurrentEpochParticipation() *solid.ParticipationBitList

func (*BeaconState) CurrentJustifiedCheckpoint

func (b *BeaconState) CurrentJustifiedCheckpoint() solid.Checkpoint

func (*BeaconState) CurrentSyncCommittee

func (b *BeaconState) CurrentSyncCommittee() *solid.SyncCommittee

func (*BeaconState) CurrentSyncCommitteeBranch

func (b *BeaconState) CurrentSyncCommitteeBranch() ([][32]byte, error)

func (*BeaconState) DebugPrint

func (b *BeaconState) DebugPrint(prefix string)

func (*BeaconState) DecodeSSZ

func (b *BeaconState) DecodeSSZ(buf []byte, version int) error

func (*BeaconState) DepositBalanceToConsume

func (b *BeaconState) DepositBalanceToConsume() uint64

func (*BeaconState) DepositRequestsStartIndex

func (b *BeaconState) DepositRequestsStartIndex() uint64

func (*BeaconState) EarliestConsolidationEpoch

func (b *BeaconState) EarliestConsolidationEpoch() uint64

func (*BeaconState) EarliestExitEpoch

func (b *BeaconState) EarliestExitEpoch() uint64

func (*BeaconState) EncodeSSZ

func (b *BeaconState) EncodeSSZ(buf []byte) ([]byte, error)

func (*BeaconState) EncodingSizeSSZ

func (b *BeaconState) EncodingSizeSSZ() (size int)

SSZ size of the Beacon State

func (*BeaconState) EpochParticipation

func (b *BeaconState) EpochParticipation(currentEpoch bool) *solid.ParticipationBitList

func (*BeaconState) EpochParticipationForValidatorIndex

func (b *BeaconState) EpochParticipationForValidatorIndex(isCurrentEpoch bool, index int) cltypes.ParticipationFlags

func (*BeaconState) Eth1Data

func (b *BeaconState) Eth1Data() *cltypes.Eth1Data

func (*BeaconState) Eth1DataVotes

func (b *BeaconState) Eth1DataVotes() *solid.ListSSZ[*cltypes.Eth1Data]

func (*BeaconState) Eth1DepositIndex

func (b *BeaconState) Eth1DepositIndex() uint64

func (*BeaconState) ExitBalanceToConsume

func (b *BeaconState) ExitBalanceToConsume() uint64

func (*BeaconState) FinalityRootBranch

func (b *BeaconState) FinalityRootBranch() ([][32]byte, error)

func (*BeaconState) FinalizedCheckpoint

func (b *BeaconState) FinalizedCheckpoint() solid.Checkpoint

func (*BeaconState) ForEachBalance

func (b *BeaconState) ForEachBalance(fn func(v uint64, idx int, total int) bool)

func (*BeaconState) ForEachSlashingSegment

func (b *BeaconState) ForEachSlashingSegment(fn func(idx int, v uint64, total int) bool)

func (*BeaconState) ForEachValidator

func (b *BeaconState) ForEachValidator(fn func(v solid.Validator, idx int, total int) bool)

func (*BeaconState) Fork

func (b *BeaconState) Fork() *cltypes.Fork

func (*BeaconState) GenesisTime

func (b *BeaconState) GenesisTime() uint64

func (*BeaconState) GenesisValidatorsRoot

func (b *BeaconState) GenesisValidatorsRoot() libcommon.Hash

func (*BeaconState) GetBlockRootAtSlot

func (b *BeaconState) GetBlockRootAtSlot(slot uint64) (libcommon.Hash, error)

GetBlockRootAtSlot returns the block root at a given slot

func (*BeaconState) GetConsolidationBalanceToConsume

func (b *BeaconState) GetConsolidationBalanceToConsume() uint64

func (*BeaconState) GetDepositBalanceToConsume

func (b *BeaconState) GetDepositBalanceToConsume() uint64

func (*BeaconState) GetDepositRequestsStartIndex

func (b *BeaconState) GetDepositRequestsStartIndex() uint64

func (*BeaconState) GetDomain

func (b *BeaconState) GetDomain(domainType [4]byte, epoch uint64) ([]byte, error)

GetDomain

func (*BeaconState) GetEarlistConsolidationEpoch

func (b *BeaconState) GetEarlistConsolidationEpoch() uint64

func (*BeaconState) GetEarlistExitEpoch

func (b *BeaconState) GetEarlistExitEpoch() uint64

func (*BeaconState) GetExitBalanceToConsume

func (b *BeaconState) GetExitBalanceToConsume() uint64

func (*BeaconState) GetPendingConsolidations

func (b *BeaconState) GetPendingConsolidations() *solid.ListSSZ[*solid.PendingConsolidation]

func (*BeaconState) GetPendingDeposits

func (b *BeaconState) GetPendingDeposits() *solid.ListSSZ[*solid.PendingDeposit]

func (*BeaconState) GetPendingPartialWithdrawals

func (b *BeaconState) GetPendingPartialWithdrawals() *solid.ListSSZ[*solid.PendingPartialWithdrawal]

func (*BeaconState) GetRandaoMix

func (b *BeaconState) GetRandaoMix(index int) [32]byte

func (*BeaconState) GetRandaoMixes

func (b *BeaconState) GetRandaoMixes(epoch uint64) [32]byte

func (*BeaconState) HashSSZ

func (b *BeaconState) HashSSZ() (out [32]byte, err error)

func (*BeaconState) HistoricalRoot

func (b *BeaconState) HistoricalRoot(index int) common.Hash

func (*BeaconState) HistoricalRootsLength

func (b *BeaconState) HistoricalRootsLength() uint64

func (*BeaconState) HistoricalSummariesLength

func (b *BeaconState) HistoricalSummariesLength() uint64

func (*BeaconState) HistoricalSummary

func (b *BeaconState) HistoricalSummary(index int) *cltypes.HistoricalSummary

func (*BeaconState) InactivityScores

func (b *BeaconState) InactivityScores() solid.Uint64ListSSZ

func (*BeaconState) JustificationBits

func (b *BeaconState) JustificationBits() cltypes.JustificationBits

func (*BeaconState) LatestBlockHeader

func (b *BeaconState) LatestBlockHeader() cltypes.BeaconBlockHeader

func (*BeaconState) LatestExecutionPayloadHeader

func (b *BeaconState) LatestExecutionPayloadHeader() *cltypes.Eth1Header

func (*BeaconState) MarshalJSON

func (b *BeaconState) MarshalJSON() ([]byte, error)

func (*BeaconState) NextSyncCommittee

func (b *BeaconState) NextSyncCommittee() *solid.SyncCommittee

func (*BeaconState) NextSyncCommitteeBranch

func (b *BeaconState) NextSyncCommitteeBranch() ([][32]byte, error)

func (*BeaconState) NextWithdrawalIndex

func (b *BeaconState) NextWithdrawalIndex() uint64

func (*BeaconState) NextWithdrawalValidatorIndex

func (b *BeaconState) NextWithdrawalValidatorIndex() uint64

func (*BeaconState) PendingConsolidations

func (b *BeaconState) PendingConsolidations() *solid.ListSSZ[*solid.PendingConsolidation]

func (*BeaconState) PendingDeposits

func (b *BeaconState) PendingDeposits() *solid.ListSSZ[*solid.PendingDeposit]

func (*BeaconState) PendingPartialWithdrawals

func (b *BeaconState) PendingPartialWithdrawals() *solid.ListSSZ[*solid.PendingPartialWithdrawal]

func (*BeaconState) PreviousEpochAttestations

func (b *BeaconState) PreviousEpochAttestations() *solid.ListSSZ[*solid.PendingAttestation]

func (*BeaconState) PreviousEpochAttestationsLength

func (b *BeaconState) PreviousEpochAttestationsLength() int

func (*BeaconState) PreviousEpochParticipation

func (b *BeaconState) PreviousEpochParticipation() *solid.ParticipationBitList

func (*BeaconState) PreviousJustifiedCheckpoint

func (b *BeaconState) PreviousJustifiedCheckpoint() solid.Checkpoint

func (*BeaconState) PreviousSlot

func (b *BeaconState) PreviousSlot() uint64

func (*BeaconState) PrintLeaves

func (b *BeaconState) PrintLeaves()

func (*BeaconState) RandaoMixes

func (b *BeaconState) RandaoMixes() solid.HashVectorSSZ

func (*BeaconState) RawBalances

func (b *BeaconState) RawBalances() []byte

func (*BeaconState) RawCurrentEpochParticipation

func (b *BeaconState) RawCurrentEpochParticipation() []byte

func (*BeaconState) RawInactivityScores

func (b *BeaconState) RawInactivityScores() []byte

Dangerous

func (*BeaconState) RawPreviousEpochParticipation

func (b *BeaconState) RawPreviousEpochParticipation() []byte

func (*BeaconState) RawSlashings

func (b *BeaconState) RawSlashings() []byte

func (*BeaconState) RawValidatorSet

func (b *BeaconState) RawValidatorSet() []byte

func (*BeaconState) ResetCurrentEpochAttestations

func (b *BeaconState) ResetCurrentEpochAttestations()

func (*BeaconState) ResetEpochParticipation

func (b *BeaconState) ResetEpochParticipation()

func (*BeaconState) ResetEth1DataVotes

func (b *BeaconState) ResetEth1DataVotes()

func (*BeaconState) ResetHistoricalSummaries

func (b *BeaconState) ResetHistoricalSummaries()

func (*BeaconState) ResetPreviousEpochAttestations

func (b *BeaconState) ResetPreviousEpochAttestations()

func (*BeaconState) SetActivationEligibilityEpochForValidatorAtIndex

func (b *BeaconState) SetActivationEligibilityEpochForValidatorAtIndex(index int, epoch uint64)

func (*BeaconState) SetActivationEpochForValidatorAtIndex

func (b *BeaconState) SetActivationEpochForValidatorAtIndex(index int, epoch uint64)

func (*BeaconState) SetBalances

func (b *BeaconState) SetBalances(balances solid.Uint64VectorSSZ)

SetBlockRoots sets the block roots of the BeaconState.

func (*BeaconState) SetBlockRootAt

func (b *BeaconState) SetBlockRootAt(index int, root libcommon.Hash)

func (*BeaconState) SetBlockRoots

func (b *BeaconState) SetBlockRoots(roots solid.HashVectorSSZ)

SetBlockRoots sets the block roots of the BeaconState.

func (*BeaconState) SetConsolidationBalanceToConsume

func (b *BeaconState) SetConsolidationBalanceToConsume(balance uint64)

func (*BeaconState) SetCurrentEpochAttestations

func (b *BeaconState) SetCurrentEpochAttestations(attestations *solid.ListSSZ[*solid.PendingAttestation])

func (*BeaconState) SetCurrentEpochParticipation

func (b *BeaconState) SetCurrentEpochParticipation(participation *solid.ParticipationBitList)

func (*BeaconState) SetCurrentEpochParticipationFlags

func (b *BeaconState) SetCurrentEpochParticipationFlags(flags []cltypes.ParticipationFlags)

func (*BeaconState) SetCurrentJustifiedCheckpoint

func (b *BeaconState) SetCurrentJustifiedCheckpoint(currentJustifiedCheckpoint solid.Checkpoint)

func (*BeaconState) SetCurrentSyncCommittee

func (b *BeaconState) SetCurrentSyncCommittee(currentSyncCommittee *solid.SyncCommittee)

func (*BeaconState) SetDepositBalanceToConsume

func (b *BeaconState) SetDepositBalanceToConsume(balance uint64)

func (*BeaconState) SetDepositRequestsStartIndex

func (b *BeaconState) SetDepositRequestsStartIndex(index uint64)

func (*BeaconState) SetEarliestExitEpoch

func (b *BeaconState) SetEarliestExitEpoch(epoch uint64)

func (*BeaconState) SetEarlistConsolidationEpoch

func (b *BeaconState) SetEarlistConsolidationEpoch(epoch uint64)

func (*BeaconState) SetEffectiveBalanceForValidatorAtIndex

func (b *BeaconState) SetEffectiveBalanceForValidatorAtIndex(index int, balance uint64)

func (*BeaconState) SetEpochParticipationForValidatorIndex

func (b *BeaconState) SetEpochParticipationForValidatorIndex(isCurrentEpoch bool, index int, flags cltypes.ParticipationFlags)

func (*BeaconState) SetEth1Data

func (b *BeaconState) SetEth1Data(eth1Data *cltypes.Eth1Data)

func (*BeaconState) SetEth1DataVotes

func (b *BeaconState) SetEth1DataVotes(votes *solid.ListSSZ[*cltypes.Eth1Data])

func (*BeaconState) SetEth1DepositIndex

func (b *BeaconState) SetEth1DepositIndex(eth1DepositIndex uint64)

func (*BeaconState) SetEvents

func (b *BeaconState) SetEvents(events Events)

func (*BeaconState) SetExitBalanceToConsume

func (b *BeaconState) SetExitBalanceToConsume(balance uint64)

func (*BeaconState) SetExitEpochForValidatorAtIndex

func (b *BeaconState) SetExitEpochForValidatorAtIndex(index int, epoch uint64)

func (*BeaconState) SetFinalizedCheckpoint

func (b *BeaconState) SetFinalizedCheckpoint(finalizedCheckpoint solid.Checkpoint)

func (*BeaconState) SetFork

func (b *BeaconState) SetFork(fork *cltypes.Fork)

func (*BeaconState) SetGenesisTime

func (b *BeaconState) SetGenesisTime(time uint64)

SetGenesisTime sets the genesis time of the BeaconState.

func (*BeaconState) SetGenesisValidatorsRoot

func (b *BeaconState) SetGenesisValidatorsRoot(root libcommon.Hash)

SetGenesisValidatorsRoot sets the genesis validators root of the BeaconState.

func (*BeaconState) SetHistoricalRoots

func (b *BeaconState) SetHistoricalRoots(hRoots solid.HashListSSZ)

func (*BeaconState) SetHistoricalSummaries

func (b *BeaconState) SetHistoricalSummaries(l *solid.ListSSZ[*cltypes.HistoricalSummary])

func (*BeaconState) SetInactivityScores

func (b *BeaconState) SetInactivityScores(scores []uint64)

func (*BeaconState) SetInactivityScoresRaw

func (b *BeaconState) SetInactivityScoresRaw(scores solid.Uint64VectorSSZ)

func (*BeaconState) SetJustificationBits

func (b *BeaconState) SetJustificationBits(justificationBits cltypes.JustificationBits)

func (*BeaconState) SetLatestBlockHeader

func (b *BeaconState) SetLatestBlockHeader(header *cltypes.BeaconBlockHeader)

func (*BeaconState) SetLatestExecutionPayloadHeader

func (b *BeaconState) SetLatestExecutionPayloadHeader(header *cltypes.Eth1Header)

func (*BeaconState) SetNextSyncCommittee

func (b *BeaconState) SetNextSyncCommittee(nextSyncCommittee *solid.SyncCommittee)

func (*BeaconState) SetNextWithdrawalIndex

func (b *BeaconState) SetNextWithdrawalIndex(index uint64)

func (*BeaconState) SetNextWithdrawalValidatorIndex

func (b *BeaconState) SetNextWithdrawalValidatorIndex(index uint64)

func (*BeaconState) SetPendingConsolidations

func (b *BeaconState) SetPendingConsolidations(consolidations *solid.ListSSZ[*solid.PendingConsolidation])

func (*BeaconState) SetPendingDeposits

func (b *BeaconState) SetPendingDeposits(deposits *solid.ListSSZ[*solid.PendingDeposit])

func (*BeaconState) SetPendingPartialWithdrawals

func (b *BeaconState) SetPendingPartialWithdrawals(pendingWithdrawals *solid.ListSSZ[*solid.PendingPartialWithdrawal])

func (*BeaconState) SetPreviousEpochAttestations

func (b *BeaconState) SetPreviousEpochAttestations(attestations *solid.ListSSZ[*solid.PendingAttestation])

func (*BeaconState) SetPreviousEpochParticipation

func (b *BeaconState) SetPreviousEpochParticipation(participation *solid.ParticipationBitList)

func (*BeaconState) SetPreviousEpochParticipationFlags

func (b *BeaconState) SetPreviousEpochParticipationFlags(flags []cltypes.ParticipationFlags)

func (*BeaconState) SetPreviousJustifiedCheckpoint

func (b *BeaconState) SetPreviousJustifiedCheckpoint(previousJustifiedCheckpoint solid.Checkpoint)

func (*BeaconState) SetRandaoMixAt

func (b *BeaconState) SetRandaoMixAt(index int, mix libcommon.Hash)

func (*BeaconState) SetRandaoMixes

func (b *BeaconState) SetRandaoMixes(mixes solid.HashVectorSSZ)

func (*BeaconState) SetSlashingSegmentAt

func (b *BeaconState) SetSlashingSegmentAt(index int, segment uint64)

func (*BeaconState) SetSlashings

func (b *BeaconState) SetSlashings(slashings solid.Uint64VectorSSZ)

func (*BeaconState) SetSlot

func (b *BeaconState) SetSlot(slot uint64)

func (*BeaconState) SetStateRootAt

func (b *BeaconState) SetStateRootAt(index int, root libcommon.Hash)

func (*BeaconState) SetStateRoots

func (b *BeaconState) SetStateRoots(roots solid.HashVectorSSZ)

SetStateRoots sets the state roots of the BeaconState.

func (*BeaconState) SetValidatorAtIndex

func (b *BeaconState) SetValidatorAtIndex(index int, validator solid.Validator)

func (*BeaconState) SetValidatorBalance

func (b *BeaconState) SetValidatorBalance(index int, balance uint64) error

func (*BeaconState) SetValidatorInactivityScore

func (b *BeaconState) SetValidatorInactivityScore(index int, score uint64) error

func (*BeaconState) SetValidatorIsCurrentMatchingHeadAttester

func (b *BeaconState) SetValidatorIsCurrentMatchingHeadAttester(index int, value bool) error

func (*BeaconState) SetValidatorIsCurrentMatchingSourceAttester

func (b *BeaconState) SetValidatorIsCurrentMatchingSourceAttester(index int, value bool) error

func (*BeaconState) SetValidatorIsCurrentMatchingTargetAttester

func (b *BeaconState) SetValidatorIsCurrentMatchingTargetAttester(index int, value bool) error

func (*BeaconState) SetValidatorIsPreviousMatchingHeadAttester

func (b *BeaconState) SetValidatorIsPreviousMatchingHeadAttester(index int, value bool) error

func (*BeaconState) SetValidatorIsPreviousMatchingSourceAttester

func (b *BeaconState) SetValidatorIsPreviousMatchingSourceAttester(index int, value bool) error

func (*BeaconState) SetValidatorIsPreviousMatchingTargetAttester

func (b *BeaconState) SetValidatorIsPreviousMatchingTargetAttester(index int, value bool) error

func (*BeaconState) SetValidatorMinCurrentInclusionDelayAttestation

func (b *BeaconState) SetValidatorMinCurrentInclusionDelayAttestation(index int, value *solid.PendingAttestation) error

func (*BeaconState) SetValidatorMinPreviousInclusionDelayAttestation

func (b *BeaconState) SetValidatorMinPreviousInclusionDelayAttestation(index int, value *solid.PendingAttestation) error

func (*BeaconState) SetValidatorSet

func (b *BeaconState) SetValidatorSet(validatorSet *solid.ValidatorSet)

func (*BeaconState) SetValidatorSlashed

func (b *BeaconState) SetValidatorSlashed(index int, slashed bool) error

func (*BeaconState) SetValidators

func (b *BeaconState) SetValidators(validators *solid.ValidatorSet)

func (*BeaconState) SetVersion

func (b *BeaconState) SetVersion(version clparams.StateVersion)

func (*BeaconState) SetWithdrawableEpochForValidatorAtIndex

func (b *BeaconState) SetWithdrawableEpochForValidatorAtIndex(index int, epoch uint64) error

func (*BeaconState) SetWithdrawalCredentialForValidatorAtIndex

func (b *BeaconState) SetWithdrawalCredentialForValidatorAtIndex(index int, creds libcommon.Hash)

func (*BeaconState) SlashingSegmentAt

func (b *BeaconState) SlashingSegmentAt(pos int) uint64

func (*BeaconState) Slashings

func (b *BeaconState) Slashings() solid.Uint64VectorSSZ

func (*BeaconState) Slot

func (b *BeaconState) Slot() uint64

func (*BeaconState) StateRoots

func (b *BeaconState) StateRoots() solid.HashVectorSSZ

func (*BeaconState) ValidatorBalance

func (b *BeaconState) ValidatorBalance(index int) (uint64, error)

func (*BeaconState) ValidatorEffectiveBalance

func (b *BeaconState) ValidatorEffectiveBalance(index int) (uint64, error)

func (*BeaconState) ValidatorExitEpoch

func (b *BeaconState) ValidatorExitEpoch(index int) (uint64, error)

func (*BeaconState) ValidatorForValidatorIndex

func (b *BeaconState) ValidatorForValidatorIndex(index int) (solid.Validator, error)

func (*BeaconState) ValidatorInactivityScore

func (b *BeaconState) ValidatorInactivityScore(index int) (uint64, error)

func (*BeaconState) ValidatorIsCurrentMatchingHeadAttester

func (b *BeaconState) ValidatorIsCurrentMatchingHeadAttester(idx int) (bool, error)

func (*BeaconState) ValidatorIsCurrentMatchingSourceAttester

func (b *BeaconState) ValidatorIsCurrentMatchingSourceAttester(idx int) (bool, error)

func (*BeaconState) ValidatorIsCurrentMatchingTargetAttester

func (b *BeaconState) ValidatorIsCurrentMatchingTargetAttester(idx int) (bool, error)

func (*BeaconState) ValidatorIsPreviousMatchingHeadAttester

func (b *BeaconState) ValidatorIsPreviousMatchingHeadAttester(idx int) (bool, error)

func (*BeaconState) ValidatorIsPreviousMatchingSourceAttester

func (b *BeaconState) ValidatorIsPreviousMatchingSourceAttester(idx int) (bool, error)

func (*BeaconState) ValidatorIsPreviousMatchingTargetAttester

func (b *BeaconState) ValidatorIsPreviousMatchingTargetAttester(idx int) (bool, error)

func (*BeaconState) ValidatorLength

func (b *BeaconState) ValidatorLength() int

func (*BeaconState) ValidatorMinCurrentInclusionDelayAttestation

func (b *BeaconState) ValidatorMinCurrentInclusionDelayAttestation(index int) (*solid.PendingAttestation, error)

func (*BeaconState) ValidatorMinPreviousInclusionDelayAttestation

func (b *BeaconState) ValidatorMinPreviousInclusionDelayAttestation(index int) (*solid.PendingAttestation, error)

func (*BeaconState) ValidatorPublicKey

func (b *BeaconState) ValidatorPublicKey(index int) (libcommon.Bytes48, error)

func (*BeaconState) ValidatorSet

func (b *BeaconState) ValidatorSet() *solid.ValidatorSet

func (*BeaconState) ValidatorWithdrawableEpoch

func (b *BeaconState) ValidatorWithdrawableEpoch(index int) (uint64, error)

func (*BeaconState) Validators

func (b *BeaconState) Validators() *solid.ValidatorSet

Get validators field

func (*BeaconState) Version

func (b *BeaconState) Version() clparams.StateVersion

type Events

type Events struct {
	OnNewBlockRoot                           func(index int, root libcommon.Hash) error
	OnNewStateRoot                           func(index int, root libcommon.Hash) error
	OnRandaoMixChange                        func(index int, mix [32]byte) error
	OnNewValidator                           func(index int, v solid.Validator, balance uint64) error
	OnNewValidatorBalance                    func(index int, balance uint64) error
	OnNewValidatorEffectiveBalance           func(index int, balance uint64) error
	OnNewValidatorActivationEpoch            func(index int, epoch uint64) error
	OnNewValidatorExitEpoch                  func(index int, epoch uint64) error
	OnNewValidatorWithdrawableEpoch          func(index int, epoch uint64) error
	OnNewValidatorSlashed                    func(index int, slashed bool) error
	OnNewValidatorActivationEligibilityEpoch func(index int, epoch uint64) error
	OnNewValidatorWithdrawalCredentials      func(index int, wc []byte) error
	OnNewSlashingSegment                     func(index int, segment uint64) error
	OnEpochBoundary                          func(epoch uint64) error
	OnNewNextSyncCommittee                   func(committee *solid.SyncCommittee) error
	OnNewCurrentSyncCommittee                func(committee *solid.SyncCommittee) error
	OnAppendEth1Data                         func(data *cltypes.Eth1Data) error
	OnResetParticipation                     func(previousParticipation *solid.ParticipationBitList) error
}

type StateLeafIndex

type StateLeafIndex uint
const (
	GenesisTimeLeafIndex                 StateLeafIndex = 0
	GenesisValidatorsRootLeafIndex       StateLeafIndex = 1
	SlotLeafIndex                        StateLeafIndex = 2
	ForkLeafIndex                        StateLeafIndex = 3
	LatestBlockHeaderLeafIndex           StateLeafIndex = 4
	BlockRootsLeafIndex                  StateLeafIndex = 5
	StateRootsLeafIndex                  StateLeafIndex = 6
	HistoricalRootsLeafIndex             StateLeafIndex = 7
	Eth1DataLeafIndex                    StateLeafIndex = 8
	Eth1DataVotesLeafIndex               StateLeafIndex = 9
	Eth1DepositIndexLeafIndex            StateLeafIndex = 10
	ValidatorsLeafIndex                  StateLeafIndex = 11
	BalancesLeafIndex                    StateLeafIndex = 12
	RandaoMixesLeafIndex                 StateLeafIndex = 13
	SlashingsLeafIndex                   StateLeafIndex = 14
	PreviousEpochParticipationLeafIndex  StateLeafIndex = 15
	CurrentEpochParticipationLeafIndex   StateLeafIndex = 16
	JustificationBitsLeafIndex           StateLeafIndex = 17
	PreviousJustifiedCheckpointLeafIndex StateLeafIndex = 18
	CurrentJustifiedCheckpointLeafIndex  StateLeafIndex = 19
	FinalizedCheckpointLeafIndex         StateLeafIndex = 20
	// Altair
	InactivityScoresLeafIndex     StateLeafIndex = 21
	CurrentSyncCommitteeLeafIndex StateLeafIndex = 22
	NextSyncCommitteeLeafIndex    StateLeafIndex = 23
	// Bellatrix
	LatestExecutionPayloadHeaderLeafIndex StateLeafIndex = 24
	// Capella
	NextWithdrawalIndexLeafIndex          StateLeafIndex = 25
	NextWithdrawalValidatorIndexLeafIndex StateLeafIndex = 26
	HistoricalSummariesLeafIndex          StateLeafIndex = 27
	// Electra
	DepositRequestsStartIndexLeafIndex     StateLeafIndex = 28
	DepositBalanceToConsumeLeafIndex       StateLeafIndex = 29
	ExitBalanceToConsumeLeafIndex          StateLeafIndex = 30
	EarliestExitEpochLeafIndex             StateLeafIndex = 31
	ConsolidationBalanceToConsumeLeafIndex StateLeafIndex = 32
	EarliestConsolidationEpochLeafIndex    StateLeafIndex = 33
	PendingDepositsLeafIndex               StateLeafIndex = 34
	PendingPartialWithdrawalsLeafIndex     StateLeafIndex = 35
	PendingConsolidationsLeafIndex         StateLeafIndex = 36
)

All position of all the leaves of the state merkle tree.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL