slashingprotection

package
v1.0.0-alpha.12 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2020 License: GPL-3.0 Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Endpoint                   string
	CertFlag                   string
	GrpcMaxCallRecvMsgSizeFlag int
	GrpcRetriesFlag            uint
	GrpcHeadersFlag            string
}

Config for the validator service.

type Protector

type Protector interface {
	VerifyAttestation(ctx context.Context, attestation *eth.IndexedAttestation) bool
	VerifyBlock(ctx context.Context, blockHeader *eth.SignedBeaconBlockHeader) bool
}

Protector interface defines the methods of the service that provides slashing protection.

type Service

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

Service represents a service to manage the validator �slashing protection.

func NewSlashingProtectionService

func NewSlashingProtectionService(ctx context.Context, cfg *Config) (*Service, error)

NewSlashingProtectionService creates a new validator service for the service registry.

func (*Service) Start

func (s *Service) Start()

Start the slasher protection service and grpc client.

func (*Service) Status

func (s *Service) Status() error

Status ...

WIP - not done.

func (*Service) Stop

func (s *Service) Stop() error

Stop the validator service.

func (*Service) VerifyAttestation

func (s *Service) VerifyAttestation(ctx context.Context, attestation *ethpb.IndexedAttestation) bool

VerifyAttestation implements the slashing protection for attestations.

func (*Service) VerifyBlock

func (s *Service) VerifyBlock(ctx context.Context, blockHeader *ethpb.SignedBeaconBlockHeader) bool

VerifyBlock implements the slashing protection for block proposals.

Jump to

Keyboard shortcuts

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