Documentation ¶
Index ¶
- type Duty
- func (d *Duty) CommitteeIndices() []spec.CommitteeIndex
- func (d *Duty) CommitteeSize(committeeIndex spec.CommitteeIndex) uint64
- func (d *Duty) CommitteesAtSlot() uint64
- func (d *Duty) Slot() spec.Slot
- func (d *Duty) String() string
- func (d *Duty) Tuples() []string
- func (d *Duty) ValidatorCommitteeIndices() []uint64
- func (d *Duty) ValidatorIndices() []spec.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(ctx context.Context, slot spec.Slot, committeesAtSlot uint64, validatorIndices []spec.ValidatorIndex, committeeIndices []spec.CommitteeIndex, validatorCommitteeIndices []uint64, committeeLengths map[spec.CommitteeIndex]uint64, ) (*Duty, error)
NewDuty creates a new beacon block attester duty.
func (*Duty) CommitteeIndices ¶
func (d *Duty) CommitteeIndices() []spec.CommitteeIndex
CommitteeIndices provides the committee indices for the beacon block attester.
func (*Duty) CommitteeSize ¶
func (d *Duty) CommitteeSize(committeeIndex spec.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() []spec.ValidatorIndex
ValidatorIndices provides the validator indices for the beacon block attester.