mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-08 10:41:19 +00:00
6e516dabf9
* slasher rpc server * fix comment * fix comment * remove server implementation from pr * Apply suggestions from code review * Gazelle * Update slasher/rpc/service.go Co-Authored-By: Ivan Martinez <ivanthegreatdev@gmail.com> * Update slasher/detection/detect.go * Update slasher/detection/detect.go * Update slasher/detection/detect.go * Update slasher/detection/detect.go Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com> Co-authored-by: Ivan Martinez <ivanthegreatdev@gmail.com> Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
30 lines
1.0 KiB
Go
30 lines
1.0 KiB
Go
package rpc
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/pkg/errors"
|
|
ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
|
|
slashpb "github.com/prysmaticlabs/prysm/proto/slashing"
|
|
"github.com/prysmaticlabs/prysm/slasher/detection"
|
|
)
|
|
|
|
// Server defines a server implementation of the gRPC Slasher service,
|
|
// providing RPC endpoints for retrieving slashing proofs for malicious validators.
|
|
type Server struct {
|
|
ctx context.Context
|
|
detector *detection.Service
|
|
}
|
|
|
|
// IsSlashableAttestation returns an attester slashing if the attestation submitted
|
|
// is a slashable vote.
|
|
func (ss *Server) IsSlashableAttestation(ctx context.Context, req *ethpb.IndexedAttestation) (*slashpb.AttesterSlashingResponse, error) {
|
|
return nil, errors.New("unimplemented")
|
|
}
|
|
|
|
// IsSlashableBlock returns an proposer slashing if the block submitted
|
|
// is a double proposal.
|
|
func (ss *Server) IsSlashableBlock(ctx context.Context, req *ethpb.SignedBeaconBlockHeader) (*slashpb.ProposerSlashingResponse, error) {
|
|
return nil, errors.New("unimplemented")
|
|
}
|