attester

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Duty

type Duty struct {
	// contains filtered or unexported fields
}

Duty contains information about a beacon block attester duty.

func MergeDuties

func MergeDuties(ctx context.Context, attesterDuties []*api.AttesterDuty) ([]*Duty, error)

MergeDuties merges attester duties given by an Ethereum 2 client into vouch's per-slot structure.

func NewDuty

func NewDuty(ctx context.Context, slot uint64, validatorIndices []uint64, committeeIndices []uint64, validatorCommitteeIndices []uint64, committeeLengths map[uint64]uint64) (*Duty, error)

NewDuty creates a new beacon block attester duty.

func (*Duty) CommitteeIndices

func (d *Duty) CommitteeIndices() []uint64

CommitteeIndices provides the committee indices for the beacon block attester.

func (*Duty) CommitteeSize

func (d *Duty) CommitteeSize(committeeIndex uint64) uint64

CommitteeSize provides the committee size for a given index.

func (*Duty) Slot

func (d *Duty) Slot() uint64

Slot provides the slot for the beacon block attester.

func (*Duty) String

func (d *Duty) String() string

String provides a friendly string for the struct's main details.

func (*Duty) ValidatorCommitteeIndices

func (d *Duty) ValidatorCommitteeIndices() []uint64

ValidatorCommitteeIndices provides the indices of validators within committees for the beacon block attester.

func (*Duty) ValidatorIndices

func (d *Duty) ValidatorIndices() []uint64

ValidatorIndices provides the validator indices for the beacon block attester.

type Service

type Service interface {
	// Attest carries out attestations for a slot.
	// It returns a list of attestations made.
	Attest(ctx context.Context, details interface{}) ([]*spec.Attestation, error)
}

Service is the beacon block attester service.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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