synccommitteemessenger

package
v1.5.0-rc5 Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 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 sync committee contribution duty.

func NewDuty

func NewDuty(slot phase0.Slot, contributionIndices map[phase0.ValidatorIndex][]phase0.CommitteeIndex) *Duty

NewDuty creates a new sync committee contribution duty.

func (*Duty) Account

func (d *Duty) Account(index phase0.ValidatorIndex) e2wtypes.Account

Account provides a specific account.

func (*Duty) Accounts

func (d *Duty) Accounts() map[phase0.ValidatorIndex]e2wtypes.Account

Accounts provides all accounts.

func (*Duty) AggregatorSubcommittees

func (d *Duty) AggregatorSubcommittees(index phase0.ValidatorIndex) map[uint64]phase0.BLSSignature

AggregatorSubcommittees returns the map of subcommittees for which the supplied index is an aggregator.

func (*Duty) ContributionIndices

func (d *Duty) ContributionIndices() map[phase0.ValidatorIndex][]phase0.CommitteeIndex

ContributionIndices provides the contribution indices for the sync committee messenger.

func (*Duty) SetAccount

func (d *Duty) SetAccount(index phase0.ValidatorIndex, account e2wtypes.Account)

SetAccount sets the account.

func (*Duty) SetAggregatorSubcommittees

func (d *Duty) SetAggregatorSubcommittees(index phase0.ValidatorIndex, subcommittee uint64, selectionProof phase0.BLSSignature)

SetAggregatorSubcommittees sets the aggregator state for a validator.

func (*Duty) Slot

func (d *Duty) Slot() phase0.Slot

Slot provides the slot for the sync committee messenger.

func (*Duty) String

func (d *Duty) String() string

String provides a friendly string for the struct.

func (*Duty) Tuples

func (d *Duty) Tuples() []string

Tuples returns a slice of (validator index, committee indices) strings.

func (*Duty) ValidatorIndices

func (d *Duty) ValidatorIndices() []phase0.ValidatorIndex

ValidatorIndices provides the validator indices for the sync committee messenger.

type Service

type Service interface {
	// Prepare prepares in advance of a sync committee message.
	Prepare(ctx context.Context, data interface{}) error

	// Message generates and broadcasts sync committee messages for a slot.
	// It returns a list of messages made.
	Message(ctx context.Context, data interface{}) ([]*altair.SyncCommitteeMessage, error)
}

Service is the sync committee messenger service.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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