rpc

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2019 License: GPL-3.0 Imports: 11 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 *db.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) 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.

func (*Server) UpdateMaxSpan added in v0.2.3

func (ss *Server) UpdateMaxSpan(ctx context.Context, source uint64, target uint64, validatorIdx uint64) error

UpdateMaxSpan is used to update the max span of an incoming attestation after the slashing detection phase. logic is following the detection method designed by https://github.com/protolambda from here: https://github.com/protolambda/eth2-surround/blob/master/README.md#min-max-surround

func (*Server) UpdateMinSpan added in v0.2.3

func (ss *Server) UpdateMinSpan(ctx context.Context, source uint64, target uint64, validatorIdx uint64) error

UpdateMinSpan is used to update the min span of an incoming attestation after the slashing detection phase. logic is following the detection method designed by https://github.com/protolambda from here: https://github.com/protolambda/eth2-surround/blob/master/README.md#min-max-surround

Jump to

Keyboard shortcuts

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