iface

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrConnectionIssue = errors.New("could not connect")

ErrConnectionIssue represents a connection problem.

Functions

This section is empty.

Types

type Validator

type Validator interface {
	Done()
	WaitForChainStart(ctx context.Context) error
	WaitForSync(ctx context.Context) error
	WaitForActivation(ctx context.Context, accountsChangedChan chan [][48]byte) error
	SlasherReady(ctx context.Context) error
	CanonicalHeadSlot(ctx context.Context) (types.Slot, error)
	NextSlot() <-chan types.Slot
	SlotDeadline(slot types.Slot) time.Time
	LogValidatorGainsAndLosses(ctx context.Context, slot types.Slot) error
	UpdateDuties(ctx context.Context, slot types.Slot) error
	RolesAt(ctx context.Context, slot types.Slot) (map[[48]byte][]ValidatorRole, error) // validator pubKey -> roles
	SubmitAttestation(ctx context.Context, slot types.Slot, pubKey [48]byte)
	ProposeBlock(ctx context.Context, slot types.Slot, pubKey [48]byte)
	SubmitAggregateAndProof(ctx context.Context, slot types.Slot, pubKey [48]byte)
	LogAttestationsSubmitted()
	LogNextDutyTimeLeft(slot types.Slot) error
	UpdateDomainDataCaches(ctx context.Context, slot types.Slot)
	WaitForWalletInitialization(ctx context.Context) error
	AllValidatorsAreExited(ctx context.Context) (bool, error)
	GetKeymanager() keymanager.IKeymanager
	ReceiveBlocks(ctx context.Context, connectionErrorChannel chan<- error)
	HandleKeyReload(ctx context.Context, newKeys [][48]byte) (bool, error)
	CheckDoppelGanger(ctx context.Context) error
}

Validator interface defines the primary methods of a validator client.

type ValidatorRole

type ValidatorRole int8

ValidatorRole defines the validator role.

const (
	// RoleUnknown means that the role of the validator cannot be determined.
	RoleUnknown ValidatorRole = iota
	// RoleAttester means that the validator should submit an attestation.
	RoleAttester
	// RoleProposer means that the validator should propose a block.
	RoleProposer
	// RoleAggregator means that the validator should submit an aggregation and proof.
	RoleAggregator
)

Jump to

Keyboard shortcuts

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