Documentation ¶
Index ¶
- Constants
- Variables
- func AttestationType(spec *common.Spec) *ContainerTypeDef
- func AttesterSlashingType(spec *common.Spec) *ContainerTypeDef
- func BeaconBlockBodyType(spec *common.Spec) *ContainerTypeDef
- func BeaconBlockType(spec *common.Spec) *ContainerTypeDef
- func BeaconStateType(spec *common.Spec) *ContainerTypeDef
- func BlockAttestationsType(spec *common.Spec) ListTypeDef
- func BlockAttesterSlashingsType(spec *common.Spec) ListTypeDef
- func BlockShardHeadersType(spec *common.Spec) ListTypeDef
- func BlockShardProposerSlashingsType(spec *common.Spec) ListTypeDef
- func BuilderRegistryBalancesType(spec *common.Spec) *BasicListTypeDef
- func BuildersRegistryType(spec *common.Spec) ListTypeDef
- func ClassicProcessAttestation(spec *common.Spec, epc *common.EpochsContext, state *BeaconStateView, ...) error
- func ComputeCommitteeIndexFromShard(spec *common.Spec, epc *common.EpochsContext, slot common.Slot, ...) (common.CommitteeIndex, error)
- func DataCommitmentsEpochTableType(spec *common.Spec) *ComplexVectorTypeDef
- func DataCommitmentsSlotVecType(spec *common.Spec) *ComplexVectorTypeDef
- func GetApplicableAttestationParticipationFlags(spec *common.Spec, state altair.AltairLikeBeaconState, data *AttestationData, ...) (out altair.ParticipationFlags, err error)
- func IndexedAttestationType(spec *common.Spec) *ContainerTypeDef
- func IsDoubleVote(a *AttestationData, b *AttestationData) bool
- func IsSlashableAttestationData(a *AttestationData, b *AttestationData) bool
- func IsSurroundVote(a *AttestationData, b *AttestationData) bool
- func PendingShardHeaderType(spec *common.Spec) *ContainerTypeDef
- func PendingShardHeadersType(spec *common.Spec) *ComplexListTypeDef
- func ProcessAttestation(spec *common.Spec, epc *common.EpochsContext, state *BeaconStateView, ...) error
- func ProcessAttestations(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, ...) error
- func ProcessAttestedShardWork(spec *common.Spec, epc *common.EpochsContext, state *BeaconStateView, ...) error
- func ProcessAttesterSlashing(spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, ...) error
- func ProcessAttesterSlashings(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, ...) error
- func ProcessEpochRewardsAndPenalties(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, ...) error
- func ProcessPendingShardConfirmations(ctx context.Context, spec *common.Spec, state *BeaconStateView) error
- func ProcessShardHeader(spec *common.Spec, epc *common.EpochsContext, state *BeaconStateView, ...) error
- func ProcessShardHeaders(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, ...) error
- func ProcessShardProposerSlashing(spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, ...) error
- func ProcessShardProposerSlashings(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, ...) error
- func ResetPendingShardWork(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, ...) error
- func ShardBlobBodyType(spec *common.Spec) *ContainerTypeDef
- func ShardBlobType(spec *common.Spec) *ContainerTypeDef
- func ShardBufferType(spec *common.Spec) *ComplexVectorTypeDef
- func ShardColumnType(spec *common.Spec) *ComplexListTypeDef
- func ShardDataType(spec *common.Spec) ListTypeDef
- func ShardWorkStatusType(spec *common.Spec) *UnionTypeDef
- func ShardWorkType(spec *common.Spec) *ContainerTypeDef
- func SignedBeaconBlockType(spec *common.Spec) *ContainerTypeDef
- func SignedShardBlobType(spec *common.Spec) *ContainerTypeDef
- func ValidateIndexedAttestation(spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, ...) error
- func ValidateIndexedAttestationIndicesSet(spec *common.Spec, indexedAttestation *IndexedAttestation) (common.ValidatorSet, error)
- func ValidateIndexedAttestationNoSignature(spec *common.Spec, state common.BeaconState, ...) error
- func ValidateIndexedAttestationSignature(spec *common.Spec, dom common.BLSDomain, pubCache *common.PubkeyCache, ...) error
- type Attestation
- func (a *Attestation) ByteLength(spec *common.Spec) uint64
- func (attestation *Attestation) ConvertToIndexed(spec *common.Spec, committee []common.ValidatorIndex) (*IndexedAttestation, error)
- func (a *Attestation) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (a *Attestation) FixedLength(*common.Spec) uint64
- func (a *Attestation) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (a *Attestation) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- type AttestationData
- func (a *AttestationData) ByteLength() uint64
- func (a *AttestationData) Deserialize(dr *codec.DecodingReader) error
- func (*AttestationData) FixedLength() uint64
- func (p *AttestationData) HashTreeRoot(hFn tree.HashFn) common.Root
- func (a *AttestationData) Serialize(w *codec.EncodingWriter) error
- func (data *AttestationData) View() *AttestationDataView
- type AttestationDataView
- type Attestations
- func (a Attestations) ByteLength(spec *common.Spec) (out uint64)
- func (a *Attestations) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (a *Attestations) FixedLength(*common.Spec) uint64
- func (li Attestations) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (a Attestations) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- type AttestedDataCommitment
- func (ad *AttestedDataCommitment) ByteLength() uint64
- func (ad *AttestedDataCommitment) Deserialize(dr *codec.DecodingReader) error
- func (ad *AttestedDataCommitment) FixedLength() uint64
- func (ad *AttestedDataCommitment) HashTreeRoot(hFn tree.HashFn) common.Root
- func (ad *AttestedDataCommitment) Serialize(w *codec.EncodingWriter) error
- func (ad *AttestedDataCommitment) View() *DataCommitmentView
- type AttestedDataCommitmentView
- func (v *AttestedDataCommitmentView) Commitment() (*DataCommitmentView, error)
- func (v *AttestedDataCommitmentView) IncluderIndex() (common.ValidatorIndex, error)
- func (v *AttestedDataCommitmentView) Raw() (*AttestedDataCommitment, error)
- func (v *AttestedDataCommitmentView) Root() (common.Root, error)
- type AttesterSlashing
- func (a *AttesterSlashing) ByteLength(spec *common.Spec) uint64
- func (a *AttesterSlashing) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (a *AttesterSlashing) FixedLength(*common.Spec) uint64
- func (a *AttesterSlashing) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (a *AttesterSlashing) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- type AttesterSlashings
- func (a AttesterSlashings) ByteLength(spec *common.Spec) (out uint64)
- func (a *AttesterSlashings) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (a *AttesterSlashings) FixedLength(*common.Spec) uint64
- func (li AttesterSlashings) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (a AttesterSlashings) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- type BLSCommitment
- 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) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (b *BeaconBlockBody) Serialize(spec *common.Spec, w *codec.EncodingWriter) 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) BlobBuilderBalances() (common.BuilderBalancesRegistry, error)
- func (state *BeaconStateView) BlobBuilders() (common.BuilderRegistry, 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) InactivityScores() (*altair.InactivityScoresView, error)
- func (state *BeaconStateView) IncrementDepositIndex() error
- func (state *BeaconStateView) IsExecutionEnabled(spec *common.Spec, block *BeaconBlock) (bool, error)
- func (state *BeaconStateView) IsTransitionBlock(spec *common.Spec, block *BeaconBlock) (bool, error)
- func (state *BeaconStateView) IsTransitionCompleted() (bool, error)
- func (state *BeaconStateView) JustificationBits() (common.JustificationBits, error)
- func (state *BeaconStateView) LatestBlockHeader() (*common.BeaconBlockHeader, error)
- func (state *BeaconStateView) LatestExecutionPayloadHeader() (*common.ExecutionPayloadHeaderView, error)
- func (state *BeaconStateView) NextSyncCommittee() (*common.SyncCommitteeView, 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 *common.ExecutionPayloadHeader) error
- func (state *BeaconStateView) SetNextSyncCommittee(v *common.SyncCommitteeView) error
- func (state *BeaconStateView) SetPreviousJustifiedCheckpoint(c common.Checkpoint) error
- func (state *BeaconStateView) SetShardGasPrice(price common.Gwei) error
- func (state *BeaconStateView) SetSlot(slot common.Slot) error
- func (state *BeaconStateView) ShardBuffer() (*ShardBufferView, error)
- func (state *BeaconStateView) ShardSamplePrice() (common.Gwei, 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 Builder
- type BuilderBalances
- func (a BuilderBalances) ByteLength(spec *common.Spec) (out uint64)
- func (a *BuilderBalances) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (a *BuilderBalances) FixedLength(spec *common.Spec) uint64
- func (li BuilderBalances) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (a BuilderBalances) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- func (li BuilderBalances) View(limit uint64) (*BuilderRegistryBalancesView, error)
- type BuilderRegistry
- func (a BuilderRegistry) ByteLength(spec *common.Spec) (out uint64)
- func (a *BuilderRegistry) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (a *BuilderRegistry) FixedLength(spec *common.Spec) uint64
- func (li BuilderRegistry) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (a BuilderRegistry) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- type BuilderRegistryBalancesView
- func (v *BuilderRegistryBalancesView) AllBalances() ([]common.Gwei, error)
- func (v *BuilderRegistryBalancesView) AppendBalance(bal common.Gwei) error
- func (v *BuilderRegistryBalancesView) GetBalance(index common.BuilderIndex) (common.Gwei, error)
- func (v *BuilderRegistryBalancesView) Iter() (next func() (bal common.Gwei, ok bool, err error))
- func (v *BuilderRegistryBalancesView) SetBalance(index common.BuilderIndex, bal common.Gwei) error
- type BuilderView
- type BuildersRegistryView
- func (registry *BuildersRegistryView) Builder(index common.BuilderIndex) (common.Builder, error)
- func (registry *BuildersRegistryView) BuilderCount() (uint64, error)
- func (registry *BuildersRegistryView) IsValidIndex(index common.BuilderIndex) (valid bool, err error)
- func (registry *BuildersRegistryView) Iter() (next func() (val common.Builder, ok bool, err error))
- type DataCommitment
- func (a *DataCommitment) ByteLength() uint64
- func (d *DataCommitment) Deserialize(dr *codec.DecodingReader) error
- func (a *DataCommitment) FixedLength() uint64
- func (d *DataCommitment) HashTreeRoot(hFn tree.HashFn) common.Root
- func (d *DataCommitment) Serialize(w *codec.EncodingWriter) error
- func (d *DataCommitment) View() *DataCommitmentView
- type DataCommitmentView
- type DataCommitmentsEpochTable
- type DataCommitmentsSlotVec
- type EpochAttesterData
- type IndexedAttestation
- func (a *IndexedAttestation) ByteLength(spec *common.Spec) uint64
- func (p *IndexedAttestation) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (*IndexedAttestation) FixedLength(*common.Spec) uint64
- func (p *IndexedAttestation) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (a *IndexedAttestation) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- type PendingShardHeader
- func (h *PendingShardHeader) ByteLength(spec *common.Spec) uint64
- func (h *PendingShardHeader) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (h *PendingShardHeader) FixedLength(spec *common.Spec) uint64
- func (h *PendingShardHeader) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (h *PendingShardHeader) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- func (h *PendingShardHeader) View(spec *common.Spec) *PendingShardHeaderView
- type PendingShardHeaderView
- func (v *PendingShardHeaderView) Attested() (*AttestedDataCommitmentView, error)
- func (v *PendingShardHeaderView) SetUpdateSlot(slot common.Slot) error
- func (v *PendingShardHeaderView) SetVotes(bits *phase0.AttestationBitsView) error
- func (v *PendingShardHeaderView) SetWeight(w common.Gwei) error
- func (v *PendingShardHeaderView) UpdateSlot() (common.Slot, error)
- func (v *PendingShardHeaderView) Votes() (*phase0.AttestationBitsView, error)
- func (v *PendingShardHeaderView) Weight() (common.Gwei, error)
- type PendingShardHeaders
- func (hl PendingShardHeaders) ByteLength(spec *common.Spec) (out uint64)
- func (hl *PendingShardHeaders) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (hl *PendingShardHeaders) FixedLength(*common.Spec) uint64
- func (hl PendingShardHeaders) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (hl PendingShardHeaders) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- func (hl PendingShardHeaders) View(spec *common.Spec) (*PendingShardHeadersView, error)
- type PendingShardHeadersView
- type RegistryIndices
- func (a RegistryIndices) ByteLength(spec *common.Spec) uint64
- func (p *RegistryIndices) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (*RegistryIndices) FixedLength() uint64
- func (p RegistryIndices) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (a RegistryIndices) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- type ShardBlob
- func (b *ShardBlob) ByteLength(spec *common.Spec) uint64
- func (b *ShardBlob) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (*ShardBlob) FixedLength(spec *common.Spec) uint64
- func (b *ShardBlob) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (b *ShardBlob) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- type ShardBlobBody
- func (b *ShardBlobBody) ByteLength(spec *common.Spec) uint64
- func (b *ShardBlobBody) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (b *ShardBlobBody) FixedLength(spec *common.Spec) uint64
- func (b *ShardBlobBody) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (b *ShardBlobBody) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- type ShardBlobBodySummary
- func (a *ShardBlobBodySummary) ByteLength() uint64
- func (d *ShardBlobBodySummary) Deserialize(dr *codec.DecodingReader) error
- func (a *ShardBlobBodySummary) FixedLength() uint64
- func (d *ShardBlobBodySummary) HashTreeRoot(hFn tree.HashFn) common.Root
- func (d *ShardBlobBodySummary) Serialize(w *codec.EncodingWriter) error
- type ShardBlobHeader
- type ShardBlobReference
- func (v *ShardBlobReference) ByteLength() uint64
- func (v *ShardBlobReference) Deserialize(dr *codec.DecodingReader) error
- func (*ShardBlobReference) FixedLength() uint64
- func (v *ShardBlobReference) HashTreeRoot(hFn tree.HashFn) common.Root
- func (v *ShardBlobReference) Serialize(w *codec.EncodingWriter) error
- type ShardBuffer
- func (a ShardBuffer) ByteLength(spec *common.Spec) (out uint64)
- func (li *ShardBuffer) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (a *ShardBuffer) FixedLength(spec *common.Spec) uint64
- func (li ShardBuffer) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (a ShardBuffer) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- type ShardBufferView
- type ShardColumn
- func (sc ShardColumn) ByteLength(spec *common.Spec) (out uint64)
- func (sc *ShardColumn) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (sc *ShardColumn) FixedLength(*common.Spec) uint64
- func (sc ShardColumn) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (sc ShardColumn) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- func (sc ShardColumn) View(spec *common.Spec) (*ShardColumnView, error)
- type ShardColumnView
- type ShardData
- func (d ShardData) ByteLength(spec *common.Spec) (out uint64)
- func (d *ShardData) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (d *ShardData) FixedLength(spec *common.Spec) uint64
- func (d ShardData) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (d ShardData) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- type ShardHeaders
- func (a ShardHeaders) ByteLength(*common.Spec) (out uint64)
- func (a *ShardHeaders) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (a *ShardHeaders) FixedLength(*common.Spec) uint64
- func (li ShardHeaders) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (a ShardHeaders) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- type ShardProposerSlashing
- func (v *ShardProposerSlashing) ByteLength() uint64
- func (v *ShardProposerSlashing) Deserialize(dr *codec.DecodingReader) error
- func (*ShardProposerSlashing) FixedLength() uint64
- func (v *ShardProposerSlashing) HashTreeRoot(hFn tree.HashFn) common.Root
- func (v *ShardProposerSlashing) Serialize(w *codec.EncodingWriter) error
- type ShardProposerSlashings
- func (a ShardProposerSlashings) ByteLength(*common.Spec) (out uint64)
- func (a *ShardProposerSlashings) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (a *ShardProposerSlashings) FixedLength(*common.Spec) uint64
- func (li ShardProposerSlashings) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (a ShardProposerSlashings) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- type ShardWork
- func (h *ShardWork) ByteLength(spec *common.Spec) uint64
- func (h *ShardWork) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (h *ShardWork) FixedLength(spec *common.Spec) uint64
- func (h *ShardWork) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (h *ShardWork) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- func (h *ShardWork) View(spec *common.Spec) (*ShardWorkView, error)
- type ShardWorkStatus
- func (h *ShardWorkStatus) ByteLength(spec *common.Spec) uint64
- func (h *ShardWorkStatus) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (h *ShardWorkStatus) FixedLength(spec *common.Spec) uint64
- func (h *ShardWorkStatus) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (h *ShardWorkStatus) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- func (h *ShardWorkStatus) UnmarshalJSON(b []byte) error
- func (h *ShardWorkStatus) UnmarshalYAML(value *yaml.Node) error
- func (h *ShardWorkStatus) View(spec *common.Spec) (*ShardWorkStatusView, error)
- type ShardWorkStatusView
- type ShardWorkView
- 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
- type SignedShardBlob
- func (b *SignedShardBlob) ByteLength(spec *common.Spec) uint64
- func (b *SignedShardBlob) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (*SignedShardBlob) FixedLength(spec *common.Spec) uint64
- func (b *SignedShardBlob) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (b *SignedShardBlob) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- type SignedShardBlobHeader
- func (v *SignedShardBlobHeader) ByteLength() uint64
- func (v *SignedShardBlobHeader) Deserialize(dr *codec.DecodingReader) error
- func (*SignedShardBlobHeader) FixedLength() uint64
- func (v *SignedShardBlobHeader) HashTreeRoot(hFn tree.HashFn) common.Root
- func (v *SignedShardBlobHeader) Serialize(w *codec.EncodingWriter) error
- type SignedShardBlobReference
- func (v *SignedShardBlobReference) ByteLength() uint64
- func (v *SignedShardBlobReference) Deserialize(dr *codec.DecodingReader) error
- func (*SignedShardBlobReference) FixedLength() uint64
- func (v *SignedShardBlobReference) HashTreeRoot(hFn tree.HashFn) common.Root
- func (v *SignedShardBlobReference) Serialize(w *codec.EncodingWriter) error
Constants ¶
View Source
const POINTS_PER_SAMPLE = 8
View Source
const SHARD_WORK_CONFIRMED = 1
View Source
const SHARD_WORK_PENDING = 2
View Source
const SHARD_WORK_UNCONFIRMED = 0
View Source
const TIMELY_SHARD_FLAG altair.ParticipationFlags = 1 << TIMELY_SHARD_FLAG_INDEX
View Source
const TIMELY_SHARD_FLAG_INDEX uint8 = 3
Variables ¶
View Source
var AttestationDataType = ContainerType("AttestationData", []FieldDef{ {"slot", common.SlotType}, {"index", common.CommitteeIndexType}, {"beacon_block_root", RootType}, {"source", common.CheckpointType}, {"target", common.CheckpointType}, {"shard_header_root", RootType}, })
View Source
var AttestedDataCommitmentType = ContainerType("AttestedDataCommitment", []FieldDef{ {"commitment", DataCommitmentType}, {"root", RootType}, {"includer_index", common.ValidatorIndexType}, })
View Source
var BLSCommitmentType = common.BLSPubkeyType
View Source
var BuilderType = ContainerType("Builder", []FieldDef{ {"pubkey", common.BLSPubkeyType}, })
View Source
var DataCommitmentType = ContainerType("DataCommitment", []FieldDef{ {"point", BLSCommitmentType}, {"length", Uint64Type}, })
View Source
var ShardBlobBodySummaryType = ContainerType("ShardBlobBodySummary", []FieldDef{ {"commitment", DataCommitmentType}, {"degree_proof", BLSCommitmentType}, {"data_root", RootType}, {"max_priority_fee_per_sample", common.GweiType}, {"max_fee_per_sample", common.GweiType}, })
View Source
var ShardBlobHeaderType = ContainerType("ShardBlobHeader", []FieldDef{ {"slot", common.SlotType}, {"shard", common.ShardType}, {"builder_index", common.BuilderIndexType}, {"proposer_index", common.ValidatorIndexType}, {"body_summary", ShardBlobBodySummaryType}, })
View Source
var ShardBlobReferenceType = ContainerType("ShardBlobReference", []FieldDef{ {"slot", common.SlotType}, {"shard", common.ShardType}, {"body_root", RootType}, {"proposer_index", common.ValidatorIndexType}, })
View Source
var ShardProposerSlashingType = ContainerType("ShardProposerSlashing", []FieldDef{ {"signed_reference_1", SignedShardBlobReferenceType}, {"signed_reference_2", SignedShardBlobReferenceType}, })
View Source
var SignedShardBlobHeaderType = ContainerType("SignedShardBlobHeader", []FieldDef{ {"message", ShardBlobHeaderType}, {"signature", common.BLSSignatureType}, })
View Source
var SignedShardBlobReferenceType = ContainerType("SignedShardBlobReference", []FieldDef{ {"message", ShardBlobReferenceType}, {"signature", common.BLSSignatureType}, })
Functions ¶
func AttestationType ¶
func AttesterSlashingType ¶ added in v0.16.1
func BeaconBlockBodyType ¶
func BeaconBlockType ¶
func BeaconStateType ¶
func BlockAttestationsType ¶
func BlockAttesterSlashingsType ¶ added in v0.16.1
func BlockShardHeadersType ¶
func BuilderRegistryBalancesType ¶ added in v0.19.0
func BuildersRegistryType ¶ added in v0.19.0
func ClassicProcessAttestation ¶ added in v0.16.1
func ClassicProcessAttestation(spec *common.Spec, epc *common.EpochsContext, state *BeaconStateView, attestation *Attestation) error
func GetApplicableAttestationParticipationFlags ¶ added in v0.19.0
func GetApplicableAttestationParticipationFlags( spec *common.Spec, state altair.AltairLikeBeaconState, data *AttestationData, inclusionDelay common.Slot) (out altair.ParticipationFlags, err error)
func IndexedAttestationType ¶ added in v0.16.1
func IsDoubleVote ¶ added in v0.16.1
func IsDoubleVote(a *AttestationData, b *AttestationData) bool
Check if a and b have the same target epoch.
func IsSlashableAttestationData ¶ added in v0.16.1
func IsSlashableAttestationData(a *AttestationData, b *AttestationData) bool
func IsSurroundVote ¶ added in v0.16.1
func IsSurroundVote(a *AttestationData, b *AttestationData) bool
Check if a surrounds b, i.E. source(a) < source(b) and target(a) > target(b)
func PendingShardHeaderType ¶
func PendingShardHeadersType ¶
func ProcessAttestation ¶
func ProcessAttestation(spec *common.Spec, epc *common.EpochsContext, state *BeaconStateView, attestation *Attestation) error
func ProcessAttestations ¶
func ProcessAttestations(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, state *BeaconStateView, ops []Attestation) error
func ProcessAttestedShardWork ¶ added in v0.19.0
func ProcessAttestedShardWork(spec *common.Spec, epc *common.EpochsContext, state *BeaconStateView, attestation *Attestation) error
func ProcessAttesterSlashing ¶ added in v0.16.1
func ProcessAttesterSlashing(spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, attesterSlashing *AttesterSlashing) error
func ProcessAttesterSlashings ¶ added in v0.16.1
func ProcessAttesterSlashings(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, ops []AttesterSlashing) error
func ProcessEpochRewardsAndPenalties ¶ added in v0.19.0
func ProcessEpochRewardsAndPenalties(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, attesterData *altair.EpochAttesterData, state *BeaconStateView) error
func ProcessShardHeader ¶
func ProcessShardHeader(spec *common.Spec, epc *common.EpochsContext, state *BeaconStateView, signedHeader *SignedShardBlobHeader) error
func ProcessShardHeaders ¶
func ProcessShardHeaders(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, state *BeaconStateView, ops []SignedShardBlobHeader) error
func ProcessShardProposerSlashing ¶
func ProcessShardProposerSlashing(spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, proposerSlashing *ShardProposerSlashing) error
func ProcessShardProposerSlashings ¶
func ProcessShardProposerSlashings(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, ops []ShardProposerSlashing) error
func ResetPendingShardWork ¶
func ResetPendingShardWork(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, state *BeaconStateView) error
func ShardBlobBodyType ¶ added in v0.16.1
func ShardBlobType ¶ added in v0.16.1
func ShardBufferType ¶
func ShardColumnType ¶
func ShardDataType ¶ added in v0.16.1
func ShardWorkStatusType ¶
func ShardWorkType ¶
func SignedBeaconBlockType ¶
func SignedShardBlobType ¶ added in v0.16.1
func ValidateIndexedAttestation ¶ added in v0.16.1
func ValidateIndexedAttestation(spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, indexedAttestation *IndexedAttestation) error
Verify validity of slashable_attestation fields.
func ValidateIndexedAttestationIndicesSet ¶ added in v0.16.1
func ValidateIndexedAttestationIndicesSet(spec *common.Spec, indexedAttestation *IndexedAttestation) (common.ValidatorSet, error)
func ValidateIndexedAttestationNoSignature ¶ added in v0.16.1
func ValidateIndexedAttestationNoSignature(spec *common.Spec, state common.BeaconState, indexedAttestation *IndexedAttestation) error
func ValidateIndexedAttestationSignature ¶ added in v0.16.1
func ValidateIndexedAttestationSignature(spec *common.Spec, dom common.BLSDomain, pubCache *common.PubkeyCache, indexedAttestation *IndexedAttestation) error
Types ¶
type Attestation ¶
type Attestation struct { AggregationBits phase0.AttestationBits `json:"aggregation_bits" yaml:"aggregation_bits"` Data AttestationData `json:"data" yaml:"data"` Signature common.BLSSignature `json:"signature" yaml:"signature"` }
func (*Attestation) ByteLength ¶
func (a *Attestation) ByteLength(spec *common.Spec) uint64
func (*Attestation) ConvertToIndexed ¶ added in v0.16.1
func (attestation *Attestation) ConvertToIndexed(spec *common.Spec, committee []common.ValidatorIndex) (*IndexedAttestation, error)
Convert attestation to (almost) indexed-verifiable form
func (*Attestation) Deserialize ¶
func (a *Attestation) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*Attestation) FixedLength ¶
func (a *Attestation) FixedLength(*common.Spec) uint64
func (*Attestation) HashTreeRoot ¶
func (*Attestation) Serialize ¶
func (a *Attestation) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
type AttestationData ¶
type AttestationData struct { Slot common.Slot `json:"slot" yaml:"slot"` Index common.CommitteeIndex `json:"index" yaml:"index"` // LMD GHOST vote BeaconBlockRoot common.Root `json:"beacon_block_root" yaml:"beacon_block_root"` // FFG vote Source common.Checkpoint `json:"source" yaml:"source"` Target common.Checkpoint `json:"target" yaml:"target"` // Shard header root ShardBlobRoot common.Root `json:"shard_blob_root" yaml:"shard_blob_root"` }
func (*AttestationData) ByteLength ¶
func (a *AttestationData) ByteLength() uint64
func (*AttestationData) Deserialize ¶
func (a *AttestationData) Deserialize(dr *codec.DecodingReader) error
func (*AttestationData) FixedLength ¶
func (*AttestationData) FixedLength() uint64
func (*AttestationData) HashTreeRoot ¶
func (p *AttestationData) HashTreeRoot(hFn tree.HashFn) common.Root
func (*AttestationData) Serialize ¶
func (a *AttestationData) Serialize(w *codec.EncodingWriter) error
func (*AttestationData) View ¶
func (data *AttestationData) View() *AttestationDataView
type AttestationDataView ¶
type AttestationDataView struct{ *ContainerView }
func AsAttestationData ¶
func AsAttestationData(v View, err error) (*AttestationDataView, error)
func (*AttestationDataView) Raw ¶
func (v *AttestationDataView) Raw() (*AttestationData, error)
type Attestations ¶
type Attestations []Attestation
func (Attestations) ByteLength ¶
func (a Attestations) ByteLength(spec *common.Spec) (out uint64)
func (*Attestations) Deserialize ¶
func (a *Attestations) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*Attestations) FixedLength ¶
func (a *Attestations) FixedLength(*common.Spec) uint64
func (Attestations) HashTreeRoot ¶
func (Attestations) Serialize ¶
func (a Attestations) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
type AttestedDataCommitment ¶ added in v0.19.0
type AttestedDataCommitment struct { // KZG10 commitment to the data, and length Commitment DataCommitment `json:"commitment" yaml:"commitment"` // hash_tree_root of the ShardBlobHeader (stored so that attestations can be checked against it) Root common.Root `json:"root" yaml:"root"` // The proposer who included the shard-header IncluderIndex common.ValidatorIndex `json:"includer_index" yaml:"includer_index"` }
func (*AttestedDataCommitment) ByteLength ¶ added in v0.19.0
func (ad *AttestedDataCommitment) ByteLength() uint64
func (*AttestedDataCommitment) Deserialize ¶ added in v0.19.0
func (ad *AttestedDataCommitment) Deserialize(dr *codec.DecodingReader) error
func (*AttestedDataCommitment) FixedLength ¶ added in v0.19.0
func (ad *AttestedDataCommitment) FixedLength() uint64
func (*AttestedDataCommitment) HashTreeRoot ¶ added in v0.19.0
func (ad *AttestedDataCommitment) HashTreeRoot(hFn tree.HashFn) common.Root
func (*AttestedDataCommitment) Serialize ¶ added in v0.19.0
func (ad *AttestedDataCommitment) Serialize(w *codec.EncodingWriter) error
func (*AttestedDataCommitment) View ¶ added in v0.19.0
func (ad *AttestedDataCommitment) View() *DataCommitmentView
type AttestedDataCommitmentView ¶ added in v0.19.0
type AttestedDataCommitmentView struct {
*ContainerView
}
func AsAttestedDataCommitment ¶ added in v0.19.0
func AsAttestedDataCommitment(v View, err error) (*AttestedDataCommitmentView, error)
func (*AttestedDataCommitmentView) Commitment ¶ added in v0.19.0
func (v *AttestedDataCommitmentView) Commitment() (*DataCommitmentView, error)
func (*AttestedDataCommitmentView) IncluderIndex ¶ added in v0.19.0
func (v *AttestedDataCommitmentView) IncluderIndex() (common.ValidatorIndex, error)
func (*AttestedDataCommitmentView) Raw ¶ added in v0.19.0
func (v *AttestedDataCommitmentView) Raw() (*AttestedDataCommitment, error)
type AttesterSlashing ¶ added in v0.16.1
type AttesterSlashing struct { Attestation1 IndexedAttestation `json:"attestation_1" yaml:"attestation_1"` Attestation2 IndexedAttestation `json:"attestation_2" yaml:"attestation_2"` }
func (*AttesterSlashing) ByteLength ¶ added in v0.16.1
func (a *AttesterSlashing) ByteLength(spec *common.Spec) uint64
func (*AttesterSlashing) Deserialize ¶ added in v0.16.1
func (a *AttesterSlashing) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*AttesterSlashing) FixedLength ¶ added in v0.16.1
func (a *AttesterSlashing) FixedLength(*common.Spec) uint64
func (*AttesterSlashing) HashTreeRoot ¶ added in v0.16.1
func (*AttesterSlashing) Serialize ¶ added in v0.16.1
func (a *AttesterSlashing) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
type AttesterSlashings ¶ added in v0.16.1
type AttesterSlashings []AttesterSlashing
func (AttesterSlashings) ByteLength ¶ added in v0.16.1
func (a AttesterSlashings) ByteLength(spec *common.Spec) (out uint64)
func (*AttesterSlashings) Deserialize ¶ added in v0.16.1
func (a *AttesterSlashings) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*AttesterSlashings) FixedLength ¶ added in v0.16.1
func (a *AttesterSlashings) FixedLength(*common.Spec) uint64
func (AttesterSlashings) HashTreeRoot ¶ added in v0.16.1
func (AttesterSlashings) Serialize ¶ added in v0.16.1
func (a AttesterSlashings) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
type BLSCommitment ¶
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 AttesterSlashings `json:"attester_slashings" yaml:"attester_slashings"` Attestations 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 common.ExecutionPayload `json:"execution_payload" yaml:"execution_payload"` ShardProposerSlashings ShardProposerSlashings `json:"shard_proposer_slashings" yaml:"shard_proposer_slashings"` ShardHeaders ShardHeaders `json:"shard_headers" yaml:"shard_headers"` }
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) HashTreeRoot ¶
func (*BeaconBlockBody) Serialize ¶
func (b *BeaconBlockBody) Serialize(spec *common.Spec, w *codec.EncodingWriter) 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"` // 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 LatestExecutionPayloadHeader common.ExecutionPayloadHeader `json:"latest_execution_payload_header" yaml:"latest_execution_payload_header"` // Blob builder registry. BlobBuilders BuilderRegistry `json:"blob_builders" yaml:"blob_builders"` BlobBuilderBalances BuilderBalances `json:"blob_builder_balances" yaml:"blob_builder_balances"` // A ring buffer of the latest slots, with information per active shard. ShardBuffer ShardBuffer `json:"shard_buffer" yaml:"shard_buffer"` ShardSamplePrice Uint64View `json:"shard_sample_price" yaml:"shard_sample_price"` }
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 (*BeaconStateView) AddValidator ¶
func (*BeaconStateView) Balances ¶
func (state *BeaconStateView) Balances() (common.BalancesRegistry, error)
func (*BeaconStateView) BlobBuilderBalances ¶ added in v0.19.0
func (state *BeaconStateView) BlobBuilderBalances() (common.BuilderBalancesRegistry, error)
func (*BeaconStateView) BlobBuilders ¶ added in v0.19.0
func (state *BeaconStateView) BlobBuilders() (common.BuilderRegistry, error)
func (*BeaconStateView) BlockRoots ¶
func (state *BeaconStateView) BlockRoots() (common.BatchRoots, error)
func (*BeaconStateView) CopyState ¶
func (state *BeaconStateView) CopyState() (common.BeaconState, error)
func (*BeaconStateView) CurrentEpochParticipation ¶ added in v0.19.0
func (state *BeaconStateView) CurrentEpochParticipation() (*altair.ParticipationRegistryView, error)
func (*BeaconStateView) CurrentJustifiedCheckpoint ¶
func (state *BeaconStateView) CurrentJustifiedCheckpoint() (common.Checkpoint, error)
func (*BeaconStateView) CurrentSyncCommittee ¶ added in v0.19.0
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 ¶ added in v0.19.0
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) InactivityScores ¶ added in v0.19.0
func (state *BeaconStateView) InactivityScores() (*altair.InactivityScoresView, error)
func (*BeaconStateView) IncrementDepositIndex ¶
func (state *BeaconStateView) IncrementDepositIndex() error
func (*BeaconStateView) IsExecutionEnabled ¶
func (state *BeaconStateView) IsExecutionEnabled(spec *common.Spec, block *BeaconBlock) (bool, error)
func (*BeaconStateView) IsTransitionBlock ¶
func (state *BeaconStateView) IsTransitionBlock(spec *common.Spec, block *BeaconBlock) (bool, error)
func (*BeaconStateView) IsTransitionCompleted ¶
func (state *BeaconStateView) IsTransitionCompleted() (bool, 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() (*common.ExecutionPayloadHeaderView, error)
func (*BeaconStateView) NextSyncCommittee ¶ added in v0.19.0
func (state *BeaconStateView) NextSyncCommittee() (*common.SyncCommitteeView, error)
func (*BeaconStateView) PreviousEpochParticipation ¶ added in v0.19.0
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 ¶ added in v0.19.0
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 ¶ added in v0.19.0
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 *common.ExecutionPayloadHeader) error
func (*BeaconStateView) SetNextSyncCommittee ¶ added in v0.19.0
func (state *BeaconStateView) SetNextSyncCommittee(v *common.SyncCommitteeView) error
func (*BeaconStateView) SetPreviousJustifiedCheckpoint ¶
func (state *BeaconStateView) SetPreviousJustifiedCheckpoint(c common.Checkpoint) error
func (*BeaconStateView) SetShardGasPrice ¶
func (state *BeaconStateView) SetShardGasPrice(price common.Gwei) error
func (*BeaconStateView) ShardBuffer ¶
func (state *BeaconStateView) ShardBuffer() (*ShardBufferView, error)
func (*BeaconStateView) ShardSamplePrice ¶ added in v0.19.0
func (state *BeaconStateView) ShardSamplePrice() (common.Gwei, 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 Builder ¶ added in v0.19.0
func (*Builder) ByteLength ¶ added in v0.19.0
func (*Builder) Deserialize ¶ added in v0.19.0
func (v *Builder) Deserialize(dr *codec.DecodingReader) error
func (*Builder) FixedLength ¶ added in v0.19.0
func (*Builder) HashTreeRoot ¶ added in v0.19.0
func (*Builder) Serialize ¶ added in v0.19.0
func (v *Builder) Serialize(w *codec.EncodingWriter) error
func (*Builder) View ¶ added in v0.19.0
func (v *Builder) View() *BuilderView
type BuilderBalances ¶ added in v0.19.0
func (BuilderBalances) ByteLength ¶ added in v0.19.0
func (a BuilderBalances) ByteLength(spec *common.Spec) (out uint64)
func (*BuilderBalances) Deserialize ¶ added in v0.19.0
func (a *BuilderBalances) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*BuilderBalances) FixedLength ¶ added in v0.19.0
func (a *BuilderBalances) FixedLength(spec *common.Spec) uint64
func (BuilderBalances) HashTreeRoot ¶ added in v0.19.0
func (BuilderBalances) Serialize ¶ added in v0.19.0
func (a BuilderBalances) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
func (BuilderBalances) View ¶ added in v0.19.0
func (li BuilderBalances) View(limit uint64) (*BuilderRegistryBalancesView, error)
type BuilderRegistry ¶ added in v0.19.0
type BuilderRegistry []*Builder
func (BuilderRegistry) ByteLength ¶ added in v0.19.0
func (a BuilderRegistry) ByteLength(spec *common.Spec) (out uint64)
func (*BuilderRegistry) Deserialize ¶ added in v0.19.0
func (a *BuilderRegistry) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*BuilderRegistry) FixedLength ¶ added in v0.19.0
func (a *BuilderRegistry) FixedLength(spec *common.Spec) uint64
func (BuilderRegistry) HashTreeRoot ¶ added in v0.19.0
func (BuilderRegistry) Serialize ¶ added in v0.19.0
func (a BuilderRegistry) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
type BuilderRegistryBalancesView ¶ added in v0.19.0
type BuilderRegistryBalancesView struct {
*BasicListView
}
func AsBuilderRegistryBalances ¶ added in v0.19.0
func AsBuilderRegistryBalances(v View, err error) (*BuilderRegistryBalancesView, error)
func (*BuilderRegistryBalancesView) AllBalances ¶ added in v0.19.0
func (v *BuilderRegistryBalancesView) AllBalances() ([]common.Gwei, error)
func (*BuilderRegistryBalancesView) AppendBalance ¶ added in v0.19.0
func (v *BuilderRegistryBalancesView) AppendBalance(bal common.Gwei) error
func (*BuilderRegistryBalancesView) GetBalance ¶ added in v0.19.0
func (v *BuilderRegistryBalancesView) GetBalance(index common.BuilderIndex) (common.Gwei, error)
func (*BuilderRegistryBalancesView) Iter ¶ added in v0.19.0
func (v *BuilderRegistryBalancesView) Iter() (next func() (bal common.Gwei, ok bool, err error))
func (*BuilderRegistryBalancesView) SetBalance ¶ added in v0.19.0
func (v *BuilderRegistryBalancesView) SetBalance(index common.BuilderIndex, bal common.Gwei) error
type BuilderView ¶ added in v0.19.0
type BuilderView struct {
*ContainerView
}
func AsBuilder ¶ added in v0.19.0
func AsBuilder(v View, err error) (*BuilderView, error)
func NewBuilderView ¶ added in v0.19.0
func NewBuilderView() *BuilderView
type BuildersRegistryView ¶ added in v0.19.0
type BuildersRegistryView struct{ *ComplexListView }
func AsBuildersRegistry ¶ added in v0.19.0
func AsBuildersRegistry(v View, err error) (*BuildersRegistryView, error)
func (*BuildersRegistryView) Builder ¶ added in v0.19.0
func (registry *BuildersRegistryView) Builder(index common.BuilderIndex) (common.Builder, error)
func (*BuildersRegistryView) BuilderCount ¶ added in v0.19.0
func (registry *BuildersRegistryView) BuilderCount() (uint64, error)
func (*BuildersRegistryView) IsValidIndex ¶ added in v0.19.0
func (registry *BuildersRegistryView) IsValidIndex(index common.BuilderIndex) (valid bool, err error)
type DataCommitment ¶
type DataCommitment struct { // KZG10 commitment to the data Point BLSCommitment `json:"point" yaml:"point"` // Length of the data in samples Length Uint64View `json:"length" yaml:"length"` }
func (*DataCommitment) ByteLength ¶
func (a *DataCommitment) ByteLength() uint64
func (*DataCommitment) Deserialize ¶
func (d *DataCommitment) Deserialize(dr *codec.DecodingReader) error
func (*DataCommitment) FixedLength ¶
func (a *DataCommitment) FixedLength() uint64
func (*DataCommitment) HashTreeRoot ¶
func (d *DataCommitment) HashTreeRoot(hFn tree.HashFn) common.Root
func (*DataCommitment) Serialize ¶
func (d *DataCommitment) Serialize(w *codec.EncodingWriter) error
func (*DataCommitment) View ¶
func (d *DataCommitment) View() *DataCommitmentView
type DataCommitmentView ¶
type DataCommitmentView struct {
*ContainerView
}
func AsDataCommitment ¶
func AsDataCommitment(v View, err error) (*DataCommitmentView, error)
func (*DataCommitmentView) Length ¶
func (v *DataCommitmentView) Length() (uint64, error)
func (*DataCommitmentView) Point ¶
func (v *DataCommitmentView) Point() (BLSCommitment, error)
func (*DataCommitmentView) Raw ¶
func (v *DataCommitmentView) Raw() (*DataCommitment, error)
type DataCommitmentsEpochTable ¶
type DataCommitmentsEpochTable []DataCommitmentsSlotVec
type DataCommitmentsSlotVec ¶
type DataCommitmentsSlotVec []DataCommitment
type EpochAttesterData ¶ added in v0.19.0
type EpochAttesterData struct {
Altair altair.EpochAttesterData
}
func ComputeEpochAttesterData ¶ added in v0.16.1
func ComputeEpochAttesterData(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, flats []common.FlatValidator, state *BeaconStateView) (out *EpochAttesterData, err error)
type IndexedAttestation ¶ added in v0.16.1
type IndexedAttestation struct { AttestingIndices common.CommitteeIndices `json:"attesting_indices" yaml:"attesting_indices"` Data AttestationData `json:"data" yaml:"data"` Signature common.BLSSignature `json:"signature" yaml:"signature"` }
func (*IndexedAttestation) ByteLength ¶ added in v0.16.1
func (a *IndexedAttestation) ByteLength(spec *common.Spec) uint64
func (*IndexedAttestation) Deserialize ¶ added in v0.16.1
func (p *IndexedAttestation) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*IndexedAttestation) FixedLength ¶ added in v0.16.1
func (*IndexedAttestation) FixedLength(*common.Spec) uint64
func (*IndexedAttestation) HashTreeRoot ¶ added in v0.16.1
func (*IndexedAttestation) Serialize ¶ added in v0.16.1
func (a *IndexedAttestation) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
type PendingShardHeader ¶
type PendingShardHeader struct { // The commitment that is attested Attested AttestedDataCommitment `json:"attested" yaml:"attested"` // Who voted for the header Votes phase0.AttestationBits `json:"votes" yaml:"votes"` // Sum of effective balances of votes Weight common.Gwei `json:"weight" yaml:"weight"` // When the header was last updated, as reference for weight accuracy UpdateSlot common.Slot `json:"update_slot" yaml:"update_slot"` }
func (*PendingShardHeader) ByteLength ¶
func (h *PendingShardHeader) ByteLength(spec *common.Spec) uint64
func (*PendingShardHeader) Deserialize ¶
func (h *PendingShardHeader) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*PendingShardHeader) FixedLength ¶
func (h *PendingShardHeader) FixedLength(spec *common.Spec) uint64
func (*PendingShardHeader) HashTreeRoot ¶
func (*PendingShardHeader) Serialize ¶
func (h *PendingShardHeader) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
func (*PendingShardHeader) View ¶
func (h *PendingShardHeader) View(spec *common.Spec) *PendingShardHeaderView
type PendingShardHeaderView ¶
type PendingShardHeaderView struct {
*ContainerView
}
func AsPendingShardHeader ¶
func AsPendingShardHeader(v View, err error) (*PendingShardHeaderView, error)
func (*PendingShardHeaderView) Attested ¶ added in v0.19.0
func (v *PendingShardHeaderView) Attested() (*AttestedDataCommitmentView, error)
func (*PendingShardHeaderView) SetUpdateSlot ¶
func (v *PendingShardHeaderView) SetUpdateSlot(slot common.Slot) error
func (*PendingShardHeaderView) SetVotes ¶
func (v *PendingShardHeaderView) SetVotes(bits *phase0.AttestationBitsView) error
func (*PendingShardHeaderView) SetWeight ¶
func (v *PendingShardHeaderView) SetWeight(w common.Gwei) error
func (*PendingShardHeaderView) UpdateSlot ¶
func (v *PendingShardHeaderView) UpdateSlot() (common.Slot, error)
func (*PendingShardHeaderView) Votes ¶
func (v *PendingShardHeaderView) Votes() (*phase0.AttestationBitsView, error)
type PendingShardHeaders ¶
type PendingShardHeaders []PendingShardHeader
func (PendingShardHeaders) ByteLength ¶
func (hl PendingShardHeaders) ByteLength(spec *common.Spec) (out uint64)
func (*PendingShardHeaders) Deserialize ¶
func (hl *PendingShardHeaders) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*PendingShardHeaders) FixedLength ¶
func (hl *PendingShardHeaders) FixedLength(*common.Spec) uint64
func (PendingShardHeaders) HashTreeRoot ¶
func (PendingShardHeaders) Serialize ¶
func (hl PendingShardHeaders) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
func (PendingShardHeaders) View ¶
func (hl PendingShardHeaders) View(spec *common.Spec) (*PendingShardHeadersView, error)
type PendingShardHeadersView ¶
type PendingShardHeadersView struct {
*ComplexListView
}
func AsPendingShardHeaders ¶
func AsPendingShardHeaders(v View, err error) (*PendingShardHeadersView, error)
func (*PendingShardHeadersView) Header ¶
func (v *PendingShardHeadersView) Header(i uint64) (*PendingShardHeaderView, error)
type RegistryIndices ¶ added in v0.19.0
type RegistryIndices []common.BuilderIndex
func (RegistryIndices) ByteLength ¶ added in v0.19.0
func (a RegistryIndices) ByteLength(spec *common.Spec) uint64
func (*RegistryIndices) Deserialize ¶ added in v0.19.0
func (p *RegistryIndices) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*RegistryIndices) FixedLength ¶ added in v0.19.0
func (*RegistryIndices) FixedLength() uint64
func (RegistryIndices) HashTreeRoot ¶ added in v0.19.0
func (RegistryIndices) Serialize ¶ added in v0.19.0
func (a RegistryIndices) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
type ShardBlob ¶ added in v0.16.1
type ShardBlob struct { // Slot that this header is intended for Slot common.Slot `json:"slot" yaml:"slot"` // Shard that this header is intended for Shard common.Shard `json:"shard" yaml:"shard"` // Shard data with related commitments and beacon anchor Body ShardBlobBody `json:"body" yaml:"body"` // Proposer of the shard-blob ProposerIndex common.ValidatorIndex `json:"proposer_index" yaml:"proposer_index"` }
func (*ShardBlob) ByteLength ¶ added in v0.16.1
func (*ShardBlob) Deserialize ¶ added in v0.16.1
func (*ShardBlob) FixedLength ¶ added in v0.16.1
func (*ShardBlob) HashTreeRoot ¶ added in v0.16.1
type ShardBlobBody ¶ added in v0.16.1
type ShardBlobBody struct { // The actual data commitment Commitment DataCommitment `json:"commitment" yaml:"commitment"` // Proof that the degree < commitment.length DegreeProof BLSCommitment `json:"degree_proof" yaml:"degree_proof"` // The actual data. Should match the commitment and degree proof. Data ShardData `json:"data" yaml:"data"` // fee payment fields (EIP 1559 like) MaxPriorityFeePerSample common.Gwei `json:"max_priority_fee_per_sample" yaml:"max_priority_fee_per_sample"` MaxFeePerSample common.Gwei `json:"max_fee_per_sample" yaml:"max_fee_per_sample"` }
func (*ShardBlobBody) ByteLength ¶ added in v0.16.1
func (b *ShardBlobBody) ByteLength(spec *common.Spec) uint64
func (*ShardBlobBody) Deserialize ¶ added in v0.16.1
func (b *ShardBlobBody) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*ShardBlobBody) FixedLength ¶ added in v0.16.1
func (b *ShardBlobBody) FixedLength(spec *common.Spec) uint64
func (*ShardBlobBody) HashTreeRoot ¶ added in v0.16.1
func (*ShardBlobBody) Serialize ¶ added in v0.16.1
func (b *ShardBlobBody) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
type ShardBlobBodySummary ¶
type ShardBlobBodySummary struct { // The actual data commitment Commitment DataCommitment `json:"commitment" yaml:"commitment"` // Proof that the degree < commitment.length DegreeProof BLSCommitment `json:"degree_proof" yaml:"degree_proof"` // Hash-tree-root as summary of the data field DataRoot common.Root `json:"data_root" yaml:"data_root"` // fee payment fields (EIP 1559 like) MaxPriorityFeePerSample common.Gwei `json:"max_priority_fee_per_sample" yaml:"max_priority_fee_per_sample"` MaxFeePerSample common.Gwei `json:"max_fee_per_sample" yaml:"max_fee_per_sample"` }
func (*ShardBlobBodySummary) ByteLength ¶
func (a *ShardBlobBodySummary) ByteLength() uint64
func (*ShardBlobBodySummary) Deserialize ¶
func (d *ShardBlobBodySummary) Deserialize(dr *codec.DecodingReader) error
func (*ShardBlobBodySummary) FixedLength ¶
func (a *ShardBlobBodySummary) FixedLength() uint64
func (*ShardBlobBodySummary) HashTreeRoot ¶
func (d *ShardBlobBodySummary) HashTreeRoot(hFn tree.HashFn) common.Root
func (*ShardBlobBodySummary) Serialize ¶
func (d *ShardBlobBodySummary) Serialize(w *codec.EncodingWriter) error
type ShardBlobHeader ¶
type ShardBlobHeader struct { // Slot that this header is intended for Slot common.Slot `json:"slot" yaml:"slot"` // Shard that this header is intended for Shard common.Shard `json:"shard" yaml:"shard"` // Builder of the data, pays data-fee to proposer BuilderIndex common.BuilderIndex `json:"builder_index" yaml:"builder_index"` // Proposer of the shard-blob ProposerIndex common.ValidatorIndex `json:"proposer_index" yaml:"proposer_index"` // Blob contents, without the full data BodySummary ShardBlobBodySummary `json:"body_summary" yaml:"body_summary"` }
func (*ShardBlobHeader) ByteLength ¶
func (v *ShardBlobHeader) ByteLength() uint64
func (*ShardBlobHeader) Deserialize ¶
func (v *ShardBlobHeader) Deserialize(dr *codec.DecodingReader) error
func (*ShardBlobHeader) FixedLength ¶
func (*ShardBlobHeader) FixedLength() uint64
func (*ShardBlobHeader) HashTreeRoot ¶
func (v *ShardBlobHeader) HashTreeRoot(hFn tree.HashFn) common.Root
func (*ShardBlobHeader) Serialize ¶
func (v *ShardBlobHeader) Serialize(w *codec.EncodingWriter) error
type ShardBlobReference ¶
type ShardBlobReference struct { // Slot that this header is intended for Slot common.Slot `json:"slot" yaml:"slot"` // Shard that this header is intended for Shard common.Shard `json:"shard" yaml:"shard"` // Hash-tree-root of ShardBlobBody BodyRoot common.Root `json:"body_root" yaml:"body_root"` // Proposer of the shard-blob ProposerIndex common.ValidatorIndex `json:"proposer_index" yaml:"proposer_index"` }
func (*ShardBlobReference) ByteLength ¶
func (v *ShardBlobReference) ByteLength() uint64
func (*ShardBlobReference) Deserialize ¶
func (v *ShardBlobReference) Deserialize(dr *codec.DecodingReader) error
func (*ShardBlobReference) FixedLength ¶
func (*ShardBlobReference) FixedLength() uint64
func (*ShardBlobReference) HashTreeRoot ¶
func (v *ShardBlobReference) HashTreeRoot(hFn tree.HashFn) common.Root
func (*ShardBlobReference) Serialize ¶
func (v *ShardBlobReference) Serialize(w *codec.EncodingWriter) error
type ShardBuffer ¶
type ShardBuffer []ShardColumn
func (ShardBuffer) ByteLength ¶
func (a ShardBuffer) ByteLength(spec *common.Spec) (out uint64)
func (*ShardBuffer) Deserialize ¶
func (li *ShardBuffer) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*ShardBuffer) FixedLength ¶
func (a *ShardBuffer) FixedLength(spec *common.Spec) uint64
func (ShardBuffer) HashTreeRoot ¶
func (ShardBuffer) Serialize ¶
func (a ShardBuffer) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
type ShardBufferView ¶
type ShardBufferView struct{ *ComplexVectorView }
func AsShardBuffer ¶
func AsShardBuffer(v View, err error) (*ShardBufferView, error)
func (*ShardBufferView) Column ¶
func (v *ShardBufferView) Column(i uint64) (*ShardColumnView, error)
func (*ShardBufferView) SetColumn ¶
func (v *ShardBufferView) SetColumn(i uint64, view *ShardColumnView) error
type ShardColumn ¶
type ShardColumn []ShardWork
func (ShardColumn) ByteLength ¶
func (sc ShardColumn) ByteLength(spec *common.Spec) (out uint64)
func (*ShardColumn) Deserialize ¶
func (sc *ShardColumn) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*ShardColumn) FixedLength ¶
func (sc *ShardColumn) FixedLength(*common.Spec) uint64
func (ShardColumn) HashTreeRoot ¶
func (ShardColumn) Serialize ¶
func (sc ShardColumn) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
func (ShardColumn) View ¶
func (sc ShardColumn) View(spec *common.Spec) (*ShardColumnView, error)
type ShardColumnView ¶
type ShardColumnView struct{ *ComplexListView }
func AsShardColumn ¶
func AsShardColumn(v View, err error) (*ShardColumnView, error)
func (*ShardColumnView) GetWork ¶
func (v *ShardColumnView) GetWork(shard common.Shard) (*ShardWorkView, error)
type ShardData ¶ added in v0.16.1
func (ShardData) ByteLength ¶ added in v0.16.1
func (*ShardData) Deserialize ¶ added in v0.16.1
func (*ShardData) FixedLength ¶ added in v0.16.1
func (ShardData) HashTreeRoot ¶ added in v0.16.1
type ShardHeaders ¶
type ShardHeaders []SignedShardBlobHeader
func (ShardHeaders) ByteLength ¶
func (a ShardHeaders) ByteLength(*common.Spec) (out uint64)
func (*ShardHeaders) Deserialize ¶
func (a *ShardHeaders) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*ShardHeaders) FixedLength ¶
func (a *ShardHeaders) FixedLength(*common.Spec) uint64
func (ShardHeaders) HashTreeRoot ¶
func (ShardHeaders) Serialize ¶
func (a ShardHeaders) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
type ShardProposerSlashing ¶
type ShardProposerSlashing struct { SignedReference1 SignedShardBlobReference `json:"signed_reference_1" yaml:"signed_reference_1"` SignedReference2 SignedShardBlobReference `json:"signed_reference_2" yaml:"signed_reference_2"` }
func (*ShardProposerSlashing) ByteLength ¶
func (v *ShardProposerSlashing) ByteLength() uint64
func (*ShardProposerSlashing) Deserialize ¶
func (v *ShardProposerSlashing) Deserialize(dr *codec.DecodingReader) error
func (*ShardProposerSlashing) FixedLength ¶
func (*ShardProposerSlashing) FixedLength() uint64
func (*ShardProposerSlashing) HashTreeRoot ¶
func (v *ShardProposerSlashing) HashTreeRoot(hFn tree.HashFn) common.Root
func (*ShardProposerSlashing) Serialize ¶
func (v *ShardProposerSlashing) Serialize(w *codec.EncodingWriter) error
type ShardProposerSlashings ¶
type ShardProposerSlashings []ShardProposerSlashing
func (ShardProposerSlashings) ByteLength ¶
func (a ShardProposerSlashings) ByteLength(*common.Spec) (out uint64)
func (*ShardProposerSlashings) Deserialize ¶
func (a *ShardProposerSlashings) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*ShardProposerSlashings) FixedLength ¶
func (a *ShardProposerSlashings) FixedLength(*common.Spec) uint64
func (ShardProposerSlashings) HashTreeRoot ¶
func (ShardProposerSlashings) Serialize ¶
func (a ShardProposerSlashings) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
type ShardWork ¶
type ShardWork struct {
Status ShardWorkStatus `json:"status" yaml:"status"`
}
func (*ShardWork) Deserialize ¶
func (*ShardWork) HashTreeRoot ¶
type ShardWorkStatus ¶
type ShardWorkStatus struct { Selector uint8 `json:"selector" yaml:"selector"` // Either nil, *AttestedDataCommitment or *PendingShardHeaders Value interface{} `json:"value" yaml:"value"` }
func (*ShardWorkStatus) ByteLength ¶
func (h *ShardWorkStatus) ByteLength(spec *common.Spec) uint64
func (*ShardWorkStatus) Deserialize ¶
func (h *ShardWorkStatus) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*ShardWorkStatus) FixedLength ¶
func (h *ShardWorkStatus) FixedLength(spec *common.Spec) uint64
func (*ShardWorkStatus) HashTreeRoot ¶
func (*ShardWorkStatus) Serialize ¶
func (h *ShardWorkStatus) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
func (*ShardWorkStatus) UnmarshalJSON ¶ added in v0.19.0
func (h *ShardWorkStatus) UnmarshalJSON(b []byte) error
func (*ShardWorkStatus) UnmarshalYAML ¶ added in v0.19.0
func (h *ShardWorkStatus) UnmarshalYAML(value *yaml.Node) error
func (*ShardWorkStatus) View ¶
func (h *ShardWorkStatus) View(spec *common.Spec) (*ShardWorkStatusView, error)
type ShardWorkStatusView ¶
type ShardWorkStatusView struct {
*UnionView
}
func AsShardWorkStatus ¶
func AsShardWorkStatus(v View, err error) (*ShardWorkStatusView, error)
type ShardWorkView ¶
type ShardWorkView struct {
*ContainerView
}
func AsShardWork ¶
func AsShardWork(v View, err error) (*ShardWorkView, error)
func (*ShardWorkView) Status ¶
func (v *ShardWorkView) Status() (*ShardWorkStatusView, error)
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
type SignedShardBlob ¶ added in v0.16.1
type SignedShardBlob struct { Message ShardBlob `json:"message" yaml:"message"` Signature common.BLSSignature `json:"signature" yaml:"signature"` }
func (*SignedShardBlob) ByteLength ¶ added in v0.16.1
func (b *SignedShardBlob) ByteLength(spec *common.Spec) uint64
func (*SignedShardBlob) Deserialize ¶ added in v0.16.1
func (b *SignedShardBlob) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*SignedShardBlob) FixedLength ¶ added in v0.16.1
func (*SignedShardBlob) FixedLength(spec *common.Spec) uint64
func (*SignedShardBlob) HashTreeRoot ¶ added in v0.16.1
func (*SignedShardBlob) Serialize ¶ added in v0.16.1
func (b *SignedShardBlob) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
type SignedShardBlobHeader ¶
type SignedShardBlobHeader struct { Message ShardBlobHeader `json:"message" yaml:"message"` Signature common.BLSSignature `json:"signature" yaml:"signature"` }
func (*SignedShardBlobHeader) ByteLength ¶
func (v *SignedShardBlobHeader) ByteLength() uint64
func (*SignedShardBlobHeader) Deserialize ¶
func (v *SignedShardBlobHeader) Deserialize(dr *codec.DecodingReader) error
func (*SignedShardBlobHeader) FixedLength ¶
func (*SignedShardBlobHeader) FixedLength() uint64
func (*SignedShardBlobHeader) HashTreeRoot ¶
func (v *SignedShardBlobHeader) HashTreeRoot(hFn tree.HashFn) common.Root
func (*SignedShardBlobHeader) Serialize ¶
func (v *SignedShardBlobHeader) Serialize(w *codec.EncodingWriter) error
type SignedShardBlobReference ¶
type SignedShardBlobReference struct { Message ShardBlobReference `json:"message" yaml:"message"` Signature common.BLSSignature `json:"signature" yaml:"signature"` }
func (*SignedShardBlobReference) ByteLength ¶
func (v *SignedShardBlobReference) ByteLength() uint64
func (*SignedShardBlobReference) Deserialize ¶
func (v *SignedShardBlobReference) Deserialize(dr *codec.DecodingReader) error
func (*SignedShardBlobReference) FixedLength ¶
func (*SignedShardBlobReference) FixedLength() uint64
func (*SignedShardBlobReference) HashTreeRoot ¶
func (v *SignedShardBlobReference) HashTreeRoot(hFn tree.HashFn) common.Root
func (*SignedShardBlobReference) Serialize ¶
func (v *SignedShardBlobReference) Serialize(w *codec.EncodingWriter) error
Source Files ¶
- attestation.go
- attestation_data.go
- attester.go
- attester_slashing.go
- block.go
- builder.go
- builder_balances.go
- builder_registry.go
- data_commitment.go
- data_commitment_epoch_table.go
- deltas.go
- indexed.go
- pending_shard_header.go
- shard_blob.go
- shard_blob_body.go
- shard_blob_body_summary.go
- shard_blob_reference.go
- shard_buffer.go
- shard_header.go
- shard_processing.go
- shard_proposer_slashing.go
- shard_work.go
- state.go
- transition.go
Click to show internal directories.
Click to hide internal directories.