beacon

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2021 License: GPL-3.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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
)

type BeaconHead

type BeaconHead struct {
	Epoch                  uint64
	FinalizedEpoch         uint64
	JustifiedEpoch         uint64
	PreviousJustifiedEpoch uint64
}

type Client

type Client interface {
	GetClientType() BeaconClientType
	GetSyncStatus() (SyncStatus, error)
	GetEth2Config() (Eth2Config, error)
	GetEth2DepositContract() (Eth2DepositContract, error)
	GetBeaconHead() (BeaconHead, error)
	GetValidatorStatus(pubkey types.ValidatorPubkey, opts *ValidatorStatusOptions) (ValidatorStatus, error)
	GetValidatorStatuses(pubkeys []types.ValidatorPubkey, opts *ValidatorStatusOptions) (map[types.ValidatorPubkey]ValidatorStatus, error)
	GetValidatorIndex(pubkey types.ValidatorPubkey) (uint64, error)
	GetDomainData(domainType []byte, epoch uint64) ([]byte, error)
	ExitValidator(validatorIndex, epoch uint64, signature types.ValidatorSignature) error
	Close() error
	GetEth1DataForEth2Block(blockId string) (Eth1Data, error)
}

Beacon client interface

type Eth1Data added in v1.0.0

type Eth1Data struct {
	DepositRoot  common.Hash
	DepositCount uint64
	BlockHash    common.Hash
}

type Eth2Config

type Eth2Config struct {
	GenesisForkVersion    []byte
	GenesisValidatorsRoot []byte
	GenesisEpoch          uint64
	GenesisTime           uint64
	SecondsPerEpoch       uint64
}

type Eth2DepositContract added in v1.0.0

type Eth2DepositContract struct {
	ChainID uint64
	Address common.Address
}

type SyncStatus

type SyncStatus struct {
	Syncing  bool
	Progress float64
}

API response types

type ValidatorStatus

type ValidatorStatus struct {
	Pubkey                     types.ValidatorPubkey
	Index                      uint64
	WithdrawalCredentials      common.Hash
	Balance                    uint64
	EffectiveBalance           uint64
	Slashed                    bool
	ActivationEligibilityEpoch uint64
	ActivationEpoch            uint64
	ExitEpoch                  uint64
	WithdrawableEpoch          uint64
	Exists                     bool
}

type ValidatorStatusOptions

type ValidatorStatusOptions struct {
	Epoch uint64
}

API request options

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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