Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttestationInfo ¶ added in v1.5.0
type BeaconBlock ¶ added in v1.5.0
type BeaconBlockHeader ¶ added in v1.12.0
type BeaconClientType ¶ added in v1.0.0
type BeaconClientType int
Beacon client type
const ( // This client is a traditional "split process" design, where the beacon // client and validator process are separate and run in different // containers SplitProcess BeaconClientType = iota // This client is a "single process" where the beacon client and // validator run in the same process (or run as separate processes // within the same docker container) SingleProcess // Unknown / missing client type Unknown )
type BeaconHead ¶
type Client ¶
type Client interface { GetClientType() (BeaconClientType, error) GetSyncStatus() (SyncStatus, error) GetEth2Config() (Eth2Config, error) GetEth2DepositContract() (Eth2DepositContract, error) GetAttestations(blockId string) ([]AttestationInfo, bool, error) GetBeaconBlock(blockId string) (BeaconBlock, bool, error) GetBeaconBlockHeader(blockId string) (BeaconBlockHeader, bool, error) GetBeaconHead() (BeaconHead, error) GetValidatorStatusByIndex(index string, opts *ValidatorStatusOptions) (ValidatorStatus, error) GetValidatorStatus(pubkey types.ValidatorPubkey, opts *ValidatorStatusOptions) (ValidatorStatus, error) GetValidatorStatuses(pubkeys []types.ValidatorPubkey, opts *ValidatorStatusOptions) (map[types.ValidatorPubkey]ValidatorStatus, error) GetValidatorIndex(pubkey types.ValidatorPubkey) (string, error) GetValidatorSyncDuties(indices []string, epoch uint64) (map[string]bool, error) GetValidatorProposerDuties(indices []string, epoch uint64) (map[string]uint64, error) GetDomainData(domainType []byte, epoch uint64, useGenesisFork bool) ([]byte, error) ExitValidator(validatorIndex string, epoch uint64, signature types.ValidatorSignature) error Close() error GetEth1DataForEth2Block(blockId string) (Eth1Data, bool, error) GetCommitteesForEpoch(epoch *uint64) (Committees, error) ChangeWithdrawalCredentials(validatorIndex string, fromBlsPubkey types.ValidatorPubkey, toExecutionAddress common.Address, signature types.ValidatorSignature) error }
Beacon client interface
type Committees ¶ added in v1.10.0
type Committees interface { // Index returns the index of the committee at the provided offset Index(int) uint64 // Slot returns the slot of the committee at the provided offset Slot(int) uint64 // Validators returns the list of validators of the committee at // the provided offset Validators(int) []string // Count returns the number of committees in the response Count() int // Release returns the reused validators slice buffer to the pool for // further reuse, and must be called when the user is done with this // committees instance Release() }
Committees is an interface as an optimization- since committees responses are quite large, there's a decent cpu/memory improvement to removing the translation to an intermediate storage class.
Instead, the interface provides the access pattern that smartnode (or more specifically, tree-gen) wants, and the underlying format is just the format of the Beacon Node response.
type Eth2Config ¶
type Eth2DepositContract ¶ added in v1.0.0
type ValidatorState ¶ added in v1.7.1
type ValidatorState string
const ( ValidatorState_PendingInitialized ValidatorState = "pending_initialized" ValidatorState_PendingQueued ValidatorState = "pending_queued" ValidatorState_ActiveOngoing ValidatorState = "active_ongoing" ValidatorState_ActiveExiting ValidatorState = "active_exiting" ValidatorState_ActiveSlashed ValidatorState = "active_slashed" ValidatorState_ExitedUnslashed ValidatorState = "exited_unslashed" ValidatorState_ExitedSlashed ValidatorState = "exited_slashed" ValidatorState_WithdrawalPossible ValidatorState = "withdrawal_possible" ValidatorState_WithdrawalDone ValidatorState = "withdrawal_done" )
type ValidatorStatus ¶
type ValidatorStatusOptions ¶
API request options
Click to show internal directories.
Click to hide internal directories.