Documentation ¶
Overview ¶
Package accountmanager is a package that manages validator accounts from multiple sources.
Index ¶
- type AccountsFetcher
- type AccountsUpdater
- type AggregateAndProofSigner
- type BeaconAttestationSigner
- type BeaconAttestationsSigner
- type BeaconBlockSigner
- type IsAggregatorProvider
- type RANDAORevealSigner
- type Service
- type Signer
- type SlotSelectionSigner
- type ValidatingAccount
- type ValidatingAccountIndexProvider
- type ValidatingAccountPubKeyProvider
- type ValidatingAccountStateProvider
- type ValidatingAccountsProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountsFetcher ¶
type AccountsFetcher interface { // RefreshAccounts refreshes the list of relevant accounts known by the account manager. RefreshAccounts(ctx context.Context) error }
AccountsFetcher fetches accounts from the remote source.
type AccountsUpdater ¶
type AccountsUpdater interface { // UpdateAccountsState updates account state with the latest information from the beacon chain. UpdateAccountsState(ctx context.Context) error }
AccountsUpdater manages updates to accounts in line with internal and external changes.
type AggregateAndProofSigner ¶
type AggregateAndProofSigner interface { // SignAggregateAndProof signs an aggregate attestation for given slot and root. SignAggregateAndProof(ctx context.Context, slot spec.Slot, root spec.Root) (spec.BLSSignature, error) }
AggregateAndProofSigner provides methods to sign aggregate and proofs.
type BeaconAttestationSigner ¶
type BeaconAttestationSigner interface { // SignBeaconAttestation signs a beacon attestation. SignBeaconAttestation(ctx context.Context, slot spec.Slot, committeeIndex spec.CommitteeIndex, blockRoot spec.Root, sourceEpoch spec.Epoch, sourceRoot spec.Root, targetEpoch spec.Epoch, targetRoot spec.Root) (spec.BLSSignature, error) }
BeaconAttestationSigner provides methods to sign beacon attestations.
type BeaconAttestationsSigner ¶ added in v0.9.0
type BeaconAttestationsSigner interface { // SignBeaconAttestation signs multiple beacon attestations. SignBeaconAttestations(ctx context.Context, slot spec.Slot, accounts []ValidatingAccount, committeeIndices []spec.CommitteeIndex, blockRoot spec.Root, sourceEpoch spec.Epoch, sourceRoot spec.Root, targetEpoch spec.Epoch, targetRoot spec.Root) ([]spec.BLSSignature, error) }
BeaconAttestationsSigner provides methods to sign multiple beacon attestations.
type BeaconBlockSigner ¶
type BeaconBlockSigner interface { // SignBeaconBlockProposal signs a beacon block proposal. SignBeaconBlockProposal(ctx context.Context, slot spec.Slot, proposerIndex spec.ValidatorIndex, parentRoot spec.Root, stateRoot spec.Root, bodyRoot spec.Root) (spec.BLSSignature, error) }
BeaconBlockSigner provides methods to sign beacon blocks.
type IsAggregatorProvider ¶
type IsAggregatorProvider interface { }
IsAggregatorProvider provides methods for obtaining aggregation status from accounts.
type RANDAORevealSigner ¶
type RANDAORevealSigner interface { // SignRANDAOReveal returns a RANDAO signature. // This signs an epoch with the "RANDAO" domain. SignRANDAOReveal(ctx context.Context, slot spec.Slot) (spec.BLSSignature, error) }
RANDAORevealSigner provides methods to sign RANDAO reveals.
type Signer ¶
type Signer interface { RANDAORevealSigner SlotSelectionSigner BeaconBlockSigner BeaconAttestationSigner AggregateAndProofSigner }
Signer is a composite interface for all signer operations.
type SlotSelectionSigner ¶
type SlotSelectionSigner interface { // SignSlotSelection returns a slot selection signature. // This signs a slot with the "selection proof" domain. SignSlotSelection(ctx context.Context, slot spec.Slot) (spec.BLSSignature, error) }
SlotSelectionSigner provides methods to sign slot selections.
type ValidatingAccount ¶
type ValidatingAccount interface { ValidatingAccountPubKeyProvider ValidatingAccountIndexProvider ValidatingAccountStateProvider }
ValidatingAccount is a composite interface for common validating account features.
type ValidatingAccountIndexProvider ¶
type ValidatingAccountIndexProvider interface { // Index() provides the validator index for this account. // Returns an error if there is no index for this validator. Index(ctx context.Context) (spec.ValidatorIndex, error) }
ValidatingAccountIndexProvider provides methods for obtaining indices from accounts.
type ValidatingAccountPubKeyProvider ¶
type ValidatingAccountPubKeyProvider interface { // PubKey() provides the public key for this account. PubKey(ctx context.Context) (spec.BLSPubKey, error) }
ValidatingAccountPubKeyProvider provides methods for obtaining public keys from accounts.
type ValidatingAccountStateProvider ¶
type ValidatingAccountStateProvider interface { // State() provides the validator state for this account. State() api.ValidatorState }
ValidatingAccountStateProvider provides methods for obtaining state from accounts.
type ValidatingAccountsProvider ¶
type ValidatingAccountsProvider interface { // Accounts provides information about all accounts that are configured to validate through this instance. Accounts(ctx context.Context) ([]ValidatingAccount, error) // AccountsByIndex provides information about the specific accounts that are configured to validate through this instance. AccountsByIndex(ctx context.Context, indices []spec.ValidatorIndex) ([]ValidatingAccount, error) // AccountsByPubKey provides information about the specific accounts that are configured to validate through this instance. AccountsByPubKey(ctx context.Context, pubKeys []spec.BLSPubKey) ([]ValidatingAccount, error) }
ValidatingAccountsProvider provides methods for validating accounts.