prysm-pulse/proto/slashing/slashing.pb.go
prylabs-bulldozer[bot] e339b07ac7
Remove unused DB functions and proto from Slasher (#4996)
* Remove unused DB functions
* goimports
* Fix bug and improve tests
* Merge branch 'master' of https://github.com/prysmaticlabs/Prysm into slasher-remove-old-db
2020-03-04 22:29:36 +00:00

1908 lines
51 KiB
Go
Executable File
Generated

// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: proto/slashing/slashing.proto
package ethereum_slashing
import (
context "context"
fmt "fmt"
io "io"
math "math"
math_bits "math/bits"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
v1alpha1 "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
github_com_prysmaticlabs_go_bitfield "github.com/prysmaticlabs/go-bitfield"
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.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type SlashingStatusRequest_SlashingStatus int32
const (
SlashingStatusRequest_Unknown SlashingStatusRequest_SlashingStatus = 0
SlashingStatusRequest_Active SlashingStatusRequest_SlashingStatus = 1
SlashingStatusRequest_Included SlashingStatusRequest_SlashingStatus = 2
SlashingStatusRequest_Reverted SlashingStatusRequest_SlashingStatus = 3
)
var SlashingStatusRequest_SlashingStatus_name = map[int32]string{
0: "Unknown",
1: "Active",
2: "Included",
3: "Reverted",
}
var SlashingStatusRequest_SlashingStatus_value = map[string]int32{
"Unknown": 0,
"Active": 1,
"Included": 2,
"Reverted": 3,
}
func (x SlashingStatusRequest_SlashingStatus) String() string {
return proto.EnumName(SlashingStatusRequest_SlashingStatus_name, int32(x))
}
func (SlashingStatusRequest_SlashingStatus) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_da7e95107d0081b4, []int{6, 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_da7e95107d0081b4, []int{0}
}
func (m *ProposerSlashingResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ProposerSlashingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ProposerSlashingResponse.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *ProposerSlashingResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ProposerSlashingResponse.Merge(m, src)
}
func (m *ProposerSlashingResponse) XXX_Size() int {
return m.Size()
}
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_da7e95107d0081b4, []int{1}
}
func (m *AttesterSlashingResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *AttesterSlashingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_AttesterSlashingResponse.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *AttesterSlashingResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_AttesterSlashingResponse.Merge(m, src)
}
func (m *AttesterSlashingResponse) XXX_Size() int {
return m.Size()
}
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_da7e95107d0081b4, []int{2}
}
func (m *MinMaxEpochSpan) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *MinMaxEpochSpan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_MinMaxEpochSpan.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *MinMaxEpochSpan) XXX_Merge(src proto.Message) {
xxx_messageInfo_MinMaxEpochSpan.Merge(m, src)
}
func (m *MinMaxEpochSpan) XXX_Size() int {
return m.Size()
}
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_da7e95107d0081b4, []int{3}
}
func (m *EpochSpanMap) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *EpochSpanMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_EpochSpanMap.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *EpochSpanMap) XXX_Merge(src proto.Message) {
xxx_messageInfo_EpochSpanMap.Merge(m, src)
}
func (m *EpochSpanMap) XXX_Size() int {
return m.Size()
}
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
}
type ProposalHistory struct {
EpochBits github_com_prysmaticlabs_go_bitfield.Bitlist `protobuf:"bytes,1,opt,name=epoch_bits,json=epochBits,proto3,casttype=github.com/prysmaticlabs/go-bitfield.Bitlist" json:"epoch_bits,omitempty"`
LatestEpochWritten uint64 `protobuf:"varint,2,opt,name=latest_epoch_written,json=latestEpochWritten,proto3" json:"latest_epoch_written,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ProposalHistory) Reset() { *m = ProposalHistory{} }
func (m *ProposalHistory) String() string { return proto.CompactTextString(m) }
func (*ProposalHistory) ProtoMessage() {}
func (*ProposalHistory) Descriptor() ([]byte, []int) {
return fileDescriptor_da7e95107d0081b4, []int{4}
}
func (m *ProposalHistory) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ProposalHistory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ProposalHistory.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *ProposalHistory) XXX_Merge(src proto.Message) {
xxx_messageInfo_ProposalHistory.Merge(m, src)
}
func (m *ProposalHistory) XXX_Size() int {
return m.Size()
}
func (m *ProposalHistory) XXX_DiscardUnknown() {
xxx_messageInfo_ProposalHistory.DiscardUnknown(m)
}
var xxx_messageInfo_ProposalHistory proto.InternalMessageInfo
func (m *ProposalHistory) GetEpochBits() github_com_prysmaticlabs_go_bitfield.Bitlist {
if m != nil {
return m.EpochBits
}
return nil
}
func (m *ProposalHistory) GetLatestEpochWritten() uint64 {
if m != nil {
return m.LatestEpochWritten
}
return 0
}
type AttestationHistory struct {
TargetToSource map[uint64]uint64 `protobuf:"bytes,1,rep,name=target_to_source,json=targetToSource,proto3" json:"target_to_source,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
LatestEpochWritten uint64 `protobuf:"varint,2,opt,name=latest_epoch_written,json=latestEpochWritten,proto3" json:"latest_epoch_written,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AttestationHistory) Reset() { *m = AttestationHistory{} }
func (m *AttestationHistory) String() string { return proto.CompactTextString(m) }
func (*AttestationHistory) ProtoMessage() {}
func (*AttestationHistory) Descriptor() ([]byte, []int) {
return fileDescriptor_da7e95107d0081b4, []int{5}
}
func (m *AttestationHistory) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *AttestationHistory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_AttestationHistory.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *AttestationHistory) XXX_Merge(src proto.Message) {
xxx_messageInfo_AttestationHistory.Merge(m, src)
}
func (m *AttestationHistory) XXX_Size() int {
return m.Size()
}
func (m *AttestationHistory) XXX_DiscardUnknown() {
xxx_messageInfo_AttestationHistory.DiscardUnknown(m)
}
var xxx_messageInfo_AttestationHistory proto.InternalMessageInfo
func (m *AttestationHistory) GetTargetToSource() map[uint64]uint64 {
if m != nil {
return m.TargetToSource
}
return nil
}
func (m *AttestationHistory) GetLatestEpochWritten() uint64 {
if m != nil {
return m.LatestEpochWritten
}
return 0
}
type SlashingStatusRequest struct {
Status SlashingStatusRequest_SlashingStatus `protobuf:"varint,1,opt,name=status,proto3,enum=ethereum.slashing.SlashingStatusRequest_SlashingStatus" json:"status,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SlashingStatusRequest) Reset() { *m = SlashingStatusRequest{} }
func (m *SlashingStatusRequest) String() string { return proto.CompactTextString(m) }
func (*SlashingStatusRequest) ProtoMessage() {}
func (*SlashingStatusRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_da7e95107d0081b4, []int{6}
}
func (m *SlashingStatusRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *SlashingStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_SlashingStatusRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *SlashingStatusRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_SlashingStatusRequest.Merge(m, src)
}
func (m *SlashingStatusRequest) XXX_Size() int {
return m.Size()
}
func (m *SlashingStatusRequest) XXX_DiscardUnknown() {
xxx_messageInfo_SlashingStatusRequest.DiscardUnknown(m)
}
var xxx_messageInfo_SlashingStatusRequest proto.InternalMessageInfo
func (m *SlashingStatusRequest) GetStatus() SlashingStatusRequest_SlashingStatus {
if m != nil {
return m.Status
}
return SlashingStatusRequest_Unknown
}
func init() {
proto.RegisterEnum("ethereum.slashing.SlashingStatusRequest_SlashingStatus", SlashingStatusRequest_SlashingStatus_name, SlashingStatusRequest_SlashingStatus_value)
proto.RegisterType((*ProposerSlashingResponse)(nil), "ethereum.slashing.ProposerSlashingResponse")
proto.RegisterType((*AttesterSlashingResponse)(nil), "ethereum.slashing.AttesterSlashingResponse")
proto.RegisterType((*MinMaxEpochSpan)(nil), "ethereum.slashing.MinMaxEpochSpan")
proto.RegisterType((*EpochSpanMap)(nil), "ethereum.slashing.EpochSpanMap")
proto.RegisterMapType((map[uint64]*MinMaxEpochSpan)(nil), "ethereum.slashing.EpochSpanMap.EpochSpanMapEntry")
proto.RegisterType((*ProposalHistory)(nil), "ethereum.slashing.ProposalHistory")
proto.RegisterType((*AttestationHistory)(nil), "ethereum.slashing.AttestationHistory")
proto.RegisterMapType((map[uint64]uint64)(nil), "ethereum.slashing.AttestationHistory.TargetToSourceEntry")
proto.RegisterType((*SlashingStatusRequest)(nil), "ethereum.slashing.SlashingStatusRequest")
}
func init() { proto.RegisterFile("proto/slashing/slashing.proto", fileDescriptor_da7e95107d0081b4) }
var fileDescriptor_da7e95107d0081b4 = []byte{
// 661 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xcd, 0x6e, 0xd3, 0x40,
0x10, 0xc6, 0x6d, 0x69, 0x61, 0x1b, 0x52, 0x77, 0x29, 0xa8, 0x8a, 0x44, 0x5b, 0x45, 0x48, 0x14,
0x41, 0x9d, 0x36, 0x1c, 0x28, 0xdc, 0x1a, 0xa9, 0x52, 0x7b, 0xa8, 0x8a, 0x9c, 0xa2, 0x9e, 0x50,
0xb4, 0xb6, 0xa7, 0xf6, 0xaa, 0xce, 0xee, 0xe2, 0x1d, 0xa7, 0xcd, 0x7b, 0xf0, 0x1e, 0xbc, 0x06,
0x07, 0x0e, 0x3c, 0x01, 0x42, 0x3d, 0x23, 0x1e, 0x80, 0x13, 0xf2, 0xda, 0x29, 0x4e, 0xe2, 0x48,
0x70, 0xdb, 0xf9, 0x66, 0xe6, 0xfb, 0xe6, 0xc7, 0x1e, 0xf2, 0x44, 0x25, 0x12, 0x65, 0x4b, 0xc7,
0x4c, 0x47, 0x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, 0xff, 0xf5, 0x35, 0xb6,
0xef, 0xd3, 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 *v1alpha1.SignedBeaconBlockHeader, opts ...grpc.CallOption) (*ProposerSlashingResponse, 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.slashing.Slasher/IsSlashableAttestation", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *slasherClient) IsSlashableBlock(ctx context.Context, in *v1alpha1.SignedBeaconBlockHeader, opts ...grpc.CallOption) (*ProposerSlashingResponse, error) {
out := new(ProposerSlashingResponse)
err := c.cc.Invoke(ctx, "/ethereum.slashing.Slasher/IsSlashableBlock", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// SlasherServer is the server API for Slasher service.
type SlasherServer interface {
IsSlashableAttestation(context.Context, *v1alpha1.IndexedAttestation) (*AttesterSlashingResponse, error)
IsSlashableBlock(context.Context, *v1alpha1.SignedBeaconBlockHeader) (*ProposerSlashingResponse, 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 *v1alpha1.SignedBeaconBlockHeader) (*ProposerSlashingResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method IsSlashableBlock 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.slashing.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(v1alpha1.SignedBeaconBlockHeader)
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.slashing.Slasher/IsSlashableBlock",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SlasherServer).IsSlashableBlock(ctx, req.(*v1alpha1.SignedBeaconBlockHeader))
}
return interceptor(ctx, in, info, handler)
}
var _Slasher_serviceDesc = grpc.ServiceDesc{
ServiceName: "ethereum.slashing.Slasher",
HandlerType: (*SlasherServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "IsSlashableAttestation",
Handler: _Slasher_IsSlashableAttestation_Handler,
},
{
MethodName: "IsSlashableBlock",
Handler: _Slasher_IsSlashableBlock_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "proto/slashing/slashing.proto",
}
func (m *ProposerSlashingResponse) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *ProposerSlashingResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *ProposerSlashingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.ProposerSlashing) > 0 {
for iNdEx := len(m.ProposerSlashing) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.ProposerSlashing[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintSlashing(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func (m *AttesterSlashingResponse) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *AttesterSlashingResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *AttesterSlashingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.AttesterSlashing) > 0 {
for iNdEx := len(m.AttesterSlashing) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.AttesterSlashing[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintSlashing(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func (m *MinMaxEpochSpan) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *MinMaxEpochSpan) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *MinMaxEpochSpan) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.MaxEpochSpan != 0 {
i = encodeVarintSlashing(dAtA, i, uint64(m.MaxEpochSpan))
i--
dAtA[i] = 0x10
}
if m.MinEpochSpan != 0 {
i = encodeVarintSlashing(dAtA, i, uint64(m.MinEpochSpan))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func (m *EpochSpanMap) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *EpochSpanMap) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *EpochSpanMap) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.EpochSpanMap) > 0 {
for k := range m.EpochSpanMap {
v := m.EpochSpanMap[k]
baseI := i
if v != nil {
{
size, err := v.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintSlashing(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
i = encodeVarintSlashing(dAtA, i, uint64(k))
i--
dAtA[i] = 0x8
i = encodeVarintSlashing(dAtA, i, uint64(baseI-i))
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func (m *ProposalHistory) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *ProposalHistory) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *ProposalHistory) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.LatestEpochWritten != 0 {
i = encodeVarintSlashing(dAtA, i, uint64(m.LatestEpochWritten))
i--
dAtA[i] = 0x10
}
if len(m.EpochBits) > 0 {
i -= len(m.EpochBits)
copy(dAtA[i:], m.EpochBits)
i = encodeVarintSlashing(dAtA, i, uint64(len(m.EpochBits)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *AttestationHistory) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *AttestationHistory) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *AttestationHistory) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.LatestEpochWritten != 0 {
i = encodeVarintSlashing(dAtA, i, uint64(m.LatestEpochWritten))
i--
dAtA[i] = 0x10
}
if len(m.TargetToSource) > 0 {
for k := range m.TargetToSource {
v := m.TargetToSource[k]
baseI := i
i = encodeVarintSlashing(dAtA, i, uint64(v))
i--
dAtA[i] = 0x10
i = encodeVarintSlashing(dAtA, i, uint64(k))
i--
dAtA[i] = 0x8
i = encodeVarintSlashing(dAtA, i, uint64(baseI-i))
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func (m *SlashingStatusRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *SlashingStatusRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *SlashingStatusRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.Status != 0 {
i = encodeVarintSlashing(dAtA, i, uint64(m.Status))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func encodeVarintSlashing(dAtA []byte, offset int, v uint64) int {
offset -= sovSlashing(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *ProposerSlashingResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.ProposerSlashing) > 0 {
for _, e := range m.ProposerSlashing {
l = e.Size()
n += 1 + l + sovSlashing(uint64(l))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *AttesterSlashingResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.AttesterSlashing) > 0 {
for _, e := range m.AttesterSlashing {
l = e.Size()
n += 1 + l + sovSlashing(uint64(l))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *MinMaxEpochSpan) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.MinEpochSpan != 0 {
n += 1 + sovSlashing(uint64(m.MinEpochSpan))
}
if m.MaxEpochSpan != 0 {
n += 1 + sovSlashing(uint64(m.MaxEpochSpan))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *EpochSpanMap) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.EpochSpanMap) > 0 {
for k, v := range m.EpochSpanMap {
_ = k
_ = v
l = 0
if v != nil {
l = v.Size()
l += 1 + sovSlashing(uint64(l))
}
mapEntrySize := 1 + sovSlashing(uint64(k)) + l
n += mapEntrySize + 1 + sovSlashing(uint64(mapEntrySize))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *ProposalHistory) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.EpochBits)
if l > 0 {
n += 1 + l + sovSlashing(uint64(l))
}
if m.LatestEpochWritten != 0 {
n += 1 + sovSlashing(uint64(m.LatestEpochWritten))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *AttestationHistory) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.TargetToSource) > 0 {
for k, v := range m.TargetToSource {
_ = k
_ = v
mapEntrySize := 1 + sovSlashing(uint64(k)) + 1 + sovSlashing(uint64(v))
n += mapEntrySize + 1 + sovSlashing(uint64(mapEntrySize))
}
}
if m.LatestEpochWritten != 0 {
n += 1 + sovSlashing(uint64(m.LatestEpochWritten))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *SlashingStatusRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Status != 0 {
n += 1 + sovSlashing(uint64(m.Status))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func sovSlashing(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozSlashing(x uint64) (n int) {
return sovSlashing(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *ProposerSlashingResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSlashing
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: ProposerSlashingResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ProposerSlashingResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ProposerSlashing", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSlashing
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthSlashing
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthSlashing
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ProposerSlashing = append(m.ProposerSlashing, &v1alpha1.ProposerSlashing{})
if err := m.ProposerSlashing[len(m.ProposerSlashing)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipSlashing(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthSlashing
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthSlashing
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *AttesterSlashingResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSlashing
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: AttesterSlashingResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: AttesterSlashingResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field AttesterSlashing", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSlashing
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthSlashing
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthSlashing
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.AttesterSlashing = append(m.AttesterSlashing, &v1alpha1.AttesterSlashing{})
if err := m.AttesterSlashing[len(m.AttesterSlashing)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipSlashing(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthSlashing
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthSlashing
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *MinMaxEpochSpan) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSlashing
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: MinMaxEpochSpan: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: MinMaxEpochSpan: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field MinEpochSpan", wireType)
}
m.MinEpochSpan = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSlashing
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.MinEpochSpan |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field MaxEpochSpan", wireType)
}
m.MaxEpochSpan = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSlashing
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.MaxEpochSpan |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipSlashing(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthSlashing
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthSlashing
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *EpochSpanMap) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSlashing
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: EpochSpanMap: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: EpochSpanMap: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field EpochSpanMap", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSlashing
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthSlashing
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthSlashing
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.EpochSpanMap == nil {
m.EpochSpanMap = make(map[uint64]*MinMaxEpochSpan)
}
var mapkey uint64
var mapvalue *MinMaxEpochSpan
for iNdEx < postIndex {
entryPreIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSlashing
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
if fieldNum == 1 {
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSlashing
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
mapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
} else if fieldNum == 2 {
var mapmsglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSlashing
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
mapmsglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if mapmsglen < 0 {
return ErrInvalidLengthSlashing
}
postmsgIndex := iNdEx + mapmsglen
if postmsgIndex < 0 {
return ErrInvalidLengthSlashing
}
if postmsgIndex > l {
return io.ErrUnexpectedEOF
}
mapvalue = &MinMaxEpochSpan{}
if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
return err
}
iNdEx = postmsgIndex
} else {
iNdEx = entryPreIndex
skippy, err := skipSlashing(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthSlashing
}
if (iNdEx + skippy) > postIndex {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
m.EpochSpanMap[mapkey] = mapvalue
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipSlashing(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthSlashing
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthSlashing
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *ProposalHistory) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSlashing
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: ProposalHistory: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ProposalHistory: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field EpochBits", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSlashing
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthSlashing
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthSlashing
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.EpochBits = append(m.EpochBits[:0], dAtA[iNdEx:postIndex]...)
if m.EpochBits == nil {
m.EpochBits = []byte{}
}
iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field LatestEpochWritten", wireType)
}
m.LatestEpochWritten = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSlashing
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.LatestEpochWritten |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipSlashing(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthSlashing
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthSlashing
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *AttestationHistory) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSlashing
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: AttestationHistory: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: AttestationHistory: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field TargetToSource", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSlashing
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthSlashing
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthSlashing
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.TargetToSource == nil {
m.TargetToSource = make(map[uint64]uint64)
}
var mapkey uint64
var mapvalue uint64
for iNdEx < postIndex {
entryPreIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSlashing
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
if fieldNum == 1 {
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSlashing
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
mapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
} else if fieldNum == 2 {
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSlashing
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
mapvalue |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
} else {
iNdEx = entryPreIndex
skippy, err := skipSlashing(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthSlashing
}
if (iNdEx + skippy) > postIndex {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
m.TargetToSource[mapkey] = mapvalue
iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field LatestEpochWritten", wireType)
}
m.LatestEpochWritten = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSlashing
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.LatestEpochWritten |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipSlashing(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthSlashing
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthSlashing
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *SlashingStatusRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSlashing
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: SlashingStatusRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: SlashingStatusRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
}
m.Status = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSlashing
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Status |= SlashingStatusRequest_SlashingStatus(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipSlashing(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthSlashing
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthSlashing
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipSlashing(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowSlashing
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowSlashing
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowSlashing
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthSlashing
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupSlashing
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthSlashing
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthSlashing = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowSlashing = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupSlashing = fmt.Errorf("proto: unexpected end of group")
)