slasher

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2019 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Overview

Package slasher defines the service used to retrieve slashings proofs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Port      string
	CertFlag  string
	KeyFlag   string
	SlasherDb *db.Store
}

Config options for the slasher server.

type Server

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

Server defines a server implementation of the gRPC Slasher service, providing RPC endpoints for retrieving slashing proofs for malicious validators.

func (*Server) IsSlashableAttestation

func (ss *Server) IsSlashableAttestation(ctx context.Context, req *ethpb.Attestation) (*ethpb.AttesterSlashing, error)

IsSlashableAttestation returns an attester slashing if the attestation submitted is a slashable vote.

func (*Server) IsSlashableBlock

IsSlashableBlock returns a proposer slashing if the block header submitted is a slashable proposal.

func (*Server) SlashableAttestations

func (ss *Server) SlashableAttestations(req *types.Empty, server ethpb.Slasher_SlashableAttestationsServer) error

SlashableAttestations is a subscription to receive all slashable attester slashing events found by the watchtower.

func (*Server) SlashableProposals

func (ss *Server) SlashableProposals(req *types.Empty, server ethpb.Slasher_SlashableProposalsServer) error

SlashableProposals is a subscription to receive all slashable proposer slashing events found by the watchtower.

type Service

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

Service defining an RPC server for the slasher service.

func NewRPCService

func NewRPCService(cfg *Config) *Service

NewRPCService creates a new instance of a struct implementing the SlasherService interface.

func (*Service) Start

func (s *Service) Start()

Start the gRPC server.

func (*Service) Status

func (s *Service) Status() error

Status returns nil, credentialError or fail status.

func (*Service) Stop

func (s *Service) Stop() error

Stop the service.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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