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 ¶ added in v0.3.8
type Config struct { Host string Port string CertFlag string KeyFlag string Detector *detection.Service SlasherDB db.Database BeaconClient *beaconclient.Service }
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 ¶
func (ss *Server) IsSlashableBlock(ctx context.Context, req *ethpb.SignedBeaconBlockHeader) (*slashpb.ProposerSlashingResponse, error)
IsSlashableBlock returns an proposer slashing if the block submitted is a double proposal.
type Service ¶ added in v0.3.8
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 ¶ added in v0.3.8
NewService instantiates a new RPC service instance that will be registered into a running beacon node.