mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-15 22:48:19 +00:00
a8e501b3cf
* update deps * update deps * update protos/* * update deps * reset protos * update protos * update shared/params/config * update protos * update /shared * update shared/slotutil and shared/testutil * update beacon-chain/core/helpers * updates beacon-chain/state * update beacon-chain/forkchoice * update beacon-chain/blockchain * update beacon-chain/cache * update beacon-chain/core * update beacon-chain/db * update beacon-chain/node * update beacon-chain/p2p * update beacon-chain/rpc * update beacon-chain/sync * go mod tidy * make sure that beacon-chain build suceeds * go fmt * update e2e tests * update slasher * remove redundant alias * update validator * gazelle * fix build errors in unit tests * go fmt * update deps * update fuzz/BUILD.bazel * fix unit tests * more unit test fixes * fix blockchain UTs * more unit test fixes
2146 lines
60 KiB
Go
Executable File
Generated
2146 lines
60 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"
|
|
github_com_prysmaticlabs_eth2_types "github.com/prysmaticlabs/eth2-types"
|
|
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 HighestAttestationRequest struct {
|
|
ValidatorIds []uint64 `protobuf:"varint,1,rep,packed,name=validator_ids,json=validatorIds,proto3" json:"validator_ids,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *HighestAttestationRequest) Reset() { *m = HighestAttestationRequest{} }
|
|
func (m *HighestAttestationRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*HighestAttestationRequest) ProtoMessage() {}
|
|
func (*HighestAttestationRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_da7e95107d0081b4, []int{0}
|
|
}
|
|
func (m *HighestAttestationRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *HighestAttestationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_HighestAttestationRequest.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 *HighestAttestationRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_HighestAttestationRequest.Merge(m, src)
|
|
}
|
|
func (m *HighestAttestationRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *HighestAttestationRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_HighestAttestationRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_HighestAttestationRequest proto.InternalMessageInfo
|
|
|
|
func (m *HighestAttestationRequest) GetValidatorIds() []uint64 {
|
|
if m != nil {
|
|
return m.ValidatorIds
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type HighestAttestationResponse struct {
|
|
Attestations []*HighestAttestation `protobuf:"bytes,1,rep,name=attestations,proto3" json:"attestations,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *HighestAttestationResponse) Reset() { *m = HighestAttestationResponse{} }
|
|
func (m *HighestAttestationResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*HighestAttestationResponse) ProtoMessage() {}
|
|
func (*HighestAttestationResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_da7e95107d0081b4, []int{1}
|
|
}
|
|
func (m *HighestAttestationResponse) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *HighestAttestationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_HighestAttestationResponse.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 *HighestAttestationResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_HighestAttestationResponse.Merge(m, src)
|
|
}
|
|
func (m *HighestAttestationResponse) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *HighestAttestationResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_HighestAttestationResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_HighestAttestationResponse proto.InternalMessageInfo
|
|
|
|
func (m *HighestAttestationResponse) GetAttestations() []*HighestAttestation {
|
|
if m != nil {
|
|
return m.Attestations
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type HighestAttestation struct {
|
|
ValidatorId uint64 `protobuf:"varint,1,opt,name=validator_id,json=validatorId,proto3" json:"validator_id,omitempty"`
|
|
HighestSourceEpoch github_com_prysmaticlabs_eth2_types.Epoch `protobuf:"varint,2,opt,name=highest_source_epoch,json=highestSourceEpoch,proto3,casttype=github.com/prysmaticlabs/eth2-types.Epoch" json:"highest_source_epoch,omitempty"`
|
|
HighestTargetEpoch github_com_prysmaticlabs_eth2_types.Epoch `protobuf:"varint,3,opt,name=highest_target_epoch,json=highestTargetEpoch,proto3,casttype=github.com/prysmaticlabs/eth2-types.Epoch" json:"highest_target_epoch,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *HighestAttestation) Reset() { *m = HighestAttestation{} }
|
|
func (m *HighestAttestation) String() string { return proto.CompactTextString(m) }
|
|
func (*HighestAttestation) ProtoMessage() {}
|
|
func (*HighestAttestation) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_da7e95107d0081b4, []int{2}
|
|
}
|
|
func (m *HighestAttestation) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *HighestAttestation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_HighestAttestation.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 *HighestAttestation) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_HighestAttestation.Merge(m, src)
|
|
}
|
|
func (m *HighestAttestation) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *HighestAttestation) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_HighestAttestation.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_HighestAttestation proto.InternalMessageInfo
|
|
|
|
func (m *HighestAttestation) GetValidatorId() uint64 {
|
|
if m != nil {
|
|
return m.ValidatorId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *HighestAttestation) GetHighestSourceEpoch() github_com_prysmaticlabs_eth2_types.Epoch {
|
|
if m != nil {
|
|
return m.HighestSourceEpoch
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *HighestAttestation) GetHighestTargetEpoch() github_com_prysmaticlabs_eth2_types.Epoch {
|
|
if m != nil {
|
|
return m.HighestTargetEpoch
|
|
}
|
|
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_da7e95107d0081b4, []int{3}
|
|
}
|
|
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 Slashable struct {
|
|
Slashable bool `protobuf:"varint,1,opt,name=slashable,proto3" json:"slashable,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Slashable) Reset() { *m = Slashable{} }
|
|
func (m *Slashable) String() string { return proto.CompactTextString(m) }
|
|
func (*Slashable) ProtoMessage() {}
|
|
func (*Slashable) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_da7e95107d0081b4, []int{4}
|
|
}
|
|
func (m *Slashable) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Slashable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Slashable.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 *Slashable) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Slashable.Merge(m, src)
|
|
}
|
|
func (m *Slashable) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Slashable) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Slashable.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Slashable proto.InternalMessageInfo
|
|
|
|
func (m *Slashable) GetSlashable() bool {
|
|
if m != nil {
|
|
return m.Slashable
|
|
}
|
|
return false
|
|
}
|
|
|
|
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{5}
|
|
}
|
|
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 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 github_com_prysmaticlabs_eth2_types.Epoch `protobuf:"varint,2,opt,name=latest_epoch_written,json=latestEpochWritten,proto3,casttype=github.com/prysmaticlabs/eth2-types.Epoch" 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{6}
|
|
}
|
|
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() github_com_prysmaticlabs_eth2_types.Epoch {
|
|
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 github_com_prysmaticlabs_eth2_types.Epoch `protobuf:"varint,2,opt,name=latest_epoch_written,json=latestEpochWritten,proto3,casttype=github.com/prysmaticlabs/eth2-types.Epoch" 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{7}
|
|
}
|
|
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() github_com_prysmaticlabs_eth2_types.Epoch {
|
|
if m != nil {
|
|
return m.LatestEpochWritten
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*HighestAttestationRequest)(nil), "ethereum.slashing.HighestAttestationRequest")
|
|
proto.RegisterType((*HighestAttestationResponse)(nil), "ethereum.slashing.HighestAttestationResponse")
|
|
proto.RegisterType((*HighestAttestation)(nil), "ethereum.slashing.HighestAttestation")
|
|
proto.RegisterType((*ProposerSlashingResponse)(nil), "ethereum.slashing.ProposerSlashingResponse")
|
|
proto.RegisterType((*Slashable)(nil), "ethereum.slashing.Slashable")
|
|
proto.RegisterType((*AttesterSlashingResponse)(nil), "ethereum.slashing.AttesterSlashingResponse")
|
|
proto.RegisterType((*ProposalHistory)(nil), "ethereum.slashing.ProposalHistory")
|
|
proto.RegisterType((*AttestationHistory)(nil), "ethereum.slashing.AttestationHistory")
|
|
proto.RegisterMapType((map[uint64]uint64)(nil), "ethereum.slashing.AttestationHistory.TargetToSourceEntry")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("proto/slashing/slashing.proto", fileDescriptor_da7e95107d0081b4) }
|
|
|
|
var fileDescriptor_da7e95107d0081b4 = []byte{
|
|
// 685 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcd, 0x6e, 0xd3, 0x4c,
|
|
0x14, 0x95, 0xdb, 0x7e, 0x3f, 0x9d, 0xe6, 0xfb, 0x48, 0xa7, 0x15, 0x0a, 0x51, 0x49, 0x4b, 0x10,
|
|
0xa2, 0x15, 0x8d, 0x43, 0xcb, 0x06, 0x58, 0x51, 0x4b, 0x48, 0xcd, 0x06, 0x90, 0x5b, 0xc4, 0xd2,
|
|
0x1a, 0xdb, 0xb7, 0xf6, 0xa8, 0xae, 0xc7, 0xcc, 0xdc, 0x14, 0xf2, 0x30, 0x3c, 0x03, 0x0f, 0xc1,
|
|
0x86, 0x25, 0x4f, 0x50, 0xa1, 0xbe, 0x05, 0x5d, 0x21, 0xcf, 0x38, 0x89, 0x5b, 0x3b, 0xa8, 0x80,
|
|
0xd8, 0xcd, 0x5c, 0xdf, 0x39, 0xe7, 0xde, 0x33, 0xe7, 0x8e, 0xc9, 0xed, 0x4c, 0x0a, 0x14, 0x7d,
|
|
0x95, 0x30, 0x15, 0xf3, 0x34, 0x9a, 0x2c, 0x6c, 0x1d, 0xa7, 0xcb, 0x80, 0x31, 0x48, 0x18, 0x9e,
|
|
0xd8, 0xe3, 0x0f, 0xed, 0x75, 0xc0, 0xb8, 0x7f, 0xba, 0xc3, 0x92, 0x2c, 0x66, 0x3b, 0x7d, 0x1f,
|
|
0x58, 0x20, 0x52, 0xcf, 0x4f, 0x44, 0x70, 0x6c, 0xce, 0xb4, 0x7b, 0x11, 0xc7, 0x78, 0xe8, 0xdb,
|
|
0x81, 0x38, 0xe9, 0x47, 0x22, 0x12, 0x7d, 0x1d, 0xf6, 0x87, 0x47, 0x7a, 0x67, 0xf8, 0xf2, 0x95,
|
|
0x49, 0xef, 0x3e, 0x23, 0xb7, 0xf6, 0x79, 0x14, 0x83, 0xc2, 0x3d, 0x44, 0x50, 0xc8, 0x90, 0x8b,
|
|
0xd4, 0x85, 0xb7, 0x43, 0x50, 0x48, 0xef, 0x92, 0xff, 0x4e, 0x59, 0xc2, 0x43, 0x86, 0x42, 0x7a,
|
|
0x3c, 0x54, 0x2d, 0x6b, 0x63, 0x7e, 0x73, 0xc1, 0x6d, 0x4c, 0x82, 0x83, 0x50, 0x75, 0x23, 0xd2,
|
|
0xae, 0x43, 0x50, 0x99, 0x48, 0x15, 0xd0, 0x01, 0x69, 0xb0, 0x69, 0xd8, 0x20, 0x2c, 0xed, 0xde,
|
|
0xb3, 0x2b, 0x9d, 0xd9, 0x35, 0x20, 0x97, 0x8e, 0x76, 0xbf, 0x59, 0x84, 0x56, 0x93, 0xe8, 0x1d,
|
|
0xd2, 0x28, 0x17, 0xd9, 0xb2, 0x36, 0xac, 0xcd, 0x05, 0x77, 0xa9, 0x54, 0x23, 0xf5, 0xc8, 0x6a,
|
|
0x6c, 0x0e, 0x7a, 0x4a, 0x0c, 0x65, 0x00, 0x1e, 0x64, 0x22, 0x88, 0x5b, 0x73, 0x79, 0xaa, 0xd3,
|
|
0xbb, 0x38, 0x5b, 0xdf, 0x2a, 0xa9, 0x96, 0xc9, 0x91, 0x3a, 0x61, 0xc8, 0x83, 0x84, 0xf9, 0xaa,
|
|
0x0f, 0x18, 0xef, 0xf6, 0x70, 0x94, 0x81, 0xb2, 0x9f, 0xe7, 0x87, 0x5c, 0x5a, 0x40, 0x1d, 0x68,
|
|
0x24, 0x1d, 0x2b, 0x13, 0x20, 0x93, 0x11, 0x60, 0x41, 0x30, 0xff, 0x3b, 0x04, 0x87, 0x1a, 0x49,
|
|
0xc7, 0xba, 0x19, 0x69, 0xbd, 0x92, 0x22, 0x13, 0x0a, 0xe4, 0x41, 0x21, 0xd8, 0x44, 0xe2, 0x43,
|
|
0xb2, 0x9c, 0x15, 0xdf, 0xbc, 0xb1, 0x9a, 0x85, 0xce, 0xf7, 0xa7, 0x3a, 0x03, 0xc6, 0xf6, 0xd8,
|
|
0x37, 0x76, 0x05, 0xab, 0x99, 0x5d, 0x89, 0x74, 0xb7, 0xc8, 0xa2, 0x5e, 0x33, 0x3f, 0x01, 0xba,
|
|
0x46, 0x16, 0xd5, 0x78, 0xa3, 0x05, 0xfe, 0xd7, 0x9d, 0x06, 0xf2, 0xe2, 0xcc, 0x85, 0xd4, 0x17,
|
|
0xc7, 0x8a, 0x6f, 0xd7, 0x2d, 0xae, 0x82, 0xd5, 0x64, 0x57, 0x22, 0xdd, 0x4f, 0x16, 0xb9, 0x61,
|
|
0x7a, 0x60, 0xc9, 0x3e, 0x57, 0x28, 0xe4, 0x88, 0xbe, 0x24, 0x44, 0x8b, 0xee, 0xf9, 0x1c, 0x95,
|
|
0x2e, 0xb2, 0xe1, 0x3c, 0xbc, 0x38, 0x5b, 0xdf, 0x9e, 0xa9, 0x7c, 0x24, 0x7a, 0x3e, 0xc7, 0x23,
|
|
0x0e, 0x49, 0x68, 0x3b, 0x1c, 0x13, 0xae, 0xd0, 0x5d, 0xd4, 0x18, 0x0e, 0x47, 0x95, 0x5f, 0x6a,
|
|
0xc2, 0x72, 0x62, 0x73, 0x99, 0xde, 0x3b, 0xc9, 0x11, 0x21, 0xfd, 0x45, 0xd7, 0x18, 0x28, 0xbd,
|
|
0x79, 0x63, 0x80, 0xba, 0x1f, 0xe6, 0x08, 0x2d, 0x39, 0x79, 0xdc, 0x48, 0x40, 0x9a, 0x85, 0x89,
|
|
0x50, 0x14, 0x7e, 0x2d, 0x14, 0x7b, 0x52, 0x33, 0x36, 0x55, 0x00, 0xdb, 0x18, 0xe7, 0x50, 0x14,
|
|
0x0e, 0x4d, 0x51, 0x8e, 0xdc, 0xff, 0xf1, 0x52, 0xf0, 0x8f, 0x37, 0xd7, 0xde, 0x23, 0x2b, 0x35,
|
|
0x75, 0xd0, 0x26, 0x99, 0x3f, 0x86, 0x51, 0x31, 0xa4, 0xf9, 0x92, 0xae, 0x92, 0xbf, 0x4e, 0x59,
|
|
0x32, 0x04, 0x43, 0xed, 0x9a, 0xcd, 0xd3, 0xb9, 0xc7, 0xd6, 0xee, 0xc7, 0x05, 0xf2, 0x8f, 0xbe,
|
|
0x72, 0x90, 0x34, 0x23, 0x37, 0x07, 0x6a, 0x62, 0xc8, 0xf2, 0xfc, 0x6f, 0xcd, 0xb0, 0xd1, 0x20,
|
|
0x0d, 0xe1, 0x3d, 0x84, 0xa5, 0xd4, 0xf6, 0x83, 0x99, 0xfa, 0xd5, 0x38, 0x57, 0x90, 0x66, 0x89,
|
|
0xd1, 0xc9, 0x9f, 0x58, 0x6a, 0xcf, 0xe0, 0x3a, 0xe0, 0x51, 0x0a, 0xa1, 0xa3, 0x5f, 0x63, 0x9d,
|
|
0xb9, 0x0f, 0x2c, 0x04, 0x59, 0x4b, 0x38, 0x73, 0x8e, 0x39, 0xe9, 0xd4, 0xb7, 0xf8, 0x42, 0xbc,
|
|
0xce, 0x42, 0x86, 0xf0, 0x33, 0xad, 0xae, 0xd5, 0x30, 0x4f, 0xe7, 0xd9, 0x27, 0xad, 0xab, 0xbd,
|
|
0x4d, 0x48, 0x36, 0x67, 0x90, 0x54, 0xbb, 0xfb, 0x31, 0x87, 0x24, 0x2b, 0xd5, 0xd7, 0x5a, 0xd1,
|
|
0xed, 0xeb, 0x3d, 0xfd, 0xe6, 0x0f, 0xd4, 0xee, 0x5d, 0x33, 0xdb, 0x48, 0xe8, 0x34, 0x3e, 0x9f,
|
|
0x77, 0xac, 0x2f, 0xe7, 0x1d, 0xeb, 0xeb, 0x79, 0xc7, 0xf2, 0xff, 0xd6, 0xbf, 0xb8, 0x47, 0xdf,
|
|
0x03, 0x00, 0x00, 0xff, 0xff, 0x0a, 0x8e, 0xba, 0x2f, 0x66, 0x07, 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)
|
|
IsSlashableAttestationNoUpdate(ctx context.Context, in *v1alpha1.IndexedAttestation, opts ...grpc.CallOption) (*Slashable, error)
|
|
IsSlashableBlockNoUpdate(ctx context.Context, in *v1alpha1.BeaconBlockHeader, opts ...grpc.CallOption) (*Slashable, error)
|
|
HighestAttestations(ctx context.Context, in *HighestAttestationRequest, opts ...grpc.CallOption) (*HighestAttestationResponse, 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
|
|
}
|
|
|
|
func (c *slasherClient) IsSlashableAttestationNoUpdate(ctx context.Context, in *v1alpha1.IndexedAttestation, opts ...grpc.CallOption) (*Slashable, error) {
|
|
out := new(Slashable)
|
|
err := c.cc.Invoke(ctx, "/ethereum.slashing.Slasher/IsSlashableAttestationNoUpdate", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *slasherClient) IsSlashableBlockNoUpdate(ctx context.Context, in *v1alpha1.BeaconBlockHeader, opts ...grpc.CallOption) (*Slashable, error) {
|
|
out := new(Slashable)
|
|
err := c.cc.Invoke(ctx, "/ethereum.slashing.Slasher/IsSlashableBlockNoUpdate", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *slasherClient) HighestAttestations(ctx context.Context, in *HighestAttestationRequest, opts ...grpc.CallOption) (*HighestAttestationResponse, error) {
|
|
out := new(HighestAttestationResponse)
|
|
err := c.cc.Invoke(ctx, "/ethereum.slashing.Slasher/HighestAttestations", 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)
|
|
IsSlashableAttestationNoUpdate(context.Context, *v1alpha1.IndexedAttestation) (*Slashable, error)
|
|
IsSlashableBlockNoUpdate(context.Context, *v1alpha1.BeaconBlockHeader) (*Slashable, error)
|
|
HighestAttestations(context.Context, *HighestAttestationRequest) (*HighestAttestationResponse, 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 (*UnimplementedSlasherServer) IsSlashableAttestationNoUpdate(ctx context.Context, req *v1alpha1.IndexedAttestation) (*Slashable, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method IsSlashableAttestationNoUpdate not implemented")
|
|
}
|
|
func (*UnimplementedSlasherServer) IsSlashableBlockNoUpdate(ctx context.Context, req *v1alpha1.BeaconBlockHeader) (*Slashable, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method IsSlashableBlockNoUpdate not implemented")
|
|
}
|
|
func (*UnimplementedSlasherServer) HighestAttestations(ctx context.Context, req *HighestAttestationRequest) (*HighestAttestationResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method HighestAttestations 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)
|
|
}
|
|
|
|
func _Slasher_IsSlashableAttestationNoUpdate_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).IsSlashableAttestationNoUpdate(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/ethereum.slashing.Slasher/IsSlashableAttestationNoUpdate",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SlasherServer).IsSlashableAttestationNoUpdate(ctx, req.(*v1alpha1.IndexedAttestation))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Slasher_IsSlashableBlockNoUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(v1alpha1.BeaconBlockHeader)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SlasherServer).IsSlashableBlockNoUpdate(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/ethereum.slashing.Slasher/IsSlashableBlockNoUpdate",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SlasherServer).IsSlashableBlockNoUpdate(ctx, req.(*v1alpha1.BeaconBlockHeader))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Slasher_HighestAttestations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(HighestAttestationRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SlasherServer).HighestAttestations(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/ethereum.slashing.Slasher/HighestAttestations",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SlasherServer).HighestAttestations(ctx, req.(*HighestAttestationRequest))
|
|
}
|
|
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,
|
|
},
|
|
{
|
|
MethodName: "IsSlashableAttestationNoUpdate",
|
|
Handler: _Slasher_IsSlashableAttestationNoUpdate_Handler,
|
|
},
|
|
{
|
|
MethodName: "IsSlashableBlockNoUpdate",
|
|
Handler: _Slasher_IsSlashableBlockNoUpdate_Handler,
|
|
},
|
|
{
|
|
MethodName: "HighestAttestations",
|
|
Handler: _Slasher_HighestAttestations_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "proto/slashing/slashing.proto",
|
|
}
|
|
|
|
func (m *HighestAttestationRequest) 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 *HighestAttestationRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *HighestAttestationRequest) 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.ValidatorIds) > 0 {
|
|
dAtA2 := make([]byte, len(m.ValidatorIds)*10)
|
|
var j1 int
|
|
for _, num := range m.ValidatorIds {
|
|
for num >= 1<<7 {
|
|
dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80)
|
|
num >>= 7
|
|
j1++
|
|
}
|
|
dAtA2[j1] = uint8(num)
|
|
j1++
|
|
}
|
|
i -= j1
|
|
copy(dAtA[i:], dAtA2[:j1])
|
|
i = encodeVarintSlashing(dAtA, i, uint64(j1))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *HighestAttestationResponse) 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 *HighestAttestationResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *HighestAttestationResponse) 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.Attestations) > 0 {
|
|
for iNdEx := len(m.Attestations) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Attestations[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 *HighestAttestation) 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 *HighestAttestation) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *HighestAttestation) 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.HighestTargetEpoch != 0 {
|
|
i = encodeVarintSlashing(dAtA, i, uint64(m.HighestTargetEpoch))
|
|
i--
|
|
dAtA[i] = 0x18
|
|
}
|
|
if m.HighestSourceEpoch != 0 {
|
|
i = encodeVarintSlashing(dAtA, i, uint64(m.HighestSourceEpoch))
|
|
i--
|
|
dAtA[i] = 0x10
|
|
}
|
|
if m.ValidatorId != 0 {
|
|
i = encodeVarintSlashing(dAtA, i, uint64(m.ValidatorId))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
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 *Slashable) 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 *Slashable) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Slashable) 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.Slashable {
|
|
i--
|
|
if m.Slashable {
|
|
dAtA[i] = 1
|
|
} else {
|
|
dAtA[i] = 0
|
|
}
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
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 *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 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 *HighestAttestationRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if len(m.ValidatorIds) > 0 {
|
|
l = 0
|
|
for _, e := range m.ValidatorIds {
|
|
l += sovSlashing(uint64(e))
|
|
}
|
|
n += 1 + sovSlashing(uint64(l)) + l
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *HighestAttestationResponse) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if len(m.Attestations) > 0 {
|
|
for _, e := range m.Attestations {
|
|
l = e.Size()
|
|
n += 1 + l + sovSlashing(uint64(l))
|
|
}
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *HighestAttestation) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.ValidatorId != 0 {
|
|
n += 1 + sovSlashing(uint64(m.ValidatorId))
|
|
}
|
|
if m.HighestSourceEpoch != 0 {
|
|
n += 1 + sovSlashing(uint64(m.HighestSourceEpoch))
|
|
}
|
|
if m.HighestTargetEpoch != 0 {
|
|
n += 1 + sovSlashing(uint64(m.HighestTargetEpoch))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
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 *Slashable) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Slashable {
|
|
n += 2
|
|
}
|
|
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 *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 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 *HighestAttestationRequest) 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: HighestAttestationRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: HighestAttestationRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType == 0 {
|
|
var v uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSlashing
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.ValidatorIds = append(m.ValidatorIds, v)
|
|
} else if wireType == 2 {
|
|
var packedLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSlashing
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
packedLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if packedLen < 0 {
|
|
return ErrInvalidLengthSlashing
|
|
}
|
|
postIndex := iNdEx + packedLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthSlashing
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
var elementCount int
|
|
var count int
|
|
for _, integer := range dAtA[iNdEx:postIndex] {
|
|
if integer < 128 {
|
|
count++
|
|
}
|
|
}
|
|
elementCount = count
|
|
if elementCount != 0 && len(m.ValidatorIds) == 0 {
|
|
m.ValidatorIds = make([]uint64, 0, elementCount)
|
|
}
|
|
for iNdEx < postIndex {
|
|
var v uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSlashing
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.ValidatorIds = append(m.ValidatorIds, v)
|
|
}
|
|
} else {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ValidatorIds", wireType)
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipSlashing(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (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 *HighestAttestationResponse) 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: HighestAttestationResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: HighestAttestationResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Attestations", 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.Attestations = append(m.Attestations, &HighestAttestation{})
|
|
if err := m.Attestations[len(m.Attestations)-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) || (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 *HighestAttestation) 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: HighestAttestation: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: HighestAttestation: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ValidatorId", wireType)
|
|
}
|
|
m.ValidatorId = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSlashing
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.ValidatorId |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field HighestSourceEpoch", wireType)
|
|
}
|
|
m.HighestSourceEpoch = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSlashing
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.HighestSourceEpoch |= github_com_prysmaticlabs_eth2_types.Epoch(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 3:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field HighestTargetEpoch", wireType)
|
|
}
|
|
m.HighestTargetEpoch = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSlashing
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.HighestTargetEpoch |= github_com_prysmaticlabs_eth2_types.Epoch(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipSlashing(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (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 *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) || (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 *Slashable) 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: Slashable: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Slashable: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Slashable", wireType)
|
|
}
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSlashing
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Slashable = bool(v != 0)
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipSlashing(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (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) || (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 |= github_com_prysmaticlabs_eth2_types.Epoch(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipSlashing(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (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) || (iNdEx+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 |= github_com_prysmaticlabs_eth2_types.Epoch(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipSlashing(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (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")
|
|
)
|