Files
prysm/proto/eth/v1alpha1/slasher.pb.go
Raul Jordan 64795bd231 Utilize Archived Data in GetValidatorParticipation RPC Server (#3526)
* archive participation begin implementation

* validator participation compute

* comments

* compute participation common func

* full test for archiving data

* gazelle

* complete tests

* gaz

* remove double negative grammar in comment

* use archive in rpc

* uses the archive!

* error if nothing found in archive

* comment

* use head fetcher and root

* tests pass

* archive active set changes appropriately

* archive committees

* archive info

* done with committee info archiving

* archived set changes stored

* fix build

* test for archive balances and active indices

* further abstractions

* only archive epoch end

* tests all pass

* tests pass now

* archive done

* test for activated validators

* tests for exited

* amend message

* use different proto

* finalization fetcher

* gaz

* use root

* use ctx

* use new ethapis

* use proper hash

* match apis compatibility

* match apis

* properly use participation

* fix tests

* use right commit
2019-09-23 10:47:34 -05:00

276 lines
9.8 KiB
Go
Executable File
Generated

// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: proto/eth/v1alpha1/slasher.proto
package eth
import (
context "context"
fmt "fmt"
proto "github.com/gogo/protobuf/proto"
types "github.com/gogo/protobuf/types"
grpc "google.golang.org/grpc"
math "math"
)
// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package
func init() { proto.RegisterFile("proto/eth/v1alpha1/slasher.proto", fileDescriptor_c3db2cc39857595b) }
var fileDescriptor_c3db2cc39857595b = []byte{
// 296 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x91, 0xc1, 0x4a, 0xf4, 0x30,
0x14, 0x85, 0x29, 0x3f, 0xfc, 0x42, 0x56, 0x12, 0x98, 0x59, 0x8c, 0x50, 0x44, 0x14, 0x5d, 0x25,
0x33, 0x8a, 0x2b, 0x57, 0x56, 0x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 0xcb,
0x6a, 0x7f, 0x2d, 0x3b, 0x4d, 0xf8, 0x9c, 0x8d, 0x86, 0x4a, 0xfa, 0xbb, 0xf6, 0xd7, 0x66, 0xa6,
0x49, 0x76, 0xf6, 0xdc, 0xa5, 0xc9, 0x4b, 0x97, 0x26, 0xaf, 0x5d, 0x9a, 0xcc, 0x8f, 0x8b, 0x92,
0x74, 0xab, 0x44, 0x6e, 0x2b, 0xd9, 0xb8, 0x85, 0xaf, 0x80, 0xca, 0xdc, 0x80, 0xf2, 0x71, 0x92,
0xdf, 0x5f, 0xf8, 0x04, 0x49, 0xab, 0xff, 0xe1, 0xfb, 0xd1, 0x5b, 0x00, 0x00, 0x00, 0xff, 0xff,
0xcd, 0x19, 0xa4, 0x22, 0x7f, 0x02, 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 *Attestation, opts ...grpc.CallOption) (*AttesterSlashing, error)
IsSlashableBlock(ctx context.Context, in *BeaconBlockHeader, opts ...grpc.CallOption) (*ProposerSlashing, error)
SlashableProposals(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (Slasher_SlashableProposalsClient, error)
SlashableAttestations(ctx context.Context, in *types.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 *Attestation, opts ...grpc.CallOption) (*AttesterSlashing, error) {
out := new(AttesterSlashing)
err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.Slasher/IsSlashableAttestation", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *slasherClient) IsSlashableBlock(ctx context.Context, in *BeaconBlockHeader, opts ...grpc.CallOption) (*ProposerSlashing, error) {
out := new(ProposerSlashing)
err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.Slasher/IsSlashableBlock", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *slasherClient) SlashableProposals(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (Slasher_SlashableProposalsClient, error) {
stream, err := c.cc.NewStream(ctx, &_Slasher_serviceDesc.Streams[0], "/ethereum.eth.v1alpha1.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() (*ProposerSlashing, error)
grpc.ClientStream
}
type slasherSlashableProposalsClient struct {
grpc.ClientStream
}
func (x *slasherSlashableProposalsClient) Recv() (*ProposerSlashing, error) {
m := new(ProposerSlashing)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *slasherClient) SlashableAttestations(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (Slasher_SlashableAttestationsClient, error) {
stream, err := c.cc.NewStream(ctx, &_Slasher_serviceDesc.Streams[1], "/ethereum.eth.v1alpha1.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() (*AttesterSlashing, error)
grpc.ClientStream
}
type slasherSlashableAttestationsClient struct {
grpc.ClientStream
}
func (x *slasherSlashableAttestationsClient) Recv() (*AttesterSlashing, error) {
m := new(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, *Attestation) (*AttesterSlashing, error)
IsSlashableBlock(context.Context, *BeaconBlockHeader) (*ProposerSlashing, error)
SlashableProposals(*types.Empty, Slasher_SlashableProposalsServer) error
SlashableAttestations(*types.Empty, Slasher_SlashableAttestationsServer) error
}
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(Attestation)
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.eth.v1alpha1.Slasher/IsSlashableAttestation",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SlasherServer).IsSlashableAttestation(ctx, req.(*Attestation))
}
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(BeaconBlockHeader)
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.eth.v1alpha1.Slasher/IsSlashableBlock",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SlasherServer).IsSlashableBlock(ctx, req.(*BeaconBlockHeader))
}
return interceptor(ctx, in, info, handler)
}
func _Slasher_SlashableProposals_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(types.Empty)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(SlasherServer).SlashableProposals(m, &slasherSlashableProposalsServer{stream})
}
type Slasher_SlashableProposalsServer interface {
Send(*ProposerSlashing) error
grpc.ServerStream
}
type slasherSlashableProposalsServer struct {
grpc.ServerStream
}
func (x *slasherSlashableProposalsServer) Send(m *ProposerSlashing) error {
return x.ServerStream.SendMsg(m)
}
func _Slasher_SlashableAttestations_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(types.Empty)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(SlasherServer).SlashableAttestations(m, &slasherSlashableAttestationsServer{stream})
}
type Slasher_SlashableAttestationsServer interface {
Send(*AttesterSlashing) error
grpc.ServerStream
}
type slasherSlashableAttestationsServer struct {
grpc.ServerStream
}
func (x *slasherSlashableAttestationsServer) Send(m *AttesterSlashing) error {
return x.ServerStream.SendMsg(m)
}
var _Slasher_serviceDesc = grpc.ServiceDesc{
ServiceName: "ethereum.eth.v1alpha1.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/eth/v1alpha1/slasher.proto",
}