client

package
v0.0.0-...-c85edb6 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2019 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package client represents the functionality to act as a validator.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttestationPool

type AttestationPool interface {
	PendingAttestations() []*pbp2p.Attestation
}

AttestationPool STUB interface. Final attestation pool pending design. TODO(1323): Replace with actual attestation pool.

type Config

type Config struct {
	Endpoint string
	CertFlag string
}

Config for the validator service.

type Validator

type Validator interface {
	Done()
	WaitForChainStart(ctx context.Context)
	WaitForActivation(ctx context.Context)
	NextSlot() <-chan uint64
	UpdateAssignments(ctx context.Context, slot uint64) error
	RoleAt(slot uint64) pb.ValidatorRole
	AttestToBlockHead(ctx context.Context, slot uint64)
	ProposeBlock(ctx context.Context, slot uint64)
}

Validator interface defines the primary methods of a validator client.

type ValidatorService

type ValidatorService struct {
	// contains filtered or unexported fields
}

ValidatorService represents a service to manage the validator client routine.

func NewValidatorService

func NewValidatorService(ctx context.Context, cfg *Config) *ValidatorService

NewValidatorService creates a new validator service for the service registry.

func (*ValidatorService) Start

func (v *ValidatorService) Start()

Start the validator service. Launches the main go routine for the validator client.

func (*ValidatorService) Status

func (v *ValidatorService) Status() error

Status ...

WIP - not done.

func (*ValidatorService) Stop

func (v *ValidatorService) Stop() error

Stop the validator service.

Jump to

Keyboard shortcuts

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