validator

package
v0.0.0-...-25dd0f4 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BLSToExecutionChangeInfo

type BLSToExecutionChangeInfo struct {
	common.ValidatorIndex
	common.Eth1Address
}

type ValidatorClient

type ValidatorClient struct {
	clients.Client
	Logger      utils.Logging
	ClientIndex int
	Config      ValidatorClientConfig
	Keys        map[common.ValidatorIndex]*ValidatorKeys
}

func (*ValidatorClient) ContainsKey

func (v *ValidatorClient) ContainsKey(pk [48]byte) bool

func (*ValidatorClient) ContainsValidatorIndex

func (v *ValidatorClient) ContainsValidatorIndex(
	index common.ValidatorIndex,
) bool

func (*ValidatorClient) Logf

func (vc *ValidatorClient) Logf(format string, values ...interface{})

func (*ValidatorClient) Shutdown

func (vc *ValidatorClient) Shutdown() error

func (*ValidatorClient) SignBLSToExecutionChange

func (v *ValidatorClient) SignBLSToExecutionChange(
	domain common.BLSDomain,
	c BLSToExecutionChangeInfo,
) (*common.SignedBLSToExecutionChange, error)

func (*ValidatorClient) SignVoluntaryExit

func (v *ValidatorClient) SignVoluntaryExit(
	domain common.BLSDomain,
	epoch common.Epoch,
	validatorIndex common.ValidatorIndex,
) (*phase0.SignedVoluntaryExit, error)

func (*ValidatorClient) Start

func (vc *ValidatorClient) Start() error

type ValidatorClientConfig

type ValidatorClientConfig struct {
	ClientIndex int
	Subnet      string
}

type ValidatorClients

type ValidatorClients []*ValidatorClient

func (ValidatorClients) ByValidatorIndex

func (all ValidatorClients) ByValidatorIndex(
	validatorIndex common.ValidatorIndex,
) *ValidatorClient

Returns the validator that contains specified validator index

func (ValidatorClients) Running

func (all ValidatorClients) Running() ValidatorClients

Return subset of clients that are currently running

func (ValidatorClients) SignBLSToExecutionChange

func (all ValidatorClients) SignBLSToExecutionChange(
	domain common.BLSDomain,
	c BLSToExecutionChangeInfo,
) (*common.SignedBLSToExecutionChange, error)

type ValidatorKeys

type ValidatorKeys struct {
	// ValidatorKeystoreJSON encodes an EIP-2335 keystore, serialized in JSON
	// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2335.md
	ValidatorKeystoreJSON []byte
	// ValidatorKeystorePass holds the secret used for ValidatorKeystoreJSON
	ValidatorKeystorePass string
	// ValidatorSecretKey is the serialized secret key for validator duties
	ValidatorSecretKey [32]byte
	// ValidatorSecretKey is the serialized pubkey derived from ValidatorSecretKey
	ValidatorPubkey [48]byte
	// WithdrawalSecretKey is the serialized secret key for withdrawing stake
	WithdrawalSecretKey [32]byte
	// WithdrawalPubkey is the serialized pubkey derived from WithdrawalSecretKey
	WithdrawalPubkey [48]byte
}

Jump to

Keyboard shortcuts

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