attestations

package
v0.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AttestationDataSSZ = zssz.GetSSZ((*AttestationData)(nil))
View Source
var AttestationSSZ = zssz.GetSSZ((*Attestation)(nil))

Functions

This section is empty.

Types

type Attestation

type Attestation struct {
	AggregationBits CommitteeBits
	Data            AttestationData
	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 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

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

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

type IndexedAttestation

type IndexedAttestation struct {
	AttestingIndices 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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL