Documentation ¶
Overview ¶
Package slasher defines a gRPC server implementation of a slasher service which allows for checking if attestations or blocks are slashable.
Index ¶
- type Server
- func (s *Server) HighestAttestations(ctx context.Context, req *ethpb.HighestAttestationRequest) (*ethpb.HighestAttestationResponse, error)
- func (s *Server) IsSlashableAttestation(ctx context.Context, req *ethpb.IndexedAttestation) (*ethpb.AttesterSlashingResponse, error)
- func (s *Server) IsSlashableBlock(ctx context.Context, req *ethpb.SignedBeaconBlockHeader) (*ethpb.ProposerSlashingResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
SlashingChecker slasherservice.SlashingChecker
}
Server defines a server implementation of the gRPC slasher service.
func (*Server) HighestAttestations ¶
func (s *Server) HighestAttestations( ctx context.Context, req *ethpb.HighestAttestationRequest, ) (*ethpb.HighestAttestationResponse, error)
HighestAttestations returns the highest source and target epochs attested for validator indices that have been observed by slasher.
func (*Server) IsSlashableAttestation ¶
func (s *Server) IsSlashableAttestation( ctx context.Context, req *ethpb.IndexedAttestation, ) (*ethpb.AttesterSlashingResponse, error)
IsSlashableAttestation returns an attester slashing if an input attestation is found to be slashable.
func (*Server) IsSlashableBlock ¶
func (s *Server) IsSlashableBlock( ctx context.Context, req *ethpb.SignedBeaconBlockHeader, ) (*ethpb.ProposerSlashingResponse, error)
IsSlashableBlock returns a proposer slashing if an input signed beacon block header is found to be slashable.
Click to show internal directories.
Click to hide internal directories.