accountmanager

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2020 License: Apache-2.0 Imports: 2 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 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 uint64, root []byte) ([]byte, error)
}

AggregateAndProofSigner provides methods to sign aggregate and proofs.

type BeaconAttestationSigner

type BeaconAttestationSigner interface {
	// SignBeaconAttestation signs a beacon attestation.
	SignBeaconAttestation(ctx context.Context,
		slot uint64,
		committeeIndex uint64,
		blockRoot []byte,
		sourceEpoch uint64,
		sourceRoot []byte,
		targetEpoch uint64,
		targetRoot []byte) ([]byte, error)
}

BeaconAttestationSigner provides methods to sign beacon attestations.

type BeaconBlockSigner

type BeaconBlockSigner interface {
	// SignBeaconBlockProposal signs a beacon block proposal.
	SignBeaconBlockProposal(ctx context.Context,
		slot uint64,
		proposerIndex uint64,
		parentRoot []byte,
		stateRoot []byte,
		bodyRoot []byte) ([]byte, 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.
	// N.B. This passes in a slot, not an epoch.
	SignRANDAOReveal(ctx context.Context, slot uint64) ([]byte, error)
}

RANDAORevealSigner provides methods to sign RANDAO reveals.

type Service

type Service interface{}

Service is the generic accountmanager service.

type Signer

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 uint64) ([]byte, error)
}

SlotSelectionSigner provides methods to sign slot selections.

type ValidatingAccount

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) (uint64, 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) ([]byte, 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 []uint64) ([]ValidatingAccount, error)

	// AccountsByPubKey provides information about the specific accounts that are configured to validate through this instance.
	AccountsByPubKey(ctx context.Context, pubKeys [][]byte) ([]ValidatingAccount, error)
}

ValidatingAccountsProvider provides methods for valdiating accounts.

Directories

Path Synopsis
Code generated by fastssz.
Code generated by fastssz.

Jump to

Keyboard shortcuts

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