Documentation ¶
Overview ¶
Code generated by fastssz. DO NOT EDIT. Hash: b47c55b85094e7e487048856c6c94e3adbc9bac71babff01e938406c58f0230d Version: 0.1.3
Index ¶
- func DefaultGenesisExecutionPayloadHeader() (*engineprimitives.ExecutionPayloadHeaderDeneb, error)
- type BeaconState
- func (b *BeaconState) GetTree() (*ssz.Node, error)
- func (b *BeaconState) HashTreeRoot() ([32]byte, error)
- func (b *BeaconState) HashTreeRootWith(hh ssz.HashWalker) (err error)
- func (b *BeaconState) MarshalSSZ() ([]byte, error)
- func (b *BeaconState) MarshalSSZTo(buf []byte) (dst []byte, err error)
- func (b *BeaconState) SizeSSZ() (size int)
- func (b *BeaconState) UnmarshalSSZ(buf []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultGenesisExecutionPayloadHeader ¶
func DefaultGenesisExecutionPayloadHeader() ( *engineprimitives.ExecutionPayloadHeaderDeneb, error, )
DefaultGenesisExecutionPayloadHeader returns a default ExecutableHeaderDeneb.
Types ¶
type BeaconState ¶
type BeaconState struct { // Versioning // //nolint:lll GenesisValidatorsRoot primitives.Root `json:"genesisValidatorsRoot" ssz-size:"32"` Slot math.Slot `json:"slot"` Fork *consensus.Fork `json:"fork"` // History LatestBlockHeader *consensus.BeaconBlockHeader `json:"latestBlockHeader"` BlockRoots []primitives.Root `json:"blockRoots" ssz-size:"?,32" ssz-max:"8192"` StateRoots []primitives.Root `json:"stateRoots" ssz-size:"?,32" ssz-max:"8192"` // Eth1 Eth1Data *consensus.Eth1Data `json:"eth1Data"` Eth1DepositIndex uint64 `json:"eth1DepositIndex"` LatestExecutionPayloadHeader *engineprimitives.ExecutionPayloadHeaderDeneb `json:"latestExecutionPayloadHeader"` // Registry Validators []*consensus.Validator `json:"validators" ssz-max:"1099511627776"` Balances []uint64 `json:"balances" ssz-max:"1099511627776"` // Randomness RandaoMixes []primitives.Bytes32 `json:"randaoMixes" ssz-size:"?,32" ssz-max:"65536"` // Withdrawals NextWithdrawalIndex uint64 `json:"nextWithdrawalIndex"` NextWithdrawalValidatorIndex math.ValidatorIndex `json:"nextWithdrawalValidatorIndex"` // Slashing Slashings []uint64 `json:"slashings" ssz-max:"1099511627776"` TotalSlashing math.Gwei `json:"totalSlashing"` }
func DefaultBeaconState ¶
func DefaultBeaconState() (*BeaconState, error)
DefaultBeaconState returns a default BeaconState.
TODO: take in BeaconConfig params to determine the default length of the arrays, which we are currently and INCORRECTLY setting to 0.
func (*BeaconState) GetTree ¶
func (b *BeaconState) GetTree() (*ssz.Node, error)
GetTree ssz hashes the BeaconState object
func (*BeaconState) HashTreeRoot ¶
func (b *BeaconState) HashTreeRoot() ([32]byte, error)
HashTreeRoot ssz hashes the BeaconState object
func (*BeaconState) HashTreeRootWith ¶
func (b *BeaconState) HashTreeRootWith(hh ssz.HashWalker) (err error)
HashTreeRootWith ssz hashes the BeaconState object with a hasher
func (*BeaconState) MarshalSSZ ¶
func (b *BeaconState) MarshalSSZ() ([]byte, error)
MarshalSSZ ssz marshals the BeaconState object
func (*BeaconState) MarshalSSZTo ¶
func (b *BeaconState) MarshalSSZTo(buf []byte) (dst []byte, err error)
MarshalSSZTo ssz marshals the BeaconState object to a target array
func (*BeaconState) SizeSSZ ¶
func (b *BeaconState) SizeSSZ() (size int)
SizeSSZ returns the ssz encoded size in bytes for the BeaconState object
func (*BeaconState) UnmarshalSSZ ¶
func (b *BeaconState) UnmarshalSSZ(buf []byte) error
UnmarshalSSZ ssz unmarshals the BeaconState object