mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-15 22:48:19 +00:00
64795bd231
* archive participation begin implementation * validator participation compute * comments * compute participation common func * full test for archiving data * gazelle * complete tests * gaz * remove double negative grammar in comment * use archive in rpc * uses the archive! * error if nothing found in archive * comment * use head fetcher and root * tests pass * archive active set changes appropriately * archive committees * archive info * done with committee info archiving * archived set changes stored * fix build * test for archive balances and active indices * further abstractions * only archive epoch end * tests all pass * tests pass now * archive done * test for activated validators * tests for exited * amend message * use different proto * finalization fetcher * gaz * use root * use ctx * use new ethapis * use proper hash * match apis compatibility * match apis * properly use participation * fix tests * use right commit
1073 lines
26 KiB
Go
Executable File
Generated
1073 lines
26 KiB
Go
Executable File
Generated
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: proto/eth/v1alpha1/archive.proto
|
|
|
|
package eth
|
|
|
|
import (
|
|
fmt "fmt"
|
|
_ "github.com/gogo/protobuf/gogoproto"
|
|
proto "github.com/gogo/protobuf/proto"
|
|
io "io"
|
|
math "math"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
type ArchivedActiveSetChanges struct {
|
|
Activated []uint64 `protobuf:"varint,1,rep,packed,name=activated,proto3" json:"activated,omitempty"`
|
|
Exited []uint64 `protobuf:"varint,2,rep,packed,name=exited,proto3" json:"exited,omitempty"`
|
|
Slashed []uint64 `protobuf:"varint,4,rep,packed,name=slashed,proto3" json:"slashed,omitempty"`
|
|
VoluntaryExits []*VoluntaryExit `protobuf:"bytes,6,rep,name=voluntary_exits,json=voluntaryExits,proto3" json:"voluntary_exits,omitempty"`
|
|
ProposerSlashings []*ProposerSlashing `protobuf:"bytes,7,rep,name=proposer_slashings,json=proposerSlashings,proto3" json:"proposer_slashings,omitempty"`
|
|
AttesterSlashings []*AttesterSlashing `protobuf:"bytes,8,rep,name=attester_slashings,json=attesterSlashings,proto3" json:"attester_slashings,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ArchivedActiveSetChanges) Reset() { *m = ArchivedActiveSetChanges{} }
|
|
func (m *ArchivedActiveSetChanges) String() string { return proto.CompactTextString(m) }
|
|
func (*ArchivedActiveSetChanges) ProtoMessage() {}
|
|
func (*ArchivedActiveSetChanges) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_afd178f87193e24d, []int{0}
|
|
}
|
|
func (m *ArchivedActiveSetChanges) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ArchivedActiveSetChanges) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ArchivedActiveSetChanges.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 *ArchivedActiveSetChanges) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ArchivedActiveSetChanges.Merge(m, src)
|
|
}
|
|
func (m *ArchivedActiveSetChanges) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ArchivedActiveSetChanges) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ArchivedActiveSetChanges.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ArchivedActiveSetChanges proto.InternalMessageInfo
|
|
|
|
func (m *ArchivedActiveSetChanges) GetActivated() []uint64 {
|
|
if m != nil {
|
|
return m.Activated
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ArchivedActiveSetChanges) GetExited() []uint64 {
|
|
if m != nil {
|
|
return m.Exited
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ArchivedActiveSetChanges) GetSlashed() []uint64 {
|
|
if m != nil {
|
|
return m.Slashed
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ArchivedActiveSetChanges) GetVoluntaryExits() []*VoluntaryExit {
|
|
if m != nil {
|
|
return m.VoluntaryExits
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ArchivedActiveSetChanges) GetProposerSlashings() []*ProposerSlashing {
|
|
if m != nil {
|
|
return m.ProposerSlashings
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ArchivedActiveSetChanges) GetAttesterSlashings() []*AttesterSlashing {
|
|
if m != nil {
|
|
return m.AttesterSlashings
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type ArchivedCommitteeInfo struct {
|
|
Seed []byte `protobuf:"bytes,1,opt,name=seed,proto3" json:"seed,omitempty" ssz-size:"32"`
|
|
StartShard uint64 `protobuf:"varint,2,opt,name=start_shard,json=startShard,proto3" json:"start_shard,omitempty"`
|
|
CommitteeCount uint64 `protobuf:"varint,3,opt,name=committee_count,json=committeeCount,proto3" json:"committee_count,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ArchivedCommitteeInfo) Reset() { *m = ArchivedCommitteeInfo{} }
|
|
func (m *ArchivedCommitteeInfo) String() string { return proto.CompactTextString(m) }
|
|
func (*ArchivedCommitteeInfo) ProtoMessage() {}
|
|
func (*ArchivedCommitteeInfo) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_afd178f87193e24d, []int{1}
|
|
}
|
|
func (m *ArchivedCommitteeInfo) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ArchivedCommitteeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ArchivedCommitteeInfo.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 *ArchivedCommitteeInfo) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ArchivedCommitteeInfo.Merge(m, src)
|
|
}
|
|
func (m *ArchivedCommitteeInfo) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ArchivedCommitteeInfo) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ArchivedCommitteeInfo.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ArchivedCommitteeInfo proto.InternalMessageInfo
|
|
|
|
func (m *ArchivedCommitteeInfo) GetSeed() []byte {
|
|
if m != nil {
|
|
return m.Seed
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ArchivedCommitteeInfo) GetStartShard() uint64 {
|
|
if m != nil {
|
|
return m.StartShard
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *ArchivedCommitteeInfo) GetCommitteeCount() uint64 {
|
|
if m != nil {
|
|
return m.CommitteeCount
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*ArchivedActiveSetChanges)(nil), "ethereum.eth.v1alpha1.ArchivedActiveSetChanges")
|
|
proto.RegisterType((*ArchivedCommitteeInfo)(nil), "ethereum.eth.v1alpha1.ArchivedCommitteeInfo")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("proto/eth/v1alpha1/archive.proto", fileDescriptor_afd178f87193e24d) }
|
|
|
|
var fileDescriptor_afd178f87193e24d = []byte{
|
|
// 424 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 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c1, 0xb1, 0x34, 0x55, 0x41, 0xfe, 0xc0, 0x95, 0xb6,
|
|
0xff, 0xd8, 0x8b, 0xc6, 0x3d, 0x5f, 0x7c, 0x5d, 0x8f, 0xbd, 0x6f, 0xeb, 0xb1, 0xf7, 0x63, 0x3d,
|
|
0xf6, 0x3e, 0xbd, 0xbe, 0x73, 0x5a, 0xa5, 0xbd, 0xc6, 0x5c, 0x90, 0x96, 0x99, 0x48, 0xb0, 0x55,
|
|
0xe1, 0xbf, 0xa7, 0xf4, 0x16, 0x48, 0x25, 0x23, 0xe7, 0x9f, 0xfd, 0x0e, 0x00, 0x00, 0xff, 0xff,
|
|
0x9d, 0xe9, 0x8d, 0x51, 0xd3, 0x02, 0x00, 0x00,
|
|
}
|
|
|
|
func (m *ArchivedActiveSetChanges) 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 *ArchivedActiveSetChanges) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Activated) > 0 {
|
|
dAtA2 := make([]byte, len(m.Activated)*10)
|
|
var j1 int
|
|
for _, num := range m.Activated {
|
|
for num >= 1<<7 {
|
|
dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80)
|
|
num >>= 7
|
|
j1++
|
|
}
|
|
dAtA2[j1] = uint8(num)
|
|
j1++
|
|
}
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintArchive(dAtA, i, uint64(j1))
|
|
i += copy(dAtA[i:], dAtA2[:j1])
|
|
}
|
|
if len(m.Exited) > 0 {
|
|
dAtA4 := make([]byte, len(m.Exited)*10)
|
|
var j3 int
|
|
for _, num := range m.Exited {
|
|
for num >= 1<<7 {
|
|
dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80)
|
|
num >>= 7
|
|
j3++
|
|
}
|
|
dAtA4[j3] = uint8(num)
|
|
j3++
|
|
}
|
|
dAtA[i] = 0x12
|
|
i++
|
|
i = encodeVarintArchive(dAtA, i, uint64(j3))
|
|
i += copy(dAtA[i:], dAtA4[:j3])
|
|
}
|
|
if len(m.Slashed) > 0 {
|
|
dAtA6 := make([]byte, len(m.Slashed)*10)
|
|
var j5 int
|
|
for _, num := range m.Slashed {
|
|
for num >= 1<<7 {
|
|
dAtA6[j5] = uint8(uint64(num)&0x7f | 0x80)
|
|
num >>= 7
|
|
j5++
|
|
}
|
|
dAtA6[j5] = uint8(num)
|
|
j5++
|
|
}
|
|
dAtA[i] = 0x22
|
|
i++
|
|
i = encodeVarintArchive(dAtA, i, uint64(j5))
|
|
i += copy(dAtA[i:], dAtA6[:j5])
|
|
}
|
|
if len(m.VoluntaryExits) > 0 {
|
|
for _, msg := range m.VoluntaryExits {
|
|
dAtA[i] = 0x32
|
|
i++
|
|
i = encodeVarintArchive(dAtA, i, uint64(msg.Size()))
|
|
n, err := msg.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n
|
|
}
|
|
}
|
|
if len(m.ProposerSlashings) > 0 {
|
|
for _, msg := range m.ProposerSlashings {
|
|
dAtA[i] = 0x3a
|
|
i++
|
|
i = encodeVarintArchive(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] = 0x42
|
|
i++
|
|
i = encodeVarintArchive(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 *ArchivedCommitteeInfo) 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 *ArchivedCommitteeInfo) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Seed) > 0 {
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintArchive(dAtA, i, uint64(len(m.Seed)))
|
|
i += copy(dAtA[i:], m.Seed)
|
|
}
|
|
if m.StartShard != 0 {
|
|
dAtA[i] = 0x10
|
|
i++
|
|
i = encodeVarintArchive(dAtA, i, uint64(m.StartShard))
|
|
}
|
|
if m.CommitteeCount != 0 {
|
|
dAtA[i] = 0x18
|
|
i++
|
|
i = encodeVarintArchive(dAtA, i, uint64(m.CommitteeCount))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func encodeVarintArchive(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 *ArchivedActiveSetChanges) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if len(m.Activated) > 0 {
|
|
l = 0
|
|
for _, e := range m.Activated {
|
|
l += sovArchive(uint64(e))
|
|
}
|
|
n += 1 + sovArchive(uint64(l)) + l
|
|
}
|
|
if len(m.Exited) > 0 {
|
|
l = 0
|
|
for _, e := range m.Exited {
|
|
l += sovArchive(uint64(e))
|
|
}
|
|
n += 1 + sovArchive(uint64(l)) + l
|
|
}
|
|
if len(m.Slashed) > 0 {
|
|
l = 0
|
|
for _, e := range m.Slashed {
|
|
l += sovArchive(uint64(e))
|
|
}
|
|
n += 1 + sovArchive(uint64(l)) + l
|
|
}
|
|
if len(m.VoluntaryExits) > 0 {
|
|
for _, e := range m.VoluntaryExits {
|
|
l = e.Size()
|
|
n += 1 + l + sovArchive(uint64(l))
|
|
}
|
|
}
|
|
if len(m.ProposerSlashings) > 0 {
|
|
for _, e := range m.ProposerSlashings {
|
|
l = e.Size()
|
|
n += 1 + l + sovArchive(uint64(l))
|
|
}
|
|
}
|
|
if len(m.AttesterSlashings) > 0 {
|
|
for _, e := range m.AttesterSlashings {
|
|
l = e.Size()
|
|
n += 1 + l + sovArchive(uint64(l))
|
|
}
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ArchivedCommitteeInfo) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Seed)
|
|
if l > 0 {
|
|
n += 1 + l + sovArchive(uint64(l))
|
|
}
|
|
if m.StartShard != 0 {
|
|
n += 1 + sovArchive(uint64(m.StartShard))
|
|
}
|
|
if m.CommitteeCount != 0 {
|
|
n += 1 + sovArchive(uint64(m.CommitteeCount))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func sovArchive(x uint64) (n int) {
|
|
for {
|
|
n++
|
|
x >>= 7
|
|
if x == 0 {
|
|
break
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
func sozArchive(x uint64) (n int) {
|
|
return sovArchive(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (m *ArchivedActiveSetChanges) 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 ErrIntOverflowArchive
|
|
}
|
|
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: ArchivedActiveSetChanges: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ArchivedActiveSetChanges: 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 ErrIntOverflowArchive
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Activated = append(m.Activated, v)
|
|
} else if wireType == 2 {
|
|
var packedLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowArchive
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
packedLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if packedLen < 0 {
|
|
return ErrInvalidLengthArchive
|
|
}
|
|
postIndex := iNdEx + packedLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthArchive
|
|
}
|
|
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.Activated) == 0 {
|
|
m.Activated = make([]uint64, 0, elementCount)
|
|
}
|
|
for iNdEx < postIndex {
|
|
var v uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowArchive
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Activated = append(m.Activated, v)
|
|
}
|
|
} else {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Activated", wireType)
|
|
}
|
|
case 2:
|
|
if wireType == 0 {
|
|
var v uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowArchive
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Exited = append(m.Exited, v)
|
|
} else if wireType == 2 {
|
|
var packedLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowArchive
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
packedLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if packedLen < 0 {
|
|
return ErrInvalidLengthArchive
|
|
}
|
|
postIndex := iNdEx + packedLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthArchive
|
|
}
|
|
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.Exited) == 0 {
|
|
m.Exited = make([]uint64, 0, elementCount)
|
|
}
|
|
for iNdEx < postIndex {
|
|
var v uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowArchive
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Exited = append(m.Exited, v)
|
|
}
|
|
} else {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Exited", wireType)
|
|
}
|
|
case 4:
|
|
if wireType == 0 {
|
|
var v uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowArchive
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Slashed = append(m.Slashed, v)
|
|
} else if wireType == 2 {
|
|
var packedLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowArchive
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
packedLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if packedLen < 0 {
|
|
return ErrInvalidLengthArchive
|
|
}
|
|
postIndex := iNdEx + packedLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthArchive
|
|
}
|
|
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.Slashed) == 0 {
|
|
m.Slashed = make([]uint64, 0, elementCount)
|
|
}
|
|
for iNdEx < postIndex {
|
|
var v uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowArchive
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Slashed = append(m.Slashed, v)
|
|
}
|
|
} else {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Slashed", wireType)
|
|
}
|
|
case 6:
|
|
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 ErrIntOverflowArchive
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthArchive
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthArchive
|
|
}
|
|
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 7:
|
|
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 ErrIntOverflowArchive
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthArchive
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthArchive
|
|
}
|
|
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 8:
|
|
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 ErrIntOverflowArchive
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthArchive
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthArchive
|
|
}
|
|
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
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipArchive(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthArchive
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthArchive
|
|
}
|
|
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 *ArchivedCommitteeInfo) 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 ErrIntOverflowArchive
|
|
}
|
|
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: ArchivedCommitteeInfo: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ArchivedCommitteeInfo: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Seed", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowArchive
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthArchive
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthArchive
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Seed = append(m.Seed[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Seed == nil {
|
|
m.Seed = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field StartShard", wireType)
|
|
}
|
|
m.StartShard = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowArchive
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.StartShard |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 3:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field CommitteeCount", wireType)
|
|
}
|
|
m.CommitteeCount = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowArchive
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.CommitteeCount |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipArchive(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthArchive
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthArchive
|
|
}
|
|
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 skipArchive(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, ErrIntOverflowArchive
|
|
}
|
|
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, ErrIntOverflowArchive
|
|
}
|
|
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, ErrIntOverflowArchive
|
|
}
|
|
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, ErrInvalidLengthArchive
|
|
}
|
|
iNdEx += length
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthArchive
|
|
}
|
|
return iNdEx, nil
|
|
case 3:
|
|
for {
|
|
var innerWire uint64
|
|
var start int = iNdEx
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowArchive
|
|
}
|
|
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 := skipArchive(dAtA[start:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
iNdEx = start + next
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthArchive
|
|
}
|
|
}
|
|
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 (
|
|
ErrInvalidLengthArchive = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowArchive = fmt.Errorf("proto: integer overflow")
|
|
)
|