best

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: 12 Imported by: 0

Documentation

Overview

Package best is a strategy that obtains attestation from multiple nodes and selects the best one.

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 WithAttestationDataProviders

func WithAttestationDataProviders(providers map[string]eth2client.AttestationDataProvider) Parameter

WithAttestationDataProviders sets the beacon block proposal providers.

func WithClientMonitor

func WithClientMonitor(monitor metrics.ClientMonitor) Parameter

WithClientMonitor sets the client monitor for the service.

func WithLogLevel

func WithLogLevel(logLevel zerolog.Level) Parameter

WithLogLevel sets the log level for the module.

func WithProcessConcurrency

func WithProcessConcurrency(concurrency int64) Parameter

WithProcessConcurrency sets the concurrency for the service.

func WithTimeout

func WithTimeout(timeout time.Duration) Parameter

WithTimeout sets the timeout for requests.

type Service

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

Service is the provider for attestation data.

func New

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

New creates a new attestation data strategy.

func (*Service) AttestationData

func (s *Service) AttestationData(ctx context.Context, slot phase0.Slot, committeeIndex phase0.CommitteeIndex) (*phase0.AttestationData, error)

AttestationData provides the best attestation data from a number of beacon nodes.

Jump to

Keyboard shortcuts

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