Documentation ¶
Index ¶
- type Config
- type Protector
- type Service
- func (s *Service) CommitAttestation(ctx context.Context, attestation *ethpb.IndexedAttestation) bool
- func (s *Service) CommitBlock(ctx context.Context, blockHeader *ethpb.SignedBeaconBlockHeader) bool
- func (s *Service) Start()
- func (s *Service) Status() error
- func (s *Service) Stop() error
- func (s *Service) VerifyAttestation(ctx context.Context, attestation *ethpb.IndexedAttestation) bool
- func (s *Service) VerifyBlock(ctx context.Context, blockHeader *ethpb.BeaconBlockHeader) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Endpoint string CertFlag string GrpcMaxCallRecvMsgSizeFlag int GrpcRetriesFlag uint GrpcHeadersFlag string }
Config for the validator service.
type Protector ¶
type Protector interface { VerifyAttestation(ctx context.Context, attestation *eth.IndexedAttestation) bool CommitAttestation(ctx context.Context, attestation *eth.IndexedAttestation) bool VerifyBlock(ctx context.Context, blockHeader *eth.BeaconBlockHeader) bool CommitBlock(ctx context.Context, blockHeader *eth.SignedBeaconBlockHeader) bool }
Protector interface defines the methods of the service that provides slashing protection.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service represents a service to manage the validator �slashing protection.
func NewSlashingProtectionService ¶
NewSlashingProtectionService creates a new validator service for the service registry.
func (*Service) CommitAttestation ¶
func (s *Service) CommitAttestation(ctx context.Context, attestation *ethpb.IndexedAttestation) bool
CommitAttestation implements the slashing protection for attestations it performs validation and db update.
func (*Service) CommitBlock ¶
CommitBlock this function is part of slashing protection for block proposals it performs validation and db update.
func (*Service) Start ¶
func (s *Service) Start()
Start the slasher protection service and grpc client.
func (*Service) VerifyAttestation ¶
func (s *Service) VerifyAttestation(ctx context.Context, attestation *ethpb.IndexedAttestation) bool
VerifyAttestation implements the slashing protection for attestations without db update.
func (*Service) VerifyBlock ¶
VerifyBlock this function is part of slashing protection for block proposals it performs validation without db update.