Documentation ¶
Index ¶
- type Duty
- func (d *Duty) CommitteeIndices() []phase0.CommitteeIndex
- func (d *Duty) CommitteeSize(committeeIndex phase0.CommitteeIndex) uint64
- func (d *Duty) CommitteesAtSlot() uint64
- func (d *Duty) Slot() phase0.Slot
- func (d *Duty) String() string
- func (d *Duty) Tuples() []string
- func (d *Duty) ValidatorCommitteeIndices() []uint64
- func (d *Duty) ValidatorIndices() []phase0.ValidatorIndex
- type Service
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 beacon block attester duties for a given slot.
func MergeDuties ¶
MergeDuties merges attester duties given by an Ethereum 2 client into vouch's per-slot structure.
func NewDuty ¶
func NewDuty(_ context.Context, slot phase0.Slot, committeesAtSlot uint64, validatorIndices []phase0.ValidatorIndex, committeeIndices []phase0.CommitteeIndex, validatorCommitteeIndices []uint64, committeeLengths map[phase0.CommitteeIndex]uint64, ) (*Duty, error)
NewDuty creates a new beacon block attester duty.
func (*Duty) CommitteeIndices ¶
func (d *Duty) CommitteeIndices() []phase0.CommitteeIndex
CommitteeIndices provides the committee indices for the beacon block attester.
func (*Duty) CommitteeSize ¶
func (d *Duty) CommitteeSize(committeeIndex phase0.CommitteeIndex) uint64
CommitteeSize provides the committee size for a given index.
func (*Duty) CommitteesAtSlot ¶ added in v0.9.0
CommitteesAtSlot provides the number of committees at the duty's slot.
func (*Duty) Tuples ¶ added in v0.9.0
Tuples returns a slice of (validator index, committee index, validator position in committee) strings. Useful for logging the
func (*Duty) ValidatorCommitteeIndices ¶
ValidatorCommitteeIndices provides the indices of validators within committees for the beacon block attester.
func (*Duty) ValidatorIndices ¶
func (d *Duty) ValidatorIndices() []phase0.ValidatorIndex
ValidatorIndices provides the validator indices for the beacon block attester.