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 ¶
- type Config
- type Server
- func (ss *Server) IsSlashableAttestation(ctx context.Context, req *ethpb.IndexedAttestation) (*slashpb.AttesterSlashingResponse, error)
- func (ss *Server) IsSlashableAttestationNoUpdate(ctx context.Context, req *ethpb.IndexedAttestation) (*slashpb.Slashable, error)
- func (ss *Server) IsSlashableBlock(ctx context.Context, req *ethpb.SignedBeaconBlockHeader) (*slashpb.ProposerSlashingResponse, error)
- func (ss *Server) IsSlashableBlockNoUpdate(ctx context.Context, req *ethpb.BeaconBlockHeader) (*slashpb.Slashable, error)
- type Service
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) IsSlashableAttestationNoUpdate ¶ added in v1.0.0
func (ss *Server) IsSlashableAttestationNoUpdate(ctx context.Context, req *ethpb.IndexedAttestation) (*slashpb.Slashable, error)
IsSlashableAttestationNoUpdate returns true if the attestation submitted is a slashable vote (no db update is being done).
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.
func (*Server) IsSlashableBlockNoUpdate ¶ added in v1.0.0
func (ss *Server) IsSlashableBlockNoUpdate(ctx context.Context, req *ethpb.BeaconBlockHeader) (*slashpb.Slashable, error)
IsSlashableBlockNoUpdate returns true if the block submitted is slashable (no db update is being done).
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.