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 WithBlindedBeaconBlockProposalProviders(providers map[string]eth2client.BlindedBeaconBlockProposalProvider) Parameter
- func WithBlockRootToSlotCache(cache cache.BlockRootToSlotProvider) Parameter
- func WithChainTimeService(chainTime chaintime.Service) Parameter
- func WithClientMonitor(monitor metrics.ClientMonitor) Parameter
- func WithEventsProvider(provider eth2client.EventsProvider) Parameter
- func WithLogLevel(logLevel zerolog.Level) Parameter
- func WithProcessConcurrency(concurrency int64) Parameter
- func WithSignedBeaconBlockProvider(provider eth2client.SignedBeaconBlockProvider) Parameter
- func WithSpecProvider(provider eth2client.SpecProvider) Parameter
- func WithTimeout(timeout time.Duration) Parameter
- type Service
- func (s *Service) BlindedBeaconBlockProposal(ctx context.Context, slot phase0.Slot, randaoReveal phase0.BLSSignature, ...) (*api.VersionedBlindedBeaconBlock, error)
- func (s *Service) BlindedBeaconBlockProposalWithExpectedPayload(ctx context.Context, slot phase0.Slot, randaoReveal phase0.BLSSignature, ...) (*api.VersionedBlindedBeaconBlock, error)
- func (s *Service) HandleHeadEvent(event *api.Event)
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 WithBlindedBeaconBlockProposalProviders ¶
func WithBlindedBeaconBlockProposalProviders(providers map[string]eth2client.BlindedBeaconBlockProposalProvider) Parameter
WithBlindedBeaconBlockProposalProviders sets the blinded beacon block proposal providers.
func WithBlockRootToSlotCache ¶
func WithBlockRootToSlotCache(cache cache.BlockRootToSlotProvider) Parameter
WithBlockRootToSlotCache sets the block root to slot cache.
func WithChainTimeService ¶
WithChainTimeService sets the chain time service.
func WithClientMonitor ¶
func WithClientMonitor(monitor metrics.ClientMonitor) Parameter
WithClientMonitor sets the client monitor for the service.
func WithEventsProvider ¶
func WithEventsProvider(provider eth2client.EventsProvider) Parameter
WithEventsProvider sets the events provider.
func WithLogLevel ¶
WithLogLevel sets the log level for the module.
func WithProcessConcurrency ¶
WithProcessConcurrency sets the concurrency for the service.
func WithSignedBeaconBlockProvider ¶
func WithSignedBeaconBlockProvider(provider eth2client.SignedBeaconBlockProvider) Parameter
WithSignedBeaconBlockProvider sets the signed beacon block provider.
func WithSpecProvider ¶
func WithSpecProvider(provider eth2client.SpecProvider) Parameter
WithSpecProvider sets the beacon spec provider.
func WithTimeout ¶
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 (*Service) BlindedBeaconBlockProposal ¶
func (s *Service) BlindedBeaconBlockProposal(ctx context.Context, slot phase0.Slot, randaoReveal phase0.BLSSignature, graffiti []byte, ) ( *api.VersionedBlindedBeaconBlock, error, )
BlindedBeaconBlockProposal provides the best blinded beacon block proposal from a number of beacon nodes.
func (*Service) BlindedBeaconBlockProposalWithExpectedPayload ¶ added in v1.7.0
func (s *Service) BlindedBeaconBlockProposalWithExpectedPayload(ctx context.Context, slot phase0.Slot, randaoReveal phase0.BLSSignature, graffiti []byte, bid *builderspec.VersionedSignedBuilderBid, ) ( *api.VersionedBlindedBeaconBlock, error, )
BlindedBeaconBlockProposalWithExpectedPayload fetches a blinded proposed beacon block for signing.
func (*Service) HandleHeadEvent ¶
HandleHeadEvent handles the "head" events from the beacon node.