first

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package first is a strategy that obtains beacon block proposals from multiple nodes and selects the first one returned.

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 WithBlindedProposalProviders added in v1.8.0

func WithBlindedProposalProviders(providers map[string]eth2client.BlindedProposalProvider) Parameter

WithBlindedProposalProviders sets the blinded proposal providers.

func WithChainTimeService added in v1.7.0

func WithChainTimeService(chainTime chaintime.Service) Parameter

WithChainTimeService sets the chain time service.

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 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 beacon block proposals.

func New

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

New creates a new beacon block proposal strategy.

func (*Service) BlindedProposal added in v1.8.0

func (s *Service) BlindedProposal(ctx context.Context,
	opts *api.BlindedProposalOpts,
) (
	*api.Response[*api.VersionedBlindedProposal],
	error,
)

BlindedProposal provides the first blinded proposal from a number of beacon nodes.

func (*Service) BlindedProposalWithExpectedPayload added in v1.8.0

func (s *Service) BlindedProposalWithExpectedPayload(ctx context.Context,
	opts *api.BlindedProposalOpts,
	bid *builderspec.VersionedSignedBuilderBid,
) (
	*api.Response[*api.VersionedBlindedProposal],
	error,
)

BlindedProposalWithExpectedPayload fetches a blinded proposal for signing.

Jump to

Keyboard shortcuts

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