Documentation ¶
Overview ¶
package majority is a strategy that obtains attestation from multiple nodes and selects the best one.
Index ¶
- type Parameter
- func WithAttestationDataProviders(providers map[string]eth2client.AttestationDataProvider) Parameter
- func WithBlockRootToSlotCache(cache cache.BlockRootToSlotProvider) Parameter
- func WithChainTime(chainTime chaintime.Service) Parameter
- func WithClientMonitor(monitor metrics.ClientMonitor) Parameter
- func WithLogLevel(logLevel zerolog.Level) Parameter
- func WithProcessConcurrency(concurrency int64) Parameter
- func WithThreshold(minimumMajority uint64) 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 WithAttestationDataProviders ¶
func WithAttestationDataProviders(providers map[string]eth2client.AttestationDataProvider) Parameter
WithAttestationDataProviders sets the beacon block proposal providers.
func WithBlockRootToSlotCache ¶
func WithBlockRootToSlotCache(cache cache.BlockRootToSlotProvider) Parameter
WithBlockRootToSlotCache sets the block root to slot cache.
func WithChainTime ¶
WithChainTime sets the chain time provider for this service.
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 WithThreshold ¶
WithThreshold sets the minimum number of providers who must agree for data to be considered acceptable.
func WithTimeout ¶
WithTimeout sets the timeout for requests.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the provider for attestation data.
func (*Service) AttestationData ¶
func (s *Service) AttestationData(ctx context.Context, opts *api.AttestationDataOpts, ) ( *api.Response[*phase0.AttestationData], error, )
AttestationData provides the consensus attestation data from a number of beacon nodes.