prysm-pulse/proto/eth/v1alpha1/beacon_block.pb.go
Nishant Das 6e90931837
Handle Missing Blocks (#3880)
* add fixes

* more changes

* simplify the solution

* add shuffle

* remove prom metric

* add to mock

* go doc

* use non default source

* add test

* terence's review

* all tests passing
2019-11-05 10:37:18 +08:00

4086 lines
100 KiB
Go
Executable File
Generated

// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: proto/eth/v1alpha1/beacon_block.proto
package eth
import (
fmt "fmt"
io "io"
math "math"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
type BeaconBlock struct {
Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"`
ParentRoot []byte `protobuf:"bytes,2,opt,name=parent_root,json=parentRoot,proto3" json:"parent_root,omitempty" ssz-size:"32"`
StateRoot []byte `protobuf:"bytes,3,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty" ssz-size:"32"`
Body *BeaconBlockBody `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"`
Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty" ssz-size:"96"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BeaconBlock) Reset() { *m = BeaconBlock{} }
func (m *BeaconBlock) String() string { return proto.CompactTextString(m) }
func (*BeaconBlock) ProtoMessage() {}
func (*BeaconBlock) Descriptor() ([]byte, []int) {
return fileDescriptor_9369dd0265944233, []int{0}
}
func (m *BeaconBlock) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *BeaconBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_BeaconBlock.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *BeaconBlock) XXX_Merge(src proto.Message) {
xxx_messageInfo_BeaconBlock.Merge(m, src)
}
func (m *BeaconBlock) XXX_Size() int {
return m.Size()
}
func (m *BeaconBlock) XXX_DiscardUnknown() {
xxx_messageInfo_BeaconBlock.DiscardUnknown(m)
}
var xxx_messageInfo_BeaconBlock proto.InternalMessageInfo
func (m *BeaconBlock) GetSlot() uint64 {
if m != nil {
return m.Slot
}
return 0
}
func (m *BeaconBlock) GetParentRoot() []byte {
if m != nil {
return m.ParentRoot
}
return nil
}
func (m *BeaconBlock) GetStateRoot() []byte {
if m != nil {
return m.StateRoot
}
return nil
}
func (m *BeaconBlock) GetBody() *BeaconBlockBody {
if m != nil {
return m.Body
}
return nil
}
func (m *BeaconBlock) GetSignature() []byte {
if m != nil {
return m.Signature
}
return nil
}
type BeaconBlockBody struct {
RandaoReveal []byte `protobuf:"bytes,1,opt,name=randao_reveal,json=randaoReveal,proto3" json:"randao_reveal,omitempty" ssz-size:"96"`
Eth1Data *Eth1Data `protobuf:"bytes,2,opt,name=eth1_data,json=eth1Data,proto3" json:"eth1_data,omitempty"`
Graffiti []byte `protobuf:"bytes,3,opt,name=graffiti,proto3" json:"graffiti,omitempty" ssz-size:"32"`
ProposerSlashings []*ProposerSlashing `protobuf:"bytes,4,rep,name=proposer_slashings,json=proposerSlashings,proto3" json:"proposer_slashings,omitempty" ssz-max:"16"`
AttesterSlashings []*AttesterSlashing `protobuf:"bytes,5,rep,name=attester_slashings,json=attesterSlashings,proto3" json:"attester_slashings,omitempty" ssz-max:"1"`
Attestations []*Attestation `protobuf:"bytes,6,rep,name=attestations,proto3" json:"attestations,omitempty" ssz-max:"128"`
Deposits []*Deposit `protobuf:"bytes,7,rep,name=deposits,proto3" json:"deposits,omitempty" ssz-max:"16"`
VoluntaryExits []*VoluntaryExit `protobuf:"bytes,8,rep,name=voluntary_exits,json=voluntaryExits,proto3" json:"voluntary_exits,omitempty" ssz-max:"16"`
Transfers []*Transfer `protobuf:"bytes,9,rep,name=transfers,proto3" json:"transfers,omitempty" ssz-max:"0"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BeaconBlockBody) Reset() { *m = BeaconBlockBody{} }
func (m *BeaconBlockBody) String() string { return proto.CompactTextString(m) }
func (*BeaconBlockBody) ProtoMessage() {}
func (*BeaconBlockBody) Descriptor() ([]byte, []int) {
return fileDescriptor_9369dd0265944233, []int{1}
}
func (m *BeaconBlockBody) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *BeaconBlockBody) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_BeaconBlockBody.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *BeaconBlockBody) XXX_Merge(src proto.Message) {
xxx_messageInfo_BeaconBlockBody.Merge(m, src)
}
func (m *BeaconBlockBody) XXX_Size() int {
return m.Size()
}
func (m *BeaconBlockBody) XXX_DiscardUnknown() {
xxx_messageInfo_BeaconBlockBody.DiscardUnknown(m)
}
var xxx_messageInfo_BeaconBlockBody proto.InternalMessageInfo
func (m *BeaconBlockBody) GetRandaoReveal() []byte {
if m != nil {
return m.RandaoReveal
}
return nil
}
func (m *BeaconBlockBody) GetEth1Data() *Eth1Data {
if m != nil {
return m.Eth1Data
}
return nil
}
func (m *BeaconBlockBody) GetGraffiti() []byte {
if m != nil {
return m.Graffiti
}
return nil
}
func (m *BeaconBlockBody) GetProposerSlashings() []*ProposerSlashing {
if m != nil {
return m.ProposerSlashings
}
return nil
}
func (m *BeaconBlockBody) GetAttesterSlashings() []*AttesterSlashing {
if m != nil {
return m.AttesterSlashings
}
return nil
}
func (m *BeaconBlockBody) GetAttestations() []*Attestation {
if m != nil {
return m.Attestations
}
return nil
}
func (m *BeaconBlockBody) GetDeposits() []*Deposit {
if m != nil {
return m.Deposits
}
return nil
}
func (m *BeaconBlockBody) GetVoluntaryExits() []*VoluntaryExit {
if m != nil {
return m.VoluntaryExits
}
return nil
}
func (m *BeaconBlockBody) GetTransfers() []*Transfer {
if m != nil {
return m.Transfers
}
return nil
}
type ProposerSlashing struct {
ProposerIndex uint64 `protobuf:"varint,1,opt,name=proposer_index,json=proposerIndex,proto3" json:"proposer_index,omitempty"`
Header_1 *BeaconBlockHeader `protobuf:"bytes,2,opt,name=header_1,json=header1,proto3" json:"header_1,omitempty"`
Header_2 *BeaconBlockHeader `protobuf:"bytes,3,opt,name=header_2,json=header2,proto3" json:"header_2,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ProposerSlashing) Reset() { *m = ProposerSlashing{} }
func (m *ProposerSlashing) String() string { return proto.CompactTextString(m) }
func (*ProposerSlashing) ProtoMessage() {}
func (*ProposerSlashing) Descriptor() ([]byte, []int) {
return fileDescriptor_9369dd0265944233, []int{2}
}
func (m *ProposerSlashing) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ProposerSlashing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ProposerSlashing.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *ProposerSlashing) XXX_Merge(src proto.Message) {
xxx_messageInfo_ProposerSlashing.Merge(m, src)
}
func (m *ProposerSlashing) XXX_Size() int {
return m.Size()
}
func (m *ProposerSlashing) XXX_DiscardUnknown() {
xxx_messageInfo_ProposerSlashing.DiscardUnknown(m)
}
var xxx_messageInfo_ProposerSlashing proto.InternalMessageInfo
func (m *ProposerSlashing) GetProposerIndex() uint64 {
if m != nil {
return m.ProposerIndex
}
return 0
}
func (m *ProposerSlashing) GetHeader_1() *BeaconBlockHeader {
if m != nil {
return m.Header_1
}
return nil
}
func (m *ProposerSlashing) GetHeader_2() *BeaconBlockHeader {
if m != nil {
return m.Header_2
}
return nil
}
type AttesterSlashing struct {
Attestation_1 *IndexedAttestation `protobuf:"bytes,1,opt,name=attestation_1,json=attestation1,proto3" json:"attestation_1,omitempty"`
Attestation_2 *IndexedAttestation `protobuf:"bytes,2,opt,name=attestation_2,json=attestation2,proto3" json:"attestation_2,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AttesterSlashing) Reset() { *m = AttesterSlashing{} }
func (m *AttesterSlashing) String() string { return proto.CompactTextString(m) }
func (*AttesterSlashing) ProtoMessage() {}
func (*AttesterSlashing) Descriptor() ([]byte, []int) {
return fileDescriptor_9369dd0265944233, []int{3}
}
func (m *AttesterSlashing) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *AttesterSlashing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_AttesterSlashing.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *AttesterSlashing) XXX_Merge(src proto.Message) {
xxx_messageInfo_AttesterSlashing.Merge(m, src)
}
func (m *AttesterSlashing) XXX_Size() int {
return m.Size()
}
func (m *AttesterSlashing) XXX_DiscardUnknown() {
xxx_messageInfo_AttesterSlashing.DiscardUnknown(m)
}
var xxx_messageInfo_AttesterSlashing proto.InternalMessageInfo
func (m *AttesterSlashing) GetAttestation_1() *IndexedAttestation {
if m != nil {
return m.Attestation_1
}
return nil
}
func (m *AttesterSlashing) GetAttestation_2() *IndexedAttestation {
if m != nil {
return m.Attestation_2
}
return nil
}
type Deposit struct {
Proof [][]byte `protobuf:"bytes,1,rep,name=proof,proto3" json:"proof,omitempty" ssz-size:"33,32"`
Data *Deposit_Data `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Deposit) Reset() { *m = Deposit{} }
func (m *Deposit) String() string { return proto.CompactTextString(m) }
func (*Deposit) ProtoMessage() {}
func (*Deposit) Descriptor() ([]byte, []int) {
return fileDescriptor_9369dd0265944233, []int{4}
}
func (m *Deposit) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Deposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Deposit.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *Deposit) XXX_Merge(src proto.Message) {
xxx_messageInfo_Deposit.Merge(m, src)
}
func (m *Deposit) XXX_Size() int {
return m.Size()
}
func (m *Deposit) XXX_DiscardUnknown() {
xxx_messageInfo_Deposit.DiscardUnknown(m)
}
var xxx_messageInfo_Deposit proto.InternalMessageInfo
func (m *Deposit) GetProof() [][]byte {
if m != nil {
return m.Proof
}
return nil
}
func (m *Deposit) GetData() *Deposit_Data {
if m != nil {
return m.Data
}
return nil
}
type Deposit_Data struct {
PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty" ssz-size:"48" spec-name:"pubkey"`
WithdrawalCredentials []byte `protobuf:"bytes,2,opt,name=withdrawal_credentials,json=withdrawalCredentials,proto3" json:"withdrawal_credentials,omitempty" ssz-size:"32"`
Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"`
Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty" ssz-size:"96"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Deposit_Data) Reset() { *m = Deposit_Data{} }
func (m *Deposit_Data) String() string { return proto.CompactTextString(m) }
func (*Deposit_Data) ProtoMessage() {}
func (*Deposit_Data) Descriptor() ([]byte, []int) {
return fileDescriptor_9369dd0265944233, []int{4, 0}
}
func (m *Deposit_Data) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Deposit_Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Deposit_Data.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *Deposit_Data) XXX_Merge(src proto.Message) {
xxx_messageInfo_Deposit_Data.Merge(m, src)
}
func (m *Deposit_Data) XXX_Size() int {
return m.Size()
}
func (m *Deposit_Data) XXX_DiscardUnknown() {
xxx_messageInfo_Deposit_Data.DiscardUnknown(m)
}
var xxx_messageInfo_Deposit_Data proto.InternalMessageInfo
func (m *Deposit_Data) GetPublicKey() []byte {
if m != nil {
return m.PublicKey
}
return nil
}
func (m *Deposit_Data) GetWithdrawalCredentials() []byte {
if m != nil {
return m.WithdrawalCredentials
}
return nil
}
func (m *Deposit_Data) GetAmount() uint64 {
if m != nil {
return m.Amount
}
return 0
}
func (m *Deposit_Data) GetSignature() []byte {
if m != nil {
return m.Signature
}
return nil
}
type VoluntaryExit struct {
Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"`
ValidatorIndex uint64 `protobuf:"varint,2,opt,name=validator_index,json=validatorIndex,proto3" json:"validator_index,omitempty"`
Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty" ssz-size:"96"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *VoluntaryExit) Reset() { *m = VoluntaryExit{} }
func (m *VoluntaryExit) String() string { return proto.CompactTextString(m) }
func (*VoluntaryExit) ProtoMessage() {}
func (*VoluntaryExit) Descriptor() ([]byte, []int) {
return fileDescriptor_9369dd0265944233, []int{5}
}
func (m *VoluntaryExit) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *VoluntaryExit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_VoluntaryExit.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *VoluntaryExit) XXX_Merge(src proto.Message) {
xxx_messageInfo_VoluntaryExit.Merge(m, src)
}
func (m *VoluntaryExit) XXX_Size() int {
return m.Size()
}
func (m *VoluntaryExit) XXX_DiscardUnknown() {
xxx_messageInfo_VoluntaryExit.DiscardUnknown(m)
}
var xxx_messageInfo_VoluntaryExit proto.InternalMessageInfo
func (m *VoluntaryExit) GetEpoch() uint64 {
if m != nil {
return m.Epoch
}
return 0
}
func (m *VoluntaryExit) GetValidatorIndex() uint64 {
if m != nil {
return m.ValidatorIndex
}
return 0
}
func (m *VoluntaryExit) GetSignature() []byte {
if m != nil {
return m.Signature
}
return nil
}
type Transfer struct {
SenderIndex uint64 `protobuf:"varint,1,opt,name=sender_index,json=senderIndex,proto3" json:"sender_index,omitempty" spec-name:"sender"`
RecipientIndex uint64 `protobuf:"varint,2,opt,name=recipient_index,json=recipientIndex,proto3" json:"recipient_index,omitempty" spec-name:"recipient"`
Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"`
Fee uint64 `protobuf:"varint,4,opt,name=fee,proto3" json:"fee,omitempty"`
Slot uint64 `protobuf:"varint,5,opt,name=slot,proto3" json:"slot,omitempty"`
SenderWithdrawalPublicKey []byte `protobuf:"bytes,6,opt,name=sender_withdrawal_public_key,json=senderWithdrawalPublicKey,proto3" json:"sender_withdrawal_public_key,omitempty" ssz-size:"48" spec-name:"pubkey"`
Signature []byte `protobuf:"bytes,7,opt,name=signature,proto3" json:"signature,omitempty" ssz-size:"96"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Transfer) Reset() { *m = Transfer{} }
func (m *Transfer) String() string { return proto.CompactTextString(m) }
func (*Transfer) ProtoMessage() {}
func (*Transfer) Descriptor() ([]byte, []int) {
return fileDescriptor_9369dd0265944233, []int{6}
}
func (m *Transfer) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Transfer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Transfer.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *Transfer) XXX_Merge(src proto.Message) {
xxx_messageInfo_Transfer.Merge(m, src)
}
func (m *Transfer) XXX_Size() int {
return m.Size()
}
func (m *Transfer) XXX_DiscardUnknown() {
xxx_messageInfo_Transfer.DiscardUnknown(m)
}
var xxx_messageInfo_Transfer proto.InternalMessageInfo
func (m *Transfer) GetSenderIndex() uint64 {
if m != nil {
return m.SenderIndex
}
return 0
}
func (m *Transfer) GetRecipientIndex() uint64 {
if m != nil {
return m.RecipientIndex
}
return 0
}
func (m *Transfer) GetAmount() uint64 {
if m != nil {
return m.Amount
}
return 0
}
func (m *Transfer) GetFee() uint64 {
if m != nil {
return m.Fee
}
return 0
}
func (m *Transfer) GetSlot() uint64 {
if m != nil {
return m.Slot
}
return 0
}
func (m *Transfer) GetSenderWithdrawalPublicKey() []byte {
if m != nil {
return m.SenderWithdrawalPublicKey
}
return nil
}
func (m *Transfer) GetSignature() []byte {
if m != nil {
return m.Signature
}
return nil
}
type Eth1Data struct {
DepositRoot []byte `protobuf:"bytes,1,opt,name=deposit_root,json=depositRoot,proto3" json:"deposit_root,omitempty" ssz-size:"32"`
DepositCount uint64 `protobuf:"varint,2,opt,name=deposit_count,json=depositCount,proto3" json:"deposit_count,omitempty"`
BlockHash []byte `protobuf:"bytes,3,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty" ssz-size:"32"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Eth1Data) Reset() { *m = Eth1Data{} }
func (m *Eth1Data) String() string { return proto.CompactTextString(m) }
func (*Eth1Data) ProtoMessage() {}
func (*Eth1Data) Descriptor() ([]byte, []int) {
return fileDescriptor_9369dd0265944233, []int{7}
}
func (m *Eth1Data) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Eth1Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Eth1Data.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *Eth1Data) XXX_Merge(src proto.Message) {
xxx_messageInfo_Eth1Data.Merge(m, src)
}
func (m *Eth1Data) XXX_Size() int {
return m.Size()
}
func (m *Eth1Data) XXX_DiscardUnknown() {
xxx_messageInfo_Eth1Data.DiscardUnknown(m)
}
var xxx_messageInfo_Eth1Data proto.InternalMessageInfo
func (m *Eth1Data) GetDepositRoot() []byte {
if m != nil {
return m.DepositRoot
}
return nil
}
func (m *Eth1Data) GetDepositCount() uint64 {
if m != nil {
return m.DepositCount
}
return 0
}
func (m *Eth1Data) GetBlockHash() []byte {
if m != nil {
return m.BlockHash
}
return nil
}
type BeaconBlockHeader struct {
Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"`
ParentRoot []byte `protobuf:"bytes,2,opt,name=parent_root,json=parentRoot,proto3" json:"parent_root,omitempty" ssz-size:"32"`
StateRoot []byte `protobuf:"bytes,3,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty" ssz-size:"32"`
BodyRoot []byte `protobuf:"bytes,4,opt,name=body_root,json=bodyRoot,proto3" json:"body_root,omitempty" ssz-size:"32"`
Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty" ssz-size:"96"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BeaconBlockHeader) Reset() { *m = BeaconBlockHeader{} }
func (m *BeaconBlockHeader) String() string { return proto.CompactTextString(m) }
func (*BeaconBlockHeader) ProtoMessage() {}
func (*BeaconBlockHeader) Descriptor() ([]byte, []int) {
return fileDescriptor_9369dd0265944233, []int{8}
}
func (m *BeaconBlockHeader) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *BeaconBlockHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_BeaconBlockHeader.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *BeaconBlockHeader) XXX_Merge(src proto.Message) {
xxx_messageInfo_BeaconBlockHeader.Merge(m, src)
}
func (m *BeaconBlockHeader) XXX_Size() int {
return m.Size()
}
func (m *BeaconBlockHeader) XXX_DiscardUnknown() {
xxx_messageInfo_BeaconBlockHeader.DiscardUnknown(m)
}
var xxx_messageInfo_BeaconBlockHeader proto.InternalMessageInfo
func (m *BeaconBlockHeader) GetSlot() uint64 {
if m != nil {
return m.Slot
}
return 0
}
func (m *BeaconBlockHeader) GetParentRoot() []byte {
if m != nil {
return m.ParentRoot
}
return nil
}
func (m *BeaconBlockHeader) GetStateRoot() []byte {
if m != nil {
return m.StateRoot
}
return nil
}
func (m *BeaconBlockHeader) GetBodyRoot() []byte {
if m != nil {
return m.BodyRoot
}
return nil
}
func (m *BeaconBlockHeader) GetSignature() []byte {
if m != nil {
return m.Signature
}
return nil
}
type IndexedAttestation struct {
CustodyBit_0Indices []uint64 `protobuf:"varint,1,rep,packed,name=custody_bit_0_indices,json=custodyBit0Indices,proto3" json:"custody_bit_0_indices,omitempty" ssz-max:"4096"`
CustodyBit_1Indices []uint64 `protobuf:"varint,2,rep,packed,name=custody_bit_1_indices,json=custodyBit1Indices,proto3" json:"custody_bit_1_indices,omitempty" ssz-max:"4096"`
Data *AttestationData `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty" ssz-size:"96"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *IndexedAttestation) Reset() { *m = IndexedAttestation{} }
func (m *IndexedAttestation) String() string { return proto.CompactTextString(m) }
func (*IndexedAttestation) ProtoMessage() {}
func (*IndexedAttestation) Descriptor() ([]byte, []int) {
return fileDescriptor_9369dd0265944233, []int{9}
}
func (m *IndexedAttestation) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *IndexedAttestation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_IndexedAttestation.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *IndexedAttestation) XXX_Merge(src proto.Message) {
xxx_messageInfo_IndexedAttestation.Merge(m, src)
}
func (m *IndexedAttestation) XXX_Size() int {
return m.Size()
}
func (m *IndexedAttestation) XXX_DiscardUnknown() {
xxx_messageInfo_IndexedAttestation.DiscardUnknown(m)
}
var xxx_messageInfo_IndexedAttestation proto.InternalMessageInfo
func (m *IndexedAttestation) GetCustodyBit_0Indices() []uint64 {
if m != nil {
return m.CustodyBit_0Indices
}
return nil
}
func (m *IndexedAttestation) GetCustodyBit_1Indices() []uint64 {
if m != nil {
return m.CustodyBit_1Indices
}
return nil
}
func (m *IndexedAttestation) GetData() *AttestationData {
if m != nil {
return m.Data
}
return nil
}
func (m *IndexedAttestation) GetSignature() []byte {
if m != nil {
return m.Signature
}
return nil
}
func init() {
proto.RegisterType((*BeaconBlock)(nil), "ethereum.eth.v1alpha1.BeaconBlock")
proto.RegisterType((*BeaconBlockBody)(nil), "ethereum.eth.v1alpha1.BeaconBlockBody")
proto.RegisterType((*ProposerSlashing)(nil), "ethereum.eth.v1alpha1.ProposerSlashing")
proto.RegisterType((*AttesterSlashing)(nil), "ethereum.eth.v1alpha1.AttesterSlashing")
proto.RegisterType((*Deposit)(nil), "ethereum.eth.v1alpha1.Deposit")
proto.RegisterType((*Deposit_Data)(nil), "ethereum.eth.v1alpha1.Deposit.Data")
proto.RegisterType((*VoluntaryExit)(nil), "ethereum.eth.v1alpha1.VoluntaryExit")
proto.RegisterType((*Transfer)(nil), "ethereum.eth.v1alpha1.Transfer")
proto.RegisterType((*Eth1Data)(nil), "ethereum.eth.v1alpha1.Eth1Data")
proto.RegisterType((*BeaconBlockHeader)(nil), "ethereum.eth.v1alpha1.BeaconBlockHeader")
proto.RegisterType((*IndexedAttestation)(nil), "ethereum.eth.v1alpha1.IndexedAttestation")
}
func init() {
proto.RegisterFile("proto/eth/v1alpha1/beacon_block.proto", fileDescriptor_9369dd0265944233)
}
var fileDescriptor_9369dd0265944233 = []byte{
// 1117 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xdd, 0x6e, 0xe3, 0x44,
0x14, 0x96, 0x13, 0xa7, 0x4d, 0x4e, 0x92, 0xfe, 0x8c, 0xb6, 0xab, 0x6c, 0x85, 0x9a, 0xc8, 0xdb,
0x65, 0x03, 0xa2, 0xf9, 0x6b, 0x29, 0xbb, 0x85, 0x1b, 0xdc, 0xad, 0xd4, 0x15, 0x68, 0xb5, 0x32,
0x08, 0x04, 0x37, 0xd6, 0xc4, 0x9e, 0xc4, 0x56, 0x13, 0x8f, 0xe5, 0x99, 0x74, 0x9b, 0xbd, 0xe1,
0x11, 0xb8, 0xe4, 0x3d, 0x78, 0x05, 0x6e, 0xb8, 0x83, 0x27, 0x08, 0xa8, 0xdc, 0x73, 0x11, 0xf1,
0x00, 0xc8, 0x33, 0x8e, 0xe3, 0xa4, 0x71, 0x69, 0xf7, 0x86, 0xbb, 0xb1, 0xfd, 0x9d, 0xef, 0x3b,
0x3e, 0xf3, 0xcd, 0x99, 0x03, 0x4f, 0xfc, 0x80, 0x72, 0xda, 0x24, 0xdc, 0x69, 0x5e, 0xb6, 0xf1,
0xc0, 0x77, 0x70, 0xbb, 0xd9, 0x25, 0xd8, 0xa2, 0x9e, 0xd9, 0x1d, 0x50, 0xeb, 0xa2, 0x21, 0xbe,
0xa3, 0x1d, 0xc2, 0x1d, 0x12, 0x90, 0xd1, 0xb0, 0x41, 0xb8, 0xd3, 0x98, 0x21, 0x77, 0x0f, 0xfa,
0x2e, 0x77, 0x46, 0xdd, 0x86, 0x45, 0x87, 0xcd, 0x3e, 0xed, 0xd3, 0xa6, 0x40, 0x77, 0x47, 0x3d,
0xf1, 0x24, 0xa9, 0xc3, 0x95, 0x64, 0xd9, 0xdd, 0x5f, 0x21, 0x86, 0x39, 0x27, 0x8c, 0x63, 0xee,
0x52, 0x4f, 0xa2, 0xb4, 0x7f, 0x14, 0x28, 0xea, 0x22, 0x05, 0x3d, 0xcc, 0x00, 0x21, 0x50, 0xd9,
0x80, 0xf2, 0x8a, 0x52, 0x53, 0xea, 0xaa, 0x21, 0xd6, 0xa8, 0x03, 0x45, 0x1f, 0x07, 0xc4, 0xe3,
0x66, 0x40, 0x29, 0xaf, 0x64, 0x6a, 0x4a, 0xbd, 0xa4, 0x6f, 0x4f, 0x27, 0xd5, 0x32, 0x63, 0x6f,
0x0f, 0x98, 0xfb, 0x96, 0x9c, 0x68, 0x87, 0x1d, 0xcd, 0x00, 0x89, 0x32, 0x28, 0xe5, 0xa8, 0x05,
0x10, 0x0a, 0x11, 0x19, 0x92, 0x4d, 0x0b, 0x29, 0x08, 0x90, 0x88, 0x38, 0x01, 0xb5, 0x4b, 0xed,
0x71, 0x45, 0xad, 0x29, 0xf5, 0x62, 0xe7, 0xfd, 0xc6, 0xca, 0x22, 0x34, 0x12, 0xb9, 0xea, 0xd4,
0x1e, 0x1b, 0x22, 0x06, 0x35, 0xa1, 0xc0, 0xdc, 0xbe, 0x87, 0xf9, 0x28, 0x20, 0x95, 0xdc, 0x2a,
0xb1, 0xe7, 0xc7, 0xa1, 0xd8, 0x0c, 0xa3, 0xfd, 0x95, 0x83, 0xcd, 0x25, 0x2a, 0x74, 0x0c, 0xe5,
0x00, 0x7b, 0x36, 0xa6, 0x66, 0x40, 0x2e, 0x09, 0x1e, 0x88, 0x1a, 0xac, 0x24, 0x2a, 0x49, 0x9c,
0x21, 0x60, 0xe8, 0x33, 0x28, 0x10, 0xee, 0xb4, 0x4d, 0x1b, 0x73, 0x2c, 0x8a, 0x53, 0xec, 0x54,
0x53, 0xb2, 0x3f, 0xe3, 0x4e, 0xfb, 0x05, 0xe6, 0xd8, 0xc8, 0x93, 0x68, 0x85, 0x0e, 0x20, 0xdf,
0x0f, 0x70, 0xaf, 0xe7, 0x72, 0x37, 0xbd, 0x4c, 0x31, 0x04, 0x39, 0x80, 0xfc, 0x80, 0xfa, 0x94,
0x91, 0xc0, 0x64, 0x03, 0xcc, 0x1c, 0xd7, 0xeb, 0xb3, 0x8a, 0x5a, 0xcb, 0xd6, 0x8b, 0x9d, 0xa7,
0x29, 0xaa, 0xaf, 0xa3, 0x80, 0xaf, 0x22, 0xbc, 0xbe, 0x35, 0x9d, 0x54, 0x4b, 0xa1, 0xc2, 0x10,
0x5f, 0x9d, 0x68, 0xed, 0x63, 0xcd, 0xd8, 0xf6, 0x97, 0x30, 0x0c, 0xf5, 0x01, 0x49, 0xbb, 0x2c,
0x28, 0xe5, 0x6e, 0x55, 0xfa, 0x3c, 0x0a, 0x88, 0x95, 0x36, 0xa7, 0x93, 0x6a, 0x71, 0xae, 0xa4,
0x19, 0xdb, 0x78, 0x09, 0xc2, 0xd0, 0x77, 0x50, 0x4a, 0xf8, 0x92, 0x55, 0xd6, 0x84, 0x84, 0x76,
0xab, 0x84, 0x80, 0xce, 0x2b, 0x25, 0xd9, 0x3b, 0xcf, 0x34, 0x63, 0x81, 0x0a, 0x7d, 0x09, 0x79,
0x9b, 0xf8, 0x94, 0xb9, 0x9c, 0x55, 0xd6, 0x05, 0xed, 0x5e, 0x0a, 0xed, 0x0b, 0x09, 0x5b, 0x51,
0x9a, 0x98, 0x01, 0x99, 0xb0, 0x79, 0x49, 0x07, 0x23, 0x8f, 0xe3, 0x60, 0x6c, 0x92, 0xab, 0x90,
0x34, 0x2f, 0x48, 0xf7, 0x53, 0x48, 0xbf, 0x99, 0xa1, 0xcf, 0xae, 0x56, 0x52, 0x6f, 0x5c, 0x26,
0x01, 0x0c, 0xbd, 0x82, 0x02, 0x0f, 0xb0, 0xc7, 0x7a, 0x24, 0x60, 0x95, 0x82, 0xa0, 0x4e, 0x73,
0xd2, 0xd7, 0x11, 0x6e, 0xa9, 0xc2, 0x2d, 0xcd, 0x98, 0x53, 0x68, 0xbf, 0x28, 0xb0, 0xb5, 0xbc,
0xf9, 0xe8, 0x09, 0x6c, 0xc4, 0x0e, 0x72, 0x3d, 0x9b, 0x5c, 0x45, 0x67, 0xbd, 0x3c, 0x7b, 0xfb,
0x32, 0x7c, 0x89, 0x4e, 0x21, 0xef, 0x10, 0x6c, 0x93, 0xc0, 0x6c, 0x47, 0xa6, 0xae, 0xff, 0xf7,
0x91, 0x3c, 0x17, 0x11, 0xc6, 0xba, 0x8c, 0x6c, 0x27, 0x48, 0x3a, 0xc2, 0xdc, 0xef, 0x40, 0xd2,
0xd1, 0x7e, 0x56, 0x60, 0x6b, 0xd9, 0x58, 0xe8, 0x15, 0x94, 0x13, 0x3b, 0x6d, 0xb6, 0xc5, 0x4f,
0x14, 0x3b, 0x1f, 0xa4, 0xd0, 0x8b, 0x7f, 0x22, 0x76, 0xc2, 0x3c, 0x0b, 0x4e, 0x69, 0x2f, 0xf3,
0x75, 0xa2, 0x7f, 0x7e, 0x47, 0xbe, 0x8e, 0xf6, 0x5b, 0x06, 0xd6, 0x23, 0x4f, 0xa1, 0x0f, 0x21,
0xe7, 0x07, 0x94, 0xf6, 0x2a, 0x4a, 0x2d, 0x5b, 0x2f, 0xe9, 0x0f, 0xa6, 0x93, 0xea, 0x56, 0xe2,
0x7c, 0x1f, 0x7e, 0x14, 0x1e, 0x71, 0x09, 0x41, 0x9f, 0x80, 0x9a, 0xe8, 0x23, 0x8f, 0x6f, 0x77,
0x6b, 0x43, 0xf4, 0x12, 0x11, 0xb0, 0x3b, 0x51, 0x40, 0x15, 0x0d, 0xe5, 0x14, 0xc0, 0x1f, 0x75,
0x07, 0xae, 0x65, 0x5e, 0x90, 0x71, 0xd4, 0xc3, 0xf6, 0xa7, 0x93, 0x6a, 0x6d, 0x2e, 0x79, 0xf4,
0x4c, 0xab, 0x31, 0x9f, 0x58, 0x07, 0x1e, 0x1e, 0x92, 0x13, 0xcd, 0x1f, 0x75, 0x2f, 0xc8, 0x58,
0x33, 0x0a, 0x32, 0xee, 0x0b, 0x32, 0x46, 0xe7, 0xf0, 0xf0, 0x8d, 0xcb, 0x1d, 0x3b, 0xc0, 0x6f,
0xf0, 0xc0, 0xb4, 0x02, 0x62, 0x13, 0x8f, 0xbb, 0x78, 0xc0, 0xd2, 0xbb, 0xff, 0xce, 0x3c, 0xe0,
0x74, 0x8e, 0x47, 0x0f, 0x61, 0x0d, 0x0f, 0xe9, 0xc8, 0x93, 0x97, 0x80, 0x6a, 0x44, 0x4f, 0x8b,
0x2d, 0x5b, 0xbd, 0x43, 0xcb, 0xfe, 0x01, 0xca, 0x0b, 0xe7, 0x09, 0x3d, 0x80, 0x1c, 0xf1, 0xa9,
0xe5, 0x44, 0xfe, 0x95, 0x0f, 0xe8, 0x29, 0x6c, 0x5e, 0xe2, 0x81, 0x6b, 0x63, 0x4e, 0x67, 0xfe,
0xce, 0x88, 0xef, 0x1b, 0xf1, 0x6b, 0x69, 0xf0, 0x85, 0x04, 0xb2, 0x77, 0x48, 0xe0, 0x8f, 0x0c,
0xe4, 0x67, 0xc7, 0x0e, 0x3d, 0x87, 0x12, 0x23, 0x9e, 0xbd, 0x78, 0x86, 0xf4, 0x87, 0xd3, 0x49,
0x15, 0x25, 0x2a, 0x2b, 0x21, 0x9a, 0x51, 0x94, 0x0b, 0x29, 0xac, 0xc3, 0x66, 0x40, 0x2c, 0xd7,
0x77, 0xc3, 0x1b, 0x35, 0x91, 0xa1, 0xfe, 0x68, 0x3a, 0xa9, 0xee, 0x24, 0xa2, 0x63, 0x94, 0x66,
0x6c, 0xc4, 0x6b, 0xc9, 0x91, 0x56, 0xd5, 0x2d, 0xc8, 0xf6, 0x88, 0xac, 0xa7, 0x6a, 0x84, 0xcb,
0xf8, 0x42, 0xcf, 0x25, 0x2e, 0x74, 0x02, 0xef, 0x45, 0xc9, 0x27, 0x36, 0x39, 0x61, 0x9a, 0xb5,
0x7b, 0x98, 0xe6, 0x91, 0x64, 0xfa, 0x36, 0x26, 0x7a, 0x1d, 0x9b, 0x68, 0xa1, 0xc2, 0xeb, 0x77,
0xa8, 0xf0, 0x4f, 0x0a, 0xe4, 0x67, 0x57, 0x24, 0x3a, 0x82, 0x52, 0xd4, 0x79, 0xe5, 0x0c, 0xa1,
0xa4, 0x19, 0xaf, 0x18, 0xc1, 0xc4, 0x14, 0xf1, 0x18, 0xca, 0xb3, 0x28, 0x4b, 0xd4, 0x47, 0x6e,
0xfe, 0x8c, 0xea, 0x54, 0x54, 0xa9, 0x05, 0x20, 0xe6, 0x2d, 0xd3, 0xc1, 0xcc, 0xb9, 0x65, 0x38,
0x11, 0xa0, 0x73, 0xcc, 0x1c, 0xed, 0x6f, 0x05, 0xb6, 0x6f, 0xb4, 0xa8, 0xff, 0x71, 0x58, 0x6a,
0x40, 0x21, 0x1c, 0x7c, 0x64, 0x80, 0x9a, 0x3a, 0x36, 0x84, 0x18, 0x81, 0xbf, 0xf7, 0x80, 0xf4,
0x63, 0x06, 0xd0, 0xcd, 0x26, 0x87, 0xce, 0x60, 0xc7, 0x1a, 0x31, 0x1e, 0x4a, 0x77, 0x5d, 0x6e,
0xb6, 0x42, 0xff, 0xba, 0x16, 0x61, 0xa2, 0xb5, 0xa9, 0x3a, 0x9a, 0x4e, 0xaa, 0x1b, 0xf1, 0x65,
0x74, 0xd4, 0x0a, 0x49, 0x51, 0x14, 0xa0, 0xbb, 0xbc, 0xf5, 0x52, 0xa2, 0x97, 0x69, 0xda, 0x31,
0x4d, 0xe6, 0x2e, 0x34, 0xed, 0x19, 0xcd, 0x49, 0xd4, 0x2c, 0xb3, 0xb7, 0x8e, 0x8c, 0x89, 0xfc,
0xe7, 0xfd, 0xf2, 0xde, 0xfd, 0x47, 0x3f, 0xfd, 0xf5, 0x7a, 0x4f, 0xf9, 0xfd, 0x7a, 0x4f, 0xf9,
0xf3, 0x7a, 0x4f, 0xf9, 0xfe, 0xe3, 0xc4, 0x30, 0xee, 0x07, 0x63, 0x36, 0xc4, 0xdc, 0xb5, 0x06,
0xb8, 0xcb, 0xe4, 0x53, 0xf3, 0xe6, 0xf0, 0xfd, 0x29, 0xe1, 0x4e, 0x77, 0x4d, 0xbc, 0x3f, 0xfc,
0x37, 0x00, 0x00, 0xff, 0xff, 0xb3, 0xeb, 0x58, 0xf2, 0x0a, 0x0c, 0x00, 0x00,
}
func (m *BeaconBlock) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *BeaconBlock) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Slot != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(m.Slot))
}
if len(m.ParentRoot) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.ParentRoot)))
i += copy(dAtA[i:], m.ParentRoot)
}
if len(m.StateRoot) > 0 {
dAtA[i] = 0x1a
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.StateRoot)))
i += copy(dAtA[i:], m.StateRoot)
}
if m.Body != nil {
dAtA[i] = 0x22
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(m.Body.Size()))
n1, err := m.Body.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n1
}
if len(m.Signature) > 0 {
dAtA[i] = 0x2a
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.Signature)))
i += copy(dAtA[i:], m.Signature)
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *BeaconBlockBody) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *BeaconBlockBody) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.RandaoReveal) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.RandaoReveal)))
i += copy(dAtA[i:], m.RandaoReveal)
}
if m.Eth1Data != nil {
dAtA[i] = 0x12
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(m.Eth1Data.Size()))
n2, err := m.Eth1Data.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n2
}
if len(m.Graffiti) > 0 {
dAtA[i] = 0x1a
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.Graffiti)))
i += copy(dAtA[i:], m.Graffiti)
}
if len(m.ProposerSlashings) > 0 {
for _, msg := range m.ProposerSlashings {
dAtA[i] = 0x22
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
if len(m.AttesterSlashings) > 0 {
for _, msg := range m.AttesterSlashings {
dAtA[i] = 0x2a
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
if len(m.Attestations) > 0 {
for _, msg := range m.Attestations {
dAtA[i] = 0x32
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
if len(m.Deposits) > 0 {
for _, msg := range m.Deposits {
dAtA[i] = 0x3a
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
if len(m.VoluntaryExits) > 0 {
for _, msg := range m.VoluntaryExits {
dAtA[i] = 0x42
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
if len(m.Transfers) > 0 {
for _, msg := range m.Transfers {
dAtA[i] = 0x4a
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *ProposerSlashing) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *ProposerSlashing) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.ProposerIndex != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(m.ProposerIndex))
}
if m.Header_1 != nil {
dAtA[i] = 0x12
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(m.Header_1.Size()))
n3, err := m.Header_1.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n3
}
if m.Header_2 != nil {
dAtA[i] = 0x1a
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(m.Header_2.Size()))
n4, err := m.Header_2.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n4
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *AttesterSlashing) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *AttesterSlashing) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Attestation_1 != nil {
dAtA[i] = 0xa
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(m.Attestation_1.Size()))
n5, err := m.Attestation_1.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n5
}
if m.Attestation_2 != nil {
dAtA[i] = 0x12
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(m.Attestation_2.Size()))
n6, err := m.Attestation_2.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n6
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *Deposit) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Deposit) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Proof) > 0 {
for _, b := range m.Proof {
dAtA[i] = 0xa
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(len(b)))
i += copy(dAtA[i:], b)
}
}
if m.Data != nil {
dAtA[i] = 0x12
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(m.Data.Size()))
n7, err := m.Data.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n7
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *Deposit_Data) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Deposit_Data) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.PublicKey) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.PublicKey)))
i += copy(dAtA[i:], m.PublicKey)
}
if len(m.WithdrawalCredentials) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.WithdrawalCredentials)))
i += copy(dAtA[i:], m.WithdrawalCredentials)
}
if m.Amount != 0 {
dAtA[i] = 0x18
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(m.Amount))
}
if len(m.Signature) > 0 {
dAtA[i] = 0x22
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.Signature)))
i += copy(dAtA[i:], m.Signature)
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *VoluntaryExit) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *VoluntaryExit) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Epoch != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(m.Epoch))
}
if m.ValidatorIndex != 0 {
dAtA[i] = 0x10
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(m.ValidatorIndex))
}
if len(m.Signature) > 0 {
dAtA[i] = 0x1a
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.Signature)))
i += copy(dAtA[i:], m.Signature)
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *Transfer) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Transfer) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.SenderIndex != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(m.SenderIndex))
}
if m.RecipientIndex != 0 {
dAtA[i] = 0x10
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(m.RecipientIndex))
}
if m.Amount != 0 {
dAtA[i] = 0x18
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(m.Amount))
}
if m.Fee != 0 {
dAtA[i] = 0x20
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(m.Fee))
}
if m.Slot != 0 {
dAtA[i] = 0x28
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(m.Slot))
}
if len(m.SenderWithdrawalPublicKey) > 0 {
dAtA[i] = 0x32
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.SenderWithdrawalPublicKey)))
i += copy(dAtA[i:], m.SenderWithdrawalPublicKey)
}
if len(m.Signature) > 0 {
dAtA[i] = 0x3a
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.Signature)))
i += copy(dAtA[i:], m.Signature)
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *Eth1Data) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Eth1Data) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.DepositRoot) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.DepositRoot)))
i += copy(dAtA[i:], m.DepositRoot)
}
if m.DepositCount != 0 {
dAtA[i] = 0x10
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(m.DepositCount))
}
if len(m.BlockHash) > 0 {
dAtA[i] = 0x1a
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.BlockHash)))
i += copy(dAtA[i:], m.BlockHash)
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *BeaconBlockHeader) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *BeaconBlockHeader) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Slot != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(m.Slot))
}
if len(m.ParentRoot) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.ParentRoot)))
i += copy(dAtA[i:], m.ParentRoot)
}
if len(m.StateRoot) > 0 {
dAtA[i] = 0x1a
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.StateRoot)))
i += copy(dAtA[i:], m.StateRoot)
}
if len(m.BodyRoot) > 0 {
dAtA[i] = 0x22
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.BodyRoot)))
i += copy(dAtA[i:], m.BodyRoot)
}
if len(m.Signature) > 0 {
dAtA[i] = 0x2a
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.Signature)))
i += copy(dAtA[i:], m.Signature)
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *IndexedAttestation) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *IndexedAttestation) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.CustodyBit_0Indices) > 0 {
dAtA9 := make([]byte, len(m.CustodyBit_0Indices)*10)
var j8 int
for _, num := range m.CustodyBit_0Indices {
for num >= 1<<7 {
dAtA9[j8] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7
j8++
}
dAtA9[j8] = uint8(num)
j8++
}
dAtA[i] = 0xa
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(j8))
i += copy(dAtA[i:], dAtA9[:j8])
}
if len(m.CustodyBit_1Indices) > 0 {
dAtA11 := make([]byte, len(m.CustodyBit_1Indices)*10)
var j10 int
for _, num := range m.CustodyBit_1Indices {
for num >= 1<<7 {
dAtA11[j10] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7
j10++
}
dAtA11[j10] = uint8(num)
j10++
}
dAtA[i] = 0x12
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(j10))
i += copy(dAtA[i:], dAtA11[:j10])
}
if m.Data != nil {
dAtA[i] = 0x1a
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(m.Data.Size()))
n12, err := m.Data.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n12
}
if len(m.Signature) > 0 {
dAtA[i] = 0x22
i++
i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.Signature)))
i += copy(dAtA[i:], m.Signature)
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func encodeVarintBeaconBlock(dAtA []byte, offset int, v uint64) int {
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return offset + 1
}
func (m *BeaconBlock) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Slot != 0 {
n += 1 + sovBeaconBlock(uint64(m.Slot))
}
l = len(m.ParentRoot)
if l > 0 {
n += 1 + l + sovBeaconBlock(uint64(l))
}
l = len(m.StateRoot)
if l > 0 {
n += 1 + l + sovBeaconBlock(uint64(l))
}
if m.Body != nil {
l = m.Body.Size()
n += 1 + l + sovBeaconBlock(uint64(l))
}
l = len(m.Signature)
if l > 0 {
n += 1 + l + sovBeaconBlock(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *BeaconBlockBody) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.RandaoReveal)
if l > 0 {
n += 1 + l + sovBeaconBlock(uint64(l))
}
if m.Eth1Data != nil {
l = m.Eth1Data.Size()
n += 1 + l + sovBeaconBlock(uint64(l))
}
l = len(m.Graffiti)
if l > 0 {
n += 1 + l + sovBeaconBlock(uint64(l))
}
if len(m.ProposerSlashings) > 0 {
for _, e := range m.ProposerSlashings {
l = e.Size()
n += 1 + l + sovBeaconBlock(uint64(l))
}
}
if len(m.AttesterSlashings) > 0 {
for _, e := range m.AttesterSlashings {
l = e.Size()
n += 1 + l + sovBeaconBlock(uint64(l))
}
}
if len(m.Attestations) > 0 {
for _, e := range m.Attestations {
l = e.Size()
n += 1 + l + sovBeaconBlock(uint64(l))
}
}
if len(m.Deposits) > 0 {
for _, e := range m.Deposits {
l = e.Size()
n += 1 + l + sovBeaconBlock(uint64(l))
}
}
if len(m.VoluntaryExits) > 0 {
for _, e := range m.VoluntaryExits {
l = e.Size()
n += 1 + l + sovBeaconBlock(uint64(l))
}
}
if len(m.Transfers) > 0 {
for _, e := range m.Transfers {
l = e.Size()
n += 1 + l + sovBeaconBlock(uint64(l))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *ProposerSlashing) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.ProposerIndex != 0 {
n += 1 + sovBeaconBlock(uint64(m.ProposerIndex))
}
if m.Header_1 != nil {
l = m.Header_1.Size()
n += 1 + l + sovBeaconBlock(uint64(l))
}
if m.Header_2 != nil {
l = m.Header_2.Size()
n += 1 + l + sovBeaconBlock(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *AttesterSlashing) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Attestation_1 != nil {
l = m.Attestation_1.Size()
n += 1 + l + sovBeaconBlock(uint64(l))
}
if m.Attestation_2 != nil {
l = m.Attestation_2.Size()
n += 1 + l + sovBeaconBlock(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Deposit) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.Proof) > 0 {
for _, b := range m.Proof {
l = len(b)
n += 1 + l + sovBeaconBlock(uint64(l))
}
}
if m.Data != nil {
l = m.Data.Size()
n += 1 + l + sovBeaconBlock(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Deposit_Data) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.PublicKey)
if l > 0 {
n += 1 + l + sovBeaconBlock(uint64(l))
}
l = len(m.WithdrawalCredentials)
if l > 0 {
n += 1 + l + sovBeaconBlock(uint64(l))
}
if m.Amount != 0 {
n += 1 + sovBeaconBlock(uint64(m.Amount))
}
l = len(m.Signature)
if l > 0 {
n += 1 + l + sovBeaconBlock(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *VoluntaryExit) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Epoch != 0 {
n += 1 + sovBeaconBlock(uint64(m.Epoch))
}
if m.ValidatorIndex != 0 {
n += 1 + sovBeaconBlock(uint64(m.ValidatorIndex))
}
l = len(m.Signature)
if l > 0 {
n += 1 + l + sovBeaconBlock(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Transfer) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.SenderIndex != 0 {
n += 1 + sovBeaconBlock(uint64(m.SenderIndex))
}
if m.RecipientIndex != 0 {
n += 1 + sovBeaconBlock(uint64(m.RecipientIndex))
}
if m.Amount != 0 {
n += 1 + sovBeaconBlock(uint64(m.Amount))
}
if m.Fee != 0 {
n += 1 + sovBeaconBlock(uint64(m.Fee))
}
if m.Slot != 0 {
n += 1 + sovBeaconBlock(uint64(m.Slot))
}
l = len(m.SenderWithdrawalPublicKey)
if l > 0 {
n += 1 + l + sovBeaconBlock(uint64(l))
}
l = len(m.Signature)
if l > 0 {
n += 1 + l + sovBeaconBlock(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Eth1Data) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.DepositRoot)
if l > 0 {
n += 1 + l + sovBeaconBlock(uint64(l))
}
if m.DepositCount != 0 {
n += 1 + sovBeaconBlock(uint64(m.DepositCount))
}
l = len(m.BlockHash)
if l > 0 {
n += 1 + l + sovBeaconBlock(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *BeaconBlockHeader) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Slot != 0 {
n += 1 + sovBeaconBlock(uint64(m.Slot))
}
l = len(m.ParentRoot)
if l > 0 {
n += 1 + l + sovBeaconBlock(uint64(l))
}
l = len(m.StateRoot)
if l > 0 {
n += 1 + l + sovBeaconBlock(uint64(l))
}
l = len(m.BodyRoot)
if l > 0 {
n += 1 + l + sovBeaconBlock(uint64(l))
}
l = len(m.Signature)
if l > 0 {
n += 1 + l + sovBeaconBlock(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *IndexedAttestation) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.CustodyBit_0Indices) > 0 {
l = 0
for _, e := range m.CustodyBit_0Indices {
l += sovBeaconBlock(uint64(e))
}
n += 1 + sovBeaconBlock(uint64(l)) + l
}
if len(m.CustodyBit_1Indices) > 0 {
l = 0
for _, e := range m.CustodyBit_1Indices {
l += sovBeaconBlock(uint64(e))
}
n += 1 + sovBeaconBlock(uint64(l)) + l
}
if m.Data != nil {
l = m.Data.Size()
n += 1 + l + sovBeaconBlock(uint64(l))
}
l = len(m.Signature)
if l > 0 {
n += 1 + l + sovBeaconBlock(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func sovBeaconBlock(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozBeaconBlock(x uint64) (n int) {
return sovBeaconBlock(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *BeaconBlock) 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 ErrIntOverflowBeaconBlock
}
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: BeaconBlock: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: BeaconBlock: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Slot", wireType)
}
m.Slot = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Slot |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ParentRoot", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ParentRoot = append(m.ParentRoot[:0], dAtA[iNdEx:postIndex]...)
if m.ParentRoot == nil {
m.ParentRoot = []byte{}
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field StateRoot", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.StateRoot = append(m.StateRoot[:0], dAtA[iNdEx:postIndex]...)
if m.StateRoot == nil {
m.StateRoot = []byte{}
}
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Body == nil {
m.Body = &BeaconBlockBody{}
}
if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...)
if m.Signature == nil {
m.Signature = []byte{}
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipBeaconBlock(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthBeaconBlock
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthBeaconBlock
}
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 *BeaconBlockBody) 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 ErrIntOverflowBeaconBlock
}
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: BeaconBlockBody: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: BeaconBlockBody: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field RandaoReveal", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.RandaoReveal = append(m.RandaoReveal[:0], dAtA[iNdEx:postIndex]...)
if m.RandaoReveal == nil {
m.RandaoReveal = []byte{}
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Eth1Data", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Eth1Data == nil {
m.Eth1Data = &Eth1Data{}
}
if err := m.Eth1Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Graffiti", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Graffiti = append(m.Graffiti[:0], dAtA[iNdEx:postIndex]...)
if m.Graffiti == nil {
m.Graffiti = []byte{}
}
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ProposerSlashings", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ProposerSlashings = append(m.ProposerSlashings, &ProposerSlashing{})
if err := m.ProposerSlashings[len(m.ProposerSlashings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field AttesterSlashings", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.AttesterSlashings = append(m.AttesterSlashings, &AttesterSlashing{})
if err := m.AttesterSlashings[len(m.AttesterSlashings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 6:
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 ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Attestations = append(m.Attestations, &Attestation{})
if err := m.Attestations[len(m.Attestations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 7:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Deposits", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Deposits = append(m.Deposits, &Deposit{})
if err := m.Deposits[len(m.Deposits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 8:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field VoluntaryExits", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.VoluntaryExits = append(m.VoluntaryExits, &VoluntaryExit{})
if err := m.VoluntaryExits[len(m.VoluntaryExits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 9:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Transfers", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Transfers = append(m.Transfers, &Transfer{})
if err := m.Transfers[len(m.Transfers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipBeaconBlock(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthBeaconBlock
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthBeaconBlock
}
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 *ProposerSlashing) 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 ErrIntOverflowBeaconBlock
}
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: ProposerSlashing: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ProposerSlashing: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ProposerIndex", wireType)
}
m.ProposerIndex = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ProposerIndex |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Header_1", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Header_1 == nil {
m.Header_1 = &BeaconBlockHeader{}
}
if err := m.Header_1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Header_2", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Header_2 == nil {
m.Header_2 = &BeaconBlockHeader{}
}
if err := m.Header_2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipBeaconBlock(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthBeaconBlock
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthBeaconBlock
}
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 *AttesterSlashing) 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 ErrIntOverflowBeaconBlock
}
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: AttesterSlashing: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: AttesterSlashing: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Attestation_1", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Attestation_1 == nil {
m.Attestation_1 = &IndexedAttestation{}
}
if err := m.Attestation_1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Attestation_2", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Attestation_2 == nil {
m.Attestation_2 = &IndexedAttestation{}
}
if err := m.Attestation_2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipBeaconBlock(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthBeaconBlock
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthBeaconBlock
}
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 *Deposit) 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 ErrIntOverflowBeaconBlock
}
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: Deposit: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Deposit: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Proof = append(m.Proof, make([]byte, postIndex-iNdEx))
copy(m.Proof[len(m.Proof)-1], dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Data == nil {
m.Data = &Deposit_Data{}
}
if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipBeaconBlock(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthBeaconBlock
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthBeaconBlock
}
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 *Deposit_Data) 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 ErrIntOverflowBeaconBlock
}
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: Data: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Data: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.PublicKey = append(m.PublicKey[:0], dAtA[iNdEx:postIndex]...)
if m.PublicKey == nil {
m.PublicKey = []byte{}
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field WithdrawalCredentials", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.WithdrawalCredentials = append(m.WithdrawalCredentials[:0], dAtA[iNdEx:postIndex]...)
if m.WithdrawalCredentials == nil {
m.WithdrawalCredentials = []byte{}
}
iNdEx = postIndex
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
}
m.Amount = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Amount |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...)
if m.Signature == nil {
m.Signature = []byte{}
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipBeaconBlock(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthBeaconBlock
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthBeaconBlock
}
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 *VoluntaryExit) 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 ErrIntOverflowBeaconBlock
}
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: VoluntaryExit: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: VoluntaryExit: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType)
}
m.Epoch = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Epoch |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ValidatorIndex", wireType)
}
m.ValidatorIndex = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ValidatorIndex |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...)
if m.Signature == nil {
m.Signature = []byte{}
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipBeaconBlock(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthBeaconBlock
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthBeaconBlock
}
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 *Transfer) 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 ErrIntOverflowBeaconBlock
}
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: Transfer: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Transfer: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field SenderIndex", wireType)
}
m.SenderIndex = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.SenderIndex |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field RecipientIndex", wireType)
}
m.RecipientIndex = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.RecipientIndex |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
}
m.Amount = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Amount |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType)
}
m.Fee = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Fee |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 5:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Slot", wireType)
}
m.Slot = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Slot |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field SenderWithdrawalPublicKey", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.SenderWithdrawalPublicKey = append(m.SenderWithdrawalPublicKey[:0], dAtA[iNdEx:postIndex]...)
if m.SenderWithdrawalPublicKey == nil {
m.SenderWithdrawalPublicKey = []byte{}
}
iNdEx = postIndex
case 7:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...)
if m.Signature == nil {
m.Signature = []byte{}
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipBeaconBlock(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthBeaconBlock
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthBeaconBlock
}
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 *Eth1Data) 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 ErrIntOverflowBeaconBlock
}
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: Eth1Data: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Eth1Data: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field DepositRoot", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.DepositRoot = append(m.DepositRoot[:0], dAtA[iNdEx:postIndex]...)
if m.DepositRoot == nil {
m.DepositRoot = []byte{}
}
iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field DepositCount", wireType)
}
m.DepositCount = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.DepositCount |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field BlockHash", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.BlockHash = append(m.BlockHash[:0], dAtA[iNdEx:postIndex]...)
if m.BlockHash == nil {
m.BlockHash = []byte{}
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipBeaconBlock(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthBeaconBlock
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthBeaconBlock
}
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 *BeaconBlockHeader) 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 ErrIntOverflowBeaconBlock
}
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: BeaconBlockHeader: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: BeaconBlockHeader: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Slot", wireType)
}
m.Slot = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Slot |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ParentRoot", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ParentRoot = append(m.ParentRoot[:0], dAtA[iNdEx:postIndex]...)
if m.ParentRoot == nil {
m.ParentRoot = []byte{}
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field StateRoot", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.StateRoot = append(m.StateRoot[:0], dAtA[iNdEx:postIndex]...)
if m.StateRoot == nil {
m.StateRoot = []byte{}
}
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field BodyRoot", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.BodyRoot = append(m.BodyRoot[:0], dAtA[iNdEx:postIndex]...)
if m.BodyRoot == nil {
m.BodyRoot = []byte{}
}
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...)
if m.Signature == nil {
m.Signature = []byte{}
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipBeaconBlock(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthBeaconBlock
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthBeaconBlock
}
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 *IndexedAttestation) 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 ErrIntOverflowBeaconBlock
}
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: IndexedAttestation: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: IndexedAttestation: 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 ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.CustodyBit_0Indices = append(m.CustodyBit_0Indices, v)
} else if wireType == 2 {
var packedLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
packedLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if packedLen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + packedLen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
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.CustodyBit_0Indices) == 0 {
m.CustodyBit_0Indices = make([]uint64, 0, elementCount)
}
for iNdEx < postIndex {
var v uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.CustodyBit_0Indices = append(m.CustodyBit_0Indices, v)
}
} else {
return fmt.Errorf("proto: wrong wireType = %d for field CustodyBit_0Indices", wireType)
}
case 2:
if wireType == 0 {
var v uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.CustodyBit_1Indices = append(m.CustodyBit_1Indices, v)
} else if wireType == 2 {
var packedLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
packedLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if packedLen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + packedLen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
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.CustodyBit_1Indices) == 0 {
m.CustodyBit_1Indices = make([]uint64, 0, elementCount)
}
for iNdEx < postIndex {
var v uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.CustodyBit_1Indices = append(m.CustodyBit_1Indices, v)
}
} else {
return fmt.Errorf("proto: wrong wireType = %d for field CustodyBit_1Indices", wireType)
}
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Data == nil {
m.Data = &AttestationData{}
}
if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthBeaconBlock
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthBeaconBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...)
if m.Signature == nil {
m.Signature = []byte{}
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipBeaconBlock(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthBeaconBlock
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthBeaconBlock
}
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 skipBeaconBlock(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowBeaconBlock
}
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, ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
return iNdEx, nil
case 1:
iNdEx += 8
return iNdEx, nil
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowBeaconBlock
}
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, ErrInvalidLengthBeaconBlock
}
iNdEx += length
if iNdEx < 0 {
return 0, ErrInvalidLengthBeaconBlock
}
return iNdEx, nil
case 3:
for {
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowBeaconBlock
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
innerWire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
innerWireType := int(innerWire & 0x7)
if innerWireType == 4 {
break
}
next, err := skipBeaconBlock(dAtA[start:])
if err != nil {
return 0, err
}
iNdEx = start + next
if iNdEx < 0 {
return 0, ErrInvalidLengthBeaconBlock
}
}
return iNdEx, nil
case 4:
return iNdEx, nil
case 5:
iNdEx += 4
return iNdEx, nil
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
}
panic("unreachable")
}
var (
ErrInvalidLengthBeaconBlock = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowBeaconBlock = fmt.Errorf("proto: integer overflow")
)