rpc

package
v0.0.0-...-ab12051 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	SlasherDB *kv.Store
	// 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) AttesterSlashings

AttesterSlashings returns attester slashings if slashing with the requested status are found in the db.

func (*Server) DetectSurroundVotes

func (ss *Server) DetectSurroundVotes(ctx context.Context, validatorIdx uint64, req *ethpb.IndexedAttestation) ([]*ethpb.AttesterSlashing, error)

DetectSurroundVotes is a method used to return the attestation that were detected by min max surround detection method.

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 a proposer slashing if the block header submitted is a slashable proposal.

func (*Server) ProposerSlashings

ProposerSlashings returns proposer slashings if slashing with the requested status are found in the db.

func (*Server) UpdateSpanMaps

func (ss *Server) UpdateSpanMaps(ctx context.Context, req *ethpb.IndexedAttestation) error

UpdateSpanMaps updates and load all span maps from db.

Jump to

Keyboard shortcuts

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