staticdelay

package
v1.13.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package staticdelay provides a static delay in which a Vouch instance waits to see if another instance has attested or proposed before doing so itself.

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 WithAttestationPoolProvider

func WithAttestationPoolProvider(provider consensusclient.AttestationPoolProvider) Parameter

WithAttestationPoolProvider sets the attestation pool provider for the module.

func WithAttesterDelay

func WithAttesterDelay(delay time.Duration) Parameter

WithAttesterDelay sets the delay for the attester trigger.

func WithBeaconBlockHeadersProvider

func WithBeaconBlockHeadersProvider(provider consensusclient.BeaconBlockHeadersProvider) Parameter

WithBeaconBlockHeadersProvider sets the beacon block headers provider for the module.

func WithChainTime

func WithChainTime(provider chaintime.Service) Parameter

WithChainTime sets the chaintime provider for the module.

func WithLogLevel

func WithLogLevel(logLevel zerolog.Level) Parameter

WithLogLevel sets the log level for the module.

func WithMonitor

func WithMonitor(monitor metrics.Service) Parameter

WithMonitor sets the monitor for the module.

func WithProposerDelay

func WithProposerDelay(delay time.Duration) Parameter

WithProposerDelay sets the delay for the proposer trigger.

func WithSpecProvider

func WithSpecProvider(provider consensusclient.SpecProvider) Parameter

WithSpecProvider sets the specification provider for the module.

type Service

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

Service is the multi instance service.

func New

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

New creates a new controller.

func (*Service) OnAttestationFailure

func (s *Service) OnAttestationFailure(ctx context.Context, duty *attester.Duty)

OnAttestationFailure flags that an attempt to attest has failed.

func (*Service) OnProposalFailure

func (s *Service) OnProposalFailure(_ context.Context, duty *beaconblockproposer.Duty)

OnProposalFailure flags that an attempt to propose has failed.

func (*Service) ShouldAttest

func (s *Service) ShouldAttest(ctx context.Context, duty *attester.Duty) bool

ShouldAttest returns true if this Vouch instance should attest.

func (*Service) ShouldPropose

func (s *Service) ShouldPropose(ctx context.Context, duty *beaconblockproposer.Duty) bool

ShouldPropose returns true if this Vouch instance should propose.

Jump to

Keyboard shortcuts

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