mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-28 14:17:17 +00:00
49a0d3caf0
* Fix a few deps to work with go.mod, check in generated files * Update Gossipsub to 1.1 (#5998) * update libs * add new validators * add new deps * new set of deps * tls * further fix gossip update * get everything to build * clean up * gaz * fix build * fix all tests * add deps to images * imports Co-authored-by: rauljordan <raul@prysmaticlabs.com> * Beacon chain builds with go build * fix bazel * fix dep * lint * Add github action for testing go * on PR for any branch * fix libp2p test failure * Fix TestProcessBlock_PassesProcessingConditions by updating the proposer index in test * Revert "Fix TestProcessBlock_PassesProcessingConditions by updating the proposer index in test" This reverts commit 43676894ab01f03fe90a9b8ee3ecfbc2ec1ec4e4. * Compute and set proposer index instead of hard code * Add back go mod/sum, fix deps * go build ./... * Temporarily skip two tests * Fix kafka confluent patch * Fix kafka confluent patch * fix kafka build * fix kafka * Add info in DEPENDENCIES. Added a stub link for Why Bazel? until https://github.com/prysmaticlabs/documentation/issues/138 * Update fuzz ssz files as well * Update fuzz ssz files as well * getting closer * rollback rules_go and gazelle * fix gogo protobuf * install librdkafka-dev as part of github actions * Update kafka to a recent version where librkafkfa is not required for go modules * clarify comment * fix kafka build * disable go tests * comment * Fix geth dependencies for end to end * rename word * lint * fix docker Co-authored-by: Nishant Das <nishdas93@gmail.com> Co-authored-by: rauljordan <raul@prysmaticlabs.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2060 lines
51 KiB
Go
Executable File
Generated
2060 lines
51 KiB
Go
Executable File
Generated
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: proto/beacon/db/powchain.proto
|
|
|
|
package db
|
|
|
|
import (
|
|
fmt "fmt"
|
|
proto "github.com/gogo/protobuf/proto"
|
|
v1alpha1 "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
|
|
v1 "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
|
|
io "io"
|
|
math "math"
|
|
math_bits "math/bits"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
type ETH1ChainData struct {
|
|
CurrentEth1Data *LatestETH1Data `protobuf:"bytes,1,opt,name=current_eth1_data,json=currentEth1Data,proto3" json:"current_eth1_data,omitempty"`
|
|
ChainstartData *ChainStartData `protobuf:"bytes,2,opt,name=chainstart_data,json=chainstartData,proto3" json:"chainstart_data,omitempty"`
|
|
BeaconState *v1.BeaconState `protobuf:"bytes,3,opt,name=beacon_state,json=beaconState,proto3" json:"beacon_state,omitempty"`
|
|
Trie *SparseMerkleTrie `protobuf:"bytes,4,opt,name=trie,proto3" json:"trie,omitempty"`
|
|
DepositContainers []*DepositContainer `protobuf:"bytes,5,rep,name=deposit_containers,json=depositContainers,proto3" json:"deposit_containers,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ETH1ChainData) Reset() { *m = ETH1ChainData{} }
|
|
func (m *ETH1ChainData) String() string { return proto.CompactTextString(m) }
|
|
func (*ETH1ChainData) ProtoMessage() {}
|
|
func (*ETH1ChainData) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_338787f8da2f3d61, []int{0}
|
|
}
|
|
func (m *ETH1ChainData) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ETH1ChainData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ETH1ChainData.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *ETH1ChainData) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ETH1ChainData.Merge(m, src)
|
|
}
|
|
func (m *ETH1ChainData) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ETH1ChainData) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ETH1ChainData.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ETH1ChainData proto.InternalMessageInfo
|
|
|
|
func (m *ETH1ChainData) GetCurrentEth1Data() *LatestETH1Data {
|
|
if m != nil {
|
|
return m.CurrentEth1Data
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ETH1ChainData) GetChainstartData() *ChainStartData {
|
|
if m != nil {
|
|
return m.ChainstartData
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ETH1ChainData) GetBeaconState() *v1.BeaconState {
|
|
if m != nil {
|
|
return m.BeaconState
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ETH1ChainData) GetTrie() *SparseMerkleTrie {
|
|
if m != nil {
|
|
return m.Trie
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ETH1ChainData) GetDepositContainers() []*DepositContainer {
|
|
if m != nil {
|
|
return m.DepositContainers
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type LatestETH1Data struct {
|
|
BlockHeight uint64 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
|
|
BlockTime uint64 `protobuf:"varint,3,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"`
|
|
BlockHash []byte `protobuf:"bytes,4,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"`
|
|
LastRequestedBlock uint64 `protobuf:"varint,5,opt,name=last_requested_block,json=lastRequestedBlock,proto3" json:"last_requested_block,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *LatestETH1Data) Reset() { *m = LatestETH1Data{} }
|
|
func (m *LatestETH1Data) String() string { return proto.CompactTextString(m) }
|
|
func (*LatestETH1Data) ProtoMessage() {}
|
|
func (*LatestETH1Data) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_338787f8da2f3d61, []int{1}
|
|
}
|
|
func (m *LatestETH1Data) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *LatestETH1Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_LatestETH1Data.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *LatestETH1Data) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_LatestETH1Data.Merge(m, src)
|
|
}
|
|
func (m *LatestETH1Data) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *LatestETH1Data) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_LatestETH1Data.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_LatestETH1Data proto.InternalMessageInfo
|
|
|
|
func (m *LatestETH1Data) GetBlockHeight() uint64 {
|
|
if m != nil {
|
|
return m.BlockHeight
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *LatestETH1Data) GetBlockTime() uint64 {
|
|
if m != nil {
|
|
return m.BlockTime
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *LatestETH1Data) GetBlockHash() []byte {
|
|
if m != nil {
|
|
return m.BlockHash
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *LatestETH1Data) GetLastRequestedBlock() uint64 {
|
|
if m != nil {
|
|
return m.LastRequestedBlock
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type ChainStartData struct {
|
|
Chainstarted bool `protobuf:"varint,1,opt,name=chainstarted,proto3" json:"chainstarted,omitempty"`
|
|
GenesisTime uint64 `protobuf:"varint,2,opt,name=genesis_time,json=genesisTime,proto3" json:"genesis_time,omitempty"`
|
|
GenesisBlock uint64 `protobuf:"varint,3,opt,name=genesis_block,json=genesisBlock,proto3" json:"genesis_block,omitempty"`
|
|
Eth1Data *v1alpha1.Eth1Data `protobuf:"bytes,4,opt,name=eth1_data,json=eth1Data,proto3" json:"eth1_data,omitempty"`
|
|
ChainstartDeposits []*v1alpha1.Deposit `protobuf:"bytes,5,rep,name=chainstart_deposits,json=chainstartDeposits,proto3" json:"chainstart_deposits,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ChainStartData) Reset() { *m = ChainStartData{} }
|
|
func (m *ChainStartData) String() string { return proto.CompactTextString(m) }
|
|
func (*ChainStartData) ProtoMessage() {}
|
|
func (*ChainStartData) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_338787f8da2f3d61, []int{2}
|
|
}
|
|
func (m *ChainStartData) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ChainStartData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ChainStartData.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *ChainStartData) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ChainStartData.Merge(m, src)
|
|
}
|
|
func (m *ChainStartData) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ChainStartData) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ChainStartData.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ChainStartData proto.InternalMessageInfo
|
|
|
|
func (m *ChainStartData) GetChainstarted() bool {
|
|
if m != nil {
|
|
return m.Chainstarted
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (m *ChainStartData) GetGenesisTime() uint64 {
|
|
if m != nil {
|
|
return m.GenesisTime
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *ChainStartData) GetGenesisBlock() uint64 {
|
|
if m != nil {
|
|
return m.GenesisBlock
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *ChainStartData) GetEth1Data() *v1alpha1.Eth1Data {
|
|
if m != nil {
|
|
return m.Eth1Data
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ChainStartData) GetChainstartDeposits() []*v1alpha1.Deposit {
|
|
if m != nil {
|
|
return m.ChainstartDeposits
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type SparseMerkleTrie struct {
|
|
Depth uint64 `protobuf:"varint,1,opt,name=depth,proto3" json:"depth,omitempty"`
|
|
Layers []*TrieLayer `protobuf:"bytes,2,rep,name=layers,proto3" json:"layers,omitempty"`
|
|
OriginalItems [][]byte `protobuf:"bytes,3,rep,name=original_items,json=originalItems,proto3" json:"original_items,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *SparseMerkleTrie) Reset() { *m = SparseMerkleTrie{} }
|
|
func (m *SparseMerkleTrie) String() string { return proto.CompactTextString(m) }
|
|
func (*SparseMerkleTrie) ProtoMessage() {}
|
|
func (*SparseMerkleTrie) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_338787f8da2f3d61, []int{3}
|
|
}
|
|
func (m *SparseMerkleTrie) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *SparseMerkleTrie) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_SparseMerkleTrie.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *SparseMerkleTrie) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_SparseMerkleTrie.Merge(m, src)
|
|
}
|
|
func (m *SparseMerkleTrie) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *SparseMerkleTrie) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_SparseMerkleTrie.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_SparseMerkleTrie proto.InternalMessageInfo
|
|
|
|
func (m *SparseMerkleTrie) GetDepth() uint64 {
|
|
if m != nil {
|
|
return m.Depth
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *SparseMerkleTrie) GetLayers() []*TrieLayer {
|
|
if m != nil {
|
|
return m.Layers
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *SparseMerkleTrie) GetOriginalItems() [][]byte {
|
|
if m != nil {
|
|
return m.OriginalItems
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type TrieLayer struct {
|
|
Layer [][]byte `protobuf:"bytes,1,rep,name=layer,proto3" json:"layer,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *TrieLayer) Reset() { *m = TrieLayer{} }
|
|
func (m *TrieLayer) String() string { return proto.CompactTextString(m) }
|
|
func (*TrieLayer) ProtoMessage() {}
|
|
func (*TrieLayer) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_338787f8da2f3d61, []int{4}
|
|
}
|
|
func (m *TrieLayer) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *TrieLayer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_TrieLayer.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *TrieLayer) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_TrieLayer.Merge(m, src)
|
|
}
|
|
func (m *TrieLayer) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *TrieLayer) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_TrieLayer.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_TrieLayer proto.InternalMessageInfo
|
|
|
|
func (m *TrieLayer) GetLayer() [][]byte {
|
|
if m != nil {
|
|
return m.Layer
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type DepositContainer struct {
|
|
Index int64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
|
|
Eth1BlockHeight uint64 `protobuf:"varint,2,opt,name=eth1_block_height,json=eth1BlockHeight,proto3" json:"eth1_block_height,omitempty"`
|
|
Deposit *v1alpha1.Deposit `protobuf:"bytes,3,opt,name=deposit,proto3" json:"deposit,omitempty"`
|
|
DepositRoot []byte `protobuf:"bytes,4,opt,name=deposit_root,json=depositRoot,proto3" json:"deposit_root,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *DepositContainer) Reset() { *m = DepositContainer{} }
|
|
func (m *DepositContainer) String() string { return proto.CompactTextString(m) }
|
|
func (*DepositContainer) ProtoMessage() {}
|
|
func (*DepositContainer) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_338787f8da2f3d61, []int{5}
|
|
}
|
|
func (m *DepositContainer) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *DepositContainer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_DepositContainer.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *DepositContainer) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_DepositContainer.Merge(m, src)
|
|
}
|
|
func (m *DepositContainer) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *DepositContainer) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_DepositContainer.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_DepositContainer proto.InternalMessageInfo
|
|
|
|
func (m *DepositContainer) GetIndex() int64 {
|
|
if m != nil {
|
|
return m.Index
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *DepositContainer) GetEth1BlockHeight() uint64 {
|
|
if m != nil {
|
|
return m.Eth1BlockHeight
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *DepositContainer) GetDeposit() *v1alpha1.Deposit {
|
|
if m != nil {
|
|
return m.Deposit
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *DepositContainer) GetDepositRoot() []byte {
|
|
if m != nil {
|
|
return m.DepositRoot
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*ETH1ChainData)(nil), "prysm.beacon.db.ETH1ChainData")
|
|
proto.RegisterType((*LatestETH1Data)(nil), "prysm.beacon.db.LatestETH1Data")
|
|
proto.RegisterType((*ChainStartData)(nil), "prysm.beacon.db.ChainStartData")
|
|
proto.RegisterType((*SparseMerkleTrie)(nil), "prysm.beacon.db.SparseMerkleTrie")
|
|
proto.RegisterType((*TrieLayer)(nil), "prysm.beacon.db.TrieLayer")
|
|
proto.RegisterType((*DepositContainer)(nil), "prysm.beacon.db.DepositContainer")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("proto/beacon/db/powchain.proto", fileDescriptor_338787f8da2f3d61) }
|
|
|
|
var fileDescriptor_338787f8da2f3d61 = []byte{
|
|
// 666 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0xcf, 0x4e, 0xdb, 0x4e,
|
|
0x10, 0x96, 0x93, 0xc0, 0x0f, 0x36, 0x21, 0x81, 0xfd, 0x71, 0x88, 0x90, 0x1a, 0x20, 0xa8, 0x12,
|
|
0xea, 0xc1, 0x6e, 0x52, 0x55, 0xea, 0x81, 0x53, 0x80, 0x2a, 0x55, 0xa9, 0x5a, 0x2d, 0x9c, 0x7a,
|
|
0x89, 0xd6, 0xf1, 0x28, 0x5e, 0xe1, 0xd8, 0xae, 0x77, 0x42, 0xcb, 0xb9, 0xc7, 0x3e, 0x46, 0x9f,
|
|
0xa0, 0x6f, 0xd1, 0x63, 0x1f, 0xa1, 0xe2, 0x25, 0x7a, 0xad, 0x76, 0x76, 0x4d, 0x48, 0x00, 0xf5,
|
|
0x38, 0x33, 0xdf, 0xf7, 0xed, 0xfc, 0xf9, 0x6c, 0xd6, 0xc9, 0x8b, 0x0c, 0xb3, 0x20, 0x04, 0x39,
|
|
0xce, 0xd2, 0x20, 0x0a, 0x83, 0x3c, 0xfb, 0x3c, 0x8e, 0xa5, 0x4a, 0x7d, 0x2a, 0xf0, 0x56, 0x5e,
|
|
0x5c, 0xeb, 0xa9, 0x6f, 0xeb, 0x7e, 0x14, 0xee, 0xec, 0x02, 0xc6, 0xc1, 0x55, 0x4f, 0x26, 0x79,
|
|
0x2c, 0x7b, 0x8e, 0x37, 0x0a, 0x93, 0x6c, 0x7c, 0x69, 0x19, 0x3b, 0xbb, 0x0b, 0x8a, 0x79, 0x3f,
|
|
0x0f, 0xae, 0x7a, 0x01, 0x5e, 0xe7, 0xa0, 0x2d, 0xa0, 0xfb, 0xa7, 0xc2, 0x36, 0x4e, 0x2f, 0x86,
|
|
0xbd, 0x63, 0xf3, 0xcc, 0x89, 0x44, 0xc9, 0xdf, 0xb2, 0xad, 0xf1, 0xac, 0x28, 0x20, 0xc5, 0x11,
|
|
0x60, 0xdc, 0x1b, 0x45, 0x12, 0x65, 0xdb, 0xdb, 0xf3, 0x0e, 0xeb, 0xfd, 0x5d, 0x7f, 0xa9, 0x01,
|
|
0xff, 0x4c, 0x22, 0x68, 0x34, 0x02, 0x86, 0x2b, 0x5a, 0x8e, 0x79, 0x8a, 0x31, 0x25, 0xf8, 0x90,
|
|
0xb5, 0x68, 0x00, 0x8d, 0xb2, 0x40, 0x2b, 0x55, 0x79, 0x44, 0x8a, 0x3a, 0x38, 0x37, 0x38, 0x92,
|
|
0x6a, 0xce, 0x79, 0xa4, 0xf4, 0x9a, 0x35, 0xdc, 0x7c, 0x1a, 0x25, 0x42, 0xbb, 0x4a, 0x32, 0x07,
|
|
0x3e, 0x60, 0x0c, 0x05, 0xcc, 0x6e, 0x95, 0xf2, 0x7e, 0xee, 0x5f, 0xf5, 0xfc, 0x01, 0x45, 0xe7,
|
|
0x06, 0x2a, 0xea, 0xe1, 0x3c, 0xe0, 0x2f, 0x59, 0x0d, 0x0b, 0x05, 0xed, 0x1a, 0xf1, 0xf7, 0xef,
|
|
0xb5, 0x71, 0x9e, 0xcb, 0x42, 0xc3, 0x3b, 0x28, 0x2e, 0x13, 0xb8, 0x28, 0x14, 0x08, 0x82, 0xf3,
|
|
0x0f, 0x8c, 0x47, 0x90, 0x67, 0x5a, 0xe1, 0x68, 0x9c, 0xa5, 0x28, 0x55, 0x0a, 0x85, 0x6e, 0xaf,
|
|
0xec, 0x55, 0x1f, 0x14, 0x39, 0xb1, 0xd0, 0xe3, 0x12, 0x29, 0xb6, 0xa2, 0xa5, 0x8c, 0xee, 0x7e,
|
|
0xf7, 0x58, 0x73, 0x71, 0x7d, 0x7c, 0x9f, 0x35, 0xe8, 0x78, 0xa3, 0x18, 0xd4, 0x24, 0x46, 0x5a,
|
|
0x55, 0x4d, 0xd4, 0x29, 0x37, 0xa4, 0x14, 0x7f, 0xc2, 0x98, 0x85, 0xa0, 0x9a, 0xda, 0x25, 0xd4,
|
|
0xc4, 0x3a, 0x65, 0x2e, 0xd4, 0x14, 0xe6, 0xe5, 0x58, 0xea, 0x98, 0x66, 0x6c, 0xb8, 0xf2, 0x50,
|
|
0xea, 0x98, 0x3f, 0x67, 0xdb, 0x89, 0xd4, 0x38, 0x2a, 0xe0, 0xd3, 0x0c, 0x34, 0x42, 0x64, 0xcd,
|
|
0xd2, 0x5e, 0x21, 0x1d, 0x6e, 0x6a, 0xa2, 0x2c, 0x0d, 0x4c, 0xa5, 0xfb, 0xad, 0xc2, 0x9a, 0x8b,
|
|
0x97, 0xe1, 0x5d, 0xd6, 0x98, 0xdf, 0x06, 0x22, 0xf2, 0xc6, 0x9a, 0x58, 0xc8, 0x99, 0x49, 0x26,
|
|
0x90, 0x82, 0x56, 0xda, 0x36, 0xea, 0x26, 0x71, 0x39, 0x6a, 0xf5, 0x80, 0x6d, 0x94, 0x10, 0xdb,
|
|
0x84, 0x1d, 0xa6, 0xe4, 0xd1, 0xf3, 0xfc, 0x88, 0xad, 0xcf, 0x4d, 0x58, 0x73, 0xce, 0xb9, 0x3d,
|
|
0x39, 0x60, 0xec, 0x97, 0xee, 0xf7, 0x4b, 0xcf, 0x89, 0x35, 0x28, 0xdd, 0xf7, 0x9e, 0xfd, 0x7f,
|
|
0xd7, 0x7d, 0xf6, 0x04, 0xe5, 0xd5, 0x3a, 0x8f, 0xe8, 0xb8, 0xdb, 0x09, 0x7e, 0xc7, 0x80, 0x8e,
|
|
0xd9, 0xfd, 0xea, 0xb1, 0xcd, 0x65, 0x83, 0xf0, 0x6d, 0xb6, 0x12, 0x41, 0x8e, 0x31, 0x2d, 0xa2,
|
|
0x26, 0x6c, 0xc0, 0xfb, 0x6c, 0x35, 0x91, 0xd7, 0xc6, 0x24, 0x15, 0x7a, 0x6e, 0xe7, 0x9e, 0x49,
|
|
0x0c, 0xf9, 0xcc, 0x40, 0x84, 0x43, 0xf2, 0xa7, 0xac, 0x99, 0x15, 0x6a, 0xa2, 0x52, 0x99, 0x8c,
|
|
0x14, 0xc2, 0x54, 0xb7, 0xab, 0x7b, 0xd5, 0xc3, 0x86, 0xd8, 0x28, 0xb3, 0x6f, 0x4c, 0xb2, 0xbb,
|
|
0xcf, 0xd6, 0x6f, 0xb9, 0xe6, 0x75, 0x62, 0xb7, 0x3d, 0x82, 0xda, 0xa0, 0xfb, 0xc3, 0x63, 0x9b,
|
|
0xcb, 0x26, 0x34, 0x50, 0x95, 0x46, 0xf0, 0x85, 0x1a, 0xad, 0x0a, 0x1b, 0xf0, 0x67, 0x6c, 0x8b,
|
|
0x56, 0xfc, 0x80, 0xf3, 0x5a, 0xa6, 0x30, 0xb8, 0xe3, 0xbe, 0x57, 0xec, 0x3f, 0xb7, 0x45, 0xf7,
|
|
0xfd, 0xfd, 0x6b, 0x89, 0x25, 0xdc, 0x18, 0xa2, 0xfc, 0x7e, 0x8a, 0x2c, 0x43, 0x67, 0xcd, 0xba,
|
|
0xcb, 0x89, 0x2c, 0xc3, 0xc1, 0xd1, 0xcf, 0x9b, 0x8e, 0xf7, 0xeb, 0xa6, 0xe3, 0xfd, 0xbe, 0xe9,
|
|
0x78, 0x1f, 0xfd, 0x89, 0xc2, 0x78, 0x16, 0xfa, 0xe3, 0x6c, 0x1a, 0xd0, 0xe6, 0x24, 0xaa, 0x71,
|
|
0x22, 0x43, 0x6d, 0xa3, 0x60, 0xe9, 0x57, 0x19, 0xae, 0x52, 0xe2, 0xc5, 0xdf, 0x00, 0x00, 0x00,
|
|
0xff, 0xff, 0x45, 0x35, 0x8c, 0x86, 0x44, 0x05, 0x00, 0x00,
|
|
}
|
|
|
|
func (m *ETH1ChainData) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *ETH1ChainData) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *ETH1ChainData) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.DepositContainers) > 0 {
|
|
for iNdEx := len(m.DepositContainers) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.DepositContainers[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintPowchain(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x2a
|
|
}
|
|
}
|
|
if m.Trie != nil {
|
|
{
|
|
size, err := m.Trie.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintPowchain(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x22
|
|
}
|
|
if m.BeaconState != nil {
|
|
{
|
|
size, err := m.BeaconState.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintPowchain(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if m.ChainstartData != nil {
|
|
{
|
|
size, err := m.ChainstartData.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintPowchain(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if m.CurrentEth1Data != nil {
|
|
{
|
|
size, err := m.CurrentEth1Data.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintPowchain(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *LatestETH1Data) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *LatestETH1Data) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *LatestETH1Data) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if m.LastRequestedBlock != 0 {
|
|
i = encodeVarintPowchain(dAtA, i, uint64(m.LastRequestedBlock))
|
|
i--
|
|
dAtA[i] = 0x28
|
|
}
|
|
if len(m.BlockHash) > 0 {
|
|
i -= len(m.BlockHash)
|
|
copy(dAtA[i:], m.BlockHash)
|
|
i = encodeVarintPowchain(dAtA, i, uint64(len(m.BlockHash)))
|
|
i--
|
|
dAtA[i] = 0x22
|
|
}
|
|
if m.BlockTime != 0 {
|
|
i = encodeVarintPowchain(dAtA, i, uint64(m.BlockTime))
|
|
i--
|
|
dAtA[i] = 0x18
|
|
}
|
|
if m.BlockHeight != 0 {
|
|
i = encodeVarintPowchain(dAtA, i, uint64(m.BlockHeight))
|
|
i--
|
|
dAtA[i] = 0x10
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *ChainStartData) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *ChainStartData) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *ChainStartData) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.ChainstartDeposits) > 0 {
|
|
for iNdEx := len(m.ChainstartDeposits) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.ChainstartDeposits[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintPowchain(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x2a
|
|
}
|
|
}
|
|
if m.Eth1Data != nil {
|
|
{
|
|
size, err := m.Eth1Data.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintPowchain(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x22
|
|
}
|
|
if m.GenesisBlock != 0 {
|
|
i = encodeVarintPowchain(dAtA, i, uint64(m.GenesisBlock))
|
|
i--
|
|
dAtA[i] = 0x18
|
|
}
|
|
if m.GenesisTime != 0 {
|
|
i = encodeVarintPowchain(dAtA, i, uint64(m.GenesisTime))
|
|
i--
|
|
dAtA[i] = 0x10
|
|
}
|
|
if m.Chainstarted {
|
|
i--
|
|
if m.Chainstarted {
|
|
dAtA[i] = 1
|
|
} else {
|
|
dAtA[i] = 0
|
|
}
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *SparseMerkleTrie) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *SparseMerkleTrie) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *SparseMerkleTrie) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.OriginalItems) > 0 {
|
|
for iNdEx := len(m.OriginalItems) - 1; iNdEx >= 0; iNdEx-- {
|
|
i -= len(m.OriginalItems[iNdEx])
|
|
copy(dAtA[i:], m.OriginalItems[iNdEx])
|
|
i = encodeVarintPowchain(dAtA, i, uint64(len(m.OriginalItems[iNdEx])))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
}
|
|
if len(m.Layers) > 0 {
|
|
for iNdEx := len(m.Layers) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Layers[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintPowchain(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
}
|
|
if m.Depth != 0 {
|
|
i = encodeVarintPowchain(dAtA, i, uint64(m.Depth))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *TrieLayer) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *TrieLayer) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *TrieLayer) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.Layer) > 0 {
|
|
for iNdEx := len(m.Layer) - 1; iNdEx >= 0; iNdEx-- {
|
|
i -= len(m.Layer[iNdEx])
|
|
copy(dAtA[i:], m.Layer[iNdEx])
|
|
i = encodeVarintPowchain(dAtA, i, uint64(len(m.Layer[iNdEx])))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *DepositContainer) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *DepositContainer) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *DepositContainer) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.DepositRoot) > 0 {
|
|
i -= len(m.DepositRoot)
|
|
copy(dAtA[i:], m.DepositRoot)
|
|
i = encodeVarintPowchain(dAtA, i, uint64(len(m.DepositRoot)))
|
|
i--
|
|
dAtA[i] = 0x22
|
|
}
|
|
if m.Deposit != nil {
|
|
{
|
|
size, err := m.Deposit.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintPowchain(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if m.Eth1BlockHeight != 0 {
|
|
i = encodeVarintPowchain(dAtA, i, uint64(m.Eth1BlockHeight))
|
|
i--
|
|
dAtA[i] = 0x10
|
|
}
|
|
if m.Index != 0 {
|
|
i = encodeVarintPowchain(dAtA, i, uint64(m.Index))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func encodeVarintPowchain(dAtA []byte, offset int, v uint64) int {
|
|
offset -= sovPowchain(v)
|
|
base := offset
|
|
for v >= 1<<7 {
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
v >>= 7
|
|
offset++
|
|
}
|
|
dAtA[offset] = uint8(v)
|
|
return base
|
|
}
|
|
func (m *ETH1ChainData) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.CurrentEth1Data != nil {
|
|
l = m.CurrentEth1Data.Size()
|
|
n += 1 + l + sovPowchain(uint64(l))
|
|
}
|
|
if m.ChainstartData != nil {
|
|
l = m.ChainstartData.Size()
|
|
n += 1 + l + sovPowchain(uint64(l))
|
|
}
|
|
if m.BeaconState != nil {
|
|
l = m.BeaconState.Size()
|
|
n += 1 + l + sovPowchain(uint64(l))
|
|
}
|
|
if m.Trie != nil {
|
|
l = m.Trie.Size()
|
|
n += 1 + l + sovPowchain(uint64(l))
|
|
}
|
|
if len(m.DepositContainers) > 0 {
|
|
for _, e := range m.DepositContainers {
|
|
l = e.Size()
|
|
n += 1 + l + sovPowchain(uint64(l))
|
|
}
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *LatestETH1Data) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.BlockHeight != 0 {
|
|
n += 1 + sovPowchain(uint64(m.BlockHeight))
|
|
}
|
|
if m.BlockTime != 0 {
|
|
n += 1 + sovPowchain(uint64(m.BlockTime))
|
|
}
|
|
l = len(m.BlockHash)
|
|
if l > 0 {
|
|
n += 1 + l + sovPowchain(uint64(l))
|
|
}
|
|
if m.LastRequestedBlock != 0 {
|
|
n += 1 + sovPowchain(uint64(m.LastRequestedBlock))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ChainStartData) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Chainstarted {
|
|
n += 2
|
|
}
|
|
if m.GenesisTime != 0 {
|
|
n += 1 + sovPowchain(uint64(m.GenesisTime))
|
|
}
|
|
if m.GenesisBlock != 0 {
|
|
n += 1 + sovPowchain(uint64(m.GenesisBlock))
|
|
}
|
|
if m.Eth1Data != nil {
|
|
l = m.Eth1Data.Size()
|
|
n += 1 + l + sovPowchain(uint64(l))
|
|
}
|
|
if len(m.ChainstartDeposits) > 0 {
|
|
for _, e := range m.ChainstartDeposits {
|
|
l = e.Size()
|
|
n += 1 + l + sovPowchain(uint64(l))
|
|
}
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *SparseMerkleTrie) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Depth != 0 {
|
|
n += 1 + sovPowchain(uint64(m.Depth))
|
|
}
|
|
if len(m.Layers) > 0 {
|
|
for _, e := range m.Layers {
|
|
l = e.Size()
|
|
n += 1 + l + sovPowchain(uint64(l))
|
|
}
|
|
}
|
|
if len(m.OriginalItems) > 0 {
|
|
for _, b := range m.OriginalItems {
|
|
l = len(b)
|
|
n += 1 + l + sovPowchain(uint64(l))
|
|
}
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *TrieLayer) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if len(m.Layer) > 0 {
|
|
for _, b := range m.Layer {
|
|
l = len(b)
|
|
n += 1 + l + sovPowchain(uint64(l))
|
|
}
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *DepositContainer) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Index != 0 {
|
|
n += 1 + sovPowchain(uint64(m.Index))
|
|
}
|
|
if m.Eth1BlockHeight != 0 {
|
|
n += 1 + sovPowchain(uint64(m.Eth1BlockHeight))
|
|
}
|
|
if m.Deposit != nil {
|
|
l = m.Deposit.Size()
|
|
n += 1 + l + sovPowchain(uint64(l))
|
|
}
|
|
l = len(m.DepositRoot)
|
|
if l > 0 {
|
|
n += 1 + l + sovPowchain(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func sovPowchain(x uint64) (n int) {
|
|
return (math_bits.Len64(x|1) + 6) / 7
|
|
}
|
|
func sozPowchain(x uint64) (n int) {
|
|
return sovPowchain(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (m *ETH1ChainData) 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 ErrIntOverflowPowchain
|
|
}
|
|
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: ETH1ChainData: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ETH1ChainData: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field CurrentEth1Data", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowPowchain
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.CurrentEth1Data == nil {
|
|
m.CurrentEth1Data = &LatestETH1Data{}
|
|
}
|
|
if err := m.CurrentEth1Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ChainstartData", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowPowchain
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.ChainstartData == nil {
|
|
m.ChainstartData = &ChainStartData{}
|
|
}
|
|
if err := m.ChainstartData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field BeaconState", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowPowchain
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.BeaconState == nil {
|
|
m.BeaconState = &v1.BeaconState{}
|
|
}
|
|
if err := m.BeaconState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Trie", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowPowchain
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Trie == nil {
|
|
m.Trie = &SparseMerkleTrie{}
|
|
}
|
|
if err := m.Trie.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 5:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field DepositContainers", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowPowchain
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.DepositContainers = append(m.DepositContainers, &DepositContainer{})
|
|
if err := m.DepositContainers[len(m.DepositContainers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipPowchain(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
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 *LatestETH1Data) 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 ErrIntOverflowPowchain
|
|
}
|
|
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: LatestETH1Data: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: LatestETH1Data: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType)
|
|
}
|
|
m.BlockHeight = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowPowchain
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.BlockHeight |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 3:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field BlockTime", wireType)
|
|
}
|
|
m.BlockTime = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowPowchain
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.BlockTime |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 4:
|
|
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 ErrIntOverflowPowchain
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.BlockHash = append(m.BlockHash[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.BlockHash == nil {
|
|
m.BlockHash = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 5:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field LastRequestedBlock", wireType)
|
|
}
|
|
m.LastRequestedBlock = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowPowchain
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.LastRequestedBlock |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipPowchain(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
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 *ChainStartData) 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 ErrIntOverflowPowchain
|
|
}
|
|
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: ChainStartData: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ChainStartData: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Chainstarted", wireType)
|
|
}
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowPowchain
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Chainstarted = bool(v != 0)
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field GenesisTime", wireType)
|
|
}
|
|
m.GenesisTime = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowPowchain
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.GenesisTime |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 3:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field GenesisBlock", wireType)
|
|
}
|
|
m.GenesisBlock = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowPowchain
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.GenesisBlock |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 4:
|
|
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 ErrIntOverflowPowchain
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Eth1Data == nil {
|
|
m.Eth1Data = &v1alpha1.Eth1Data{}
|
|
}
|
|
if err := m.Eth1Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 5:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ChainstartDeposits", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowPowchain
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.ChainstartDeposits = append(m.ChainstartDeposits, &v1alpha1.Deposit{})
|
|
if err := m.ChainstartDeposits[len(m.ChainstartDeposits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipPowchain(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
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 *SparseMerkleTrie) 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 ErrIntOverflowPowchain
|
|
}
|
|
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: SparseMerkleTrie: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: SparseMerkleTrie: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Depth", wireType)
|
|
}
|
|
m.Depth = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowPowchain
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Depth |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Layers", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowPowchain
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Layers = append(m.Layers, &TrieLayer{})
|
|
if err := m.Layers[len(m.Layers)-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 OriginalItems", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowPowchain
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.OriginalItems = append(m.OriginalItems, make([]byte, postIndex-iNdEx))
|
|
copy(m.OriginalItems[len(m.OriginalItems)-1], dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipPowchain(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
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 *TrieLayer) 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 ErrIntOverflowPowchain
|
|
}
|
|
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: TrieLayer: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: TrieLayer: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Layer", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowPowchain
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Layer = append(m.Layer, make([]byte, postIndex-iNdEx))
|
|
copy(m.Layer[len(m.Layer)-1], dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipPowchain(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
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 *DepositContainer) 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 ErrIntOverflowPowchain
|
|
}
|
|
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: DepositContainer: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: DepositContainer: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
|
|
}
|
|
m.Index = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowPowchain
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Index |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Eth1BlockHeight", wireType)
|
|
}
|
|
m.Eth1BlockHeight = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowPowchain
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Eth1BlockHeight |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowPowchain
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Deposit == nil {
|
|
m.Deposit = &v1alpha1.Deposit{}
|
|
}
|
|
if err := m.Deposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 4:
|
|
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 ErrIntOverflowPowchain
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.DepositRoot = append(m.DepositRoot[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.DepositRoot == nil {
|
|
m.DepositRoot = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipPowchain(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthPowchain
|
|
}
|
|
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 skipPowchain(dAtA []byte) (n int, err error) {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
depth := 0
|
|
for iNdEx < l {
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowPowchain
|
|
}
|
|
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, ErrIntOverflowPowchain
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx++
|
|
if dAtA[iNdEx-1] < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 1:
|
|
iNdEx += 8
|
|
case 2:
|
|
var length int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowPowchain
|
|
}
|
|
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, ErrInvalidLengthPowchain
|
|
}
|
|
iNdEx += length
|
|
case 3:
|
|
depth++
|
|
case 4:
|
|
if depth == 0 {
|
|
return 0, ErrUnexpectedEndOfGroupPowchain
|
|
}
|
|
depth--
|
|
case 5:
|
|
iNdEx += 4
|
|
default:
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
}
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthPowchain
|
|
}
|
|
if depth == 0 {
|
|
return iNdEx, nil
|
|
}
|
|
}
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
|
|
var (
|
|
ErrInvalidLengthPowchain = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowPowchain = fmt.Errorf("proto: integer overflow")
|
|
ErrUnexpectedEndOfGroupPowchain = fmt.Errorf("proto: unexpected end of group")
|
|
)
|