types

package
v3.2.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: GPL-3.0 Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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
)

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) Native

func (FieldIndex) Native() bool

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(_ int) string

String returns the name of the field index.

Jump to

Keyboard shortcuts

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