Documentation ¶
Index ¶
- type Parameter
- func WithAccountPaths(accountPaths []string) Parameter
- func WithCACert(cert []byte) Parameter
- func WithClientCert(cert []byte) Parameter
- func WithClientKey(key []byte) Parameter
- func WithClientMonitor(clientMonitor metrics.ClientMonitor) Parameter
- func WithCurrentEpochProvider(provider chaintime.Service) Parameter
- func WithDomainProvider(provider eth2client.DomainProvider) Parameter
- func WithEndpoints(endpoints []string) Parameter
- func WithFarFutureEpochProvider(provider eth2client.FarFutureEpochProvider) Parameter
- func WithLogLevel(logLevel zerolog.Level) Parameter
- func WithMonitor(monitor metrics.Service) Parameter
- func WithProcessConcurrency(concurrency int64) Parameter
- func WithTimeout(timeout time.Duration) Parameter
- func WithValidatorsManager(provider validatorsmanager.Service) Parameter
- type Service
- func (s *Service) AccountByPublicKey(_ context.Context, pubkey phase0.BLSPubKey) (e2wtypes.Account, error)
- func (s *Service) Refresh(ctx context.Context)
- func (s *Service) SyncCommitteeAccountsForEpoch(ctx context.Context, epoch phase0.Epoch) (map[phase0.ValidatorIndex]e2wtypes.Account, error)
- func (s *Service) SyncCommitteeAccountsForEpochByIndex(ctx context.Context, epoch phase0.Epoch, indices []phase0.ValidatorIndex) (map[phase0.ValidatorIndex]e2wtypes.Account, error)
- func (s *Service) ValidatingAccountsForEpoch(ctx context.Context, epoch phase0.Epoch) (map[phase0.ValidatorIndex]e2wtypes.Account, error)
- func (s *Service) ValidatingAccountsForEpochByIndex(ctx context.Context, epoch phase0.Epoch, indices []phase0.ValidatorIndex) (map[phase0.ValidatorIndex]e2wtypes.Account, error)
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 WithAccountPaths ¶
WithAccountPaths sets the accounts paths for which to validate.
func WithCACert ¶
WithCACert sets the bytes of the certificate authority TLS certificate.
func WithClientCert ¶
WithClientCert sets the bytes of the client TLS certificate.
func WithClientKey ¶
WithClientKey sets the bytes of the client TLS key.
func WithClientMonitor ¶ added in v0.6.2
func WithClientMonitor(clientMonitor metrics.ClientMonitor) Parameter
WithClientMonitor sets the client monitor for the module.
func WithCurrentEpochProvider ¶ added in v1.0.3
WithCurrentEpochProvider sets the current epoch provider.
func WithDomainProvider ¶ added in v0.9.0
func WithDomainProvider(provider eth2client.DomainProvider) Parameter
WithDomainProvider sets the signature domain provider.
func WithEndpoints ¶
WithEndpoints sets the endpoints to communicate with dirk.
func WithFarFutureEpochProvider ¶ added in v1.0.0
func WithFarFutureEpochProvider(provider eth2client.FarFutureEpochProvider) Parameter
WithFarFutureEpochProvider sets the far future epoch provider.
func WithLogLevel ¶
WithLogLevel sets the log level for the module.
func WithMonitor ¶
WithMonitor sets the monitor for the module.
func WithProcessConcurrency ¶ added in v1.2.0
WithProcessConcurrency sets the concurrency for the service.
func WithTimeout ¶ added in v1.7.0
WithTimeout sets the timeout for the module.
func WithValidatorsManager ¶ added in v1.0.0
func WithValidatorsManager(provider validatorsmanager.Service) Parameter
WithValidatorsManager sets the validators manager.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the manager for dirk accounts.
func (*Service) AccountByPublicKey ¶ added in v1.7.0
func (s *Service) AccountByPublicKey(_ context.Context, pubkey phase0.BLSPubKey) (e2wtypes.Account, error)
AccountByPublicKey returns the account for the given public key.
func (*Service) Refresh ¶ added in v1.0.0
Refresh refreshes the accounts from Dirk, and account validator state from the validators provider. This is a relatively expensive operation, so should not be run in the validating path.
func (*Service) SyncCommitteeAccountsForEpoch ¶ added in v1.9.0
func (s *Service) SyncCommitteeAccountsForEpoch(ctx context.Context, epoch phase0.Epoch) (map[phase0.ValidatorIndex]e2wtypes.Account, error)
SyncCommitteeAccountsForEpoch obtains the accounts eligible for Sync Committee duty for a given epoch. The Ethereum specification has different criteria for Sync Committee eligibility compared to other validating duties. This includes an edge case where we are still in scope for sync committee duty between exited and withdrawal states.
func (*Service) SyncCommitteeAccountsForEpochByIndex ¶ added in v1.9.0
func (s *Service) SyncCommitteeAccountsForEpochByIndex(ctx context.Context, epoch phase0.Epoch, indices []phase0.ValidatorIndex) (map[phase0.ValidatorIndex]e2wtypes.Account, error)
SyncCommitteeAccountsForEpochByIndex obtains the specified Sync Committee eligible accounts for a given epoch. The Ethereum specification has different criteria for Sync Committee eligibility compared to other validating duties. This includes an edge case where we are still in scope for sync committee duty between exited and withdrawal states.
func (*Service) ValidatingAccountsForEpoch ¶ added in v1.0.0
func (s *Service) ValidatingAccountsForEpoch(ctx context.Context, epoch phase0.Epoch) (map[phase0.ValidatorIndex]e2wtypes.Account, error)
ValidatingAccountsForEpoch obtains the validating accounts for a given epoch.
func (*Service) ValidatingAccountsForEpochByIndex ¶ added in v1.0.0
func (s *Service) ValidatingAccountsForEpochByIndex(ctx context.Context, epoch phase0.Epoch, indices []phase0.ValidatorIndex) (map[phase0.ValidatorIndex]e2wtypes.Account, error)
ValidatingAccountsForEpochByIndex obtains the specified validating accounts for a given epoch.