detection

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2020 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Package detection defines a service that reacts to incoming blocks/attestations by running slashing detection for double proposals, double votes, and surround votes according to the eth2 specification. As soon as slashing objects are found, they are sent over a feed for the beaconclient service to submit to a beacon node via gRPC.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Notifier              beaconclient.Notifier
	SlasherDB             db.Database
	ChainFetcher          beaconclient.ChainFetcher
	BeaconClient          *beaconclient.Service
	AttesterSlashingsFeed *event.Feed
	ProposerSlashingsFeed *event.Feed
}

Config options for the detection service.

type Service

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

Service struct for the detection service of the slasher.

func NewDetectionService

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

NewDetectionService instantiation.

func (*Service) Start

func (ds *Service) Start()

Start the detection service runtime.

func (*Service) Status

func (ds *Service) Status() error

Status returns an error if there exists an error in the notifier service.

func (*Service) Stop

func (ds *Service) Stop() error

Stop the notifier service.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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