rpc

package
v0.0.0-...-d79950a Latest Latest
Warning

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

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

Documentation

Overview

Package rpc defines an implementation of a gRPC slasher service, providing endpoints for determining whether or not a block/attestation is slashable based on slasher's evidence.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host      string
	Port      string
	CertFlag  string
	KeyFlag   string
	Detector  *detection.Service
	SlasherDB db.Database
}

Config options for the slasher node RPC 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.IndexedAttestation) (*slashpb.AttesterSlashingResponse, error)

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

func (*Server) IsSlashableBlock

IsSlashableBlock returns an proposer slashing if the block submitted is a double proposal.

type Service

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

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

func NewService

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

NewService instantiates a new RPC service instance that will be registered into a running beacon node.

func (*Service) Start

func (s *Service) Start()

Start the gRPC service.

func (*Service) Status

func (s *Service) Status() error

Status returns nil or credentialError

func (*Service) Stop

func (s *Service) Stop() error

Stop the service.

Jump to

Keyboard shortcuts

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