standard

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parameter

type Parameter interface {
	// contains filtered or unexported methods
}

Parameter is the interface for service parameters.

func WithAggregateAttestationDataProvider

func WithAggregateAttestationDataProvider(provider eth2client.NonSpecAggregateAttestationProvider) Parameter

WithAggregateAttestationDataProvider sets the aggregate attestation provider.

func WithAggregateAttestationSubmitter

func WithAggregateAttestationSubmitter(submitter submitter.AggregateAttestationSubmitter) Parameter

WithAggregateAttestationSubmitter sets the aggregate attestation submitter.

func WithLogLevel

func WithLogLevel(logLevel zerolog.Level) Parameter

WithLogLevel sets the log level for the module.

func WithMonitor

func WithMonitor(monitor metrics.AttestationAggregationMonitor) Parameter

WithMonitor sets the monitor for this module.

func WithTargetAggregatorsPerCommitteeProvider

func WithTargetAggregatorsPerCommitteeProvider(provider eth2client.TargetAggregatorsPerCommitteeProvider) Parameter

WithTargetAggregatorsPerCommitteeProvider sets the target aggregators per attestation provider.

func WithValidatingAccountsProvider

func WithValidatingAccountsProvider(provider accountmanager.ValidatingAccountsProvider) Parameter

WithValidatingAccountsProvider sets the account manager.

type Service

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

Service is an attestation aggregator.

func New

func New(ctx context.Context, params ...Parameter) (*Service, error)

New creates a new attestation aggregator.

func (*Service) Aggregate

func (s *Service) Aggregate(ctx context.Context, data interface{})

Aggregate aggregates the attestations for a given slot/committee combination.

func (*Service) IsAggregator

func (s *Service) IsAggregator(ctx context.Context, validatorIndex uint64, committeeIndex uint64, slot uint64, committeeSize uint64) (bool, []byte, error)

IsAggregator reports if we are an attestation aggregator for a given valdiator/committee/slot combination.

Jump to

Keyboard shortcuts

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