Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataType ¶
type DataType int
DataType signifies the data type of the field.
const ( // BasicArray represents a simple array type for a field. BasicArray DataType = iota // CompositeArray represents a variable length array with // a non primitive type. CompositeArray // CompressedArray represents a variable length array which // can pack multiple elements into a leaf of the underlying // trie. CompressedArray )
List of current data types the state supports.
type FieldIndex ¶
type FieldIndex int
FieldIndex represents the relevant field position in the state struct for a field.
const ( GenesisTime FieldIndex = iota GenesisValidatorsRoot Slot Fork LatestBlockHeader BlockRoots StateRoots HistoricalRoots Eth1Data Eth1DataVotes Eth1DepositIndex Validators Balances RandaoMixes Slashings PreviousEpochAttestations CurrentEpochAttestations PreviousEpochParticipationBits CurrentEpochParticipationBits JustificationBits PreviousJustifiedCheckpoint CurrentJustifiedCheckpoint FinalizedCheckpoint InactivityScores CurrentSyncCommittee NextSyncCommittee LatestExecutionPayloadHeader LatestExecutionPayloadHeaderCapella NextWithdrawalIndex NextWithdrawalValidatorIndex HistoricalSummaries )
Below we define a set of useful enum values for the field indices of the beacon state. For example, genesisTime is the 0th field of the beacon state. This is helpful when we are updating the Merkle branches up the trie representation of the beacon state. The below field indexes correspond to the state.
func (FieldIndex) ElemsInChunk ¶
func (f FieldIndex) ElemsInChunk() (uint64, error)
ElemsInChunk returns the number of elements in the chunk (number of elements that are able to be packed).
func (FieldIndex) RealPosition ¶
func (f FieldIndex) RealPosition() int
RealPosition denotes the position of the field in the beacon state. The value might differ for different state versions.
func (FieldIndex) String ¶
func (f FieldIndex) String() string
String returns the name of the field index.