accountmanager

package
v1.9.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package accountmanager is a package that manages validator accounts from multiple sources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountsProvider added in v1.7.0

type AccountsProvider interface {
	// AccountByPublicKey returns the account for the given public key.
	AccountByPublicKey(ctx context.Context, pubkey phase0.BLSPubKey) (e2wtypes.Account, error)
}

AccountsProvider provides accounts.

type Refresher added in v1.0.0

type Refresher interface {
	// Refresh refreshes the accounts from the remote source, and account validator state from
	// the validators provider.
	// This is a relatively expensive operation, so should not be run in the validating path.
	Refresh(ctx context.Context)
}

Refresher refreshes account information from the remote source.

type Service

type Service interface{}

Service is the generic accountmanager service.

type ValidatingAccountsProvider

type ValidatingAccountsProvider interface {
	// ValidatingAccountsForEpoch obtains the validating accounts for a given epoch.
	ValidatingAccountsForEpoch(ctx context.Context, epoch phase0.Epoch) (map[phase0.ValidatorIndex]e2wtypes.Account, error)

	// ValidatingAccountsForEpochByIndex obtains the specified validating accounts for a given epoch.
	ValidatingAccountsForEpochByIndex(ctx context.Context,
		epoch phase0.Epoch,
		indices []phase0.ValidatorIndex,
	) (
		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.
	SyncCommitteeAccountsForEpoch(ctx context.Context, epoch phase0.Epoch) (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.
	SyncCommitteeAccountsForEpochByIndex(ctx context.Context,
		epoch phase0.Epoch,
		indices []phase0.ValidatorIndex,
	) (
		map[phase0.ValidatorIndex]e2wtypes.Account,
		error,
	)
}

ValidatingAccountsProvider provides methods for validating accounts.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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