Documentation
¶
Index ¶
- Variables
- type Attestation
- type AttestationData
- type AttestationDataAndCustodyBit
- type AttestationDeltasFeature
- type AttestationFeature
- type AttestationProcessor
- type AttestationValidator
- type AttestationsState
- type AttesterStatusFeature
- type CommitteeBits
- func (cb CommitteeBits) BitLen() uint64
- func (cb CommitteeBits) FilterNonParticipants(committee []ValidatorIndex) []ValidatorIndex
- func (cb CommitteeBits) FilterParticipants(committee []ValidatorIndex) []ValidatorIndex
- func (cb CommitteeBits) GetBit(i uint64) bool
- func (cb *CommitteeBits) Limit() uint64
- func (cb CommitteeBits) Or(other CommitteeBits)
- func (cb CommitteeBits) SetBit(i uint64, v bool)
- type CommitteeIndices
- type EpochPendingAttestations
- type IndexedAttestation
- type PendingAttestation
Constants ¶
This section is empty.
Variables ¶
View Source
var AttestationDataAndCustodyBitSSZ = zssz.GetSSZ((*AttestationDataAndCustodyBit)(nil))
View Source
var AttestationSSZ = zssz.GetSSZ((*Attestation)(nil))
Functions ¶
This section is empty.
Types ¶
type Attestation ¶
type Attestation struct { AggregationBits CommitteeBits Data AttestationData CustodyBits CommitteeBits Signature BLSSignature }
func (*Attestation) ConvertToIndexed ¶
func (attestation *Attestation) ConvertToIndexed(committee []ValidatorIndex) (*IndexedAttestation, error)
Convert attestation to (almost) indexed-verifiable form
type AttestationData ¶
type AttestationData struct { Slot Slot Index CommitteeIndex // LMD GHOST vote BeaconBlockRoot Root // FFG vote Source Checkpoint Target Checkpoint }
type AttestationDataAndCustodyBit ¶
type AttestationDataAndCustodyBit struct { Data AttestationData CustodyBit bool // Challengeable bit (SSZ-bool, 1 byte) for the custody of shard data }
type AttestationDeltasFeature ¶
type AttestationDeltasFeature struct { Meta interface { meta.Versioning meta.RegistrySize meta.Staking meta.EffectiveBalances meta.AttesterStatuses meta.Finality } }
func (*AttestationDeltasFeature) AttestationDeltas ¶
func (f *AttestationDeltasFeature) AttestationDeltas() *Deltas
type AttestationFeature ¶
type AttestationFeature struct { State *AttestationsState Meta interface { meta.Versioning meta.BeaconCommittees meta.CommitteeCount meta.Finality meta.RegistrySize meta.Pubkeys meta.Proposers } }
func (*AttestationFeature) ProcessAttestation ¶
func (f *AttestationFeature) ProcessAttestation(attestation *Attestation) error
func (*AttestationFeature) ProcessAttestations ¶
func (f *AttestationFeature) ProcessAttestations(ops []Attestation) error
type AttestationProcessor ¶
type AttestationProcessor interface { ProcessAttestations(ops []Attestation) error ProcessAttestation(attestation *Attestation) error }
type AttestationValidator ¶
type AttestationValidator interface { meta.RegistrySize meta.Pubkeys meta.Versioning }
type AttestationsState ¶
type AttestationsState struct { PreviousEpochAttestations EpochPendingAttestations CurrentEpochAttestations EpochPendingAttestations }
func (*AttestationsState) RotateEpochAttestations ¶
func (state *AttestationsState) RotateEpochAttestations()
Rotate current/previous epoch attestations
type AttesterStatusFeature ¶
type AttesterStatusFeature struct { State *AttestationsState Meta interface { meta.Versioning meta.RegistrySize meta.CommitteeCount meta.BeaconCommittees meta.History meta.SlashedIndices meta.ActiveIndices meta.ValidatorEpochData } }
func (*AttesterStatusFeature) GetAttesterStatuses ¶ added in v0.8.4
func (f *AttesterStatusFeature) GetAttesterStatuses() (out []AttesterStatus)
type CommitteeBits ¶
type CommitteeBits []byte
func (CommitteeBits) BitLen ¶
func (cb CommitteeBits) BitLen() uint64
func (CommitteeBits) FilterNonParticipants ¶
func (cb CommitteeBits) FilterNonParticipants(committee []ValidatorIndex) []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.
func (CommitteeBits) FilterParticipants ¶
func (cb CommitteeBits) FilterParticipants(committee []ValidatorIndex) []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.
func (CommitteeBits) GetBit ¶
func (cb CommitteeBits) GetBit(i uint64) bool
func (*CommitteeBits) Limit ¶
func (cb *CommitteeBits) Limit() uint64
func (CommitteeBits) Or ¶
func (cb CommitteeBits) Or(other CommitteeBits)
Sets the bits to true that are true in other. (in place)
func (CommitteeBits) SetBit ¶
func (cb CommitteeBits) SetBit(i uint64, v bool)
type CommitteeIndices ¶
type CommitteeIndices []ValidatorIndex
func (*CommitteeIndices) Limit ¶
func (ci *CommitteeIndices) Limit() uint64
type EpochPendingAttestations ¶
type EpochPendingAttestations []*PendingAttestation
func (*EpochPendingAttestations) Limit ¶
func (*EpochPendingAttestations) Limit() uint64
type IndexedAttestation ¶
type IndexedAttestation struct { // Indices with custody bit equal to 0 CustodyBit0Indices CommitteeIndices // Indices with custody bit equal to 1 CustodyBit1Indices CommitteeIndices Data AttestationData Signature BLSSignature }
func (*IndexedAttestation) Validate ¶
func (indexedAttestation *IndexedAttestation) Validate(m AttestationValidator) error
Verify validity of slashable_attestation fields.
type PendingAttestation ¶
type PendingAttestation struct { AggregationBits CommitteeBits Data AttestationData InclusionDelay Slot ProposerIndex ValidatorIndex }
Click to show internal directories.
Click to hide internal directories.