standard

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

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 WithAttestationAggregator

func WithAttestationAggregator(aggregator attestationaggregator.Service) Parameter

WithAttestationAggregator sets the attestation aggregator.

func WithAttester

func WithAttester(attester attester.Service) Parameter

WithAttester sets the attester.

func WithAttesterDutiesProvider

func WithAttesterDutiesProvider(provider eth2client.AttesterDutiesProvider) Parameter

WithAttesterDutiesProvider sets the attester duties provider.

func WithBeaconBlockProposer

func WithBeaconBlockProposer(proposer beaconblockproposer.Service) Parameter

WithBeaconBlockProposer sets the beacon block propser.

func WithBeaconChainHeadUpdatedSource

func WithBeaconChainHeadUpdatedSource(source eth2client.BeaconChainHeadUpdatedSource) Parameter

WithBeaconChainHeadUpdatedSource sets the source for an OnBeaconChainHeadUpdated request

func WithBeaconCommitteeSubscriber

func WithBeaconCommitteeSubscriber(subscriber beaconcommitteesubscriber.Service) Parameter

WithBeaconCommitteeSubscriber sets the beacon committee subscriber.

func WithChainTimeService

func WithChainTimeService(service chaintime.Service) Parameter

WithChainTimeService sets the chain time service.

func WithLogLevel

func WithLogLevel(logLevel zerolog.Level) Parameter

WithLogLevel sets the log level for the module.

func WithMonitor

func WithMonitor(monitor metrics.ControllerMonitor) Parameter

WithMonitor sets the monitor for the module.

func WithProposerDutiesProvider

func WithProposerDutiesProvider(provider eth2client.ProposerDutiesProvider) Parameter

WithProposerDutiesProvider sets the proposer duties provider.

func WithScheduler

func WithScheduler(scheduler scheduler.Service) Parameter

WithScheduler sets the scheduler.

func WithSlotDurationProvider

func WithSlotDurationProvider(provider eth2client.SlotDurationProvider) Parameter

WithSlotDurationProvider sets the slot duration provider.

func WithSlotsPerEpochProvider

func WithSlotsPerEpochProvider(provider eth2client.SlotsPerEpochProvider) Parameter

WithSlotsPerEpochProvider sets the slots per epoch provider.

func WithValidatingAccountsProvider

func WithValidatingAccountsProvider(provider accountmanager.ValidatingAccountsProvider) Parameter

WithValidatingAccountsProvider sets the validating accounts provider.

type Service

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

Service is the co-ordination system for vouch. It runs purely against clock events, setting up jobs for the validator's processes of block proposal, attestation creation and attestation aggregation.

func New

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

New creates a new controller.

func (*Service) AttestAndScheduleAggregate

func (s *Service) AttestAndScheduleAggregate(ctx context.Context, data interface{})

AttestAndScheduleAggregate attests, then schedules aggregation jobs as required.

func (*Service) OnBeaconChainHeadUpdated

func (s *Service) OnBeaconChainHeadUpdated(ctx context.Context, slot uint64, stateRoot []byte, bodyRoot []byte, epochTransitioni bool)

OnBeaconChainHeadUpdated runs attestations for a slot immediately, if the update is for the current slot.

Jump to

Keyboard shortcuts

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