Documentation ¶
Index ¶
- Variables
- func AggregateSelectionProofSigningRoot(spec *common.Spec, domainFn common.BLSDomainFn, slot common.Slot) (common.Root, error)
- func AttestationBitsType(spec *common.Spec) *BitListTypeDef
- func AttestationType(spec *common.Spec) *ContainerTypeDef
- func AttesterSlashingType(spec *common.Spec) *ContainerTypeDef
- func BatchRootsType(spec *common.Spec) VectorTypeDef
- 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 BlockDepositsType(spec *common.Spec) ListTypeDef
- func BlockProposerSlashingsType(spec *common.Spec) ListTypeDef
- func BlockVoluntaryExitsType(spec *common.Spec) ListTypeDef
- func ComputeSubnetForAttestation(spec *common.Spec, committeesPerSlot uint64, slot common.Slot, ...) (uint64, error)
- func Eth1DataVotesType(spec *common.Spec) ListTypeDef
- func HistoricalBatchType(spec *common.Spec) *ContainerTypeDef
- func HistoricalRootsType(spec *common.Spec) ListTypeDef
- func IndexedAttestationType(spec *common.Spec) *ContainerTypeDef
- func InitiateValidatorExit(spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, ...) error
- func IsActive(v common.Validator, epoch common.Epoch) (bool, error)
- func IsAggregator(spec *common.Spec, commSize uint64, selectionProof common.BLSSignature) bool
- func IsDoubleVote(a *AttestationData, b *AttestationData) bool
- func IsEligibleForActivation(v common.Validator, finalizedEpoch common.Epoch) (bool, error)
- func IsEligibleForActivationQueue(v common.Validator, spec *common.Spec) (bool, error)
- func IsSlashable(v common.Validator, epoch common.Epoch) (bool, error)
- func IsSlashableAttestationData(a *AttestationData, b *AttestationData) bool
- func IsSurroundVote(a *AttestationData, b *AttestationData) bool
- func IsValidGenesisState(spec *common.Spec, state *BeaconStateView) (bool, error)
- func PendingAttestationType(spec *common.Spec) *ContainerTypeDef
- func PendingAttestationsType(spec *common.Spec) ListTypeDef
- func ProcessAttestation(spec *common.Spec, epc *common.EpochsContext, state *BeaconStateView, ...) error
- func ProcessAttestations(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, ...) 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 ProcessDeposit(spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, ...) error
- func ProcessDeposits(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, ...) error
- func ProcessEffectiveBalanceUpdates(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, ...) error
- func ProcessEpochJustification(ctx context.Context, spec *common.Spec, data *JustificationStakeData, ...) error
- func ProcessEpochRegistryUpdates(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, ...) error
- func ProcessEpochRewardsAndPenalties(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, ...) error
- func ProcessEpochSlashings(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, ...) error
- func ProcessEth1DataReset(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, ...) error
- func ProcessEth1Vote(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, ...) error
- func ProcessHistoricalRootsUpdate(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, ...) error
- func ProcessParticipationRecordUpdates(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, ...) error
- func ProcessProposerSlashing(spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, ...) error
- func ProcessProposerSlashings(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, ...) error
- func ProcessRandaoMixesReset(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, ...) error
- func ProcessRandaoReveal(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, ...) error
- func ProcessSlashingsReset(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, ...) 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 RandaoMixesType(spec *common.Spec) VectorTypeDef
- func RegistryBalancesType(spec *common.Spec) *BasicListTypeDef
- func SignedBeaconBlockType(spec *common.Spec) *ContainerTypeDef
- func SlashValidator(spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, ...) error
- func SlashingsType(spec *common.Spec) VectorTypeDef
- func ValidateAggregateSelectionProof(spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, ...) (bool, error)
- 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
- func ValidateProposerSlashing(spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, ...) error
- func ValidateProposerSlashingNoSignature(spec *common.Spec, ps *ProposerSlashing) error
- func ValidateVoluntaryExit(spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, ...) error
- func ValidatorsRegistryType(spec *common.Spec) ListTypeDef
- type AggregateAndProof
- func (a *AggregateAndProof) ByteLength(spec *common.Spec) uint64
- func (a *AggregateAndProof) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (a *AggregateAndProof) FixedLength(*common.Spec) uint64
- func (a *AggregateAndProof) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (a *AggregateAndProof) Serialize(spec *common.Spec, w *codec.EncodingWriter) 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 AttestationBits
- func (cb AttestationBits) BitLen() uint64
- func (a AttestationBits) ByteLength(spec *common.Spec) uint64
- func (cb AttestationBits) Copy() AttestationBits
- func (cb AttestationBits) Covers(other AttestationBits) (bool, error)
- func (li *AttestationBits) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (cb AttestationBits) FilterNonParticipants(committee []common.ValidatorIndex) []common.ValidatorIndex
- func (cb AttestationBits) FilterParticipants(committee []common.ValidatorIndex) []common.ValidatorIndex
- func (a *AttestationBits) FixedLength(*common.Spec) uint64
- func (cb AttestationBits) GetBit(i uint64) bool
- func (li AttestationBits) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (cb AttestationBits) MarshalText() ([]byte, error)
- func (cb AttestationBits) OnesCount() uint64
- func (cb AttestationBits) Or(other AttestationBits)
- func (a AttestationBits) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- func (cb AttestationBits) SetBit(i uint64, v bool)
- func (cb AttestationBits) SingleParticipant(committee []common.ValidatorIndex) (common.ValidatorIndex, error)
- func (cb AttestationBits) String() string
- func (cb *AttestationBits) UnmarshalText(text []byte) error
- func (li AttestationBits) View(spec *common.Spec) *AttestationBitsView
- type AttestationBitsView
- 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 AttesterFlag
- 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 AttesterStatus
- type Balances
- func (a Balances) ByteLength(spec *common.Spec) (out uint64)
- func (a *Balances) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (a *Balances) FixedLength(spec *common.Spec) uint64
- func (li Balances) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (a Balances) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- type BatchRootsView
- 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 AsBeaconStateView(v View, err error) (*BeaconStateView, error)
- func GenesisFromEth1(spec *common.Spec, eth1BlockHash common.Root, time common.Timestamp, ...) (*BeaconStateView, *common.EpochsContext, error)
- func KickStartState(spec *common.Spec, eth1BlockHash common.Root, time common.Timestamp, ...) (*BeaconStateView, *common.EpochsContext, error)
- func KickStartStateWithSignatures(spec *common.Spec, eth1BlockHash common.Root, time common.Timestamp, ...) (*BeaconStateView, *common.EpochsContext, error)
- func NewBeaconStateView(spec *common.Spec) *BeaconStateView
- func (state *BeaconStateView) AddValidator(spec *common.Spec, pub common.BLSPubkey, withdrawalCreds common.Root, ...) error
- func (state *BeaconStateView) Balances() (common.Balances, error)
- func (state *BeaconStateView) BlockRoots() (common.BatchRoots, error)
- func (state *BeaconStateView) Copy() (common.BeaconState, error)
- func (state *BeaconStateView) CurrentEpochAttestations() (*PendingAttestationsView, error)
- func (state *BeaconStateView) CurrentJustifiedCheckpoint() (common.Checkpoint, error)
- func (state *BeaconStateView) DepositIndex() (common.DepositIndex, error)
- func (state *BeaconStateView) Eth1Data() (common.Eth1Data, error)
- func (state *BeaconStateView) Eth1DataVotes() (common.Eth1DataVotes, 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) IncrementDepositIndex() error
- func (state *BeaconStateView) JustificationBits() (common.JustificationBits, error)
- func (state *BeaconStateView) LatestBlockHeader() (*common.BeaconBlockHeader, error)
- func (state *BeaconStateView) PreviousEpochAttestations() (*PendingAttestationsView, 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) SeedRandao(spec *common.Spec, seed common.Root) error
- func (state *BeaconStateView) SetCurrentJustifiedCheckpoint(c common.Checkpoint) 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) 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 DepositRootsView
- type Deposits
- func (a Deposits) ByteLength(*common.Spec) (out uint64)
- func (a *Deposits) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (a *Deposits) FixedLength(*common.Spec) uint64
- func (li Deposits) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (a Deposits) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- type EpochAttesterData
- type EpochStakeSummary
- type Eth1DataVotes
- func (a Eth1DataVotes) ByteLength(spec *common.Spec) (out uint64)
- func (a *Eth1DataVotes) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (a *Eth1DataVotes) FixedLength(spec *common.Spec) uint64
- func (li Eth1DataVotes) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (a Eth1DataVotes) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- type Eth1DataVotesView
- type HistoricalBatch
- func (a *HistoricalBatch) ByteLength(spec *common.Spec) uint64
- func (a *HistoricalBatch) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (*HistoricalBatch) FixedLength(spec *common.Spec) uint64
- func (p *HistoricalBatch) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (a *HistoricalBatch) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- type HistoricalBatchRoots
- func (a HistoricalBatchRoots) ByteLength(spec *common.Spec) (out uint64)
- func (a *HistoricalBatchRoots) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (a *HistoricalBatchRoots) FixedLength(spec *common.Spec) uint64
- func (li HistoricalBatchRoots) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (a HistoricalBatchRoots) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- type HistoricalBatchView
- type HistoricalRoots
- func (a HistoricalRoots) ByteLength(spec *common.Spec) (out uint64)
- func (a *HistoricalRoots) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (a *HistoricalRoots) FixedLength(spec *common.Spec) uint64
- func (li HistoricalRoots) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (a HistoricalRoots) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- type HistoricalRootsView
- 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 JustificationStakeData
- type KickstartValidatorData
- type PendingAttestation
- func (a *PendingAttestation) ByteLength(spec *common.Spec) uint64
- func (a *PendingAttestation) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (a *PendingAttestation) FixedLength(*common.Spec) uint64
- func (a *PendingAttestation) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (a *PendingAttestation) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- func (att *PendingAttestation) View(spec *common.Spec) *PendingAttestationView
- type PendingAttestationView
- type PendingAttestations
- func (p PendingAttestations) ByteLength(spec *common.Spec) (out uint64)
- func (a *PendingAttestations) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (a *PendingAttestations) FixedLength(*common.Spec) uint64
- func (li PendingAttestations) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (a PendingAttestations) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- type PendingAttestationsView
- type ProposerSlashing
- func (a *ProposerSlashing) ByteLength() uint64
- func (a *ProposerSlashing) Deserialize(dr *codec.DecodingReader) error
- func (*ProposerSlashing) FixedLength() uint64
- func (p *ProposerSlashing) HashTreeRoot(hFn tree.HashFn) common.Root
- func (a *ProposerSlashing) Serialize(w *codec.EncodingWriter) error
- type ProposerSlashings
- func (a ProposerSlashings) ByteLength(_ *common.Spec) (out uint64)
- func (a *ProposerSlashings) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (*ProposerSlashings) FixedLength(*common.Spec) uint64
- func (li ProposerSlashings) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (a ProposerSlashings) Serialize(_ *common.Spec, w *codec.EncodingWriter) error
- type RandaoMixes
- func (a RandaoMixes) ByteLength(spec *common.Spec) (out uint64)
- func (a *RandaoMixes) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (a *RandaoMixes) FixedLength(spec *common.Spec) uint64
- func (li RandaoMixes) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (a RandaoMixes) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- type RandaoMixesView
- type RegistryBalancesView
- func (v *RegistryBalancesView) AllBalances() ([]common.Gwei, error)
- func (v *RegistryBalancesView) GetBalance(index common.ValidatorIndex) (common.Gwei, error)
- func (v *RegistryBalancesView) Iter() (next func() (bal common.Gwei, ok bool, err error))
- func (v *RegistryBalancesView) SetBalance(index common.ValidatorIndex, bal common.Gwei) error
- 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 RegistryProcessData
- type RewardsAndPenalties
- type SignedAggregateAndProof
- func (a *SignedAggregateAndProof) ByteLength(spec *common.Spec) uint64
- func (a *SignedAggregateAndProof) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (a *SignedAggregateAndProof) FixedLength(*common.Spec) uint64
- func (a *SignedAggregateAndProof) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (a *SignedAggregateAndProof) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- 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 SignedVoluntaryExit
- func (v *SignedVoluntaryExit) ByteLength() uint64
- func (v *SignedVoluntaryExit) Deserialize(dr *codec.DecodingReader) error
- func (*SignedVoluntaryExit) FixedLength() uint64
- func (v *SignedVoluntaryExit) HashTreeRoot(hFn tree.HashFn) common.Root
- func (v *SignedVoluntaryExit) Serialize(w *codec.EncodingWriter) error
- type SlashingsHistory
- func (a SlashingsHistory) ByteLength(spec *common.Spec) (out uint64)
- func (a *SlashingsHistory) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (a *SlashingsHistory) FixedLength(spec *common.Spec) uint64
- func (li SlashingsHistory) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (a SlashingsHistory) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- type SlashingsView
- type Validator
- func (a *Validator) ByteLength() uint64
- func (v *Validator) Deserialize(dr *codec.DecodingReader) error
- func (*Validator) FixedLength() uint64
- func (v *Validator) HashTreeRoot(hFn tree.HashFn) common.Root
- func (v *Validator) Serialize(w *codec.EncodingWriter) error
- func (v *Validator) View() *ValidatorView
- type ValidatorRegistry
- func (a ValidatorRegistry) ByteLength(spec *common.Spec) (out uint64)
- func (a *ValidatorRegistry) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (a *ValidatorRegistry) FixedLength(spec *common.Spec) uint64
- func (li ValidatorRegistry) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (a ValidatorRegistry) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
- type ValidatorView
- func (v *ValidatorView) ActivationEligibilityEpoch() (common.Epoch, error)
- func (v *ValidatorView) ActivationEpoch() (common.Epoch, error)
- func (v *ValidatorView) EffectiveBalance() (common.Gwei, error)
- func (v *ValidatorView) ExitEpoch() (common.Epoch, error)
- func (v *ValidatorView) Flatten(dst *common.FlatValidator) error
- func (v *ValidatorView) MakeSlashed() error
- func (v *ValidatorView) Pubkey() (common.BLSPubkey, error)
- func (v *ValidatorView) SetActivationEligibilityEpoch(epoch common.Epoch) error
- func (v *ValidatorView) SetActivationEpoch(epoch common.Epoch) error
- func (v *ValidatorView) SetEffectiveBalance(b common.Gwei) error
- func (v *ValidatorView) SetExitEpoch(ep common.Epoch) error
- func (v *ValidatorView) SetWithdrawableEpoch(epoch common.Epoch) error
- func (v *ValidatorView) Slashed() (bool, error)
- func (v *ValidatorView) WithdrawableEpoch() (common.Epoch, error)
- func (v *ValidatorView) WithdrawalCredentials() (out common.Root, err error)
- type ValidatorsRegistryView
- func (registry *ValidatorsRegistryView) IsValidIndex(index common.ValidatorIndex) (valid bool, err error)
- func (registry *ValidatorsRegistryView) Iter() (next func() (val common.Validator, ok bool, err error))
- func (registry *ValidatorsRegistryView) Validator(index common.ValidatorIndex) (common.Validator, error)
- func (registry *ValidatorsRegistryView) ValidatorCount() (uint64, error)
- type VoluntaryExit
- type VoluntaryExits
- func (a VoluntaryExits) ByteLength(spec *common.Spec) (out uint64)
- func (a *VoluntaryExits) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
- func (*VoluntaryExits) FixedLength(*common.Spec) uint64
- func (li VoluntaryExits) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root
- func (a VoluntaryExits) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
Constants ¶
This section is empty.
Variables ¶
var AttestationDataType = ContainerType("AttestationData", []FieldDef{ {"slot", common.SlotType}, {"index", common.CommitteeIndexType}, {"beacon_block_root", RootType}, {"source", common.CheckpointType}, {"target", common.CheckpointType}, })
var DepositRootsType = ComplexListType(RootType, 1<<common.DEPOSIT_CONTRACT_TREE_DEPTH)
var ProposerSlashingType = ContainerType("ProposerSlashing", []FieldDef{ {"header_1", common.SignedBeaconBlockHeaderType}, {"header_2", common.SignedBeaconBlockHeaderType}, })
var SignedVoluntaryExitType = ContainerType("SignedVoluntaryExit", []FieldDef{ {"message", VoluntaryExitType}, {"signature", common.BLSSignatureType}, })
var ValidatorType = ContainerType("Validator", []FieldDef{ {"pubkey", common.BLSPubkeyType}, {"withdrawal_credentials", common.Bytes32Type}, {"effective_balance", common.GweiType}, {"slashed", BoolType}, {"activation_eligibility_epoch", common.EpochType}, {"activation_epoch", common.EpochType}, {"exit_epoch", common.EpochType}, {"withdrawable_epoch", common.EpochType}, })
var VoluntaryExitType = ContainerType("VoluntaryExit", []FieldDef{ {"epoch", common.EpochType}, {"validator_index", common.ValidatorIndexType}, })
Functions ¶
func AttestationBitsType ¶
func AttestationType ¶
func AttesterSlashingType ¶
func BatchRootsType ¶
func BeaconBlockBodyType ¶
func BeaconBlockType ¶
func BeaconStateType ¶
func BlockAttestationsType ¶
func BlockDepositsType ¶
func BlockVoluntaryExitsType ¶
func Eth1DataVotesType ¶
func HistoricalBatchType ¶
func HistoricalRootsType ¶
func IndexedAttestationType ¶
func InitiateValidatorExit ¶
func InitiateValidatorExit(spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, index common.ValidatorIndex) error
Initiate the exit of the validator of the given index
func IsAggregator ¶
Given some committee size at a given slot, and a signature (not validated here) for that same slot
func IsDoubleVote ¶
func IsDoubleVote(a *AttestationData, b *AttestationData) bool
Check if a and b have the same target epoch.
func IsEligibleForActivation ¶
func IsSlashableAttestationData ¶
func IsSlashableAttestationData(a *AttestationData, b *AttestationData) bool
func IsSurroundVote ¶
func IsSurroundVote(a *AttestationData, b *AttestationData) bool
Check if a surrounds b, i.E. source(a) < source(b) and target(a) > target(b)
func IsValidGenesisState ¶
func IsValidGenesisState(spec *common.Spec, state *BeaconStateView) (bool, error)
func PendingAttestationType ¶
func PendingAttestationsType ¶
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 ProcessAttesterSlashing ¶
func ProcessAttesterSlashing(spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, attesterSlashing *AttesterSlashing) error
func ProcessAttesterSlashings ¶
func ProcessAttesterSlashings(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, ops []AttesterSlashing) error
func ProcessDeposit ¶
func ProcessDeposit(spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, dep *common.Deposit, ignoreSignatureAndProof bool) error
Process an Eth1 deposit, registering a validator or increasing its balance.
func ProcessDeposits ¶
func ProcessDeposits(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, ops []common.Deposit) error
Verify that outstanding deposits are processed up to the maximum number of deposits, then process all in order.
func ProcessEffectiveBalanceUpdates ¶
func ProcessEffectiveBalanceUpdates(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, flats []common.FlatValidator, state common.BeaconState) error
func ProcessEpochJustification ¶
func ProcessEpochJustification(ctx context.Context, spec *common.Spec, data *JustificationStakeData, state common.BeaconState) error
func ProcessEpochRegistryUpdates ¶
func ProcessEpochRegistryUpdates(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, flats []common.FlatValidator, state common.BeaconState) error
func ProcessEpochRewardsAndPenalties ¶
func ProcessEpochRewardsAndPenalties(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, attesterData *EpochAttesterData, state *BeaconStateView) error
func ProcessEpochSlashings ¶
func ProcessEpochSlashings(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, flats []common.FlatValidator, state common.BeaconState) error
func ProcessEth1DataReset ¶
func ProcessEth1DataReset(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, state common.BeaconState) error
func ProcessEth1Vote ¶
func ProcessHistoricalRootsUpdate ¶
func ProcessHistoricalRootsUpdate(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, state common.BeaconState) error
func ProcessParticipationRecordUpdates ¶
func ProcessParticipationRecordUpdates(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, state *BeaconStateView) error
func ProcessProposerSlashing ¶
func ProcessProposerSlashing(spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, ps *ProposerSlashing) error
func ProcessProposerSlashings ¶
func ProcessProposerSlashings(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, ops []ProposerSlashing) error
func ProcessRandaoMixesReset ¶
func ProcessRandaoMixesReset(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, state common.BeaconState) error
func ProcessRandaoReveal ¶
func ProcessRandaoReveal(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, reveal common.BLSSignature) error
func ProcessSlashingsReset ¶
func ProcessSlashingsReset(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, state common.BeaconState) error
func ProcessVoluntaryExit ¶
func ProcessVoluntaryExit(spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, signedExit *SignedVoluntaryExit) error
func ProcessVoluntaryExits ¶
func ProcessVoluntaryExits(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, ops []SignedVoluntaryExit) error
func RandaoMixesType ¶
func RegistryBalancesType ¶
func SignedBeaconBlockType ¶
func SlashValidator ¶
func SlashValidator(spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, slashedIndex common.ValidatorIndex, whistleblowerIndex *common.ValidatorIndex) error
Slash the validator with the given index.
func SlashingsType ¶
Balances slashed at every withdrawal period
func ValidateAggregateSelectionProof ¶
func ValidateAggregateSelectionProof(spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, slot common.Slot, commIndex common.CommitteeIndex, aggregator common.ValidatorIndex, selectionProof common.BLSSignature) (bool, error)
func ValidateIndexedAttestation ¶
func ValidateIndexedAttestation(spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, indexedAttestation *IndexedAttestation) error
Verify validity of slashable_attestation fields.
func ValidateIndexedAttestationIndicesSet ¶
func ValidateIndexedAttestationIndicesSet(spec *common.Spec, indexedAttestation *IndexedAttestation) (common.ValidatorSet, error)
func ValidateIndexedAttestationNoSignature ¶
func ValidateIndexedAttestationNoSignature(spec *common.Spec, state common.BeaconState, indexedAttestation *IndexedAttestation) error
func ValidateIndexedAttestationSignature ¶
func ValidateIndexedAttestationSignature(spec *common.Spec, dom common.BLSDomain, pubCache *common.PubkeyCache, indexedAttestation *IndexedAttestation) error
func ValidateProposerSlashing ¶
func ValidateProposerSlashing(spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, ps *ProposerSlashing) error
func ValidateProposerSlashingNoSignature ¶
func ValidateProposerSlashingNoSignature(spec *common.Spec, ps *ProposerSlashing) error
func ValidateVoluntaryExit ¶
func ValidateVoluntaryExit(spec *common.Spec, epc *common.EpochsContext, state common.BeaconState, signedExit *SignedVoluntaryExit) error
func ValidatorsRegistryType ¶
Types ¶
type AggregateAndProof ¶
type AggregateAndProof struct { AggregatorIndex common.ValidatorIndex `json:"aggregator_index"` Aggregate Attestation `json:"aggregate"` SelectionProof common.BLSSignature `json:"selection_proof"` }
func (*AggregateAndProof) ByteLength ¶
func (a *AggregateAndProof) ByteLength(spec *common.Spec) uint64
func (*AggregateAndProof) Deserialize ¶
func (a *AggregateAndProof) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*AggregateAndProof) FixedLength ¶
func (a *AggregateAndProof) FixedLength(*common.Spec) uint64
func (*AggregateAndProof) HashTreeRoot ¶
func (*AggregateAndProof) Serialize ¶
func (a *AggregateAndProof) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
type Attestation ¶
type Attestation struct { AggregationBits 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 ¶
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 AttestationBits ¶
type AttestationBits []byte
AttestationBits is formatted as a serialized SSZ bitlist, including the delimit bit
func (AttestationBits) BitLen ¶
func (cb AttestationBits) BitLen() uint64
func (AttestationBits) ByteLength ¶
func (a AttestationBits) ByteLength(spec *common.Spec) uint64
func (AttestationBits) Copy ¶
func (cb AttestationBits) Copy() AttestationBits
func (AttestationBits) Covers ¶
func (cb AttestationBits) Covers(other AttestationBits) (bool, error)
Returns true if other only has bits set to 1 that this bitfield also has set to 1
func (*AttestationBits) Deserialize ¶
func (li *AttestationBits) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (AttestationBits) FilterNonParticipants ¶
func (cb AttestationBits) FilterNonParticipants(committee []common.ValidatorIndex) []common.ValidatorIndex
In-place filters a list of committees indices to only keep the bitfield NON-participants. The result is not sorted. Returns the re-sliced filtered non-participants list.
WARNING: unsafe to use, panics if committee size does not match.
func (AttestationBits) FilterParticipants ¶
func (cb AttestationBits) FilterParticipants(committee []common.ValidatorIndex) []common.ValidatorIndex
In-place filters a list of committees indices to only keep the bitfield participants. The result is not sorted. Returns the re-sliced filtered participants list.
WARNING: unsafe to use, panics if committee size does not match.
func (*AttestationBits) FixedLength ¶
func (a *AttestationBits) FixedLength(*common.Spec) uint64
func (AttestationBits) GetBit ¶
func (cb AttestationBits) GetBit(i uint64) bool
func (AttestationBits) HashTreeRoot ¶
func (AttestationBits) MarshalText ¶
func (cb AttestationBits) MarshalText() ([]byte, error)
func (AttestationBits) OnesCount ¶
func (cb AttestationBits) OnesCount() uint64
func (AttestationBits) Or ¶
func (cb AttestationBits) Or(other AttestationBits)
Sets the bits to true that are true in other. (in place)
func (AttestationBits) Serialize ¶
func (a AttestationBits) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
func (AttestationBits) SetBit ¶
func (cb AttestationBits) SetBit(i uint64, v bool)
func (AttestationBits) SingleParticipant ¶
func (cb AttestationBits) SingleParticipant(committee []common.ValidatorIndex) (common.ValidatorIndex, error)
func (AttestationBits) String ¶
func (cb AttestationBits) String() string
func (*AttestationBits) UnmarshalText ¶
func (cb *AttestationBits) UnmarshalText(text []byte) error
func (AttestationBits) View ¶
func (li AttestationBits) View(spec *common.Spec) *AttestationBitsView
type AttestationBitsView ¶
type AttestationBitsView struct {
*BitListView
}
func AsAttestationBits ¶
func AsAttestationBits(v View, err error) (*AttestationBitsView, error)
func (*AttestationBitsView) Raw ¶
func (v *AttestationBitsView) Raw() (AttestationBits, 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"` }
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 AttesterFlag ¶
type AttesterFlag uint8
const ( PrevSourceAttester AttesterFlag = 1 << iota PrevTargetAttester PrevHeadAttester CurrSourceAttester CurrTargetAttester CurrHeadAttester UnslashedAttester EligibleAttester )
func (AttesterFlag) HasMarkers ¶
func (flags AttesterFlag) HasMarkers(markers AttesterFlag) bool
type AttesterSlashing ¶
type AttesterSlashing struct { Attestation1 IndexedAttestation `json:"attestation_1" yaml:"attestation_1"` Attestation2 IndexedAttestation `json:"attestation_2" yaml:"attestation_2"` }
func (*AttesterSlashing) ByteLength ¶
func (a *AttesterSlashing) ByteLength(spec *common.Spec) uint64
func (*AttesterSlashing) Deserialize ¶
func (a *AttesterSlashing) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*AttesterSlashing) FixedLength ¶
func (a *AttesterSlashing) FixedLength(*common.Spec) uint64
func (*AttesterSlashing) HashTreeRoot ¶
func (*AttesterSlashing) Serialize ¶
func (a *AttesterSlashing) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
type AttesterSlashings ¶
type AttesterSlashings []AttesterSlashing
func (AttesterSlashings) ByteLength ¶
func (a AttesterSlashings) ByteLength(spec *common.Spec) (out uint64)
func (*AttesterSlashings) Deserialize ¶
func (a *AttesterSlashings) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*AttesterSlashings) FixedLength ¶
func (a *AttesterSlashings) FixedLength(*common.Spec) uint64
func (AttesterSlashings) HashTreeRoot ¶
func (AttesterSlashings) Serialize ¶
func (a AttesterSlashings) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
type AttesterStatus ¶
type AttesterStatus struct { // The delay of inclusion of the latest attestation by the attester. // No delay (i.e. 0) by default InclusionDelay common.Slot // The validator index of the proposer of the attested beacon block. // Only valid if the validator has an attesting flag set. AttestedProposer common.ValidatorIndex // A bitfield of markers describing the recent actions of the validator Flags AttesterFlag }
type BatchRootsView ¶
type BatchRootsView struct{ *ComplexVectorView }
func AsBatchRoots ¶
func AsBatchRoots(v View, err error) (*BatchRootsView, error)
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 ProposerSlashings `json:"proposer_slashings" yaml:"proposer_slashings"` AttesterSlashings AttesterSlashings `json:"attester_slashings" yaml:"attester_slashings"` Attestations Attestations `json:"attestations" yaml:"attestations"` Deposits Deposits `json:"deposits" yaml:"deposits"` VoluntaryExits VoluntaryExits `json:"voluntary_exits" yaml:"voluntary_exits"` }
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 HistoricalBatchRoots `json:"block_roots" yaml:"block_roots"` StateRoots HistoricalBatchRoots `json:"state_roots" yaml:"state_roots"` HistoricalRoots HistoricalRoots `json:"historical_roots" yaml:"historical_roots"` // Eth1 Eth1Data common.Eth1Data `json:"eth1_data" yaml:"eth1_data"` Eth1DataVotes Eth1DataVotes `json:"eth1_data_votes" yaml:"eth1_data_votes"` DepositIndex common.DepositIndex `json:"eth1_deposit_index" yaml:"eth1_deposit_index"` // Registry Validators ValidatorRegistry `json:"validators" yaml:"validators"` Balances Balances `json:"balances" yaml:"balances"` RandaoMixes RandaoMixes `json:"randao_mixes" yaml:"randao_mixes"` Slashings SlashingsHistory `json:"slashings" yaml:"slashings"` // Attestations PreviousEpochAttestations PendingAttestations `json:"previous_epoch_attestations" yaml:"previous_epoch_attestations"` CurrentEpochAttestations PendingAttestations `json:"current_epoch_attestations" yaml:"current_epoch_attestations"` // 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"` }
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 GenesisFromEth1 ¶
func KickStartState ¶
func KickStartState(spec *common.Spec, eth1BlockHash common.Root, time common.Timestamp, validators []KickstartValidatorData) (*BeaconStateView, *common.EpochsContext, error)
To build a genesis state without Eth 1.0 deposits, i.e. directly from a sequence of minimal validator data.
func KickStartStateWithSignatures ¶
func KickStartStateWithSignatures(spec *common.Spec, eth1BlockHash common.Root, time common.Timestamp, validators []KickstartValidatorData, keys [][32]byte) (*BeaconStateView, *common.EpochsContext, error)
To build a genesis state without Eth 1.0 deposits, i.e. directly from a sequence of minimal validator data.
func NewBeaconStateView ¶
func NewBeaconStateView(spec *common.Spec) *BeaconStateView
func (*BeaconStateView) AddValidator ¶
func (*BeaconStateView) Balances ¶
func (state *BeaconStateView) Balances() (common.Balances, error)
func (*BeaconStateView) BlockRoots ¶
func (state *BeaconStateView) BlockRoots() (common.BatchRoots, error)
func (*BeaconStateView) Copy ¶
func (state *BeaconStateView) Copy() (common.BeaconState, error)
func (*BeaconStateView) CurrentEpochAttestations ¶
func (state *BeaconStateView) CurrentEpochAttestations() (*PendingAttestationsView, error)
func (*BeaconStateView) CurrentJustifiedCheckpoint ¶
func (state *BeaconStateView) CurrentJustifiedCheckpoint() (common.Checkpoint, error)
func (*BeaconStateView) DepositIndex ¶
func (state *BeaconStateView) DepositIndex() (common.DepositIndex, error)
func (*BeaconStateView) Eth1Data ¶
func (state *BeaconStateView) Eth1Data() (common.Eth1Data, error)
func (*BeaconStateView) Eth1DataVotes ¶
func (state *BeaconStateView) Eth1DataVotes() (common.Eth1DataVotes, 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) IncrementDepositIndex ¶
func (state *BeaconStateView) IncrementDepositIndex() error
func (*BeaconStateView) JustificationBits ¶
func (state *BeaconStateView) JustificationBits() (common.JustificationBits, error)
func (*BeaconStateView) LatestBlockHeader ¶
func (state *BeaconStateView) LatestBlockHeader() (*common.BeaconBlockHeader, error)
func (*BeaconStateView) PreviousEpochAttestations ¶
func (state *BeaconStateView) PreviousEpochAttestations() (*PendingAttestationsView, 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) SeedRandao ¶
func (*BeaconStateView) SetCurrentJustifiedCheckpoint ¶
func (state *BeaconStateView) SetCurrentJustifiedCheckpoint(c common.Checkpoint) 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) 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 DepositRootsView ¶
type DepositRootsView struct {
*ComplexListView
}
func AsDepositRootsView ¶
func AsDepositRootsView(v View, err error) (*DepositRootsView, error)
func NewDepositRootsView ¶
func NewDepositRootsView() *DepositRootsView
type EpochAttesterData ¶
type EpochAttesterData struct { PrevEpoch common.Epoch CurrEpoch common.Epoch Statuses []AttesterStatus Flats []common.FlatValidator PrevEpochUnslashedStake EpochStakeSummary CurrEpochUnslashedTargetStake common.Gwei }
func ComputeEpochAttesterData ¶
func ComputeEpochAttesterData(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, flats []common.FlatValidator, state *BeaconStateView) (out *EpochAttesterData, err error)
type EpochStakeSummary ¶
type Eth1DataVotes ¶
func (Eth1DataVotes) ByteLength ¶
func (a Eth1DataVotes) ByteLength(spec *common.Spec) (out uint64)
func (*Eth1DataVotes) Deserialize ¶
func (a *Eth1DataVotes) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*Eth1DataVotes) FixedLength ¶
func (a *Eth1DataVotes) FixedLength(spec *common.Spec) uint64
func (Eth1DataVotes) HashTreeRoot ¶
func (Eth1DataVotes) Serialize ¶
func (a Eth1DataVotes) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
type Eth1DataVotesView ¶
type Eth1DataVotesView struct{ *ComplexListView }
func AsEth1DataVotes ¶
func AsEth1DataVotes(v View, err error) (*Eth1DataVotesView, error)
func (*Eth1DataVotesView) Count ¶
func (v *Eth1DataVotesView) Count(dat common.Eth1Data) (uint64, error)
func (*Eth1DataVotesView) Length ¶
func (v *Eth1DataVotesView) Length() (uint64, error)
func (*Eth1DataVotesView) Reset ¶
func (v *Eth1DataVotesView) Reset() error
Done at the end of every voting period
type HistoricalBatch ¶
type HistoricalBatch struct { BlockRoots HistoricalBatchRoots `json:"block_roots" yaml:"block_roots"` StateRoots HistoricalBatchRoots `json:"state_roots" yaml:"state_roots"` }
func (*HistoricalBatch) ByteLength ¶
func (a *HistoricalBatch) ByteLength(spec *common.Spec) uint64
func (*HistoricalBatch) Deserialize ¶
func (a *HistoricalBatch) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*HistoricalBatch) FixedLength ¶
func (*HistoricalBatch) FixedLength(spec *common.Spec) uint64
func (*HistoricalBatch) HashTreeRoot ¶
func (*HistoricalBatch) Serialize ¶
func (a *HistoricalBatch) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
type HistoricalBatchRoots ¶
HistoricalBatchRoots stores roots: a batch of state or block roots. It represents a Vector[Root, SLOTS_PER_HISTORICAL_ROOT]
func (HistoricalBatchRoots) ByteLength ¶
func (a HistoricalBatchRoots) ByteLength(spec *common.Spec) (out uint64)
func (*HistoricalBatchRoots) Deserialize ¶
func (a *HistoricalBatchRoots) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*HistoricalBatchRoots) FixedLength ¶
func (a *HistoricalBatchRoots) FixedLength(spec *common.Spec) uint64
func (HistoricalBatchRoots) HashTreeRoot ¶
func (HistoricalBatchRoots) Serialize ¶
func (a HistoricalBatchRoots) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
type HistoricalBatchView ¶
type HistoricalBatchView struct{ *ContainerView }
func AsHistoricalBatch ¶
func AsHistoricalBatch(v View, err error) (*HistoricalBatchView, error)
func (*HistoricalBatchView) BlockRoots ¶
func (v *HistoricalBatchView) BlockRoots() (*BatchRootsView, error)
func (*HistoricalBatchView) StateRoots ¶
func (v *HistoricalBatchView) StateRoots() (*BatchRootsView, error)
type HistoricalRoots ¶
roots of HistoricalBatch
func (HistoricalRoots) ByteLength ¶
func (a HistoricalRoots) ByteLength(spec *common.Spec) (out uint64)
func (*HistoricalRoots) Deserialize ¶
func (a *HistoricalRoots) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*HistoricalRoots) FixedLength ¶
func (a *HistoricalRoots) FixedLength(spec *common.Spec) uint64
func (HistoricalRoots) HashTreeRoot ¶
func (HistoricalRoots) Serialize ¶
func (a HistoricalRoots) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
type HistoricalRootsView ¶
type HistoricalRootsView struct{ *ComplexListView }
roots of HistoricalBatch
func AsHistoricalRoots ¶
func AsHistoricalRoots(v View, err error) (*HistoricalRootsView, error)
type IndexedAttestation ¶
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 ¶
func (a *IndexedAttestation) ByteLength(spec *common.Spec) uint64
func (*IndexedAttestation) Deserialize ¶
func (p *IndexedAttestation) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*IndexedAttestation) FixedLength ¶
func (*IndexedAttestation) FixedLength(*common.Spec) uint64
func (*IndexedAttestation) HashTreeRoot ¶
func (*IndexedAttestation) Serialize ¶
func (a *IndexedAttestation) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
type JustificationStakeData ¶
type JustificationStakeData struct { CurrentEpoch common.Epoch // Minimum 1 effective balance increment. May include balance of recently slashed validators. TotalActiveStake common.Gwei // Minimum 1 effective balance increment PrevEpochUnslashedTargetStake common.Gwei // Minimum 1 effective balance increment CurrEpochUnslashedTargetStake common.Gwei }
type KickstartValidatorData ¶
type PendingAttestation ¶
type PendingAttestation struct { AggregationBits AttestationBits `json:"aggregation_bits" yaml:"aggregation_bits"` Data AttestationData `json:"data" yaml:"data"` InclusionDelay common.Slot `json:"inclusion_delay" yaml:"inclusion_delay"` ProposerIndex common.ValidatorIndex `json:"proposer_index" yaml:"proposer_index"` }
func (*PendingAttestation) ByteLength ¶
func (a *PendingAttestation) ByteLength(spec *common.Spec) uint64
func (*PendingAttestation) Deserialize ¶
func (a *PendingAttestation) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*PendingAttestation) FixedLength ¶
func (a *PendingAttestation) FixedLength(*common.Spec) uint64
func (*PendingAttestation) HashTreeRoot ¶
func (*PendingAttestation) Serialize ¶
func (a *PendingAttestation) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
func (*PendingAttestation) View ¶
func (att *PendingAttestation) View(spec *common.Spec) *PendingAttestationView
type PendingAttestationView ¶
type PendingAttestationView struct{ *ContainerView }
func AsPendingAttestation ¶
func AsPendingAttestation(v View, err error) (*PendingAttestationView, error)
func (*PendingAttestationView) Raw ¶
func (v *PendingAttestationView) Raw() (*PendingAttestation, error)
type PendingAttestations ¶
type PendingAttestations []*PendingAttestation
func (PendingAttestations) ByteLength ¶
func (p PendingAttestations) ByteLength(spec *common.Spec) (out uint64)
func (*PendingAttestations) Deserialize ¶
func (a *PendingAttestations) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*PendingAttestations) FixedLength ¶
func (a *PendingAttestations) FixedLength(*common.Spec) uint64
func (PendingAttestations) HashTreeRoot ¶
func (PendingAttestations) Serialize ¶
func (a PendingAttestations) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
type PendingAttestationsView ¶
type PendingAttestationsView struct{ *ComplexListView }
func AsPendingAttestations ¶
func AsPendingAttestations(v View, err error) (*PendingAttestationsView, error)
type ProposerSlashing ¶
type ProposerSlashing struct { SignedHeader1 common.SignedBeaconBlockHeader `json:"signed_header_1" yaml:"signed_header_1"` SignedHeader2 common.SignedBeaconBlockHeader `json:"signed_header_2" yaml:"signed_header_2"` }
func (*ProposerSlashing) ByteLength ¶
func (a *ProposerSlashing) ByteLength() uint64
func (*ProposerSlashing) Deserialize ¶
func (a *ProposerSlashing) Deserialize(dr *codec.DecodingReader) error
func (*ProposerSlashing) FixedLength ¶
func (*ProposerSlashing) FixedLength() uint64
func (*ProposerSlashing) HashTreeRoot ¶
func (p *ProposerSlashing) HashTreeRoot(hFn tree.HashFn) common.Root
func (*ProposerSlashing) Serialize ¶
func (a *ProposerSlashing) Serialize(w *codec.EncodingWriter) error
type ProposerSlashings ¶
type ProposerSlashings []ProposerSlashing
func (ProposerSlashings) ByteLength ¶
func (a ProposerSlashings) ByteLength(_ *common.Spec) (out uint64)
func (*ProposerSlashings) Deserialize ¶
func (a *ProposerSlashings) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*ProposerSlashings) FixedLength ¶
func (*ProposerSlashings) FixedLength(*common.Spec) uint64
func (ProposerSlashings) HashTreeRoot ¶
func (ProposerSlashings) Serialize ¶
func (a ProposerSlashings) Serialize(_ *common.Spec, w *codec.EncodingWriter) error
type RandaoMixes ¶
RandaoMixes is a EPOCHS_PER_HISTORICAL_VECTOR vector
func (RandaoMixes) ByteLength ¶
func (a RandaoMixes) ByteLength(spec *common.Spec) (out uint64)
func (*RandaoMixes) Deserialize ¶
func (a *RandaoMixes) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*RandaoMixes) FixedLength ¶
func (a *RandaoMixes) FixedLength(spec *common.Spec) uint64
func (RandaoMixes) HashTreeRoot ¶
func (RandaoMixes) Serialize ¶
func (a RandaoMixes) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
type RandaoMixesView ¶
type RandaoMixesView struct{ *ComplexVectorView }
Randomness and committees
func AsRandaoMixes ¶
func AsRandaoMixes(v View, err error) (*RandaoMixesView, error)
func SeedRandao ¶
func (*RandaoMixesView) GetRandomMix ¶
Provides a source of randomness for the state, for e.g. shuffling
func (*RandaoMixesView) SetRandomMix ¶
type RegistryBalancesView ¶
type RegistryBalancesView struct {
*BasicListView
}
func AsRegistryBalances ¶
func AsRegistryBalances(v View, err error) (*RegistryBalancesView, error)
func (*RegistryBalancesView) AllBalances ¶
func (v *RegistryBalancesView) AllBalances() ([]common.Gwei, error)
func (*RegistryBalancesView) GetBalance ¶
func (v *RegistryBalancesView) GetBalance(index common.ValidatorIndex) (common.Gwei, error)
func (*RegistryBalancesView) Iter ¶
func (v *RegistryBalancesView) Iter() (next func() (bal common.Gwei, ok bool, err error))
func (*RegistryBalancesView) SetBalance ¶
func (v *RegistryBalancesView) SetBalance(index common.ValidatorIndex, bal common.Gwei) error
type RegistryIndices ¶
type RegistryIndices []common.ValidatorIndex
func (RegistryIndices) ByteLength ¶
func (a RegistryIndices) ByteLength(spec *common.Spec) uint64
func (*RegistryIndices) Deserialize ¶
func (p *RegistryIndices) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*RegistryIndices) FixedLength ¶
func (*RegistryIndices) FixedLength() uint64
func (RegistryIndices) HashTreeRoot ¶
func (RegistryIndices) Serialize ¶
func (a RegistryIndices) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
type RegistryProcessData ¶
type RegistryProcessData struct { IndicesToSetActivationEligibility []common.ValidatorIndex // Ignores churn. Apply churn-limit manually. // Maybe, because finality affects it still. IndicesToMaybeActivate []common.ValidatorIndex IndicesToEject []common.ValidatorIndex ExitQueueEnd common.Epoch ExitQueueEndChurn uint64 ChurnLimit uint64 }
func ComputeRegistryProcessData ¶
func ComputeRegistryProcessData(spec *common.Spec, flats []common.FlatValidator, currentEpoch common.Epoch) *RegistryProcessData
type RewardsAndPenalties ¶
type RewardsAndPenalties struct { Source *common.Deltas Target *common.Deltas Head *common.Deltas InclusionDelay *common.Deltas Inactivity *common.Deltas }
func AttestationRewardsAndPenalties ¶
func AttestationRewardsAndPenalties(ctx context.Context, spec *common.Spec, epc *common.EpochsContext, attesterData *EpochAttesterData, state *BeaconStateView) (*RewardsAndPenalties, error)
func NewRewardsAndPenalties ¶
func NewRewardsAndPenalties(validatorCount uint64) *RewardsAndPenalties
type SignedAggregateAndProof ¶
type SignedAggregateAndProof struct { Message AggregateAndProof `json:"message"` Signature common.BLSSignature `json:"signature"` }
func (*SignedAggregateAndProof) ByteLength ¶
func (a *SignedAggregateAndProof) ByteLength(spec *common.Spec) uint64
func (*SignedAggregateAndProof) Deserialize ¶
func (a *SignedAggregateAndProof) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*SignedAggregateAndProof) FixedLength ¶
func (a *SignedAggregateAndProof) FixedLength(*common.Spec) uint64
func (*SignedAggregateAndProof) HashTreeRoot ¶
func (*SignedAggregateAndProof) Serialize ¶
func (a *SignedAggregateAndProof) Serialize(spec *common.Spec, w *codec.EncodingWriter) 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 SignedVoluntaryExit ¶
type SignedVoluntaryExit struct { Message VoluntaryExit `json:"message" yaml:"message"` Signature common.BLSSignature `json:"signature" yaml:"signature"` }
func (*SignedVoluntaryExit) ByteLength ¶
func (v *SignedVoluntaryExit) ByteLength() uint64
func (*SignedVoluntaryExit) Deserialize ¶
func (v *SignedVoluntaryExit) Deserialize(dr *codec.DecodingReader) error
func (*SignedVoluntaryExit) FixedLength ¶
func (*SignedVoluntaryExit) FixedLength() uint64
func (*SignedVoluntaryExit) HashTreeRoot ¶
func (v *SignedVoluntaryExit) HashTreeRoot(hFn tree.HashFn) common.Root
func (*SignedVoluntaryExit) Serialize ¶
func (v *SignedVoluntaryExit) Serialize(w *codec.EncodingWriter) error
type SlashingsHistory ¶
SlashingsHistory is a EPOCHS_PER_SLASHINGS_VECTOR vector
func (SlashingsHistory) ByteLength ¶
func (a SlashingsHistory) ByteLength(spec *common.Spec) (out uint64)
func (*SlashingsHistory) Deserialize ¶
func (a *SlashingsHistory) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*SlashingsHistory) FixedLength ¶
func (a *SlashingsHistory) FixedLength(spec *common.Spec) uint64
func (SlashingsHistory) HashTreeRoot ¶
func (SlashingsHistory) Serialize ¶
func (a SlashingsHistory) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
type SlashingsView ¶
type SlashingsView struct{ *BasicVectorView }
func AsSlashings ¶
func AsSlashings(v View, err error) (*SlashingsView, error)
func (*SlashingsView) AddSlashing ¶
func (*SlashingsView) GetSlashingsValue ¶
func (*SlashingsView) ResetSlashings ¶
func (sl *SlashingsView) ResetSlashings(epoch common.Epoch) error
type Validator ¶
type Validator struct { Pubkey common.BLSPubkey `json:"pubkey" yaml:"pubkey"` WithdrawalCredentials common.Root `json:"withdrawal_credentials" yaml:"withdrawal_credentials"` EffectiveBalance common.Gwei `json:"effective_balance" yaml:"effective_balance"` Slashed bool `json:"slashed" yaml:"slashed"` ActivationEligibilityEpoch common.Epoch `json:"activation_eligibility_epoch" yaml:"activation_eligibility_epoch"` ActivationEpoch common.Epoch `json:"activation_epoch" yaml:"activation_epoch"` ExitEpoch common.Epoch `json:"exit_epoch" yaml:"exit_epoch"` WithdrawableEpoch common.Epoch `json:"withdrawable_epoch" yaml:"withdrawable_epoch"` }
func (*Validator) ByteLength ¶
func (*Validator) Deserialize ¶
func (v *Validator) Deserialize(dr *codec.DecodingReader) error
func (*Validator) FixedLength ¶
func (*Validator) View ¶
func (v *Validator) View() *ValidatorView
type ValidatorRegistry ¶
type ValidatorRegistry []*Validator
func (ValidatorRegistry) ByteLength ¶
func (a ValidatorRegistry) ByteLength(spec *common.Spec) (out uint64)
func (*ValidatorRegistry) Deserialize ¶
func (a *ValidatorRegistry) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*ValidatorRegistry) FixedLength ¶
func (a *ValidatorRegistry) FixedLength(spec *common.Spec) uint64
func (ValidatorRegistry) HashTreeRoot ¶
func (ValidatorRegistry) Serialize ¶
func (a ValidatorRegistry) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
type ValidatorView ¶
type ValidatorView struct {
*ContainerView
}
func AsValidator ¶
func AsValidator(v View, err error) (*ValidatorView, error)
func NewValidatorView ¶
func NewValidatorView() *ValidatorView
func (*ValidatorView) ActivationEligibilityEpoch ¶
func (v *ValidatorView) ActivationEligibilityEpoch() (common.Epoch, error)
func (*ValidatorView) ActivationEpoch ¶
func (v *ValidatorView) ActivationEpoch() (common.Epoch, error)
func (*ValidatorView) EffectiveBalance ¶
func (v *ValidatorView) EffectiveBalance() (common.Gwei, error)
func (*ValidatorView) Flatten ¶
func (v *ValidatorView) Flatten(dst *common.FlatValidator) error
func (*ValidatorView) MakeSlashed ¶
func (v *ValidatorView) MakeSlashed() error
func (*ValidatorView) SetActivationEligibilityEpoch ¶
func (v *ValidatorView) SetActivationEligibilityEpoch(epoch common.Epoch) error
func (*ValidatorView) SetActivationEpoch ¶
func (v *ValidatorView) SetActivationEpoch(epoch common.Epoch) error
func (*ValidatorView) SetEffectiveBalance ¶
func (v *ValidatorView) SetEffectiveBalance(b common.Gwei) error
func (*ValidatorView) SetExitEpoch ¶
func (v *ValidatorView) SetExitEpoch(ep common.Epoch) error
func (*ValidatorView) SetWithdrawableEpoch ¶
func (v *ValidatorView) SetWithdrawableEpoch(epoch common.Epoch) error
func (*ValidatorView) Slashed ¶
func (v *ValidatorView) Slashed() (bool, error)
func (*ValidatorView) WithdrawableEpoch ¶
func (v *ValidatorView) WithdrawableEpoch() (common.Epoch, error)
func (*ValidatorView) WithdrawalCredentials ¶
func (v *ValidatorView) WithdrawalCredentials() (out common.Root, err error)
type ValidatorsRegistryView ¶
type ValidatorsRegistryView struct{ *ComplexListView }
func AsValidatorsRegistry ¶
func AsValidatorsRegistry(v View, err error) (*ValidatorsRegistryView, error)
func (*ValidatorsRegistryView) IsValidIndex ¶
func (registry *ValidatorsRegistryView) IsValidIndex(index common.ValidatorIndex) (valid bool, err error)
func (*ValidatorsRegistryView) Iter ¶
func (registry *ValidatorsRegistryView) Iter() (next func() (val common.Validator, ok bool, err error))
func (*ValidatorsRegistryView) Validator ¶
func (registry *ValidatorsRegistryView) Validator(index common.ValidatorIndex) (common.Validator, error)
func (*ValidatorsRegistryView) ValidatorCount ¶
func (registry *ValidatorsRegistryView) ValidatorCount() (uint64, error)
type VoluntaryExit ¶
type VoluntaryExit struct { // Earliest epoch when voluntary exit can be processed Epoch common.Epoch `json:"epoch" yaml:"epoch"` ValidatorIndex common.ValidatorIndex `json:"validator_index" yaml:"validator_index"` }
func (*VoluntaryExit) ByteLength ¶
func (v *VoluntaryExit) ByteLength() uint64
func (*VoluntaryExit) Deserialize ¶
func (v *VoluntaryExit) Deserialize(dr *codec.DecodingReader) error
func (*VoluntaryExit) FixedLength ¶
func (*VoluntaryExit) FixedLength() uint64
func (*VoluntaryExit) HashTreeRoot ¶
func (v *VoluntaryExit) HashTreeRoot(hFn tree.HashFn) common.Root
func (*VoluntaryExit) Serialize ¶
func (v *VoluntaryExit) Serialize(w *codec.EncodingWriter) error
type VoluntaryExits ¶
type VoluntaryExits []SignedVoluntaryExit
func (VoluntaryExits) ByteLength ¶
func (a VoluntaryExits) ByteLength(spec *common.Spec) (out uint64)
func (*VoluntaryExits) Deserialize ¶
func (a *VoluntaryExits) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error
func (*VoluntaryExits) FixedLength ¶
func (*VoluntaryExits) FixedLength(*common.Spec) uint64
func (VoluntaryExits) HashTreeRoot ¶
func (VoluntaryExits) Serialize ¶
func (a VoluntaryExits) Serialize(spec *common.Spec, w *codec.EncodingWriter) error
Source Files ¶
- aggregate_and_proof.go
- attestation.go
- attestation_bits.go
- attester.go
- attester_slashing.go
- balances.go
- block.go
- deltas.go
- deposit.go
- eth1.go
- final.go
- genesis.go
- history.go
- indexed.go
- justification.go
- kickstart.go
- pending_attestation.go
- proposer_slashing.go
- randao.go
- registry.go
- slashings.go
- state.go
- transition.go
- validator.go
- voluntary_exit.go