// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: common.proto

/*
	Package blockchain is a generated protocol buffer package.

	It is generated from these files:
		common.proto

	It has these top-level messages:
		BigInt
		Account
		Transaction
		STransaction
		TransactionProto
		Txdata
		Coinbase
		TxBlockHdr
		TxBlockData
		TxBlock
		PoWHdr
		PoW
		KeyBlockHdr
		KeyBlock
*/
package blockchain

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"

import binary "encoding/binary"

import io "io"

// 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.ProtoPackageIsVersion2 // please upgrade the proto package

type BigInt struct {
	Neg bool   `protobuf:"varint,1,opt,name=neg,proto3" json:"neg,omitempty"`
	Abs []byte `protobuf:"bytes,2,opt,name=abs,proto3" json:"abs,omitempty"`
}

func (m *BigInt) Reset()                    { *m = BigInt{} }
func (m *BigInt) String() string            { return proto.CompactTextString(m) }
func (*BigInt) ProtoMessage()               {}
func (*BigInt) Descriptor() ([]byte, []int) { return fileDescriptorCommon, []int{0} }

func (m *BigInt) GetNeg() bool {
	if m != nil {
		return m.Neg
	}
	return false
}

func (m *BigInt) GetAbs() []byte {
	if m != nil {
		return m.Abs
	}
	return nil
}

// Accounts
type Account struct {
	Version  uint32 `protobuf:"varint,1,opt,name=Version,proto3" json:"Version,omitempty"`
	Type     uint32 `protobuf:"varint,2,opt,name=Type,proto3" json:"Type,omitempty"`
	Address  []byte `protobuf:"bytes,3,opt,name=Address,proto3" json:"Address,omitempty"`
	Latency  uint32 `protobuf:"varint,4,opt,name=Latency,proto3" json:"Latency,omitempty"`
	Balance  []byte `protobuf:"bytes,5,opt,name=Balance,proto3" json:"Balance,omitempty"`
	CodeHash []byte `protobuf:"bytes,6,opt,name=CodeHash,proto3" json:"CodeHash,omitempty"`
	StgRoot  []byte `protobuf:"bytes,7,opt,name=StgRoot,proto3" json:"StgRoot,omitempty"`
}

func (m *Account) Reset()                    { *m = Account{} }
func (m *Account) String() string            { return proto.CompactTextString(m) }
func (*Account) ProtoMessage()               {}
func (*Account) Descriptor() ([]byte, []int) { return fileDescriptorCommon, []int{1} }

func (m *Account) GetVersion() uint32 {
	if m != nil {
		return m.Version
	}
	return 0
}

func (m *Account) GetType() uint32 {
	if m != nil {
		return m.Type
	}
	return 0
}

func (m *Account) GetAddress() []byte {
	if m != nil {
		return m.Address
	}
	return nil
}

func (m *Account) GetLatency() uint32 {
	if m != nil {
		return m.Latency
	}
	return 0
}

func (m *Account) GetBalance() []byte {
	if m != nil {
		return m.Balance
	}
	return nil
}

func (m *Account) GetCodeHash() []byte {
	if m != nil {
		return m.CodeHash
	}
	return nil
}

func (m *Account) GetStgRoot() []byte {
	if m != nil {
		return m.StgRoot
	}
	return nil
}

type Transaction struct {
	Version   uint32 `protobuf:"varint,1,opt,name=Version,proto3" json:"Version,omitempty"`
	SenderKey []byte `protobuf:"bytes,3,opt,name=SenderKey,proto3" json:"SenderKey,omitempty"`
	Recipient []byte `protobuf:"bytes,4,opt,name=Recipient,proto3" json:"Recipient,omitempty"`
	Quantity  []byte `protobuf:"bytes,5,opt,name=Quantity,proto3" json:"Quantity,omitempty"`
	Data      []byte `protobuf:"bytes,6,opt,name=Data,proto3" json:"Data,omitempty"`
	AvailGas  uint64 `protobuf:"varint,7,opt,name=AvailGas,proto3" json:"AvailGas,omitempty"`
	GasPrice  []byte `protobuf:"bytes,8,opt,name=GasPrice,proto3" json:"GasPrice,omitempty"`
}

func (m *Transaction) Reset()                    { *m = Transaction{} }
func (m *Transaction) String() string            { return proto.CompactTextString(m) }
func (*Transaction) ProtoMessage()               {}
func (*Transaction) Descriptor() ([]byte, []int) { return fileDescriptorCommon, []int{2} }

func (m *Transaction) GetVersion() uint32 {
	if m != nil {
		return m.Version
	}
	return 0
}

func (m *Transaction) GetSenderKey() []byte {
	if m != nil {
		return m.SenderKey
	}
	return nil
}

func (m *Transaction) GetRecipient() []byte {
	if m != nil {
		return m.Recipient
	}
	return nil
}

func (m *Transaction) GetQuantity() []byte {
	if m != nil {
		return m.Quantity
	}
	return nil
}

func (m *Transaction) GetData() []byte {
	if m != nil {
		return m.Data
	}
	return nil
}

func (m *Transaction) GetAvailGas() uint64 {
	if m != nil {
		return m.AvailGas
	}
	return 0
}

func (m *Transaction) GetGasPrice() []byte {
	if m != nil {
		return m.GasPrice
	}
	return nil
}

type STransaction struct {
	Tx        *Transaction `protobuf:"bytes,1,opt,name=tx" json:"tx,omitempty"`
	SenderSig []byte       `protobuf:"bytes,2,opt,name=SenderSig,proto3" json:"SenderSig,omitempty"`
}

func (m *STransaction) Reset()                    { *m = STransaction{} }
func (m *STransaction) String() string            { return proto.CompactTextString(m) }
func (*STransaction) ProtoMessage()               {}
func (*STransaction) Descriptor() ([]byte, []int) { return fileDescriptorCommon, []int{3} }

func (m *STransaction) GetTx() *Transaction {
	if m != nil {
		return m.Tx
	}
	return nil
}

func (m *STransaction) GetSenderSig() []byte {
	if m != nil {
		return m.SenderSig
	}
	return nil
}

type TransactionProto struct {
	Data  *Txdata `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
	Hash  []byte  `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
	Size_ float64 `protobuf:"fixed64,3,opt,name=size,proto3" json:"size,omitempty"`
	From  []byte  `protobuf:"bytes,4,opt,name=from,proto3" json:"from,omitempty"`
}

func (m *TransactionProto) Reset()                    { *m = TransactionProto{} }
func (m *TransactionProto) String() string            { return proto.CompactTextString(m) }
func (*TransactionProto) ProtoMessage()               {}
func (*TransactionProto) Descriptor() ([]byte, []int) { return fileDescriptorCommon, []int{4} }

func (m *TransactionProto) GetData() *Txdata {
	if m != nil {
		return m.Data
	}
	return nil
}

func (m *TransactionProto) GetHash() []byte {
	if m != nil {
		return m.Hash
	}
	return nil
}

func (m *TransactionProto) GetSize_() float64 {
	if m != nil {
		return m.Size_
	}
	return 0
}

func (m *TransactionProto) GetFrom() []byte {
	if m != nil {
		return m.From
	}
	return nil
}

type Txdata struct {
	Version      uint32  `protobuf:"varint,1,opt,name=Version,proto3" json:"Version,omitempty"`
	SenderKey    []byte  `protobuf:"bytes,2,opt,name=SenderKey,proto3" json:"SenderKey,omitempty"`
	Recipient    []byte  `protobuf:"bytes,3,opt,name=Recipient,proto3" json:"Recipient,omitempty"`
	Amount       *BigInt `protobuf:"bytes,4,opt,name=Amount" json:"Amount,omitempty"`
	Payload      []byte  `protobuf:"bytes,5,opt,name=Payload,proto3" json:"Payload,omitempty"`
	GasLimit     uint64  `protobuf:"varint,6,opt,name=GasLimit,proto3" json:"GasLimit,omitempty"`
	Price        []byte  `protobuf:"bytes,7,opt,name=Price,proto3" json:"Price,omitempty"`
	AccountNonce uint64  `protobuf:"varint,8,opt,name=AccountNonce,proto3" json:"AccountNonce,omitempty"`
	V            []byte  `protobuf:"bytes,9,opt,name=V,proto3" json:"V,omitempty"`
	R            []byte  `protobuf:"bytes,10,opt,name=R,proto3" json:"R,omitempty"`
	S            []byte  `protobuf:"bytes,11,opt,name=S,proto3" json:"S,omitempty"`
}

func (m *Txdata) Reset()                    { *m = Txdata{} }
func (m *Txdata) String() string            { return proto.CompactTextString(m) }
func (*Txdata) ProtoMessage()               {}
func (*Txdata) Descriptor() ([]byte, []int) { return fileDescriptorCommon, []int{5} }

func (m *Txdata) GetVersion() uint32 {
	if m != nil {
		return m.Version
	}
	return 0
}

func (m *Txdata) GetSenderKey() []byte {
	if m != nil {
		return m.SenderKey
	}
	return nil
}

func (m *Txdata) GetRecipient() []byte {
	if m != nil {
		return m.Recipient
	}
	return nil
}

func (m *Txdata) GetAmount() *BigInt {
	if m != nil {
		return m.Amount
	}
	return nil
}

func (m *Txdata) GetPayload() []byte {
	if m != nil {
		return m.Payload
	}
	return nil
}

func (m *Txdata) GetGasLimit() uint64 {
	if m != nil {
		return m.GasLimit
	}
	return 0
}

func (m *Txdata) GetPrice() []byte {
	if m != nil {
		return m.Price
	}
	return nil
}

func (m *Txdata) GetAccountNonce() uint64 {
	if m != nil {
		return m.AccountNonce
	}
	return 0
}

func (m *Txdata) GetV() []byte {
	if m != nil {
		return m.V
	}
	return nil
}

func (m *Txdata) GetR() []byte {
	if m != nil {
		return m.R
	}
	return nil
}

func (m *Txdata) GetS() []byte {
	if m != nil {
		return m.S
	}
	return nil
}

type Coinbase struct {
	NumCommittee uint64 `protobuf:"varint,1,opt,name=NumCommittee,proto3" json:"NumCommittee,omitempty"`
	Committee    []byte `protobuf:"bytes,2,opt,name=Committee,proto3" json:"Committee,omitempty"`
	Quantity     []byte `protobuf:"bytes,3,opt,name=Quantity,proto3" json:"Quantity,omitempty"`
}

func (m *Coinbase) Reset()                    { *m = Coinbase{} }
func (m *Coinbase) String() string            { return proto.CompactTextString(m) }
func (*Coinbase) ProtoMessage()               {}
func (*Coinbase) Descriptor() ([]byte, []int) { return fileDescriptorCommon, []int{6} }

func (m *Coinbase) GetNumCommittee() uint64 {
	if m != nil {
		return m.NumCommittee
	}
	return 0
}

func (m *Coinbase) GetCommittee() []byte {
	if m != nil {
		return m.Committee
	}
	return nil
}

func (m *Coinbase) GetQuantity() []byte {
	if m != nil {
		return m.Quantity
	}
	return nil
}

type TxBlockHdr struct {
	Version   uint32 `protobuf:"varint,1,opt,name=Version,proto3" json:"Version,omitempty"`
	Type      uint32 `protobuf:"varint,2,opt,name=Type,proto3" json:"Type,omitempty"`
	GasLimit  []byte `protobuf:"bytes,3,opt,name=GasLimit,proto3" json:"GasLimit,omitempty"`
	GasUsed   []byte `protobuf:"bytes,4,opt,name=GasUsed,proto3" json:"GasUsed,omitempty"`
	KblkHash  []byte `protobuf:"bytes,5,opt,name=KblkHash,proto3" json:"KblkHash,omitempty"`
	PblkHash  []byte `protobuf:"bytes,6,opt,name=PblkHash,proto3" json:"PblkHash,omitempty"`
	PTblkHash []byte `protobuf:"bytes,7,opt,name=PTblkHash,proto3" json:"PTblkHash,omitempty"`
	Timestamp uint64 `protobuf:"varint,8,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"`
	StateRoot []byte `protobuf:"bytes,9,opt,name=StateRoot,proto3" json:"StateRoot,omitempty"`
	TxRoot    []byte `protobuf:"bytes,10,opt,name=TxRoot,proto3" json:"TxRoot,omitempty"`
}

func (m *TxBlockHdr) Reset()                    { *m = TxBlockHdr{} }
func (m *TxBlockHdr) String() string            { return proto.CompactTextString(m) }
func (*TxBlockHdr) ProtoMessage()               {}
func (*TxBlockHdr) Descriptor() ([]byte, []int) { return fileDescriptorCommon, []int{7} }

func (m *TxBlockHdr) GetVersion() uint32 {
	if m != nil {
		return m.Version
	}
	return 0
}

func (m *TxBlockHdr) GetType() uint32 {
	if m != nil {
		return m.Type
	}
	return 0
}

func (m *TxBlockHdr) GetGasLimit() []byte {
	if m != nil {
		return m.GasLimit
	}
	return nil
}

func (m *TxBlockHdr) GetGasUsed() []byte {
	if m != nil {
		return m.GasUsed
	}
	return nil
}

func (m *TxBlockHdr) GetKblkHash() []byte {
	if m != nil {
		return m.KblkHash
	}
	return nil
}

func (m *TxBlockHdr) GetPblkHash() []byte {
	if m != nil {
		return m.PblkHash
	}
	return nil
}

func (m *TxBlockHdr) GetPTblkHash() []byte {
	if m != nil {
		return m.PTblkHash
	}
	return nil
}

func (m *TxBlockHdr) GetTimestamp() uint64 {
	if m != nil {
		return m.Timestamp
	}
	return 0
}

func (m *TxBlockHdr) GetStateRoot() []byte {
	if m != nil {
		return m.StateRoot
	}
	return nil
}

func (m *TxBlockHdr) GetTxRoot() []byte {
	if m != nil {
		return m.TxRoot
	}
	return nil
}

type TxBlockData struct {
	StxCnt uint32          `protobuf:"varint,9,opt,name=StxCnt,proto3" json:"StxCnt,omitempty"`
	Stx    []*STransaction `protobuf:"bytes,10,rep,name=Stx" json:"Stx,omitempty"`
}

func (m *TxBlockData) Reset()                    { *m = TxBlockData{} }
func (m *TxBlockData) String() string            { return proto.CompactTextString(m) }
func (*TxBlockData) ProtoMessage()               {}
func (*TxBlockData) Descriptor() ([]byte, []int) { return fileDescriptorCommon, []int{8} }

func (m *TxBlockData) GetStxCnt() uint32 {
	if m != nil {
		return m.StxCnt
	}
	return 0
}

func (m *TxBlockData) GetStx() []*STransaction {
	if m != nil {
		return m.Stx
	}
	return nil
}

type TxBlock struct {
	Tbh          *TxBlockHdr  `protobuf:"bytes,1,opt,name=tbh" json:"tbh,omitempty"`
	Tbd          *TxBlockData `protobuf:"bytes,2,opt,name=tbd" json:"tbd,omitempty"`
	Coinbase     *Coinbase    `protobuf:"bytes,3,opt,name=Coinbase" json:"Coinbase,omitempty"`
	KblkCosiSign []byte       `protobuf:"bytes,4,opt,name=KblkCosiSign,proto3" json:"KblkCosiSign,omitempty"`
	KblkCosiAggr []byte       `protobuf:"bytes,5,opt,name=KblkCosiAggr,proto3" json:"KblkCosiAggr,omitempty"`
}

func (m *TxBlock) Reset()                    { *m = TxBlock{} }
func (m *TxBlock) String() string            { return proto.CompactTextString(m) }
func (*TxBlock) ProtoMessage()               {}
func (*TxBlock) Descriptor() ([]byte, []int) { return fileDescriptorCommon, []int{9} }

func (m *TxBlock) GetTbh() *TxBlockHdr {
	if m != nil {
		return m.Tbh
	}
	return nil
}

func (m *TxBlock) GetTbd() *TxBlockData {
	if m != nil {
		return m.Tbd
	}
	return nil
}

func (m *TxBlock) GetCoinbase() *Coinbase {
	if m != nil {
		return m.Coinbase
	}
	return nil
}

func (m *TxBlock) GetKblkCosiSign() []byte {
	if m != nil {
		return m.KblkCosiSign
	}
	return nil
}

func (m *TxBlock) GetKblkCosiAggr() []byte {
	if m != nil {
		return m.KblkCosiAggr
	}
	return nil
}

type PoWHdr struct {
	PKblkHash  []byte `protobuf:"bytes,1,opt,name=PKblkHash,proto3" json:"PKblkHash,omitempty"`
	Difficulty uint64 `protobuf:"varint,2,opt,name=Difficulty,proto3" json:"Difficulty,omitempty"`
	Timestamp  uint64 `protobuf:"varint,3,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"`
	Worker     []byte `protobuf:"bytes,4,opt,name=Worker,proto3" json:"Worker,omitempty"`
	Nonce      uint64 `protobuf:"varint,5,opt,name=Nonce,proto3" json:"Nonce,omitempty"`
	MixHash    []byte `protobuf:"bytes,6,opt,name=mixHash,proto3" json:"mixHash,omitempty"`
}

func (m *PoWHdr) Reset()                    { *m = PoWHdr{} }
func (m *PoWHdr) String() string            { return proto.CompactTextString(m) }
func (*PoWHdr) ProtoMessage()               {}
func (*PoWHdr) Descriptor() ([]byte, []int) { return fileDescriptorCommon, []int{10} }

func (m *PoWHdr) GetPKblkHash() []byte {
	if m != nil {
		return m.PKblkHash
	}
	return nil
}

func (m *PoWHdr) GetDifficulty() uint64 {
	if m != nil {
		return m.Difficulty
	}
	return 0
}

func (m *PoWHdr) GetTimestamp() uint64 {
	if m != nil {
		return m.Timestamp
	}
	return 0
}

func (m *PoWHdr) GetWorker() []byte {
	if m != nil {
		return m.Worker
	}
	return nil
}

func (m *PoWHdr) GetNonce() uint64 {
	if m != nil {
		return m.Nonce
	}
	return 0
}

func (m *PoWHdr) GetMixHash() []byte {
	if m != nil {
		return m.MixHash
	}
	return nil
}

type PoW struct {
	Ph  *PoWHdr `protobuf:"bytes,1,opt,name=ph" json:"ph,omitempty"`
	Sig []byte  `protobuf:"bytes,2,opt,name=sig,proto3" json:"sig,omitempty"`
}

func (m *PoW) Reset()                    { *m = PoW{} }
func (m *PoW) String() string            { return proto.CompactTextString(m) }
func (*PoW) ProtoMessage()               {}
func (*PoW) Descriptor() ([]byte, []int) { return fileDescriptorCommon, []int{11} }

func (m *PoW) GetPh() *PoWHdr {
	if m != nil {
		return m.Ph
	}
	return nil
}

func (m *PoW) GetSig() []byte {
	if m != nil {
		return m.Sig
	}
	return nil
}

type KeyBlockHdr struct {
	Version   uint32 `protobuf:"varint,1,opt,name=Version,proto3" json:"Version,omitempty"`
	PKblkHash []byte `protobuf:"bytes,2,opt,name=PKblkHash,proto3" json:"PKblkHash,omitempty"`
	Timestamp uint64 `protobuf:"varint,3,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"`
}

func (m *KeyBlockHdr) Reset()                    { *m = KeyBlockHdr{} }
func (m *KeyBlockHdr) String() string            { return proto.CompactTextString(m) }
func (*KeyBlockHdr) ProtoMessage()               {}
func (*KeyBlockHdr) Descriptor() ([]byte, []int) { return fileDescriptorCommon, []int{12} }

func (m *KeyBlockHdr) GetVersion() uint32 {
	if m != nil {
		return m.Version
	}
	return 0
}

func (m *KeyBlockHdr) GetPKblkHash() []byte {
	if m != nil {
		return m.PKblkHash
	}
	return nil
}

func (m *KeyBlockHdr) GetTimestamp() uint64 {
	if m != nil {
		return m.Timestamp
	}
	return 0
}

type KeyBlock struct {
	Kbh          *KeyBlockHdr `protobuf:"bytes,1,opt,name=kbh" json:"kbh,omitempty"`
	KblkCosiSign []byte       `protobuf:"bytes,2,opt,name=KblkCosiSign,proto3" json:"KblkCosiSign,omitempty"`
	KblkCosiAggr []byte       `protobuf:"bytes,3,opt,name=KblkCosiAggr,proto3" json:"KblkCosiAggr,omitempty"`
	NumPow       uint64       `protobuf:"varint,4,opt,name=NumPow,proto3" json:"NumPow,omitempty"`
	Pows         []*PoW       `protobuf:"bytes,5,rep,name=Pows" json:"Pows,omitempty"`
}

func (m *KeyBlock) Reset()                    { *m = KeyBlock{} }
func (m *KeyBlock) String() string            { return proto.CompactTextString(m) }
func (*KeyBlock) ProtoMessage()               {}
func (*KeyBlock) Descriptor() ([]byte, []int) { return fileDescriptorCommon, []int{13} }

func (m *KeyBlock) GetKbh() *KeyBlockHdr {
	if m != nil {
		return m.Kbh
	}
	return nil
}

func (m *KeyBlock) GetKblkCosiSign() []byte {
	if m != nil {
		return m.KblkCosiSign
	}
	return nil
}

func (m *KeyBlock) GetKblkCosiAggr() []byte {
	if m != nil {
		return m.KblkCosiAggr
	}
	return nil
}

func (m *KeyBlock) GetNumPow() uint64 {
	if m != nil {
		return m.NumPow
	}
	return 0
}

func (m *KeyBlock) GetPows() []*PoW {
	if m != nil {
		return m.Pows
	}
	return nil
}

func init() {
	proto.RegisterType((*BigInt)(nil), "blockchain.BigInt")
	proto.RegisterType((*Account)(nil), "blockchain.Account")
	proto.RegisterType((*Transaction)(nil), "blockchain.Transaction")
	proto.RegisterType((*STransaction)(nil), "blockchain.STransaction")
	proto.RegisterType((*TransactionProto)(nil), "blockchain.TransactionProto")
	proto.RegisterType((*Txdata)(nil), "blockchain.Txdata")
	proto.RegisterType((*Coinbase)(nil), "blockchain.Coinbase")
	proto.RegisterType((*TxBlockHdr)(nil), "blockchain.TxBlockHdr")
	proto.RegisterType((*TxBlockData)(nil), "blockchain.TxBlockData")
	proto.RegisterType((*TxBlock)(nil), "blockchain.TxBlock")
	proto.RegisterType((*PoWHdr)(nil), "blockchain.PoWHdr")
	proto.RegisterType((*PoW)(nil), "blockchain.PoW")
	proto.RegisterType((*KeyBlockHdr)(nil), "blockchain.KeyBlockHdr")
	proto.RegisterType((*KeyBlock)(nil), "blockchain.KeyBlock")
}
func (m *BigInt) 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 *BigInt) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.Neg {
		dAtA[i] = 0x8
		i++
		if m.Neg {
			dAtA[i] = 1
		} else {
			dAtA[i] = 0
		}
		i++
	}
	if len(m.Abs) > 0 {
		dAtA[i] = 0x12
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.Abs)))
		i += copy(dAtA[i:], m.Abs)
	}
	return i, nil
}

func (m *Account) 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 *Account) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.Version != 0 {
		dAtA[i] = 0x8
		i++
		i = encodeVarintCommon(dAtA, i, uint64(m.Version))
	}
	if m.Type != 0 {
		dAtA[i] = 0x10
		i++
		i = encodeVarintCommon(dAtA, i, uint64(m.Type))
	}
	if len(m.Address) > 0 {
		dAtA[i] = 0x1a
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.Address)))
		i += copy(dAtA[i:], m.Address)
	}
	if m.Latency != 0 {
		dAtA[i] = 0x20
		i++
		i = encodeVarintCommon(dAtA, i, uint64(m.Latency))
	}
	if len(m.Balance) > 0 {
		dAtA[i] = 0x2a
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.Balance)))
		i += copy(dAtA[i:], m.Balance)
	}
	if len(m.CodeHash) > 0 {
		dAtA[i] = 0x32
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.CodeHash)))
		i += copy(dAtA[i:], m.CodeHash)
	}
	if len(m.StgRoot) > 0 {
		dAtA[i] = 0x3a
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.StgRoot)))
		i += copy(dAtA[i:], m.StgRoot)
	}
	return i, nil
}

func (m *Transaction) 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 *Transaction) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.Version != 0 {
		dAtA[i] = 0x8
		i++
		i = encodeVarintCommon(dAtA, i, uint64(m.Version))
	}
	if len(m.SenderKey) > 0 {
		dAtA[i] = 0x1a
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.SenderKey)))
		i += copy(dAtA[i:], m.SenderKey)
	}
	if len(m.Recipient) > 0 {
		dAtA[i] = 0x22
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.Recipient)))
		i += copy(dAtA[i:], m.Recipient)
	}
	if len(m.Quantity) > 0 {
		dAtA[i] = 0x2a
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.Quantity)))
		i += copy(dAtA[i:], m.Quantity)
	}
	if len(m.Data) > 0 {
		dAtA[i] = 0x32
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.Data)))
		i += copy(dAtA[i:], m.Data)
	}
	if m.AvailGas != 0 {
		dAtA[i] = 0x38
		i++
		i = encodeVarintCommon(dAtA, i, uint64(m.AvailGas))
	}
	if len(m.GasPrice) > 0 {
		dAtA[i] = 0x42
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.GasPrice)))
		i += copy(dAtA[i:], m.GasPrice)
	}
	return i, nil
}

func (m *STransaction) 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 *STransaction) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.Tx != nil {
		dAtA[i] = 0xa
		i++
		i = encodeVarintCommon(dAtA, i, uint64(m.Tx.Size()))
		n1, err := m.Tx.MarshalTo(dAtA[i:])
		if err != nil {
			return 0, err
		}
		i += n1
	}
	if len(m.SenderSig) > 0 {
		dAtA[i] = 0x12
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.SenderSig)))
		i += copy(dAtA[i:], m.SenderSig)
	}
	return i, nil
}

func (m *TransactionProto) 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 *TransactionProto) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.Data != nil {
		dAtA[i] = 0xa
		i++
		i = encodeVarintCommon(dAtA, i, uint64(m.Data.Size()))
		n2, err := m.Data.MarshalTo(dAtA[i:])
		if err != nil {
			return 0, err
		}
		i += n2
	}
	if len(m.Hash) > 0 {
		dAtA[i] = 0x12
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.Hash)))
		i += copy(dAtA[i:], m.Hash)
	}
	if m.Size_ != 0 {
		dAtA[i] = 0x19
		i++
		binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Size_))))
		i += 8
	}
	if len(m.From) > 0 {
		dAtA[i] = 0x22
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.From)))
		i += copy(dAtA[i:], m.From)
	}
	return i, nil
}

func (m *Txdata) 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 *Txdata) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.Version != 0 {
		dAtA[i] = 0x8
		i++
		i = encodeVarintCommon(dAtA, i, uint64(m.Version))
	}
	if len(m.SenderKey) > 0 {
		dAtA[i] = 0x12
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.SenderKey)))
		i += copy(dAtA[i:], m.SenderKey)
	}
	if len(m.Recipient) > 0 {
		dAtA[i] = 0x1a
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.Recipient)))
		i += copy(dAtA[i:], m.Recipient)
	}
	if m.Amount != nil {
		dAtA[i] = 0x22
		i++
		i = encodeVarintCommon(dAtA, i, uint64(m.Amount.Size()))
		n3, err := m.Amount.MarshalTo(dAtA[i:])
		if err != nil {
			return 0, err
		}
		i += n3
	}
	if len(m.Payload) > 0 {
		dAtA[i] = 0x2a
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.Payload)))
		i += copy(dAtA[i:], m.Payload)
	}
	if m.GasLimit != 0 {
		dAtA[i] = 0x30
		i++
		i = encodeVarintCommon(dAtA, i, uint64(m.GasLimit))
	}
	if len(m.Price) > 0 {
		dAtA[i] = 0x3a
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.Price)))
		i += copy(dAtA[i:], m.Price)
	}
	if m.AccountNonce != 0 {
		dAtA[i] = 0x40
		i++
		i = encodeVarintCommon(dAtA, i, uint64(m.AccountNonce))
	}
	if len(m.V) > 0 {
		dAtA[i] = 0x4a
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.V)))
		i += copy(dAtA[i:], m.V)
	}
	if len(m.R) > 0 {
		dAtA[i] = 0x52
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.R)))
		i += copy(dAtA[i:], m.R)
	}
	if len(m.S) > 0 {
		dAtA[i] = 0x5a
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.S)))
		i += copy(dAtA[i:], m.S)
	}
	return i, nil
}

func (m *Coinbase) 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 *Coinbase) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.NumCommittee != 0 {
		dAtA[i] = 0x8
		i++
		i = encodeVarintCommon(dAtA, i, uint64(m.NumCommittee))
	}
	if len(m.Committee) > 0 {
		dAtA[i] = 0x12
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.Committee)))
		i += copy(dAtA[i:], m.Committee)
	}
	if len(m.Quantity) > 0 {
		dAtA[i] = 0x1a
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.Quantity)))
		i += copy(dAtA[i:], m.Quantity)
	}
	return i, nil
}

func (m *TxBlockHdr) 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 *TxBlockHdr) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.Version != 0 {
		dAtA[i] = 0x8
		i++
		i = encodeVarintCommon(dAtA, i, uint64(m.Version))
	}
	if m.Type != 0 {
		dAtA[i] = 0x10
		i++
		i = encodeVarintCommon(dAtA, i, uint64(m.Type))
	}
	if len(m.GasLimit) > 0 {
		dAtA[i] = 0x1a
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.GasLimit)))
		i += copy(dAtA[i:], m.GasLimit)
	}
	if len(m.GasUsed) > 0 {
		dAtA[i] = 0x22
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.GasUsed)))
		i += copy(dAtA[i:], m.GasUsed)
	}
	if len(m.KblkHash) > 0 {
		dAtA[i] = 0x2a
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.KblkHash)))
		i += copy(dAtA[i:], m.KblkHash)
	}
	if len(m.PblkHash) > 0 {
		dAtA[i] = 0x32
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.PblkHash)))
		i += copy(dAtA[i:], m.PblkHash)
	}
	if len(m.PTblkHash) > 0 {
		dAtA[i] = 0x3a
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.PTblkHash)))
		i += copy(dAtA[i:], m.PTblkHash)
	}
	if m.Timestamp != 0 {
		dAtA[i] = 0x40
		i++
		i = encodeVarintCommon(dAtA, i, uint64(m.Timestamp))
	}
	if len(m.StateRoot) > 0 {
		dAtA[i] = 0x4a
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.StateRoot)))
		i += copy(dAtA[i:], m.StateRoot)
	}
	if len(m.TxRoot) > 0 {
		dAtA[i] = 0x52
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.TxRoot)))
		i += copy(dAtA[i:], m.TxRoot)
	}
	return i, nil
}

func (m *TxBlockData) 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 *TxBlockData) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.StxCnt != 0 {
		dAtA[i] = 0x48
		i++
		i = encodeVarintCommon(dAtA, i, uint64(m.StxCnt))
	}
	if len(m.Stx) > 0 {
		for _, msg := range m.Stx {
			dAtA[i] = 0x52
			i++
			i = encodeVarintCommon(dAtA, i, uint64(msg.Size()))
			n, err := msg.MarshalTo(dAtA[i:])
			if err != nil {
				return 0, err
			}
			i += n
		}
	}
	return i, nil
}

func (m *TxBlock) 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 *TxBlock) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.Tbh != nil {
		dAtA[i] = 0xa
		i++
		i = encodeVarintCommon(dAtA, i, uint64(m.Tbh.Size()))
		n4, err := m.Tbh.MarshalTo(dAtA[i:])
		if err != nil {
			return 0, err
		}
		i += n4
	}
	if m.Tbd != nil {
		dAtA[i] = 0x12
		i++
		i = encodeVarintCommon(dAtA, i, uint64(m.Tbd.Size()))
		n5, err := m.Tbd.MarshalTo(dAtA[i:])
		if err != nil {
			return 0, err
		}
		i += n5
	}
	if m.Coinbase != nil {
		dAtA[i] = 0x1a
		i++
		i = encodeVarintCommon(dAtA, i, uint64(m.Coinbase.Size()))
		n6, err := m.Coinbase.MarshalTo(dAtA[i:])
		if err != nil {
			return 0, err
		}
		i += n6
	}
	if len(m.KblkCosiSign) > 0 {
		dAtA[i] = 0x22
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.KblkCosiSign)))
		i += copy(dAtA[i:], m.KblkCosiSign)
	}
	if len(m.KblkCosiAggr) > 0 {
		dAtA[i] = 0x2a
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.KblkCosiAggr)))
		i += copy(dAtA[i:], m.KblkCosiAggr)
	}
	return i, nil
}

func (m *PoWHdr) 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 *PoWHdr) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if len(m.PKblkHash) > 0 {
		dAtA[i] = 0xa
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.PKblkHash)))
		i += copy(dAtA[i:], m.PKblkHash)
	}
	if m.Difficulty != 0 {
		dAtA[i] = 0x10
		i++
		i = encodeVarintCommon(dAtA, i, uint64(m.Difficulty))
	}
	if m.Timestamp != 0 {
		dAtA[i] = 0x18
		i++
		i = encodeVarintCommon(dAtA, i, uint64(m.Timestamp))
	}
	if len(m.Worker) > 0 {
		dAtA[i] = 0x22
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.Worker)))
		i += copy(dAtA[i:], m.Worker)
	}
	if m.Nonce != 0 {
		dAtA[i] = 0x28
		i++
		i = encodeVarintCommon(dAtA, i, uint64(m.Nonce))
	}
	if len(m.MixHash) > 0 {
		dAtA[i] = 0x32
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.MixHash)))
		i += copy(dAtA[i:], m.MixHash)
	}
	return i, nil
}

func (m *PoW) 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 *PoW) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.Ph != nil {
		dAtA[i] = 0xa
		i++
		i = encodeVarintCommon(dAtA, i, uint64(m.Ph.Size()))
		n7, err := m.Ph.MarshalTo(dAtA[i:])
		if err != nil {
			return 0, err
		}
		i += n7
	}
	if len(m.Sig) > 0 {
		dAtA[i] = 0x12
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.Sig)))
		i += copy(dAtA[i:], m.Sig)
	}
	return i, nil
}

func (m *KeyBlockHdr) 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 *KeyBlockHdr) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.Version != 0 {
		dAtA[i] = 0x8
		i++
		i = encodeVarintCommon(dAtA, i, uint64(m.Version))
	}
	if len(m.PKblkHash) > 0 {
		dAtA[i] = 0x12
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.PKblkHash)))
		i += copy(dAtA[i:], m.PKblkHash)
	}
	if m.Timestamp != 0 {
		dAtA[i] = 0x18
		i++
		i = encodeVarintCommon(dAtA, i, uint64(m.Timestamp))
	}
	return i, nil
}

func (m *KeyBlock) 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 *KeyBlock) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.Kbh != nil {
		dAtA[i] = 0xa
		i++
		i = encodeVarintCommon(dAtA, i, uint64(m.Kbh.Size()))
		n8, err := m.Kbh.MarshalTo(dAtA[i:])
		if err != nil {
			return 0, err
		}
		i += n8
	}
	if len(m.KblkCosiSign) > 0 {
		dAtA[i] = 0x12
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.KblkCosiSign)))
		i += copy(dAtA[i:], m.KblkCosiSign)
	}
	if len(m.KblkCosiAggr) > 0 {
		dAtA[i] = 0x1a
		i++
		i = encodeVarintCommon(dAtA, i, uint64(len(m.KblkCosiAggr)))
		i += copy(dAtA[i:], m.KblkCosiAggr)
	}
	if m.NumPow != 0 {
		dAtA[i] = 0x20
		i++
		i = encodeVarintCommon(dAtA, i, uint64(m.NumPow))
	}
	if len(m.Pows) > 0 {
		for _, msg := range m.Pows {
			dAtA[i] = 0x2a
			i++
			i = encodeVarintCommon(dAtA, i, uint64(msg.Size()))
			n, err := msg.MarshalTo(dAtA[i:])
			if err != nil {
				return 0, err
			}
			i += n
		}
	}
	return i, nil
}

func encodeVarintCommon(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 *BigInt) Size() (n int) {
	var l int
	_ = l
	if m.Neg {
		n += 2
	}
	l = len(m.Abs)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	return n
}

func (m *Account) Size() (n int) {
	var l int
	_ = l
	if m.Version != 0 {
		n += 1 + sovCommon(uint64(m.Version))
	}
	if m.Type != 0 {
		n += 1 + sovCommon(uint64(m.Type))
	}
	l = len(m.Address)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	if m.Latency != 0 {
		n += 1 + sovCommon(uint64(m.Latency))
	}
	l = len(m.Balance)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	l = len(m.CodeHash)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	l = len(m.StgRoot)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	return n
}

func (m *Transaction) Size() (n int) {
	var l int
	_ = l
	if m.Version != 0 {
		n += 1 + sovCommon(uint64(m.Version))
	}
	l = len(m.SenderKey)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	l = len(m.Recipient)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	l = len(m.Quantity)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	l = len(m.Data)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	if m.AvailGas != 0 {
		n += 1 + sovCommon(uint64(m.AvailGas))
	}
	l = len(m.GasPrice)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	return n
}

func (m *STransaction) Size() (n int) {
	var l int
	_ = l
	if m.Tx != nil {
		l = m.Tx.Size()
		n += 1 + l + sovCommon(uint64(l))
	}
	l = len(m.SenderSig)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	return n
}

func (m *TransactionProto) Size() (n int) {
	var l int
	_ = l
	if m.Data != nil {
		l = m.Data.Size()
		n += 1 + l + sovCommon(uint64(l))
	}
	l = len(m.Hash)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	if m.Size_ != 0 {
		n += 9
	}
	l = len(m.From)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	return n
}

func (m *Txdata) Size() (n int) {
	var l int
	_ = l
	if m.Version != 0 {
		n += 1 + sovCommon(uint64(m.Version))
	}
	l = len(m.SenderKey)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	l = len(m.Recipient)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	if m.Amount != nil {
		l = m.Amount.Size()
		n += 1 + l + sovCommon(uint64(l))
	}
	l = len(m.Payload)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	if m.GasLimit != 0 {
		n += 1 + sovCommon(uint64(m.GasLimit))
	}
	l = len(m.Price)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	if m.AccountNonce != 0 {
		n += 1 + sovCommon(uint64(m.AccountNonce))
	}
	l = len(m.V)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	l = len(m.R)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	l = len(m.S)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	return n
}

func (m *Coinbase) Size() (n int) {
	var l int
	_ = l
	if m.NumCommittee != 0 {
		n += 1 + sovCommon(uint64(m.NumCommittee))
	}
	l = len(m.Committee)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	l = len(m.Quantity)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	return n
}

func (m *TxBlockHdr) Size() (n int) {
	var l int
	_ = l
	if m.Version != 0 {
		n += 1 + sovCommon(uint64(m.Version))
	}
	if m.Type != 0 {
		n += 1 + sovCommon(uint64(m.Type))
	}
	l = len(m.GasLimit)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	l = len(m.GasUsed)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	l = len(m.KblkHash)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	l = len(m.PblkHash)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	l = len(m.PTblkHash)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	if m.Timestamp != 0 {
		n += 1 + sovCommon(uint64(m.Timestamp))
	}
	l = len(m.StateRoot)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	l = len(m.TxRoot)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	return n
}

func (m *TxBlockData) Size() (n int) {
	var l int
	_ = l
	if m.StxCnt != 0 {
		n += 1 + sovCommon(uint64(m.StxCnt))
	}
	if len(m.Stx) > 0 {
		for _, e := range m.Stx {
			l = e.Size()
			n += 1 + l + sovCommon(uint64(l))
		}
	}
	return n
}

func (m *TxBlock) Size() (n int) {
	var l int
	_ = l
	if m.Tbh != nil {
		l = m.Tbh.Size()
		n += 1 + l + sovCommon(uint64(l))
	}
	if m.Tbd != nil {
		l = m.Tbd.Size()
		n += 1 + l + sovCommon(uint64(l))
	}
	if m.Coinbase != nil {
		l = m.Coinbase.Size()
		n += 1 + l + sovCommon(uint64(l))
	}
	l = len(m.KblkCosiSign)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	l = len(m.KblkCosiAggr)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	return n
}

func (m *PoWHdr) Size() (n int) {
	var l int
	_ = l
	l = len(m.PKblkHash)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	if m.Difficulty != 0 {
		n += 1 + sovCommon(uint64(m.Difficulty))
	}
	if m.Timestamp != 0 {
		n += 1 + sovCommon(uint64(m.Timestamp))
	}
	l = len(m.Worker)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	if m.Nonce != 0 {
		n += 1 + sovCommon(uint64(m.Nonce))
	}
	l = len(m.MixHash)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	return n
}

func (m *PoW) Size() (n int) {
	var l int
	_ = l
	if m.Ph != nil {
		l = m.Ph.Size()
		n += 1 + l + sovCommon(uint64(l))
	}
	l = len(m.Sig)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	return n
}

func (m *KeyBlockHdr) Size() (n int) {
	var l int
	_ = l
	if m.Version != 0 {
		n += 1 + sovCommon(uint64(m.Version))
	}
	l = len(m.PKblkHash)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	if m.Timestamp != 0 {
		n += 1 + sovCommon(uint64(m.Timestamp))
	}
	return n
}

func (m *KeyBlock) Size() (n int) {
	var l int
	_ = l
	if m.Kbh != nil {
		l = m.Kbh.Size()
		n += 1 + l + sovCommon(uint64(l))
	}
	l = len(m.KblkCosiSign)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	l = len(m.KblkCosiAggr)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	if m.NumPow != 0 {
		n += 1 + sovCommon(uint64(m.NumPow))
	}
	if len(m.Pows) > 0 {
		for _, e := range m.Pows {
			l = e.Size()
			n += 1 + l + sovCommon(uint64(l))
		}
	}
	return n
}

func sovCommon(x uint64) (n int) {
	for {
		n++
		x >>= 7
		if x == 0 {
			break
		}
	}
	return n
}
func sozCommon(x uint64) (n int) {
	return sovCommon(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *BigInt) 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 ErrIntOverflowCommon
			}
			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: BigInt: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: BigInt: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Neg", wireType)
			}
			var v int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				v |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.Neg = bool(v != 0)
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Abs", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Abs = append(m.Abs[:0], dAtA[iNdEx:postIndex]...)
			if m.Abs == nil {
				m.Abs = []byte{}
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipCommon(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthCommon
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *Account) 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 ErrIntOverflowCommon
			}
			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: Account: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: Account: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
			}
			m.Version = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Version |= (uint32(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
			}
			m.Type = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Type |= (uint32(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...)
			if m.Address == nil {
				m.Address = []byte{}
			}
			iNdEx = postIndex
		case 4:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Latency", wireType)
			}
			m.Latency = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Latency |= (uint32(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 5:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Balance = append(m.Balance[:0], dAtA[iNdEx:postIndex]...)
			if m.Balance == nil {
				m.Balance = []byte{}
			}
			iNdEx = postIndex
		case 6:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field CodeHash", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.CodeHash = append(m.CodeHash[:0], dAtA[iNdEx:postIndex]...)
			if m.CodeHash == nil {
				m.CodeHash = []byte{}
			}
			iNdEx = postIndex
		case 7:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field StgRoot", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.StgRoot = append(m.StgRoot[:0], dAtA[iNdEx:postIndex]...)
			if m.StgRoot == nil {
				m.StgRoot = []byte{}
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipCommon(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthCommon
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *Transaction) 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 ErrIntOverflowCommon
			}
			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: Transaction: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: Transaction: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
			}
			m.Version = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Version |= (uint32(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field SenderKey", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.SenderKey = append(m.SenderKey[:0], dAtA[iNdEx:postIndex]...)
			if m.SenderKey == nil {
				m.SenderKey = []byte{}
			}
			iNdEx = postIndex
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Recipient = append(m.Recipient[:0], dAtA[iNdEx:postIndex]...)
			if m.Recipient == nil {
				m.Recipient = []byte{}
			}
			iNdEx = postIndex
		case 5:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Quantity = append(m.Quantity[:0], dAtA[iNdEx:postIndex]...)
			if m.Quantity == nil {
				m.Quantity = []byte{}
			}
			iNdEx = postIndex
		case 6:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
			if m.Data == nil {
				m.Data = []byte{}
			}
			iNdEx = postIndex
		case 7:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field AvailGas", wireType)
			}
			m.AvailGas = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.AvailGas |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 8:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field GasPrice", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.GasPrice = append(m.GasPrice[:0], dAtA[iNdEx:postIndex]...)
			if m.GasPrice == nil {
				m.GasPrice = []byte{}
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipCommon(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthCommon
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *STransaction) 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 ErrIntOverflowCommon
			}
			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: STransaction: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: STransaction: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Tx == nil {
				m.Tx = &Transaction{}
			}
			if err := m.Tx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field SenderSig", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.SenderSig = append(m.SenderSig[:0], dAtA[iNdEx:postIndex]...)
			if m.SenderSig == nil {
				m.SenderSig = []byte{}
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipCommon(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthCommon
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *TransactionProto) 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 ErrIntOverflowCommon
			}
			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: TransactionProto: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: TransactionProto: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			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 ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Data == nil {
				m.Data = &Txdata{}
			}
			if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...)
			if m.Hash == nil {
				m.Hash = []byte{}
			}
			iNdEx = postIndex
		case 3:
			if wireType != 1 {
				return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType)
			}
			var v uint64
			if (iNdEx + 8) > l {
				return io.ErrUnexpectedEOF
			}
			v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:]))
			iNdEx += 8
			m.Size_ = float64(math.Float64frombits(v))
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field From", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.From = append(m.From[:0], dAtA[iNdEx:postIndex]...)
			if m.From == nil {
				m.From = []byte{}
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipCommon(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthCommon
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *Txdata) 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 ErrIntOverflowCommon
			}
			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: Txdata: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: Txdata: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
			}
			m.Version = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Version |= (uint32(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field SenderKey", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.SenderKey = append(m.SenderKey[:0], dAtA[iNdEx:postIndex]...)
			if m.SenderKey == nil {
				m.SenderKey = []byte{}
			}
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Recipient = append(m.Recipient[:0], dAtA[iNdEx:postIndex]...)
			if m.Recipient == nil {
				m.Recipient = []byte{}
			}
			iNdEx = postIndex
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Amount == nil {
				m.Amount = &BigInt{}
			}
			if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 5:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...)
			if m.Payload == nil {
				m.Payload = []byte{}
			}
			iNdEx = postIndex
		case 6:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field GasLimit", wireType)
			}
			m.GasLimit = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.GasLimit |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 7:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Price = append(m.Price[:0], dAtA[iNdEx:postIndex]...)
			if m.Price == nil {
				m.Price = []byte{}
			}
			iNdEx = postIndex
		case 8:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field AccountNonce", wireType)
			}
			m.AccountNonce = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.AccountNonce |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 9:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field V", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.V = append(m.V[:0], dAtA[iNdEx:postIndex]...)
			if m.V == nil {
				m.V = []byte{}
			}
			iNdEx = postIndex
		case 10:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field R", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.R = append(m.R[:0], dAtA[iNdEx:postIndex]...)
			if m.R == nil {
				m.R = []byte{}
			}
			iNdEx = postIndex
		case 11:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field S", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.S = append(m.S[:0], dAtA[iNdEx:postIndex]...)
			if m.S == nil {
				m.S = []byte{}
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipCommon(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthCommon
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *Coinbase) 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 ErrIntOverflowCommon
			}
			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: Coinbase: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: Coinbase: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field NumCommittee", wireType)
			}
			m.NumCommittee = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.NumCommittee |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Committee", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Committee = append(m.Committee[:0], dAtA[iNdEx:postIndex]...)
			if m.Committee == nil {
				m.Committee = []byte{}
			}
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Quantity = append(m.Quantity[:0], dAtA[iNdEx:postIndex]...)
			if m.Quantity == nil {
				m.Quantity = []byte{}
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipCommon(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthCommon
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *TxBlockHdr) 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 ErrIntOverflowCommon
			}
			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: TxBlockHdr: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: TxBlockHdr: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
			}
			m.Version = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Version |= (uint32(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
			}
			m.Type = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Type |= (uint32(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field GasLimit", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.GasLimit = append(m.GasLimit[:0], dAtA[iNdEx:postIndex]...)
			if m.GasLimit == nil {
				m.GasLimit = []byte{}
			}
			iNdEx = postIndex
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.GasUsed = append(m.GasUsed[:0], dAtA[iNdEx:postIndex]...)
			if m.GasUsed == nil {
				m.GasUsed = []byte{}
			}
			iNdEx = postIndex
		case 5:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field KblkHash", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.KblkHash = append(m.KblkHash[:0], dAtA[iNdEx:postIndex]...)
			if m.KblkHash == nil {
				m.KblkHash = []byte{}
			}
			iNdEx = postIndex
		case 6:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field PblkHash", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.PblkHash = append(m.PblkHash[:0], dAtA[iNdEx:postIndex]...)
			if m.PblkHash == nil {
				m.PblkHash = []byte{}
			}
			iNdEx = postIndex
		case 7:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field PTblkHash", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.PTblkHash = append(m.PTblkHash[:0], dAtA[iNdEx:postIndex]...)
			if m.PTblkHash == nil {
				m.PTblkHash = []byte{}
			}
			iNdEx = postIndex
		case 8:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
			}
			m.Timestamp = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Timestamp |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 9:
			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 ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			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 10:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field TxRoot", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.TxRoot = append(m.TxRoot[:0], dAtA[iNdEx:postIndex]...)
			if m.TxRoot == nil {
				m.TxRoot = []byte{}
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipCommon(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthCommon
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *TxBlockData) 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 ErrIntOverflowCommon
			}
			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: TxBlockData: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: TxBlockData: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 9:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field StxCnt", wireType)
			}
			m.StxCnt = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.StxCnt |= (uint32(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 10:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Stx", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Stx = append(m.Stx, &STransaction{})
			if err := m.Stx[len(m.Stx)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipCommon(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthCommon
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *TxBlock) 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 ErrIntOverflowCommon
			}
			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: TxBlock: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: TxBlock: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Tbh", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Tbh == nil {
				m.Tbh = &TxBlockHdr{}
			}
			if err := m.Tbh.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Tbd", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Tbd == nil {
				m.Tbd = &TxBlockData{}
			}
			if err := m.Tbd.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Coinbase", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Coinbase == nil {
				m.Coinbase = &Coinbase{}
			}
			if err := m.Coinbase.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field KblkCosiSign", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.KblkCosiSign = append(m.KblkCosiSign[:0], dAtA[iNdEx:postIndex]...)
			if m.KblkCosiSign == nil {
				m.KblkCosiSign = []byte{}
			}
			iNdEx = postIndex
		case 5:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field KblkCosiAggr", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.KblkCosiAggr = append(m.KblkCosiAggr[:0], dAtA[iNdEx:postIndex]...)
			if m.KblkCosiAggr == nil {
				m.KblkCosiAggr = []byte{}
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipCommon(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthCommon
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *PoWHdr) 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 ErrIntOverflowCommon
			}
			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: PoWHdr: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: PoWHdr: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field PKblkHash", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.PKblkHash = append(m.PKblkHash[:0], dAtA[iNdEx:postIndex]...)
			if m.PKblkHash == nil {
				m.PKblkHash = []byte{}
			}
			iNdEx = postIndex
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Difficulty", wireType)
			}
			m.Difficulty = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Difficulty |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 3:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
			}
			m.Timestamp = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Timestamp |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Worker", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Worker = append(m.Worker[:0], dAtA[iNdEx:postIndex]...)
			if m.Worker == nil {
				m.Worker = []byte{}
			}
			iNdEx = postIndex
		case 5:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType)
			}
			m.Nonce = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Nonce |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 6:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field MixHash", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.MixHash = append(m.MixHash[:0], dAtA[iNdEx:postIndex]...)
			if m.MixHash == nil {
				m.MixHash = []byte{}
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipCommon(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthCommon
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *PoW) 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 ErrIntOverflowCommon
			}
			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: PoW: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: PoW: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Ph", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Ph == nil {
				m.Ph = &PoWHdr{}
			}
			if err := m.Ph.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Sig", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Sig = append(m.Sig[:0], dAtA[iNdEx:postIndex]...)
			if m.Sig == nil {
				m.Sig = []byte{}
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipCommon(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthCommon
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *KeyBlockHdr) 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 ErrIntOverflowCommon
			}
			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: KeyBlockHdr: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: KeyBlockHdr: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
			}
			m.Version = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Version |= (uint32(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field PKblkHash", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.PKblkHash = append(m.PKblkHash[:0], dAtA[iNdEx:postIndex]...)
			if m.PKblkHash == nil {
				m.PKblkHash = []byte{}
			}
			iNdEx = postIndex
		case 3:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
			}
			m.Timestamp = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Timestamp |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := skipCommon(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthCommon
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *KeyBlock) 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 ErrIntOverflowCommon
			}
			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: KeyBlock: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: KeyBlock: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Kbh", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Kbh == nil {
				m.Kbh = &KeyBlockHdr{}
			}
			if err := m.Kbh.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field KblkCosiSign", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.KblkCosiSign = append(m.KblkCosiSign[:0], dAtA[iNdEx:postIndex]...)
			if m.KblkCosiSign == nil {
				m.KblkCosiSign = []byte{}
			}
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field KblkCosiAggr", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.KblkCosiAggr = append(m.KblkCosiAggr[:0], dAtA[iNdEx:postIndex]...)
			if m.KblkCosiAggr == nil {
				m.KblkCosiAggr = []byte{}
			}
			iNdEx = postIndex
		case 4:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field NumPow", wireType)
			}
			m.NumPow = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.NumPow |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 5:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Pows", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Pows = append(m.Pows, &PoW{})
			if err := m.Pows[len(m.Pows)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipCommon(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthCommon
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func skipCommon(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, ErrIntOverflowCommon
			}
			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, ErrIntOverflowCommon
				}
				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, ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				length |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			iNdEx += length
			if length < 0 {
				return 0, ErrInvalidLengthCommon
			}
			return iNdEx, nil
		case 3:
			for {
				var innerWire uint64
				var start int = iNdEx
				for shift := uint(0); ; shift += 7 {
					if shift >= 64 {
						return 0, ErrIntOverflowCommon
					}
					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 := skipCommon(dAtA[start:])
				if err != nil {
					return 0, err
				}
				iNdEx = start + next
			}
			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 (
	ErrInvalidLengthCommon = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowCommon   = fmt.Errorf("proto: integer overflow")
)

func init() { proto.RegisterFile("common.proto", fileDescriptorCommon) }

var fileDescriptorCommon = []byte{
	// 915 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0xcd, 0x6e, 0x23, 0x45,
	0x10, 0x66, 0x7e, 0x62, 0x27, 0x65, 0x47, 0x44, 0xad, 0x55, 0x18, 0x21, 0x64, 0x45, 0x83, 0x04,
	0x61, 0x85, 0x22, 0x14, 0x8e, 0x9c, 0x9c, 0xac, 0x94, 0x45, 0x59, 0x45, 0xb3, 0x3d, 0xde, 0xe4,
	0xdc, 0x9e, 0xe9, 0xd8, 0x2d, 0x7b, 0xa6, 0xad, 0x99, 0xf6, 0xae, 0xcd, 0x93, 0x20, 0xce, 0x1c,
	0x79, 0x02, 0x78, 0x01, 0x24, 0x2e, 0x1c, 0x39, 0xa2, 0xf0, 0x22, 0xa8, 0xba, 0x7b, 0xfe, 0xbc,
	0x10, 0x65, 0x6f, 0xfd, 0x55, 0x55, 0x97, 0xab, 0xbf, 0xef, 0xab, 0x49, 0x60, 0x98, 0xc8, 0x2c,
	0x93, 0xf9, 0xd9, 0xaa, 0x90, 0x4a, 0x12, 0x98, 0x2e, 0x65, 0xb2, 0x48, 0xe6, 0x4c, 0xe4, 0xe1,
	0xd7, 0xd0, 0xbb, 0x10, 0xb3, 0xef, 0x73, 0x45, 0x8e, 0xc0, 0xcb, 0xf9, 0x2c, 0x70, 0x4e, 0x9c,
	0xd3, 0x7d, 0x8a, 0x47, 0x8c, 0xb0, 0x69, 0x19, 0xb8, 0x27, 0xce, 0xe9, 0x90, 0xe2, 0x31, 0xfc,
	0xcd, 0x81, 0xfe, 0x38, 0x49, 0xe4, 0x3a, 0x57, 0x24, 0x80, 0xfe, 0x2d, 0x2f, 0x4a, 0x21, 0x73,
	0x7d, 0xe7, 0x90, 0x56, 0x90, 0x10, 0xf0, 0x27, 0xdb, 0x15, 0xd7, 0x17, 0x0f, 0xa9, 0x3e, 0x63,
	0xf5, 0x38, 0x4d, 0x0b, 0x5e, 0x96, 0x81, 0xa7, 0xfb, 0x55, 0x10, 0x33, 0xaf, 0x98, 0xe2, 0x79,
	0xb2, 0x0d, 0x7c, 0xd3, 0xc7, 0x42, 0xcc, 0x5c, 0xb0, 0x25, 0xcb, 0x13, 0x1e, 0xec, 0x99, 0x3b,
	0x16, 0x92, 0x4f, 0x61, 0xff, 0x52, 0xa6, 0xfc, 0x25, 0x2b, 0xe7, 0x41, 0x4f, 0xa7, 0x6a, 0x8c,
	0xb7, 0x62, 0x35, 0xa3, 0x52, 0xaa, 0xa0, 0x6f, 0x6e, 0x59, 0x18, 0xfe, 0xe1, 0xc0, 0x60, 0x52,
	0xb0, 0xbc, 0x64, 0x89, 0xc2, 0x39, 0xff, 0xff, 0x05, 0x9f, 0xc1, 0x41, 0xcc, 0xf3, 0x94, 0x17,
	0xd7, 0x7c, 0x6b, 0xe7, 0x6d, 0x02, 0x98, 0xa5, 0x3c, 0x11, 0x2b, 0xc1, 0x73, 0xa5, 0x67, 0x1e,
	0xd2, 0x26, 0x80, 0xb3, 0xbd, 0x5e, 0xb3, 0x5c, 0x09, 0xb5, 0xb5, 0x63, 0xd7, 0x18, 0x99, 0x79,
	0xc1, 0x14, 0xb3, 0x33, 0xeb, 0x33, 0xd6, 0x8f, 0xdf, 0x32, 0xb1, 0xbc, 0x62, 0xa5, 0x1e, 0xd8,
	0xa7, 0x35, 0xc6, 0xdc, 0x15, 0x2b, 0xa3, 0x42, 0x24, 0x3c, 0xd8, 0x37, 0xbd, 0x2a, 0x1c, 0xbe,
	0x81, 0x61, 0xdc, 0x7e, 0xcd, 0x97, 0xe0, 0xaa, 0x8d, 0x7e, 0xc8, 0xe0, 0xfc, 0x93, 0xb3, 0x46,
	0xe2, 0xb3, 0x56, 0x11, 0x75, 0xd5, 0xa6, 0x79, 0x5c, 0x2c, 0x66, 0x56, 0xdc, 0x26, 0x10, 0xbe,
	0x85, 0xa3, 0xd6, 0x85, 0x48, 0x1b, 0xe6, 0x0b, 0xf0, 0x53, 0x1c, 0xdb, 0x34, 0x27, 0x9d, 0xe6,
	0x1b, 0xcc, 0x50, 0x9d, 0xc7, 0xe7, 0xcd, 0x51, 0x12, 0xd3, 0x54, 0x9f, 0x31, 0x56, 0x8a, 0x1f,
	0xb8, 0x66, 0xd1, 0xa1, 0xfa, 0x8c, 0xb1, 0xfb, 0x42, 0x66, 0x96, 0x3b, 0x7d, 0x0e, 0x7f, 0x76,
	0xa1, 0x67, 0x9a, 0x3d, 0x55, 0x17, 0xf7, 0x51, 0x5d, 0xbc, 0x5d, 0x5d, 0x9e, 0x43, 0x6f, 0x9c,
	0xa1, 0x73, 0xf5, 0xcf, 0xee, 0x3c, 0xc3, 0xec, 0x00, 0xb5, 0x15, 0x38, 0x41, 0xc4, 0xb6, 0x4b,
	0xc9, 0xd2, 0xca, 0x79, 0x16, 0x5a, 0x45, 0x5e, 0x89, 0x4c, 0x28, 0xad, 0xa2, 0x4f, 0x6b, 0x4c,
	0x9e, 0xc1, 0x9e, 0x91, 0xca, 0xf8, 0xce, 0x00, 0x12, 0xc2, 0xd0, 0xae, 0xcc, 0x8d, 0xcc, 0xad,
	0x8e, 0x3e, 0xed, 0xc4, 0xc8, 0x10, 0x9c, 0xdb, 0xe0, 0x40, 0xdf, 0x72, 0x6e, 0x11, 0xd1, 0x00,
	0x0c, 0xa2, 0x88, 0xe2, 0x60, 0x60, 0x50, 0x1c, 0xce, 0xd1, 0xf9, 0x22, 0x9f, 0xb2, 0x52, 0x77,
	0xbe, 0x59, 0x67, 0x97, 0x32, 0xcb, 0x84, 0x52, 0x9c, 0x6b, 0xb2, 0x7c, 0xda, 0x89, 0x21, 0x27,
	0x4d, 0x81, 0x65, 0xac, 0xc9, 0xb6, 0xbd, 0xea, 0x75, 0xbd, 0x1a, 0xfe, 0xe4, 0x02, 0x4c, 0x36,
	0x17, 0xc8, 0xd1, 0xcb, 0xb4, 0xf8, 0xc0, 0x75, 0x6f, 0xd3, 0xe4, 0xd5, 0xc6, 0x35, 0x34, 0x05,
	0xd0, 0xbf, 0x62, 0xe5, 0x9b, 0x92, 0xa7, 0xd6, 0x00, 0x15, 0xc4, 0x5b, 0xd7, 0xd3, 0xe5, 0x42,
	0xaf, 0xb5, 0x5d, 0x9d, 0x0a, 0x63, 0x2e, 0xaa, 0x72, 0x76, 0xe5, 0x2b, 0x8c, 0x8f, 0x8c, 0x26,
	0x55, 0xd2, 0x90, 0xdf, 0x04, 0x30, 0x3b, 0x11, 0x19, 0x2f, 0x15, 0xcb, 0x56, 0x96, 0xfd, 0x26,
	0xa0, 0x2d, 0xa5, 0x98, 0xe2, 0xfa, 0x83, 0x71, 0x60, 0x2d, 0x55, 0x05, 0xc8, 0x31, 0x9a, 0x52,
	0xa7, 0x8c, 0x1e, 0x16, 0x85, 0xaf, 0x61, 0x60, 0xb9, 0xd1, 0x3b, 0x7c, 0x0c, 0xbd, 0x58, 0x6d,
	0x2e, 0x73, 0xd3, 0xe1, 0x90, 0x5a, 0x44, 0x9e, 0x83, 0x17, 0xab, 0x4d, 0x00, 0x27, 0xde, 0xe9,
	0xe0, 0x3c, 0x68, 0x1b, 0xae, 0xbd, 0xba, 0x14, 0x8b, 0xc2, 0xbf, 0x1c, 0xe8, 0xdb, 0x9e, 0xe4,
	0x14, 0x3c, 0x35, 0x9d, 0xdb, 0x7d, 0x3b, 0xee, 0xee, 0x5b, 0xa5, 0x08, 0xc5, 0x12, 0xf2, 0x15,
	0x56, 0xa6, 0x9a, 0xfb, 0xdd, 0xb5, 0x6f, 0xe6, 0xc3, 0xd2, 0x94, 0x7c, 0xd3, 0x58, 0x47, 0x6b,
	0x32, 0x38, 0x7f, 0xd6, 0xae, 0xaf, 0x72, 0xb4, 0x63, 0x30, 0xe4, 0xff, 0x52, 0x96, 0x22, 0x16,
	0xb3, 0xdc, 0xca, 0xd5, 0x89, 0xb5, 0x6b, 0xc6, 0xb3, 0x59, 0x61, 0x75, 0xeb, 0xc4, 0xc2, 0x5f,
	0x1c, 0xe8, 0x45, 0xf2, 0x0e, 0x6d, 0x84, 0x52, 0xd5, 0x1a, 0x3b, 0x56, 0xaa, 0x5a, 0xe4, 0x11,
	0xc0, 0x0b, 0x71, 0x7f, 0x2f, 0x92, 0xf5, 0x52, 0x99, 0x05, 0xf7, 0x69, 0x2b, 0xd2, 0x95, 0xd2,
	0xdb, 0x95, 0xf2, 0x18, 0x7a, 0x77, 0xb2, 0x58, 0xf0, 0xc2, 0x0e, 0x6a, 0x11, 0xee, 0xa5, 0x59,
	0xbd, 0x3d, 0x7d, 0xc3, 0x00, 0xb4, 0x61, 0x26, 0x36, 0x2d, 0x3f, 0x55, 0x30, 0xfc, 0x0e, 0xbc,
	0x48, 0xde, 0x91, 0x10, 0xdc, 0xd5, 0xfc, 0xbf, 0xbe, 0x79, 0xe6, 0x29, 0xd4, 0x5d, 0xcd, 0xf1,
	0x4f, 0x64, 0x59, 0x7f, 0x45, 0xf1, 0x18, 0x26, 0x30, 0xb8, 0xe6, 0xdb, 0x27, 0xac, 0x4d, 0x87,
	0x09, 0x77, 0x97, 0x89, 0x47, 0x5f, 0x1a, 0xfe, 0xea, 0xc0, 0x7e, 0xf5, 0x2b, 0x68, 0x81, 0x45,
	0x6d, 0x96, 0x8e, 0x05, 0x5a, 0x83, 0x50, 0xac, 0x79, 0x4f, 0x50, 0xf7, 0x09, 0x82, 0x7a, 0xef,
	0x0b, 0x8a, 0x4c, 0xdf, 0xac, 0xb3, 0x48, 0xbe, 0xd3, 0x4c, 0xfb, 0xd4, 0x22, 0xf2, 0x39, 0xf8,
	0x91, 0x7c, 0x57, 0x06, 0x7b, 0xda, 0xf0, 0x1f, 0xef, 0x90, 0x46, 0x75, 0xf2, 0xe2, 0xe8, 0xf7,
	0x87, 0x91, 0xf3, 0xe7, 0xc3, 0xc8, 0xf9, 0xfb, 0x61, 0xe4, 0xfc, 0xf8, 0xcf, 0xe8, 0xa3, 0x69,
	0x4f, 0xff, 0x5f, 0xf2, 0xed, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x19, 0xf7, 0x3f, 0x6f, 0xa7,
	0x08, 0x00, 0x00,
}
