prysm-pulse/proto/beacon/rpc/v1_gateway/slasher.pb.go
shayzluf 59575bcac9
fuzz core/blocks package (#4907)
* fuzz core/blocks package

* gaz goimports

* fix test

* terence feedback

* terence feedback

* add error to domain. halfway through

* adding error to domain

* goimports

* added error handling to test

* error instead of continue

* terence and nishant feedback

* domain error handling

* domain error handling

* handle nil validator in ReadOnlyValidator creation

* goinmports

* [4]byte domain type

* [4]byte domain type

* [4]byte domain type fix tests

* fix tests

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2020-03-03 19:02:14 +05:30

632 lines
25 KiB
Go
Executable File
Generated

// Code generated by protoc-gen-go. DO NOT EDIT.
// source: proto/beacon/rpc/v1/slasher.proto
package ethereum_beacon_rpc_v1
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
v1alpha1 "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type ValidatorIDToIdxAtt struct {
Indices []uint64 `protobuf:"varint,1,rep,packed,name=indices,proto3" json:"indices,omitempty"`
DataRoot []byte `protobuf:"bytes,2,opt,name=data_root,json=dataRoot,proto3" json:"data_root,omitempty"`
Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ValidatorIDToIdxAtt) Reset() { *m = ValidatorIDToIdxAtt{} }
func (m *ValidatorIDToIdxAtt) String() string { return proto.CompactTextString(m) }
func (*ValidatorIDToIdxAtt) ProtoMessage() {}
func (*ValidatorIDToIdxAtt) Descriptor() ([]byte, []int) {
return fileDescriptor_d75c5a5be5c552fc, []int{0}
}
func (m *ValidatorIDToIdxAtt) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ValidatorIDToIdxAtt.Unmarshal(m, b)
}
func (m *ValidatorIDToIdxAtt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ValidatorIDToIdxAtt.Marshal(b, m, deterministic)
}
func (m *ValidatorIDToIdxAtt) XXX_Merge(src proto.Message) {
xxx_messageInfo_ValidatorIDToIdxAtt.Merge(m, src)
}
func (m *ValidatorIDToIdxAtt) XXX_Size() int {
return xxx_messageInfo_ValidatorIDToIdxAtt.Size(m)
}
func (m *ValidatorIDToIdxAtt) XXX_DiscardUnknown() {
xxx_messageInfo_ValidatorIDToIdxAtt.DiscardUnknown(m)
}
var xxx_messageInfo_ValidatorIDToIdxAtt proto.InternalMessageInfo
func (m *ValidatorIDToIdxAtt) GetIndices() []uint64 {
if m != nil {
return m.Indices
}
return nil
}
func (m *ValidatorIDToIdxAtt) GetDataRoot() []byte {
if m != nil {
return m.DataRoot
}
return nil
}
func (m *ValidatorIDToIdxAtt) GetSignature() []byte {
if m != nil {
return m.Signature
}
return nil
}
type ValidatorIDToIdxAttList struct {
IndicesList []*ValidatorIDToIdxAtt `protobuf:"bytes,1,rep,name=indicesList,proto3" json:"indicesList,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ValidatorIDToIdxAttList) Reset() { *m = ValidatorIDToIdxAttList{} }
func (m *ValidatorIDToIdxAttList) String() string { return proto.CompactTextString(m) }
func (*ValidatorIDToIdxAttList) ProtoMessage() {}
func (*ValidatorIDToIdxAttList) Descriptor() ([]byte, []int) {
return fileDescriptor_d75c5a5be5c552fc, []int{1}
}
func (m *ValidatorIDToIdxAttList) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ValidatorIDToIdxAttList.Unmarshal(m, b)
}
func (m *ValidatorIDToIdxAttList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ValidatorIDToIdxAttList.Marshal(b, m, deterministic)
}
func (m *ValidatorIDToIdxAttList) XXX_Merge(src proto.Message) {
xxx_messageInfo_ValidatorIDToIdxAttList.Merge(m, src)
}
func (m *ValidatorIDToIdxAttList) XXX_Size() int {
return xxx_messageInfo_ValidatorIDToIdxAttList.Size(m)
}
func (m *ValidatorIDToIdxAttList) XXX_DiscardUnknown() {
xxx_messageInfo_ValidatorIDToIdxAttList.DiscardUnknown(m)
}
var xxx_messageInfo_ValidatorIDToIdxAttList proto.InternalMessageInfo
func (m *ValidatorIDToIdxAttList) GetIndicesList() []*ValidatorIDToIdxAtt {
if m != nil {
return m.IndicesList
}
return nil
}
type ProposerSlashingRequest struct {
BlockHeader *v1alpha1.BeaconBlockHeader `protobuf:"bytes,1,opt,name=block_header,json=blockHeader,proto3" json:"block_header,omitempty"`
ValidatorIndex uint64 `protobuf:"varint,2,opt,name=validator_index,json=validatorIndex,proto3" json:"validator_index,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ProposerSlashingRequest) Reset() { *m = ProposerSlashingRequest{} }
func (m *ProposerSlashingRequest) String() string { return proto.CompactTextString(m) }
func (*ProposerSlashingRequest) ProtoMessage() {}
func (*ProposerSlashingRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_d75c5a5be5c552fc, []int{2}
}
func (m *ProposerSlashingRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ProposerSlashingRequest.Unmarshal(m, b)
}
func (m *ProposerSlashingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ProposerSlashingRequest.Marshal(b, m, deterministic)
}
func (m *ProposerSlashingRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ProposerSlashingRequest.Merge(m, src)
}
func (m *ProposerSlashingRequest) XXX_Size() int {
return xxx_messageInfo_ProposerSlashingRequest.Size(m)
}
func (m *ProposerSlashingRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ProposerSlashingRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ProposerSlashingRequest proto.InternalMessageInfo
func (m *ProposerSlashingRequest) GetBlockHeader() *v1alpha1.BeaconBlockHeader {
if m != nil {
return m.BlockHeader
}
return nil
}
func (m *ProposerSlashingRequest) GetValidatorIndex() uint64 {
if m != nil {
return m.ValidatorIndex
}
return 0
}
type ProposerSlashingResponse struct {
ProposerSlashing []*v1alpha1.ProposerSlashing `protobuf:"bytes,1,rep,name=proposer_slashing,json=proposerSlashing,proto3" json:"proposer_slashing,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ProposerSlashingResponse) Reset() { *m = ProposerSlashingResponse{} }
func (m *ProposerSlashingResponse) String() string { return proto.CompactTextString(m) }
func (*ProposerSlashingResponse) ProtoMessage() {}
func (*ProposerSlashingResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_d75c5a5be5c552fc, []int{3}
}
func (m *ProposerSlashingResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ProposerSlashingResponse.Unmarshal(m, b)
}
func (m *ProposerSlashingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ProposerSlashingResponse.Marshal(b, m, deterministic)
}
func (m *ProposerSlashingResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ProposerSlashingResponse.Merge(m, src)
}
func (m *ProposerSlashingResponse) XXX_Size() int {
return xxx_messageInfo_ProposerSlashingResponse.Size(m)
}
func (m *ProposerSlashingResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ProposerSlashingResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ProposerSlashingResponse proto.InternalMessageInfo
func (m *ProposerSlashingResponse) GetProposerSlashing() []*v1alpha1.ProposerSlashing {
if m != nil {
return m.ProposerSlashing
}
return nil
}
type AttesterSlashingResponse struct {
AttesterSlashing []*v1alpha1.AttesterSlashing `protobuf:"bytes,1,rep,name=attester_slashing,json=attesterSlashing,proto3" json:"attester_slashing,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AttesterSlashingResponse) Reset() { *m = AttesterSlashingResponse{} }
func (m *AttesterSlashingResponse) String() string { return proto.CompactTextString(m) }
func (*AttesterSlashingResponse) ProtoMessage() {}
func (*AttesterSlashingResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_d75c5a5be5c552fc, []int{4}
}
func (m *AttesterSlashingResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AttesterSlashingResponse.Unmarshal(m, b)
}
func (m *AttesterSlashingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AttesterSlashingResponse.Marshal(b, m, deterministic)
}
func (m *AttesterSlashingResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_AttesterSlashingResponse.Merge(m, src)
}
func (m *AttesterSlashingResponse) XXX_Size() int {
return xxx_messageInfo_AttesterSlashingResponse.Size(m)
}
func (m *AttesterSlashingResponse) XXX_DiscardUnknown() {
xxx_messageInfo_AttesterSlashingResponse.DiscardUnknown(m)
}
var xxx_messageInfo_AttesterSlashingResponse proto.InternalMessageInfo
func (m *AttesterSlashingResponse) GetAttesterSlashing() []*v1alpha1.AttesterSlashing {
if m != nil {
return m.AttesterSlashing
}
return nil
}
type MinMaxEpochSpan struct {
MinEpochSpan uint32 `protobuf:"varint,1,opt,name=min_epoch_span,json=minEpochSpan,proto3" json:"min_epoch_span,omitempty"`
MaxEpochSpan uint32 `protobuf:"varint,2,opt,name=max_epoch_span,json=maxEpochSpan,proto3" json:"max_epoch_span,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *MinMaxEpochSpan) Reset() { *m = MinMaxEpochSpan{} }
func (m *MinMaxEpochSpan) String() string { return proto.CompactTextString(m) }
func (*MinMaxEpochSpan) ProtoMessage() {}
func (*MinMaxEpochSpan) Descriptor() ([]byte, []int) {
return fileDescriptor_d75c5a5be5c552fc, []int{5}
}
func (m *MinMaxEpochSpan) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MinMaxEpochSpan.Unmarshal(m, b)
}
func (m *MinMaxEpochSpan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_MinMaxEpochSpan.Marshal(b, m, deterministic)
}
func (m *MinMaxEpochSpan) XXX_Merge(src proto.Message) {
xxx_messageInfo_MinMaxEpochSpan.Merge(m, src)
}
func (m *MinMaxEpochSpan) XXX_Size() int {
return xxx_messageInfo_MinMaxEpochSpan.Size(m)
}
func (m *MinMaxEpochSpan) XXX_DiscardUnknown() {
xxx_messageInfo_MinMaxEpochSpan.DiscardUnknown(m)
}
var xxx_messageInfo_MinMaxEpochSpan proto.InternalMessageInfo
func (m *MinMaxEpochSpan) GetMinEpochSpan() uint32 {
if m != nil {
return m.MinEpochSpan
}
return 0
}
func (m *MinMaxEpochSpan) GetMaxEpochSpan() uint32 {
if m != nil {
return m.MaxEpochSpan
}
return 0
}
type EpochSpanMap struct {
EpochSpanMap map[uint64]*MinMaxEpochSpan `protobuf:"bytes,1,rep,name=epoch_span_map,json=epochSpanMap,proto3" json:"epoch_span_map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *EpochSpanMap) Reset() { *m = EpochSpanMap{} }
func (m *EpochSpanMap) String() string { return proto.CompactTextString(m) }
func (*EpochSpanMap) ProtoMessage() {}
func (*EpochSpanMap) Descriptor() ([]byte, []int) {
return fileDescriptor_d75c5a5be5c552fc, []int{6}
}
func (m *EpochSpanMap) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_EpochSpanMap.Unmarshal(m, b)
}
func (m *EpochSpanMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_EpochSpanMap.Marshal(b, m, deterministic)
}
func (m *EpochSpanMap) XXX_Merge(src proto.Message) {
xxx_messageInfo_EpochSpanMap.Merge(m, src)
}
func (m *EpochSpanMap) XXX_Size() int {
return xxx_messageInfo_EpochSpanMap.Size(m)
}
func (m *EpochSpanMap) XXX_DiscardUnknown() {
xxx_messageInfo_EpochSpanMap.DiscardUnknown(m)
}
var xxx_messageInfo_EpochSpanMap proto.InternalMessageInfo
func (m *EpochSpanMap) GetEpochSpanMap() map[uint64]*MinMaxEpochSpan {
if m != nil {
return m.EpochSpanMap
}
return nil
}
func init() {
proto.RegisterType((*ValidatorIDToIdxAtt)(nil), "ethereum.beacon.rpc.v1.ValidatorIDToIdxAtt")
proto.RegisterType((*ValidatorIDToIdxAttList)(nil), "ethereum.beacon.rpc.v1.ValidatorIDToIdxAttList")
proto.RegisterType((*ProposerSlashingRequest)(nil), "ethereum.beacon.rpc.v1.ProposerSlashingRequest")
proto.RegisterType((*ProposerSlashingResponse)(nil), "ethereum.beacon.rpc.v1.ProposerSlashingResponse")
proto.RegisterType((*AttesterSlashingResponse)(nil), "ethereum.beacon.rpc.v1.AttesterSlashingResponse")
proto.RegisterType((*MinMaxEpochSpan)(nil), "ethereum.beacon.rpc.v1.MinMaxEpochSpan")
proto.RegisterType((*EpochSpanMap)(nil), "ethereum.beacon.rpc.v1.EpochSpanMap")
proto.RegisterMapType((map[uint64]*MinMaxEpochSpan)(nil), "ethereum.beacon.rpc.v1.EpochSpanMap.EpochSpanMapEntry")
}
func init() { proto.RegisterFile("proto/beacon/rpc/v1/slasher.proto", fileDescriptor_d75c5a5be5c552fc) }
var fileDescriptor_d75c5a5be5c552fc = []byte{
// 597 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x6f, 0x6b, 0xd4, 0x4e,
0x10, 0x26, 0xbd, 0xfe, 0x7e, 0xb5, 0x73, 0x67, 0x7b, 0x5d, 0xb1, 0x3d, 0xae, 0x82, 0x35, 0x08,
0x3d, 0x11, 0x92, 0x5e, 0x05, 0x11, 0xc1, 0x17, 0x2d, 0x16, 0x3c, 0xf4, 0x40, 0xd2, 0xa2, 0x20,
0x4a, 0xd8, 0x24, 0xe3, 0x25, 0x36, 0xb7, 0xbb, 0xee, 0x6e, 0x8e, 0xeb, 0xa7, 0xf0, 0x8b, 0xf8,
0x79, 0xfc, 0x3c, 0x92, 0x4d, 0xae, 0x97, 0xfb, 0x13, 0xa8, 0xef, 0x32, 0xcf, 0x3c, 0x33, 0xcf,
0xec, 0x93, 0xd9, 0x85, 0x27, 0x42, 0x72, 0xcd, 0xdd, 0x00, 0x69, 0xc8, 0x99, 0x2b, 0x45, 0xe8,
0x4e, 0xfa, 0xae, 0x4a, 0xa9, 0x8a, 0x51, 0x3a, 0x26, 0x47, 0xf6, 0x51, 0xc7, 0x28, 0x31, 0x1b,
0x3b, 0x05, 0xcb, 0x91, 0x22, 0x74, 0x26, 0xfd, 0xee, 0xe1, 0x88, 0xf3, 0x51, 0x8a, 0xae, 0x61,
0x05, 0xd9, 0x77, 0x17, 0xc7, 0x42, 0xdf, 0x14, 0x45, 0xdd, 0xc7, 0xa8, 0x63, 0x77, 0xd2, 0xa7,
0xa9, 0x88, 0x69, 0xbf, 0x6c, 0xef, 0x07, 0x29, 0x0f, 0xaf, 0x0b, 0x82, 0xfd, 0x03, 0x1e, 0x7c,
0xa2, 0x69, 0x12, 0x51, 0xcd, 0xe5, 0xe0, 0xed, 0x15, 0x1f, 0x44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x0b, 0x12, 0x4d, 0x15, 0xd9, 0x77, 0x8a, 0x27, 0xcd, 0x99, 0x3d, 0x69, 0xce, 0x45, 0xfe, 0xa4,
0x75, 0xef, 0x7a, 0x19, 0x4e, 0x2c, 0xf2, 0x05, 0x1e, 0xae, 0x33, 0xf1, 0xdf, 0x7b, 0x2f, 0x3b,
0x76, 0x62, 0x05, 0xff, 0x9b, 0xd2, 0x17, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x3c, 0x23, 0x47,
0x27, 0xb4, 0x05, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// SlasherClient is the client API for Slasher service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type SlasherClient interface {
IsSlashableAttestation(ctx context.Context, in *v1alpha1.IndexedAttestation, opts ...grpc.CallOption) (*AttesterSlashingResponse, error)
IsSlashableBlock(ctx context.Context, in *ProposerSlashingRequest, opts ...grpc.CallOption) (*ProposerSlashingResponse, error)
SlashableProposals(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (Slasher_SlashableProposalsClient, error)
SlashableAttestations(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (Slasher_SlashableAttestationsClient, error)
}
type slasherClient struct {
cc *grpc.ClientConn
}
func NewSlasherClient(cc *grpc.ClientConn) SlasherClient {
return &slasherClient{cc}
}
func (c *slasherClient) IsSlashableAttestation(ctx context.Context, in *v1alpha1.IndexedAttestation, opts ...grpc.CallOption) (*AttesterSlashingResponse, error) {
out := new(AttesterSlashingResponse)
err := c.cc.Invoke(ctx, "/ethereum.beacon.rpc.v1.Slasher/IsSlashableAttestation", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *slasherClient) IsSlashableBlock(ctx context.Context, in *ProposerSlashingRequest, opts ...grpc.CallOption) (*ProposerSlashingResponse, error) {
out := new(ProposerSlashingResponse)
err := c.cc.Invoke(ctx, "/ethereum.beacon.rpc.v1.Slasher/IsSlashableBlock", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *slasherClient) SlashableProposals(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (Slasher_SlashableProposalsClient, error) {
stream, err := c.cc.NewStream(ctx, &_Slasher_serviceDesc.Streams[0], "/ethereum.beacon.rpc.v1.Slasher/SlashableProposals", opts...)
if err != nil {
return nil, err
}
x := &slasherSlashableProposalsClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type Slasher_SlashableProposalsClient interface {
Recv() (*v1alpha1.ProposerSlashing, error)
grpc.ClientStream
}
type slasherSlashableProposalsClient struct {
grpc.ClientStream
}
func (x *slasherSlashableProposalsClient) Recv() (*v1alpha1.ProposerSlashing, error) {
m := new(v1alpha1.ProposerSlashing)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *slasherClient) SlashableAttestations(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (Slasher_SlashableAttestationsClient, error) {
stream, err := c.cc.NewStream(ctx, &_Slasher_serviceDesc.Streams[1], "/ethereum.beacon.rpc.v1.Slasher/SlashableAttestations", opts...)
if err != nil {
return nil, err
}
x := &slasherSlashableAttestationsClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type Slasher_SlashableAttestationsClient interface {
Recv() (*v1alpha1.AttesterSlashing, error)
grpc.ClientStream
}
type slasherSlashableAttestationsClient struct {
grpc.ClientStream
}
func (x *slasherSlashableAttestationsClient) Recv() (*v1alpha1.AttesterSlashing, error) {
m := new(v1alpha1.AttesterSlashing)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// SlasherServer is the server API for Slasher service.
type SlasherServer interface {
IsSlashableAttestation(context.Context, *v1alpha1.IndexedAttestation) (*AttesterSlashingResponse, error)
IsSlashableBlock(context.Context, *ProposerSlashingRequest) (*ProposerSlashingResponse, error)
SlashableProposals(*empty.Empty, Slasher_SlashableProposalsServer) error
SlashableAttestations(*empty.Empty, Slasher_SlashableAttestationsServer) error
}
// UnimplementedSlasherServer can be embedded to have forward compatible implementations.
type UnimplementedSlasherServer struct {
}
func (*UnimplementedSlasherServer) IsSlashableAttestation(ctx context.Context, req *v1alpha1.IndexedAttestation) (*AttesterSlashingResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method IsSlashableAttestation not implemented")
}
func (*UnimplementedSlasherServer) IsSlashableBlock(ctx context.Context, req *ProposerSlashingRequest) (*ProposerSlashingResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method IsSlashableBlock not implemented")
}
func (*UnimplementedSlasherServer) SlashableProposals(req *empty.Empty, srv Slasher_SlashableProposalsServer) error {
return status.Errorf(codes.Unimplemented, "method SlashableProposals not implemented")
}
func (*UnimplementedSlasherServer) SlashableAttestations(req *empty.Empty, srv Slasher_SlashableAttestationsServer) error {
return status.Errorf(codes.Unimplemented, "method SlashableAttestations not implemented")
}
func RegisterSlasherServer(s *grpc.Server, srv SlasherServer) {
s.RegisterService(&_Slasher_serviceDesc, srv)
}
func _Slasher_IsSlashableAttestation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(v1alpha1.IndexedAttestation)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SlasherServer).IsSlashableAttestation(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ethereum.beacon.rpc.v1.Slasher/IsSlashableAttestation",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SlasherServer).IsSlashableAttestation(ctx, req.(*v1alpha1.IndexedAttestation))
}
return interceptor(ctx, in, info, handler)
}
func _Slasher_IsSlashableBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ProposerSlashingRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SlasherServer).IsSlashableBlock(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ethereum.beacon.rpc.v1.Slasher/IsSlashableBlock",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SlasherServer).IsSlashableBlock(ctx, req.(*ProposerSlashingRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Slasher_SlashableProposals_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(empty.Empty)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(SlasherServer).SlashableProposals(m, &slasherSlashableProposalsServer{stream})
}
type Slasher_SlashableProposalsServer interface {
Send(*v1alpha1.ProposerSlashing) error
grpc.ServerStream
}
type slasherSlashableProposalsServer struct {
grpc.ServerStream
}
func (x *slasherSlashableProposalsServer) Send(m *v1alpha1.ProposerSlashing) error {
return x.ServerStream.SendMsg(m)
}
func _Slasher_SlashableAttestations_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(empty.Empty)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(SlasherServer).SlashableAttestations(m, &slasherSlashableAttestationsServer{stream})
}
type Slasher_SlashableAttestationsServer interface {
Send(*v1alpha1.AttesterSlashing) error
grpc.ServerStream
}
type slasherSlashableAttestationsServer struct {
grpc.ServerStream
}
func (x *slasherSlashableAttestationsServer) Send(m *v1alpha1.AttesterSlashing) error {
return x.ServerStream.SendMsg(m)
}
var _Slasher_serviceDesc = grpc.ServiceDesc{
ServiceName: "ethereum.beacon.rpc.v1.Slasher",
HandlerType: (*SlasherServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "IsSlashableAttestation",
Handler: _Slasher_IsSlashableAttestation_Handler,
},
{
MethodName: "IsSlashableBlock",
Handler: _Slasher_IsSlashableBlock_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "SlashableProposals",
Handler: _Slasher_SlashableProposals_Handler,
ServerStreams: true,
},
{
StreamName: "SlashableAttestations",
Handler: _Slasher_SlashableAttestations_Handler,
ServerStreams: true,
},
},
Metadata: "proto/beacon/rpc/v1/slasher.proto",
}