Documentation ¶
Overview ¶
Package best is a strategy that obtains beacon block proposals from multiple nodes and selects the best one based on its attestation load.
Index ¶
- type Parameter
- func WithBeaconBlockProposalProviders(providers map[string]eth2client.BeaconBlockProposalProvider) Parameter
- func WithClientMonitor(monitor metrics.ClientMonitor) Parameter
- func WithLogLevel(logLevel zerolog.Level) Parameter
- func WithProcessConcurrency(concurrency int64) Parameter
- func WithSignedBeaconBlockProvider(provider eth2client.SignedBeaconBlockProvider) Parameter
- func WithTimeout(timeout time.Duration) Parameter
- type Service
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 WithBeaconBlockProposalProviders ¶
func WithBeaconBlockProposalProviders(providers map[string]eth2client.BeaconBlockProposalProvider) Parameter
WithBeaconBlockProposalProviders sets the beacon block proposal providers.
func WithClientMonitor ¶
func WithClientMonitor(monitor metrics.ClientMonitor) Parameter
WithClientMonitor sets the client monitor for the service.
func WithLogLevel ¶
WithLogLevel sets the log level for the module.
func WithProcessConcurrency ¶
WithProcessConcurrency sets the concurrency for the service.
func WithSignedBeaconBlockProvider ¶ added in v0.9.0
func WithSignedBeaconBlockProvider(provider eth2client.SignedBeaconBlockProvider) Parameter
WithSignedBeaconBlockProvider sets the signed beacon block provider.
func WithTimeout ¶
WithTimeout sets the timeout for beacon block proposal requests.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the provider for beacon block proposals.
func (*Service) BeaconBlockProposal ¶
func (s *Service) BeaconBlockProposal(ctx context.Context, slot spec.Slot, randaoReveal spec.BLSSignature, graffiti []byte) (*spec.BeaconBlock, error)
BeaconBlockProposal provides the best beacon block proposal from a number of beacon nodes.