Documentation ¶
Index ¶
- type Server
- func (ss *Server) AttesterSlashings(ctx context.Context, st *slashpb.SlashingStatusRequest) (*slashpb.AttesterSlashingResponse, error)
- func (ss *Server) DetectSurroundVotes(ctx context.Context, validatorIdx uint64, req *ethpb.IndexedAttestation) ([]*ethpb.AttesterSlashing, error)
- func (ss *Server) IsSlashableAttestation(ctx context.Context, req *ethpb.IndexedAttestation) (*slashpb.AttesterSlashingResponse, error)
- func (ss *Server) IsSlashableBlock(ctx context.Context, psr *slashpb.ProposerSlashingRequest) (*slashpb.ProposerSlashingResponse, error)
- func (ss *Server) ProposerSlashings(ctx context.Context, st *slashpb.SlashingStatusRequest) (*slashpb.ProposerSlashingResponse, error)
- func (ss *Server) UpdateSpanMaps(ctx context.Context, req *ethpb.IndexedAttestation) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
Server defines a server implementation of the gRPC Slasher service, providing RPC endpoints for retrieving slashing proofs for malicious validators.
func (*Server) AttesterSlashings ¶
func (ss *Server) AttesterSlashings(ctx context.Context, st *slashpb.SlashingStatusRequest) (*slashpb.AttesterSlashingResponse, error)
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 ¶
func (ss *Server) IsSlashableBlock(ctx context.Context, psr *slashpb.ProposerSlashingRequest) (*slashpb.ProposerSlashingResponse, error)
IsSlashableBlock returns a proposer slashing if the block header submitted is a slashable proposal.
func (*Server) ProposerSlashings ¶
func (ss *Server) ProposerSlashings(ctx context.Context, st *slashpb.SlashingStatusRequest) (*slashpb.ProposerSlashingResponse, error)
ProposerSlashings returns proposer slashings if slashing with the requested status are found in the db.
func (*Server) UpdateSpanMaps ¶
UpdateSpanMaps updates and load all span maps from db.