Documentation ¶
Index ¶
- Variables
- func BeaconBlockBodyType(spec *common.Spec) *ContainerTypeDef
- func BeaconBlockType(spec *common.Spec) *ContainerTypeDef
- func BeaconStateType(spec *common.Spec) *ContainerTypeDef
- func ExecutionPayloadType(spec *common.Spec) *ContainerTypeDef
- func GetApplicableAttestationParticipationFlags(spec *common.Spec, state common.BeaconState, data *phase0.AttestationData, ...) (out altair.ParticipationFlags, err error)
- func KZGCommitmentsType(spec *common.Spec) *view.ComplexListTypeDef
- func ProcessAttestation(spec *common.Spec, epc *common.EpochsContext, ...) error
- func ProcessAttestations(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, ...) error
- func ProcessEpochRegistryUpdates(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, ...) error
- func ProcessExecutionPayload(ctx context.Context, spec *common.Spec, state ExecutionTrackingBeaconState, ...) error
- func ProcessVoluntaryExit(spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, ...) error
- func ProcessVoluntaryExits(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, ...) error
- func SignedBeaconBlockType(spec *common.Spec) *ContainerTypeDef
- func ValidateVoluntaryExit(spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, ...) error
- func VerifyAndNotifyNewPayload(ctx context.Context, eng ExecutionEngine, newPayloadRequest *NewPayloadRequest) (bool, error)
- type BeaconBlock
- func (b *BeaconBlock) ByteLength(spec *common.Spec) uint64
- func (b *BeaconBlock) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (a *BeaconBlock) FixedLength(*common.Spec) uint64
- func (b *BeaconBlock) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (block *BeaconBlock) Header(spec *common.Spec) *common.BeaconBlockHeader
- func (b *BeaconBlock) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- type BeaconBlockBody
- func (b *BeaconBlockBody) ByteLength(spec *common.Spec) uint64
- func (b *BeaconBlockBody) CheckLimits(spec *common.Spec) error
- func (b *BeaconBlockBody) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (a *BeaconBlockBody) FixedLength(*common.Spec) uint64
- func (b *BeaconBlockBody) GetBlobKZGCommitments() []common.KZGCommitment
- func (b *BeaconBlockBody) GetTransactions() []common.Transaction
- func (b *BeaconBlockBody) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (b *BeaconBlockBody) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- func (b *BeaconBlockBody) Shallow(spec *common.Spec) *BeaconBlockBodyShallow
- type BeaconBlockBodyShallow
- func (b *BeaconBlockBodyShallow) ByteLength(spec *common.Spec) uint64
- func (b *BeaconBlockBodyShallow) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (a *BeaconBlockBodyShallow) FixedLength(*common.Spec) uint64
- func (b *BeaconBlockBodyShallow) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (b *BeaconBlockBodyShallow) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- func (b *BeaconBlockBodyShallow) WithExecutionPayload(spec *common.Spec, payload ExecutionPayload) (*BeaconBlockBody, error)
- type BeaconState
- func (v *BeaconState) ByteLength(spec *common.Spec) uint64
- func (v *BeaconState) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (*BeaconState) FixedLength(*common.Spec) uint64
- func (v *BeaconState) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (v *BeaconState) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- type BeaconStateView
- func (state *BeaconStateView) AddValidator(spec *common.Spec, pub common.BLSPubkey, withdrawalCreds common.Root, ...) error
- func (state *BeaconStateView) Balances() (common.BalancesRegistry, error)
- func (state *BeaconStateView) BlockRoots() (common.BatchRoots, error)
- func (state *BeaconStateView) CopyState() (common.BeaconState, error)
- func (state *BeaconStateView) CurrentEpochParticipation() (*altair.ParticipationRegistryView, error)
- func (state *BeaconStateView) CurrentJustifiedCheckpoint() (common.Checkpoint, error)
- func (state *BeaconStateView) CurrentSyncCommittee() (*common.SyncCommitteeView, error)
- func (state *BeaconStateView) Eth1Data() (common.Eth1Data, error)
- func (state *BeaconStateView) Eth1DataVotes() (common.Eth1DataVotes, error)
- func (state *BeaconStateView) Eth1DepositIndex() (common.DepositIndex, error)
- func (state *BeaconStateView) FinalizedCheckpoint() (common.Checkpoint, error)
- func (state *BeaconStateView) Fork() (common.Fork, error)
- func (state *BeaconStateView) ForkSettings(spec *common.Spec) *common.ForkSettings
- func (state *BeaconStateView) GenesisTime() (common.Timestamp, error)
- func (state *BeaconStateView) GenesisValidatorsRoot() (common.Root, error)
- func (state *BeaconStateView) HistoricalRoots() (common.HistoricalRoots, error)
- func (state *BeaconStateView) HistoricalSummaries() (capella.HistoricalSummariesList, error)
- func (state *BeaconStateView) InactivityScores() (*altair.InactivityScoresView, error)
- func (state *BeaconStateView) IncrementDepositIndex() error
- func (state *BeaconStateView) IncrementNextWithdrawalIndex() error
- func (state *BeaconStateView) JustificationBits() (common.JustificationBits, error)
- func (state *BeaconStateView) LatestBlockHeader() (*common.BeaconBlockHeader, error)
- func (state *BeaconStateView) LatestExecutionPayloadHeader() (*ExecutionPayloadHeaderView, error)
- func (state *BeaconStateView) NextSyncCommittee() (*common.SyncCommitteeView, error)
- func (state *BeaconStateView) NextWithdrawalIndex() (common.WithdrawalIndex, error)
- func (state *BeaconStateView) NextWithdrawalValidatorIndex() (common.ValidatorIndex, error)
- func (state *BeaconStateView) PreviousEpochParticipation() (*altair.ParticipationRegistryView, error)
- func (state *BeaconStateView) PreviousJustifiedCheckpoint() (common.Checkpoint, error)
- func (state *BeaconStateView) ProcessBlock(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, ...) error
- func (state *BeaconStateView) ProcessEpoch(ctx context.Context, spec *common.Spec, epc *common.EpochsContext) error
- func (state *BeaconStateView) RandaoMixes() (common.RandaoMixes, error)
- func (state *BeaconStateView) Raw(spec *common.Spec) (*BeaconState, error)
- func (state *BeaconStateView) RotateSyncCommittee(next *common.SyncCommitteeView) error
- func (state *BeaconStateView) SeedRandao(spec *common.Spec, seed common.Root) error
- func (state *BeaconStateView) SetBalances(balances []common.Gwei) error
- func (state *BeaconStateView) SetCurrentJustifiedCheckpoint(c common.Checkpoint) error
- func (state *BeaconStateView) SetCurrentSyncCommittee(v *common.SyncCommitteeView) error
- func (state *BeaconStateView) SetEth1Data(v common.Eth1Data) error
- func (state *BeaconStateView) SetFinalizedCheckpoint(c common.Checkpoint) error
- func (state *BeaconStateView) SetFork(f common.Fork) error
- func (state *BeaconStateView) SetGenesisTime(t common.Timestamp) error
- func (state *BeaconStateView) SetGenesisValidatorsRoot(r common.Root) error
- func (state *BeaconStateView) SetJustificationBits(bits common.JustificationBits) error
- func (state *BeaconStateView) SetLatestBlockHeader(v *common.BeaconBlockHeader) error
- func (state *BeaconStateView) SetLatestExecutionPayloadHeader(h *ExecutionPayloadHeader) error
- func (state *BeaconStateView) SetNextSyncCommittee(v *common.SyncCommitteeView) error
- func (state *BeaconStateView) SetNextWithdrawalIndex(nextIndex common.WithdrawalIndex) error
- func (state *BeaconStateView) SetNextWithdrawalValidatorIndex(nextValidator common.ValidatorIndex) error
- func (state *BeaconStateView) SetPreviousJustifiedCheckpoint(c common.Checkpoint) error
- func (state *BeaconStateView) SetSlot(slot common.Slot) error
- func (state *BeaconStateView) Slashings() (common.Slashings, error)
- func (state *BeaconStateView) Slot() (common.Slot, error)
- func (state *BeaconStateView) StateRoots() (common.BatchRoots, error)
- func (state *BeaconStateView) Validators() (common.ValidatorRegistry, error)
- type ExecutionEngine
- type ExecutionPayload
- func (s *ExecutionPayload) ByteLength(spec *common.Spec) uint64
- func (s *ExecutionPayload) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (a *ExecutionPayload) FixedLength(*common.Spec) uint64
- func (ep *ExecutionPayload) GetWitdrawals() []common.Withdrawal
- func (s *ExecutionPayload) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (ep *ExecutionPayload) Header(spec *common.Spec) *ExecutionPayloadHeader
- func (s *ExecutionPayload) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- type ExecutionPayloadHeader
- func (s *ExecutionPayloadHeader) ByteLength() uint64
- func (s *ExecutionPayloadHeader) Deserialize(dr *codec.DecodingReader) error
- func (b *ExecutionPayloadHeader) FixedLength() uint64
- func (s *ExecutionPayloadHeader) HashTreeRoot(hFn tree.HashFn) common.Root
- func (s *ExecutionPayloadHeader) Serialize(w *codec.EncodingWriter) error
- func (s *ExecutionPayloadHeader) View() *ExecutionPayloadHeaderView
- type ExecutionPayloadHeaderView
- func (v *ExecutionPayloadHeaderView) BaseFeePerGas() (Uint256View, error)
- func (v *ExecutionPayloadHeaderView) BlobGasUsed() (Uint64View, error)
- func (v *ExecutionPayloadHeaderView) BlockHash() (common.Hash32, error)
- func (v *ExecutionPayloadHeaderView) BlockNumber() (Uint64View, error)
- func (v *ExecutionPayloadHeaderView) ExcessBlobGas() (Uint64View, error)
- func (v *ExecutionPayloadHeaderView) FeeRecipient() (common.Eth1Address, error)
- func (v *ExecutionPayloadHeaderView) GasLimit() (Uint64View, error)
- func (v *ExecutionPayloadHeaderView) GasUsed() (Uint64View, error)
- func (v *ExecutionPayloadHeaderView) LogsBloom() (*common.LogsBloom, error)
- func (v *ExecutionPayloadHeaderView) ParentHash() (common.Hash32, error)
- func (v *ExecutionPayloadHeaderView) Random() (common.Bytes32, error)
- func (v *ExecutionPayloadHeaderView) Raw() (*ExecutionPayloadHeader, error)
- func (v *ExecutionPayloadHeaderView) ReceiptRoot() (common.Bytes32, error)
- func (v *ExecutionPayloadHeaderView) StateRoot() (common.Bytes32, error)
- func (v *ExecutionPayloadHeaderView) Timestamp() (common.Timestamp, error)
- func (v *ExecutionPayloadHeaderView) TransactionsRoot() (common.Root, error)
- type ExecutionPayloadView
- type ExecutionTrackingBeaconState
- type KZGCommitments
- func (li KZGCommitments) ByteLength(_ *common.Spec) (out uint64)
- func (li *KZGCommitments) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (*KZGCommitments) FixedLength(*common.Spec) uint64
- func (li KZGCommitments) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (li KZGCommitments) MarshalJSON() ([]byte, error)
- func (li KZGCommitments) Serialize(_ *common.Spec, w *codec.EncodingWriter) error
- type NewPayloadRequest
- type SignedBeaconBlock
- func (b *SignedBeaconBlock) ByteLength(spec *common.Spec) uint64
- func (b *SignedBeaconBlock) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (b *SignedBeaconBlock) Envelope(spec *common.Spec, digest common.ForkDigest) *common.BeaconBlockEnvelope
- func (a *SignedBeaconBlock) FixedLength(*common.Spec) uint64
- func (b *SignedBeaconBlock) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (b *SignedBeaconBlock) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- func (block *SignedBeaconBlock) SignedHeader(spec *common.Spec) *common.SignedBeaconBlockHeader
Constants ¶
This section is empty.
Variables ¶
View Source
var ExecutionPayloadHeaderType = ContainerType("ExecutionPayloadHeader", []FieldDef{ {"parent_hash", common.Hash32Type}, {"fee_recipient", common.Eth1AddressType}, {"state_root", common.Bytes32Type}, {"receipts_root", common.Bytes32Type}, {"logs_bloom", common.LogsBloomType}, {"prev_randao", common.Bytes32Type}, {"block_number", Uint64Type}, {"gas_limit", Uint64Type}, {"gas_used", Uint64Type}, {"timestamp", common.TimestampType}, {"extra_data", common.ExtraDataType}, {"base_fee_per_gas", Uint256Type}, {"block_hash", common.Hash32Type}, {"transactions_root", RootType}, {"withdrawals_root", RootType}, {"blob_gas_used", Uint64Type}, {"excess_blob_gas", Uint64Type}, })
Functions ¶
func BeaconBlockBodyType ¶
func BeaconBlockType ¶
func BeaconStateType ¶
func ExecutionPayloadType ¶
func GetApplicableAttestationParticipationFlags ¶ added in v0.32.0
func GetApplicableAttestationParticipationFlags( spec *common.Spec, state common.BeaconState, data *phase0.AttestationData, inclusionDelay common.Slot) (out altair.ParticipationFlags, err error)
func KZGCommitmentsType ¶
func KZGCommitmentsType(spec *common.Spec) *view.ComplexListTypeDef
func ProcessAttestation ¶ added in v0.32.0
func ProcessAttestation(spec *common.Spec, epc *common.EpochsContext, state altair.AltairLikeBeaconState, attestation *phase0.Attestation) error
func ProcessAttestations ¶ added in v0.32.0
func ProcessAttestations(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, state altair.AltairLikeBeaconState, ops []phase0.Attestation) error
func ProcessEpochRegistryUpdates ¶ added in v0.32.0
func ProcessEpochRegistryUpdates(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, flats []common.FlatValidator, state common.BeaconState) error
func ProcessExecutionPayload ¶
func ProcessExecutionPayload(ctx context.Context, spec *common.Spec, state ExecutionTrackingBeaconState, body *BeaconBlockBody, engine ExecutionEngine) error
func ProcessVoluntaryExit ¶ added in v0.32.0
func ProcessVoluntaryExit(spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, signedExit *phase0.SignedVoluntaryExit) error
func ProcessVoluntaryExits ¶ added in v0.32.0
func ProcessVoluntaryExits(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, ops []phase0.SignedVoluntaryExit) error
func SignedBeaconBlockType ¶
func ValidateVoluntaryExit ¶ added in v0.32.0
func ValidateVoluntaryExit(spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, signedExit *phase0.SignedVoluntaryExit) error
func VerifyAndNotifyNewPayload ¶ added in v0.32.0
func VerifyAndNotifyNewPayload(ctx context.Context, eng ExecutionEngine, newPayloadRequest *NewPayloadRequest) (bool, error)
Types ¶
type BeaconBlock ¶
type BeaconBlock struct { Slot common.Slot `json:"slot" yaml:"slot"` ProposerIndex common.ValidatorIndex `json:"proposer_index" yaml:"proposer_index"` ParentRoot common.Root `json:"parent_root" yaml:"parent_root"` StateRoot common.Root `json:"state_root" yaml:"state_root"` Body BeaconBlockBody `json:"body" yaml:"body"` }
func (*BeaconBlock) ByteLength ¶
func (b *BeaconBlock) ByteLength(spec *common.Spec) uint64
func (*BeaconBlock) Deserialize ¶
func (b *BeaconBlock) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*BeaconBlock) FixedLength ¶
func (a *BeaconBlock) FixedLength(*common.Spec) uint64
func (*BeaconBlock) HashTreeRoot ¶
func (*BeaconBlock) Header ¶
func (block *BeaconBlock) Header(spec *common.Spec) *common.BeaconBlockHeader
func (*BeaconBlock) Serialize ¶
func (b *BeaconBlock) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
type BeaconBlockBody ¶
type BeaconBlockBody struct { RandaoReveal common.BLSSignature `json:"randao_reveal" yaml:"randao_reveal"` Eth1Data common.Eth1Data `json:"eth1_data" yaml:"eth1_data"` Graffiti common.Root `json:"graffiti" yaml:"graffiti"` ProposerSlashings phase0.ProposerSlashings `json:"proposer_slashings" yaml:"proposer_slashings"` AttesterSlashings phase0.AttesterSlashings `json:"attester_slashings" yaml:"attester_slashings"` Attestations phase0.Attestations `json:"attestations" yaml:"attestations"` Deposits phase0.Deposits `json:"deposits" yaml:"deposits"` VoluntaryExits phase0.VoluntaryExits `json:"voluntary_exits" yaml:"voluntary_exits"` SyncAggregate altair.SyncAggregate `json:"sync_aggregate" yaml:"sync_aggregate"` ExecutionPayload ExecutionPayload `json:"execution_payload" yaml:"execution_payload"` // modified in EIP-4844 BLSToExecutionChanges common.SignedBLSToExecutionChanges `json:"bls_to_execution_changes" yaml:"bls_to_execution_changes"` BlobKZGCommitments KZGCommitments `json:"blob_kzg_commitments" yaml:"blob_kzg_commitments"` // new in EIP-4844 }
func (*BeaconBlockBody) ByteLength ¶
func (b *BeaconBlockBody) ByteLength(spec *common.Spec) uint64
func (*BeaconBlockBody) CheckLimits ¶
func (b *BeaconBlockBody) CheckLimits(spec *common.Spec) error
func (*BeaconBlockBody) Deserialize ¶
func (b *BeaconBlockBody) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*BeaconBlockBody) FixedLength ¶
func (a *BeaconBlockBody) FixedLength(*common.Spec) uint64
func (*BeaconBlockBody) GetBlobKZGCommitments ¶
func (b *BeaconBlockBody) GetBlobKZGCommitments() []common.KZGCommitment
func (*BeaconBlockBody) GetTransactions ¶
func (b *BeaconBlockBody) GetTransactions() []common.Transaction
func (*BeaconBlockBody) HashTreeRoot ¶
func (*BeaconBlockBody) Serialize ¶
func (b *BeaconBlockBody) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
func (*BeaconBlockBody) Shallow ¶
func (b *BeaconBlockBody) Shallow(spec *common.Spec) *BeaconBlockBodyShallow
type BeaconBlockBodyShallow ¶
type BeaconBlockBodyShallow struct { RandaoReveal common.BLSSignature `json:"randao_reveal" yaml:"randao_reveal"` Eth1Data common.Eth1Data `json:"eth1_data" yaml:"eth1_data"` Graffiti common.Root `json:"graffiti" yaml:"graffiti"` ProposerSlashings phase0.ProposerSlashings `json:"proposer_slashings" yaml:"proposer_slashings"` AttesterSlashings phase0.AttesterSlashings `json:"attester_slashings" yaml:"attester_slashings"` Attestations phase0.Attestations `json:"attestations" yaml:"attestations"` Deposits phase0.Deposits `json:"deposits" yaml:"deposits"` VoluntaryExits phase0.VoluntaryExits `json:"voluntary_exits" yaml:"voluntary_exits"` SyncAggregate altair.SyncAggregate `json:"sync_aggregate" yaml:"sync_aggregate"` ExecutionPayloadRoot common.Root `json:"execution_payload_root" yaml:"execution_payload_root"` BLSToExecutionChanges common.SignedBLSToExecutionChanges `json:"bls_to_execution_changes" yaml:"bls_to_execution_changes"` BlobKZGCommitments KZGCommitments `json:"blob_kzg_commitments" yaml:"blob_kzg_commitments"` // new in EIP-4844 }
func (*BeaconBlockBodyShallow) ByteLength ¶
func (b *BeaconBlockBodyShallow) ByteLength(spec *common.Spec) uint64
func (*BeaconBlockBodyShallow) Deserialize ¶
func (b *BeaconBlockBodyShallow) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*BeaconBlockBodyShallow) FixedLength ¶
func (a *BeaconBlockBodyShallow) FixedLength(*common.Spec) uint64
func (*BeaconBlockBodyShallow) HashTreeRoot ¶
func (*BeaconBlockBodyShallow) Serialize ¶
func (b *BeaconBlockBodyShallow) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
func (*BeaconBlockBodyShallow) WithExecutionPayload ¶
func (b *BeaconBlockBodyShallow) WithExecutionPayload(spec *common.Spec, payload ExecutionPayload) (*BeaconBlockBody, error)
type BeaconState ¶
type BeaconState struct { // Versioning GenesisTime common.Timestamp `json:"genesis_time" yaml:"genesis_time"` GenesisValidatorsRoot common.Root `json:"genesis_validators_root" yaml:"genesis_validators_root"` Slot common.Slot `json:"slot" yaml:"slot"` Fork common.Fork `json:"fork" yaml:"fork"` // History LatestBlockHeader common.BeaconBlockHeader `json:"latest_block_header" yaml:"latest_block_header"` BlockRoots phase0.HistoricalBatchRoots `json:"block_roots" yaml:"block_roots"` StateRoots phase0.HistoricalBatchRoots `json:"state_roots" yaml:"state_roots"` HistoricalRoots phase0.HistoricalRoots `json:"historical_roots" yaml:"historical_roots"` // Frozen in Capella, replaced by historical_summaries // Eth1 Eth1Data common.Eth1Data `json:"eth1_data" yaml:"eth1_data"` Eth1DataVotes phase0.Eth1DataVotes `json:"eth1_data_votes" yaml:"eth1_data_votes"` Eth1DepositIndex common.DepositIndex `json:"eth1_deposit_index" yaml:"eth1_deposit_index"` // Registry Validators phase0.ValidatorRegistry `json:"validators" yaml:"validators"` Balances phase0.Balances `json:"balances" yaml:"balances"` RandaoMixes phase0.RandaoMixes `json:"randao_mixes" yaml:"randao_mixes"` Slashings phase0.SlashingsHistory `json:"slashings" yaml:"slashings"` // Participation PreviousEpochParticipation altair.ParticipationRegistry `json:"previous_epoch_participation" yaml:"previous_epoch_participation"` CurrentEpochParticipation altair.ParticipationRegistry `json:"current_epoch_participation" yaml:"current_epoch_participation"` // Finality JustificationBits common.JustificationBits `json:"justification_bits" yaml:"justification_bits"` PreviousJustifiedCheckpoint common.Checkpoint `json:"previous_justified_checkpoint" yaml:"previous_justified_checkpoint"` CurrentJustifiedCheckpoint common.Checkpoint `json:"current_justified_checkpoint" yaml:"current_justified_checkpoint"` FinalizedCheckpoint common.Checkpoint `json:"finalized_checkpoint" yaml:"finalized_checkpoint"` // Inactivity InactivityScores altair.InactivityScores `json:"inactivity_scores" yaml:"inactivity_scores"` // Light client sync committees CurrentSyncCommittee common.SyncCommittee `json:"current_sync_committee" yaml:"current_sync_committee"` NextSyncCommittee common.SyncCommittee `json:"next_sync_committee" yaml:"next_sync_committee"` // Execution-layer (modified in EIP-4844) LatestExecutionPayloadHeader ExecutionPayloadHeader `json:"latest_execution_payload_header" yaml:"latest_execution_payload_header"` // Withdrawals NextWithdrawalIndex common.WithdrawalIndex `json:"next_withdrawal_index" yaml:"next_withdrawal_index"` NextWithdrawalValidatorIndex common.ValidatorIndex `json:"next_withdrawal_validator_index" yaml:"next_withdrawal_validator_index"` // Deep history valid from Capella onwards HistoricalSummaries capella.HistoricalSummaries `json:"historical_summaries"` }
func (*BeaconState) ByteLength ¶
func (v *BeaconState) ByteLength(spec *common.Spec) uint64
func (*BeaconState) Deserialize ¶
func (v *BeaconState) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*BeaconState) FixedLength ¶
func (*BeaconState) FixedLength(*common.Spec) uint64
func (*BeaconState) HashTreeRoot ¶
func (*BeaconState) Serialize ¶
func (v *BeaconState) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
type BeaconStateView ¶
type BeaconStateView struct {
*ContainerView
}
func AsBeaconStateView ¶
func AsBeaconStateView(v View, err error) (*BeaconStateView, error)
To load a state:
state, err := beacon.AsBeaconStateView(beacon.BeaconStateType.Deserialize(codec.NewDecodingReader(reader, size)))
func NewBeaconStateView ¶
func NewBeaconStateView(spec *common.Spec) *BeaconStateView
func UpgradeToDeneb ¶
func UpgradeToDeneb(spec *common.Spec, epc *common.EpochsContext, pre *capella.BeaconStateView) (*BeaconStateView, error)
func (*BeaconStateView) AddValidator ¶
func (*BeaconStateView) Balances ¶
func (state *BeaconStateView) Balances() (common.BalancesRegistry, error)
func (*BeaconStateView) BlockRoots ¶
func (state *BeaconStateView) BlockRoots() (common.BatchRoots, error)
func (*BeaconStateView) CopyState ¶
func (state *BeaconStateView) CopyState() (common.BeaconState, error)
func (*BeaconStateView) CurrentEpochParticipation ¶
func (state *BeaconStateView) CurrentEpochParticipation() (*altair.ParticipationRegistryView, error)
func (*BeaconStateView) CurrentJustifiedCheckpoint ¶
func (state *BeaconStateView) CurrentJustifiedCheckpoint() (common.Checkpoint, error)
func (*BeaconStateView) CurrentSyncCommittee ¶
func (state *BeaconStateView) CurrentSyncCommittee() (*common.SyncCommitteeView, error)
func (*BeaconStateView) Eth1Data ¶
func (state *BeaconStateView) Eth1Data() (common.Eth1Data, error)
func (*BeaconStateView) Eth1DataVotes ¶
func (state *BeaconStateView) Eth1DataVotes() (common.Eth1DataVotes, error)
func (*BeaconStateView) Eth1DepositIndex ¶
func (state *BeaconStateView) Eth1DepositIndex() (common.DepositIndex, error)
func (*BeaconStateView) FinalizedCheckpoint ¶
func (state *BeaconStateView) FinalizedCheckpoint() (common.Checkpoint, error)
func (*BeaconStateView) ForkSettings ¶
func (state *BeaconStateView) ForkSettings(spec *common.Spec) *common.ForkSettings
func (*BeaconStateView) GenesisTime ¶
func (state *BeaconStateView) GenesisTime() (common.Timestamp, error)
func (*BeaconStateView) GenesisValidatorsRoot ¶
func (state *BeaconStateView) GenesisValidatorsRoot() (common.Root, error)
func (*BeaconStateView) HistoricalRoots ¶
func (state *BeaconStateView) HistoricalRoots() (common.HistoricalRoots, error)
func (*BeaconStateView) HistoricalSummaries ¶
func (state *BeaconStateView) HistoricalSummaries() (capella.HistoricalSummariesList, error)
func (*BeaconStateView) InactivityScores ¶
func (state *BeaconStateView) InactivityScores() (*altair.InactivityScoresView, error)
func (*BeaconStateView) IncrementDepositIndex ¶
func (state *BeaconStateView) IncrementDepositIndex() error
func (*BeaconStateView) IncrementNextWithdrawalIndex ¶
func (state *BeaconStateView) IncrementNextWithdrawalIndex() error
func (*BeaconStateView) JustificationBits ¶
func (state *BeaconStateView) JustificationBits() (common.JustificationBits, error)
func (*BeaconStateView) LatestBlockHeader ¶
func (state *BeaconStateView) LatestBlockHeader() (*common.BeaconBlockHeader, error)
func (*BeaconStateView) LatestExecutionPayloadHeader ¶
func (state *BeaconStateView) LatestExecutionPayloadHeader() (*ExecutionPayloadHeaderView, error)
func (*BeaconStateView) NextSyncCommittee ¶
func (state *BeaconStateView) NextSyncCommittee() (*common.SyncCommitteeView, error)
func (*BeaconStateView) NextWithdrawalIndex ¶
func (state *BeaconStateView) NextWithdrawalIndex() (common.WithdrawalIndex, error)
func (*BeaconStateView) NextWithdrawalValidatorIndex ¶
func (state *BeaconStateView) NextWithdrawalValidatorIndex() (common.ValidatorIndex, error)
func (*BeaconStateView) PreviousEpochParticipation ¶
func (state *BeaconStateView) PreviousEpochParticipation() (*altair.ParticipationRegistryView, error)
func (*BeaconStateView) PreviousJustifiedCheckpoint ¶
func (state *BeaconStateView) PreviousJustifiedCheckpoint() (common.Checkpoint, error)
func (*BeaconStateView) ProcessBlock ¶
func (state *BeaconStateView) ProcessBlock(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, benv *common.BeaconBlockEnvelope) error
func (*BeaconStateView) ProcessEpoch ¶
func (state *BeaconStateView) ProcessEpoch(ctx context.Context, spec *common.Spec, epc *common.EpochsContext) error
func (*BeaconStateView) RandaoMixes ¶
func (state *BeaconStateView) RandaoMixes() (common.RandaoMixes, error)
func (*BeaconStateView) Raw ¶
func (state *BeaconStateView) Raw(spec *common.Spec) (*BeaconState, error)
Raw converts the tree-structured state into a flattened native Go structure.
func (*BeaconStateView) RotateSyncCommittee ¶
func (state *BeaconStateView) RotateSyncCommittee(next *common.SyncCommitteeView) error
func (*BeaconStateView) SeedRandao ¶
func (*BeaconStateView) SetBalances ¶
func (state *BeaconStateView) SetBalances(balances []common.Gwei) error
func (*BeaconStateView) SetCurrentJustifiedCheckpoint ¶
func (state *BeaconStateView) SetCurrentJustifiedCheckpoint(c common.Checkpoint) error
func (*BeaconStateView) SetCurrentSyncCommittee ¶
func (state *BeaconStateView) SetCurrentSyncCommittee(v *common.SyncCommitteeView) error
func (*BeaconStateView) SetEth1Data ¶
func (state *BeaconStateView) SetEth1Data(v common.Eth1Data) error
func (*BeaconStateView) SetFinalizedCheckpoint ¶
func (state *BeaconStateView) SetFinalizedCheckpoint(c common.Checkpoint) error
func (*BeaconStateView) SetGenesisTime ¶
func (state *BeaconStateView) SetGenesisTime(t common.Timestamp) error
func (*BeaconStateView) SetGenesisValidatorsRoot ¶
func (state *BeaconStateView) SetGenesisValidatorsRoot(r common.Root) error
func (*BeaconStateView) SetJustificationBits ¶
func (state *BeaconStateView) SetJustificationBits(bits common.JustificationBits) error
func (*BeaconStateView) SetLatestBlockHeader ¶
func (state *BeaconStateView) SetLatestBlockHeader(v *common.BeaconBlockHeader) error
func (*BeaconStateView) SetLatestExecutionPayloadHeader ¶
func (state *BeaconStateView) SetLatestExecutionPayloadHeader(h *ExecutionPayloadHeader) error
func (*BeaconStateView) SetNextSyncCommittee ¶
func (state *BeaconStateView) SetNextSyncCommittee(v *common.SyncCommitteeView) error
func (*BeaconStateView) SetNextWithdrawalIndex ¶
func (state *BeaconStateView) SetNextWithdrawalIndex(nextIndex common.WithdrawalIndex) error
func (*BeaconStateView) SetNextWithdrawalValidatorIndex ¶
func (state *BeaconStateView) SetNextWithdrawalValidatorIndex(nextValidator common.ValidatorIndex) error
func (*BeaconStateView) SetPreviousJustifiedCheckpoint ¶
func (state *BeaconStateView) SetPreviousJustifiedCheckpoint(c common.Checkpoint) error
func (*BeaconStateView) Slashings ¶
func (state *BeaconStateView) Slashings() (common.Slashings, error)
func (*BeaconStateView) StateRoots ¶
func (state *BeaconStateView) StateRoots() (common.BatchRoots, error)
func (*BeaconStateView) Validators ¶
func (state *BeaconStateView) Validators() (common.ValidatorRegistry, error)
type ExecutionEngine ¶
type ExecutionEngine interface { DenebNotifyNewPayload(ctx context.Context, executionPayload *ExecutionPayload, parentBeaconBlockRoot common.Root) (valid bool, err error) DenebIsValidVersionedHashes(ctx context.Context, payload *ExecutionPayload, versionedHashes []common.Hash32) (bool, error) DenebIsValidBlockHash(ctx context.Context, payload *ExecutionPayload, parentBeaconBlockRoot common.Root) (bool, error) }
type ExecutionPayload ¶
type ExecutionPayload struct { ParentHash common.Hash32 `json:"parent_hash" yaml:"parent_hash"` FeeRecipient common.Eth1Address `json:"fee_recipient" yaml:"fee_recipient"` StateRoot common.Bytes32 `json:"state_root" yaml:"state_root"` ReceiptsRoot common.Bytes32 `json:"receipts_root" yaml:"receipts_root"` LogsBloom common.LogsBloom `json:"logs_bloom" yaml:"logs_bloom"` PrevRandao common.Bytes32 `json:"prev_randao" yaml:"prev_randao"` BlockNumber Uint64View `json:"block_number" yaml:"block_number"` GasLimit Uint64View `json:"gas_limit" yaml:"gas_limit"` GasUsed Uint64View `json:"gas_used" yaml:"gas_used"` Timestamp common.Timestamp `json:"timestamp" yaml:"timestamp"` ExtraData common.ExtraData `json:"extra_data" yaml:"extra_data"` BaseFeePerGas Uint256View `json:"base_fee_per_gas" yaml:"base_fee_per_gas"` BlockHash common.Hash32 `json:"block_hash" yaml:"block_hash"` Transactions common.PayloadTransactions `json:"transactions" yaml:"transactions"` Withdrawals common.Withdrawals `json:"withdrawals" yaml:"withdrawals"` BlobGasUsed Uint64View `json:"blob_gas_used" yaml:"blob_gas_used"` ExcessBlobGas Uint64View `json:"excess_blob_gas" yaml:"excess_blob_gas"` }
func (*ExecutionPayload) ByteLength ¶
func (s *ExecutionPayload) ByteLength(spec *common.Spec) uint64
func (*ExecutionPayload) Deserialize ¶
func (s *ExecutionPayload) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*ExecutionPayload) FixedLength ¶
func (a *ExecutionPayload) FixedLength(*common.Spec) uint64
func (*ExecutionPayload) GetWitdrawals ¶
func (ep *ExecutionPayload) GetWitdrawals() []common.Withdrawal
func (*ExecutionPayload) HashTreeRoot ¶
func (*ExecutionPayload) Header ¶
func (ep *ExecutionPayload) Header(spec *common.Spec) *ExecutionPayloadHeader
func (*ExecutionPayload) Serialize ¶
func (s *ExecutionPayload) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
type ExecutionPayloadHeader ¶
type ExecutionPayloadHeader struct { ParentHash common.Hash32 `json:"parent_hash" yaml:"parent_hash"` FeeRecipient common.Eth1Address `json:"fee_recipient" yaml:"fee_recipient"` StateRoot common.Bytes32 `json:"state_root" yaml:"state_root"` ReceiptsRoot common.Bytes32 `json:"receipts_root" yaml:"receipts_root"` LogsBloom common.LogsBloom `json:"logs_bloom" yaml:"logs_bloom"` PrevRandao common.Bytes32 `json:"prev_randao" yaml:"prev_randao"` BlockNumber Uint64View `json:"block_number" yaml:"block_number"` GasLimit Uint64View `json:"gas_limit" yaml:"gas_limit"` GasUsed Uint64View `json:"gas_used" yaml:"gas_used"` Timestamp common.Timestamp `json:"timestamp" yaml:"timestamp"` ExtraData common.ExtraData `json:"extra_data" yaml:"extra_data"` BaseFeePerGas Uint256View `json:"base_fee_per_gas" yaml:"base_fee_per_gas"` BlockHash common.Hash32 `json:"block_hash" yaml:"block_hash"` TransactionsRoot common.Root `json:"transactions_root" yaml:"transactions_root"` WithdrawalsRoot common.Root `json:"withdrawals_root" yaml:"withdrawals_root"` BlobGasUsed Uint64View `json:"blob_gas_used" yaml:"blob_gas_used"` ExcessBlobGas Uint64View `json:"excess_blob_gas" yaml:"excess_blob_gas"` }
func (*ExecutionPayloadHeader) ByteLength ¶
func (s *ExecutionPayloadHeader) ByteLength() uint64
func (*ExecutionPayloadHeader) Deserialize ¶
func (s *ExecutionPayloadHeader) Deserialize(dr *codec.DecodingReader) error
func (*ExecutionPayloadHeader) FixedLength ¶
func (b *ExecutionPayloadHeader) FixedLength() uint64
func (*ExecutionPayloadHeader) HashTreeRoot ¶
func (s *ExecutionPayloadHeader) HashTreeRoot(hFn tree.HashFn) common.Root
func (*ExecutionPayloadHeader) Serialize ¶
func (s *ExecutionPayloadHeader) Serialize(w *codec.EncodingWriter) error
func (*ExecutionPayloadHeader) View ¶
func (s *ExecutionPayloadHeader) View() *ExecutionPayloadHeaderView
type ExecutionPayloadHeaderView ¶
type ExecutionPayloadHeaderView struct {
*ContainerView
}
func AsExecutionPayloadHeader ¶
func AsExecutionPayloadHeader(v View, err error) (*ExecutionPayloadHeaderView, error)
func (*ExecutionPayloadHeaderView) BaseFeePerGas ¶
func (v *ExecutionPayloadHeaderView) BaseFeePerGas() (Uint256View, error)
func (*ExecutionPayloadHeaderView) BlobGasUsed ¶ added in v0.32.0
func (v *ExecutionPayloadHeaderView) BlobGasUsed() (Uint64View, error)
func (*ExecutionPayloadHeaderView) BlockHash ¶
func (v *ExecutionPayloadHeaderView) BlockHash() (common.Hash32, error)
func (*ExecutionPayloadHeaderView) BlockNumber ¶
func (v *ExecutionPayloadHeaderView) BlockNumber() (Uint64View, error)
func (*ExecutionPayloadHeaderView) ExcessBlobGas ¶ added in v0.32.0
func (v *ExecutionPayloadHeaderView) ExcessBlobGas() (Uint64View, error)
func (*ExecutionPayloadHeaderView) FeeRecipient ¶
func (v *ExecutionPayloadHeaderView) FeeRecipient() (common.Eth1Address, error)
func (*ExecutionPayloadHeaderView) GasLimit ¶
func (v *ExecutionPayloadHeaderView) GasLimit() (Uint64View, error)
func (*ExecutionPayloadHeaderView) GasUsed ¶
func (v *ExecutionPayloadHeaderView) GasUsed() (Uint64View, error)
func (*ExecutionPayloadHeaderView) LogsBloom ¶
func (v *ExecutionPayloadHeaderView) LogsBloom() (*common.LogsBloom, error)
func (*ExecutionPayloadHeaderView) ParentHash ¶
func (v *ExecutionPayloadHeaderView) ParentHash() (common.Hash32, error)
func (*ExecutionPayloadHeaderView) Random ¶
func (v *ExecutionPayloadHeaderView) Random() (common.Bytes32, error)
func (*ExecutionPayloadHeaderView) Raw ¶
func (v *ExecutionPayloadHeaderView) Raw() (*ExecutionPayloadHeader, error)
func (*ExecutionPayloadHeaderView) ReceiptRoot ¶
func (v *ExecutionPayloadHeaderView) ReceiptRoot() (common.Bytes32, error)
func (*ExecutionPayloadHeaderView) StateRoot ¶
func (v *ExecutionPayloadHeaderView) StateRoot() (common.Bytes32, error)
func (*ExecutionPayloadHeaderView) Timestamp ¶
func (v *ExecutionPayloadHeaderView) Timestamp() (common.Timestamp, error)
func (*ExecutionPayloadHeaderView) TransactionsRoot ¶
func (v *ExecutionPayloadHeaderView) TransactionsRoot() (common.Root, error)
type ExecutionPayloadView ¶
type ExecutionPayloadView struct {
*ContainerView
}
func AsExecutionPayload ¶
func AsExecutionPayload(v View, err error) (*ExecutionPayloadView, error)
type ExecutionTrackingBeaconState ¶
type ExecutionTrackingBeaconState interface { common.BeaconState LatestExecutionPayloadHeader() (*ExecutionPayloadHeaderView, error) SetLatestExecutionPayloadHeader(h *ExecutionPayloadHeader) error }
type KZGCommitments ¶
type KZGCommitments []common.KZGCommitment
func (KZGCommitments) ByteLength ¶
func (li KZGCommitments) ByteLength(_ *common.Spec) (out uint64)
func (*KZGCommitments) Deserialize ¶
func (li *KZGCommitments) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*KZGCommitments) FixedLength ¶
func (*KZGCommitments) FixedLength(*common.Spec) uint64
func (KZGCommitments) HashTreeRoot ¶
func (KZGCommitments) MarshalJSON ¶ added in v0.32.1
func (li KZGCommitments) MarshalJSON() ([]byte, error)
func (KZGCommitments) Serialize ¶
func (li KZGCommitments) Serialize(_ *common.Spec, w *codec.EncodingWriter) error
type NewPayloadRequest ¶ added in v0.32.0
type NewPayloadRequest struct { ExecutionPayload *ExecutionPayload VersionedHashes []common.Hash32 ParentBeaconBlockRoot common.Root }
type SignedBeaconBlock ¶
type SignedBeaconBlock struct { Message BeaconBlock `json:"message" yaml:"message"` Signature common.BLSSignature `json:"signature" yaml:"signature"` }
func (*SignedBeaconBlock) ByteLength ¶
func (b *SignedBeaconBlock) ByteLength(spec *common.Spec) uint64
func (*SignedBeaconBlock) Deserialize ¶
func (b *SignedBeaconBlock) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*SignedBeaconBlock) Envelope ¶
func (b *SignedBeaconBlock) Envelope(spec *common.Spec, digest common.ForkDigest) *common.BeaconBlockEnvelope
func (*SignedBeaconBlock) FixedLength ¶
func (a *SignedBeaconBlock) FixedLength(*common.Spec) uint64
func (*SignedBeaconBlock) HashTreeRoot ¶
func (*SignedBeaconBlock) Serialize ¶
func (b *SignedBeaconBlock) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
func (*SignedBeaconBlock) SignedHeader ¶
func (block *SignedBeaconBlock) SignedHeader(spec *common.Spec) *common.SignedBeaconBlockHeader
Click to show internal directories.
Click to hide internal directories.