github.com/okex/exchain@v1.8.0/libs/tendermint/proto/types/types.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: proto/types/types.proto
     3  
     4  package types
     5  
     6  import (
     7  	fmt "fmt"
     8  	_ "github.com/gogo/protobuf/gogoproto"
     9  	github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
    10  	proto "github.com/golang/protobuf/proto"
    11  	_ "github.com/golang/protobuf/ptypes/timestamp"
    12  	merkle "github.com/okex/exchain/libs/tendermint/proto/crypto/merkle"
    13  	bits "github.com/okex/exchain/libs/tendermint/proto/libs/bits"
    14  	version "github.com/okex/exchain/libs/tendermint/proto/version"
    15  	"io"
    16  	math "math"
    17  	math_bits "math/bits"
    18  	time "time"
    19  )
    20  
    21  // Reference imports to suppress errors if they are not otherwise used.
    22  var _ = proto.Marshal
    23  var _ = fmt.Errorf
    24  var _ = math.Inf
    25  var _ = time.Kitchen
    26  
    27  // This is a compile-time assertion to ensure that this generated file
    28  // is compatible with the proto package it is being compiled against.
    29  // A compilation error at this line likely means your copy of the
    30  // proto package needs to be updated.
    31  const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
    32  
    33  // BlockIdFlag indicates which BlcokID the signature is for
    34  type BlockIDFlag int32
    35  
    36  const (
    37  	BLOCKD_ID_FLAG_UNKNOWN BlockIDFlag = 0
    38  	BlockIDFlagAbsent      BlockIDFlag = 1
    39  	BlockIDFlagCommit      BlockIDFlag = 2
    40  	BlockIDFlagNil         BlockIDFlag = 3
    41  )
    42  
    43  var BlockIDFlag_name = map[int32]string{
    44  	0: "BLOCKD_ID_FLAG_UNKNOWN",
    45  	1: "BLOCK_ID_FLAG_ABSENT",
    46  	2: "BLOCK_ID_FLAG_COMMIT",
    47  	3: "BLOCK_ID_FLAG_NIL",
    48  }
    49  
    50  var BlockIDFlag_value = map[string]int32{
    51  	"BLOCKD_ID_FLAG_UNKNOWN": 0,
    52  	"BLOCK_ID_FLAG_ABSENT":   1,
    53  	"BLOCK_ID_FLAG_COMMIT":   2,
    54  	"BLOCK_ID_FLAG_NIL":      3,
    55  }
    56  
    57  func (BlockIDFlag) EnumDescriptor() ([]byte, []int) {
    58  	return fileDescriptor_ff06f8095857fb18, []int{0}
    59  }
    60  
    61  // SignedMsgType is a type of signed message in the consensus.
    62  type SignedMsgType int32
    63  
    64  const (
    65  	SIGNED_MSG_TYPE_UNKNOWN SignedMsgType = 0
    66  	PrevoteType             SignedMsgType = 1
    67  	PrecommitType           SignedMsgType = 2
    68  	ProposalType            SignedMsgType = 3
    69  )
    70  
    71  var SignedMsgType_name = map[int32]string{
    72  	0: "SIGNED_MSG_TYPE_UNKNOWN",
    73  	1: "PREVOTE_TYPE",
    74  	2: "PRECOMMIT_TYPE",
    75  	3: "PROPOSAL_TYPE",
    76  }
    77  
    78  var SignedMsgType_value = map[string]int32{
    79  	"SIGNED_MSG_TYPE_UNKNOWN": 0,
    80  	"PREVOTE_TYPE":            1,
    81  	"PRECOMMIT_TYPE":          2,
    82  	"PROPOSAL_TYPE":           3,
    83  }
    84  
    85  func (SignedMsgType) EnumDescriptor() ([]byte, []int) {
    86  	return fileDescriptor_ff06f8095857fb18, []int{1}
    87  }
    88  
    89  // PartsetHeader
    90  type PartSetHeader struct {
    91  	Total                int64    `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
    92  	Hash                 []byte   `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
    93  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
    94  	XXX_unrecognized     []byte   `json:"-"`
    95  	XXX_sizecache        int32    `json:"-"`
    96  }
    97  
    98  func (m *PartSetHeader) Reset()         { *m = PartSetHeader{} }
    99  func (m *PartSetHeader) String() string { return proto.CompactTextString(m) }
   100  func (*PartSetHeader) ProtoMessage()    {}
   101  func (*PartSetHeader) Descriptor() ([]byte, []int) {
   102  	return fileDescriptor_ff06f8095857fb18, []int{0}
   103  }
   104  func (m *PartSetHeader) XXX_Unmarshal(b []byte) error {
   105  	return m.Unmarshal(b)
   106  }
   107  func (m *PartSetHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   108  	if deterministic {
   109  		return xxx_messageInfo_PartSetHeader.Marshal(b, m, deterministic)
   110  	} else {
   111  		b = b[:cap(b)]
   112  		n, err := m.MarshalToSizedBuffer(b)
   113  		if err != nil {
   114  			return nil, err
   115  		}
   116  		return b[:n], nil
   117  	}
   118  }
   119  func (m *PartSetHeader) XXX_Merge(src proto.Message) {
   120  	xxx_messageInfo_PartSetHeader.Merge(m, src)
   121  }
   122  func (m *PartSetHeader) XXX_Size() int {
   123  	return m.Size()
   124  }
   125  func (m *PartSetHeader) XXX_DiscardUnknown() {
   126  	xxx_messageInfo_PartSetHeader.DiscardUnknown(m)
   127  }
   128  
   129  var xxx_messageInfo_PartSetHeader proto.InternalMessageInfo
   130  
   131  func (m *PartSetHeader) GetTotal() int64 {
   132  	if m != nil {
   133  		return m.Total
   134  	}
   135  	return 0
   136  }
   137  
   138  func (m *PartSetHeader) GetHash() []byte {
   139  	if m != nil {
   140  		return m.Hash
   141  	}
   142  	return nil
   143  }
   144  
   145  type Part struct {
   146  	Index                uint32             `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
   147  	Bytes                []byte             `protobuf:"bytes,2,opt,name=bytes,proto3" json:"bytes,omitempty"`
   148  	Proof                merkle.SimpleProof `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof"`
   149  	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
   150  	XXX_unrecognized     []byte             `json:"-"`
   151  	XXX_sizecache        int32              `json:"-"`
   152  }
   153  
   154  func (m *Part) Reset()         { *m = Part{} }
   155  func (m *Part) String() string { return proto.CompactTextString(m) }
   156  func (*Part) ProtoMessage()    {}
   157  func (*Part) Descriptor() ([]byte, []int) {
   158  	return fileDescriptor_ff06f8095857fb18, []int{1}
   159  }
   160  func (m *Part) XXX_Unmarshal(b []byte) error {
   161  	return m.Unmarshal(b)
   162  }
   163  func (m *Part) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   164  	if deterministic {
   165  		return xxx_messageInfo_Part.Marshal(b, m, deterministic)
   166  	} else {
   167  		b = b[:cap(b)]
   168  		n, err := m.MarshalToSizedBuffer(b)
   169  		if err != nil {
   170  			return nil, err
   171  		}
   172  		return b[:n], nil
   173  	}
   174  }
   175  func (m *Part) XXX_Merge(src proto.Message) {
   176  	xxx_messageInfo_Part.Merge(m, src)
   177  }
   178  func (m *Part) XXX_Size() int {
   179  	return m.Size()
   180  }
   181  func (m *Part) XXX_DiscardUnknown() {
   182  	xxx_messageInfo_Part.DiscardUnknown(m)
   183  }
   184  
   185  var xxx_messageInfo_Part proto.InternalMessageInfo
   186  
   187  func (m *Part) GetIndex() uint32 {
   188  	if m != nil {
   189  		return m.Index
   190  	}
   191  	return 0
   192  }
   193  
   194  func (m *Part) GetBytes() []byte {
   195  	if m != nil {
   196  		return m.Bytes
   197  	}
   198  	return nil
   199  }
   200  
   201  func (m *Part) GetProof() merkle.SimpleProof {
   202  	if m != nil {
   203  		return m.Proof
   204  	}
   205  	return merkle.SimpleProof{}
   206  }
   207  
   208  // BlockID
   209  type BlockID struct {
   210  	Hash                 []byte        `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
   211  	PartsHeader          PartSetHeader `protobuf:"bytes,2,opt,name=parts_header,json=partsHeader,proto3" json:"parts_header"`
   212  	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
   213  	XXX_unrecognized     []byte        `json:"-"`
   214  	XXX_sizecache        int32         `json:"-"`
   215  }
   216  
   217  func (m *BlockID) Reset()         { *m = BlockID{} }
   218  func (m *BlockID) String() string { return proto.CompactTextString(m) }
   219  func (*BlockID) ProtoMessage()    {}
   220  func (*BlockID) Descriptor() ([]byte, []int) {
   221  	return fileDescriptor_ff06f8095857fb18, []int{2}
   222  }
   223  func (m *BlockID) XXX_Unmarshal(b []byte) error {
   224  	return m.Unmarshal(b)
   225  }
   226  func (m *BlockID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   227  	if deterministic {
   228  		return xxx_messageInfo_BlockID.Marshal(b, m, deterministic)
   229  	} else {
   230  		b = b[:cap(b)]
   231  		n, err := m.MarshalToSizedBuffer(b)
   232  		if err != nil {
   233  			return nil, err
   234  		}
   235  		return b[:n], nil
   236  	}
   237  }
   238  func (m *BlockID) XXX_Merge(src proto.Message) {
   239  	xxx_messageInfo_BlockID.Merge(m, src)
   240  }
   241  func (m *BlockID) XXX_Size() int {
   242  	return m.Size()
   243  }
   244  func (m *BlockID) XXX_DiscardUnknown() {
   245  	xxx_messageInfo_BlockID.DiscardUnknown(m)
   246  }
   247  
   248  var xxx_messageInfo_BlockID proto.InternalMessageInfo
   249  
   250  func (m *BlockID) GetHash() []byte {
   251  	if m != nil {
   252  		return m.Hash
   253  	}
   254  	return nil
   255  }
   256  
   257  func (m *BlockID) GetPartsHeader() PartSetHeader {
   258  	if m != nil {
   259  		return m.PartsHeader
   260  	}
   261  	return PartSetHeader{}
   262  }
   263  
   264  // Header defines the structure of a Tendermint block header.
   265  type Header struct {
   266  	// basic block info
   267  	Version version.Consensus `protobuf:"bytes,1,opt,name=version,proto3" json:"version"`
   268  	ChainID string            `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
   269  	Height  int64             `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
   270  	Time    time.Time         `protobuf:"bytes,4,opt,name=time,proto3,stdtime" json:"time"`
   271  	// prev block info
   272  	LastBlockID BlockID `protobuf:"bytes,5,opt,name=last_block_id,json=lastBlockId,proto3" json:"last_block_id"`
   273  	// hashes of block data
   274  	LastCommitHash []byte `protobuf:"bytes,6,opt,name=last_commit_hash,json=lastCommitHash,proto3" json:"last_commit_hash,omitempty"`
   275  	DataHash       []byte `protobuf:"bytes,7,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"`
   276  	// hashes from the app output from the prev block
   277  	ValidatorsHash     []byte `protobuf:"bytes,8,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"`
   278  	NextValidatorsHash []byte `protobuf:"bytes,9,opt,name=next_validators_hash,json=nextValidatorsHash,proto3" json:"next_validators_hash,omitempty"`
   279  	ConsensusHash      []byte `protobuf:"bytes,10,opt,name=consensus_hash,json=consensusHash,proto3" json:"consensus_hash,omitempty"`
   280  	AppHash            []byte `protobuf:"bytes,11,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"`
   281  	LastResultsHash    []byte `protobuf:"bytes,12,opt,name=last_results_hash,json=lastResultsHash,proto3" json:"last_results_hash,omitempty"`
   282  	// consensus info
   283  	EvidenceHash         []byte   `protobuf:"bytes,13,opt,name=evidence_hash,json=evidenceHash,proto3" json:"evidence_hash,omitempty"`
   284  	ProposerAddress      []byte   `protobuf:"bytes,14,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"`
   285  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   286  	XXX_unrecognized     []byte   `json:"-"`
   287  	XXX_sizecache        int32    `json:"-"`
   288  }
   289  
   290  func (m *Header) Reset()         { *m = Header{} }
   291  func (m *Header) String() string { return proto.CompactTextString(m) }
   292  func (*Header) ProtoMessage()    {}
   293  func (*Header) Descriptor() ([]byte, []int) {
   294  	return fileDescriptor_ff06f8095857fb18, []int{3}
   295  }
   296  func (m *Header) XXX_Unmarshal(b []byte) error {
   297  	return m.Unmarshal(b)
   298  }
   299  func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   300  	if deterministic {
   301  		return xxx_messageInfo_Header.Marshal(b, m, deterministic)
   302  	} else {
   303  		b = b[:cap(b)]
   304  		n, err := m.MarshalToSizedBuffer(b)
   305  		if err != nil {
   306  			return nil, err
   307  		}
   308  		return b[:n], nil
   309  	}
   310  }
   311  func (m *Header) XXX_Merge(src proto.Message) {
   312  	xxx_messageInfo_Header.Merge(m, src)
   313  }
   314  func (m *Header) XXX_Size() int {
   315  	return m.Size()
   316  }
   317  func (m *Header) XXX_DiscardUnknown() {
   318  	xxx_messageInfo_Header.DiscardUnknown(m)
   319  }
   320  
   321  var xxx_messageInfo_Header proto.InternalMessageInfo
   322  
   323  func (m *Header) GetVersion() version.Consensus {
   324  	if m != nil {
   325  		return m.Version
   326  	}
   327  	return version.Consensus{}
   328  }
   329  
   330  func (m *Header) GetChainID() string {
   331  	if m != nil {
   332  		return m.ChainID
   333  	}
   334  	return ""
   335  }
   336  
   337  func (m *Header) GetHeight() int64 {
   338  	if m != nil {
   339  		return m.Height
   340  	}
   341  	return 0
   342  }
   343  
   344  func (m *Header) GetTime() time.Time {
   345  	if m != nil {
   346  		return m.Time
   347  	}
   348  	return time.Time{}
   349  }
   350  
   351  func (m *Header) GetLastBlockID() BlockID {
   352  	if m != nil {
   353  		return m.LastBlockID
   354  	}
   355  	return BlockID{}
   356  }
   357  
   358  func (m *Header) GetLastCommitHash() []byte {
   359  	if m != nil {
   360  		return m.LastCommitHash
   361  	}
   362  	return nil
   363  }
   364  
   365  func (m *Header) GetDataHash() []byte {
   366  	if m != nil {
   367  		return m.DataHash
   368  	}
   369  	return nil
   370  }
   371  
   372  func (m *Header) GetValidatorsHash() []byte {
   373  	if m != nil {
   374  		return m.ValidatorsHash
   375  	}
   376  	return nil
   377  }
   378  
   379  func (m *Header) GetNextValidatorsHash() []byte {
   380  	if m != nil {
   381  		return m.NextValidatorsHash
   382  	}
   383  	return nil
   384  }
   385  
   386  func (m *Header) GetConsensusHash() []byte {
   387  	if m != nil {
   388  		return m.ConsensusHash
   389  	}
   390  	return nil
   391  }
   392  
   393  func (m *Header) GetAppHash() []byte {
   394  	if m != nil {
   395  		return m.AppHash
   396  	}
   397  	return nil
   398  }
   399  
   400  func (m *Header) GetLastResultsHash() []byte {
   401  	if m != nil {
   402  		return m.LastResultsHash
   403  	}
   404  	return nil
   405  }
   406  
   407  func (m *Header) GetEvidenceHash() []byte {
   408  	if m != nil {
   409  		return m.EvidenceHash
   410  	}
   411  	return nil
   412  }
   413  
   414  func (m *Header) GetProposerAddress() []byte {
   415  	if m != nil {
   416  		return m.ProposerAddress
   417  	}
   418  	return nil
   419  }
   420  
   421  // Data contains the set of transactions included in the block
   422  type Data struct {
   423  	// Txs that will be applied by state @ block.Height+1.
   424  	// NOTE: not all txs here are valid.  We're just agreeing on the order first.
   425  	// This means that block.AppHash does not include these txs.
   426  	Txs [][]byte `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"`
   427  	// Volatile
   428  	Hash                 []byte   `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
   429  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   430  	XXX_unrecognized     []byte   `json:"-"`
   431  	XXX_sizecache        int32    `json:"-"`
   432  }
   433  
   434  func (m *Data) Reset()         { *m = Data{} }
   435  func (m *Data) String() string { return proto.CompactTextString(m) }
   436  func (*Data) ProtoMessage()    {}
   437  func (*Data) Descriptor() ([]byte, []int) {
   438  	return fileDescriptor_ff06f8095857fb18, []int{4}
   439  }
   440  func (m *Data) XXX_Unmarshal(b []byte) error {
   441  	return m.Unmarshal(b)
   442  }
   443  func (m *Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   444  	if deterministic {
   445  		return xxx_messageInfo_Data.Marshal(b, m, deterministic)
   446  	} else {
   447  		b = b[:cap(b)]
   448  		n, err := m.MarshalToSizedBuffer(b)
   449  		if err != nil {
   450  			return nil, err
   451  		}
   452  		return b[:n], nil
   453  	}
   454  }
   455  func (m *Data) XXX_Merge(src proto.Message) {
   456  	xxx_messageInfo_Data.Merge(m, src)
   457  }
   458  func (m *Data) XXX_Size() int {
   459  	return m.Size()
   460  }
   461  func (m *Data) XXX_DiscardUnknown() {
   462  	xxx_messageInfo_Data.DiscardUnknown(m)
   463  }
   464  
   465  var xxx_messageInfo_Data proto.InternalMessageInfo
   466  
   467  func (m *Data) GetTxs() [][]byte {
   468  	if m != nil {
   469  		return m.Txs
   470  	}
   471  	return nil
   472  }
   473  
   474  func (m *Data) GetHash() []byte {
   475  	if m != nil {
   476  		return m.Hash
   477  	}
   478  	return nil
   479  }
   480  
   481  // Vote represents a prevote, precommit, or commit vote from validators for
   482  // consensus.
   483  type Vote struct {
   484  	Type                 SignedMsgType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.proto.types.SignedMsgType" json:"type,omitempty"`
   485  	Height               int64         `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
   486  	Round                int64         `protobuf:"varint,3,opt,name=round,proto3" json:"round,omitempty"`
   487  	BlockID              BlockID       `protobuf:"bytes,4,opt,name=block_id,json=blockId,proto3" json:"block_id"`
   488  	Timestamp            time.Time     `protobuf:"bytes,5,opt,name=timestamp,proto3,stdtime" json:"timestamp"`
   489  	ValidatorAddress     []byte        `protobuf:"bytes,6,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"`
   490  	ValidatorIndex       int64         `protobuf:"varint,7,opt,name=validator_index,json=validatorIndex,proto3" json:"validator_index,omitempty"`
   491  	Signature            []byte        `protobuf:"bytes,8,opt,name=signature,proto3" json:"signature,omitempty"`
   492  	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
   493  	XXX_unrecognized     []byte        `json:"-"`
   494  	XXX_sizecache        int32         `json:"-"`
   495  }
   496  
   497  func (m *Vote) Reset()         { *m = Vote{} }
   498  func (m *Vote) String() string { return proto.CompactTextString(m) }
   499  func (*Vote) ProtoMessage()    {}
   500  func (*Vote) Descriptor() ([]byte, []int) {
   501  	return fileDescriptor_ff06f8095857fb18, []int{5}
   502  }
   503  func (m *Vote) XXX_Unmarshal(b []byte) error {
   504  	return m.Unmarshal(b)
   505  }
   506  func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   507  	if deterministic {
   508  		return xxx_messageInfo_Vote.Marshal(b, m, deterministic)
   509  	} else {
   510  		b = b[:cap(b)]
   511  		n, err := m.MarshalToSizedBuffer(b)
   512  		if err != nil {
   513  			return nil, err
   514  		}
   515  		return b[:n], nil
   516  	}
   517  }
   518  func (m *Vote) XXX_Merge(src proto.Message) {
   519  	xxx_messageInfo_Vote.Merge(m, src)
   520  }
   521  func (m *Vote) XXX_Size() int {
   522  	return m.Size()
   523  }
   524  func (m *Vote) XXX_DiscardUnknown() {
   525  	xxx_messageInfo_Vote.DiscardUnknown(m)
   526  }
   527  
   528  var xxx_messageInfo_Vote proto.InternalMessageInfo
   529  
   530  func (m *Vote) GetType() SignedMsgType {
   531  	if m != nil {
   532  		return m.Type
   533  	}
   534  	return SIGNED_MSG_TYPE_UNKNOWN
   535  }
   536  
   537  func (m *Vote) GetHeight() int64 {
   538  	if m != nil {
   539  		return m.Height
   540  	}
   541  	return 0
   542  }
   543  
   544  func (m *Vote) GetRound() int64 {
   545  	if m != nil {
   546  		return m.Round
   547  	}
   548  	return 0
   549  }
   550  
   551  func (m *Vote) GetBlockID() BlockID {
   552  	if m != nil {
   553  		return m.BlockID
   554  	}
   555  	return BlockID{}
   556  }
   557  
   558  func (m *Vote) GetTimestamp() time.Time {
   559  	if m != nil {
   560  		return m.Timestamp
   561  	}
   562  	return time.Time{}
   563  }
   564  
   565  func (m *Vote) GetValidatorAddress() []byte {
   566  	if m != nil {
   567  		return m.ValidatorAddress
   568  	}
   569  	return nil
   570  }
   571  
   572  func (m *Vote) GetValidatorIndex() int64 {
   573  	if m != nil {
   574  		return m.ValidatorIndex
   575  	}
   576  	return 0
   577  }
   578  
   579  func (m *Vote) GetSignature() []byte {
   580  	if m != nil {
   581  		return m.Signature
   582  	}
   583  	return nil
   584  }
   585  
   586  // Commit contains the evidence that a block was committed by a set of validators.
   587  type Commit struct {
   588  	Height               int64          `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
   589  	Round                int32          `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"`
   590  	BlockID              BlockID        `protobuf:"bytes,3,opt,name=block_id,json=blockId,proto3" json:"block_id"`
   591  	Signatures           []CommitSig    `protobuf:"bytes,4,rep,name=signatures,proto3" json:"signatures"`
   592  	Hash                 []byte         `protobuf:"bytes,5,opt,name=hash,proto3" json:"hash,omitempty"`
   593  	BitArray             *bits.BitArray `protobuf:"bytes,6,opt,name=bit_array,json=bitArray,proto3" json:"bit_array,omitempty"`
   594  	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
   595  	XXX_unrecognized     []byte         `json:"-"`
   596  	XXX_sizecache        int32          `json:"-"`
   597  }
   598  
   599  func (m *Commit) Reset()         { *m = Commit{} }
   600  func (m *Commit) String() string { return proto.CompactTextString(m) }
   601  func (*Commit) ProtoMessage()    {}
   602  func (*Commit) Descriptor() ([]byte, []int) {
   603  	return fileDescriptor_ff06f8095857fb18, []int{6}
   604  }
   605  func (m *Commit) XXX_Unmarshal(b []byte) error {
   606  	return m.Unmarshal(b)
   607  }
   608  func (m *Commit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   609  	if deterministic {
   610  		return xxx_messageInfo_Commit.Marshal(b, m, deterministic)
   611  	} else {
   612  		b = b[:cap(b)]
   613  		n, err := m.MarshalToSizedBuffer(b)
   614  		if err != nil {
   615  			return nil, err
   616  		}
   617  		return b[:n], nil
   618  	}
   619  }
   620  func (m *Commit) XXX_Merge(src proto.Message) {
   621  	xxx_messageInfo_Commit.Merge(m, src)
   622  }
   623  func (m *Commit) XXX_Size() int {
   624  	return m.Size()
   625  }
   626  func (m *Commit) XXX_DiscardUnknown() {
   627  	xxx_messageInfo_Commit.DiscardUnknown(m)
   628  }
   629  
   630  var xxx_messageInfo_Commit proto.InternalMessageInfo
   631  
   632  func (m *Commit) GetHeight() int64 {
   633  	if m != nil {
   634  		return m.Height
   635  	}
   636  	return 0
   637  }
   638  
   639  func (m *Commit) GetRound() int32 {
   640  	if m != nil {
   641  		return m.Round
   642  	}
   643  	return 0
   644  }
   645  
   646  func (m *Commit) GetBlockID() BlockID {
   647  	if m != nil {
   648  		return m.BlockID
   649  	}
   650  	return BlockID{}
   651  }
   652  
   653  func (m *Commit) GetSignatures() []CommitSig {
   654  	if m != nil {
   655  		return m.Signatures
   656  	}
   657  	return nil
   658  }
   659  
   660  func (m *Commit) GetHash() []byte {
   661  	if m != nil {
   662  		return m.Hash
   663  	}
   664  	return nil
   665  }
   666  
   667  func (m *Commit) GetBitArray() *bits.BitArray {
   668  	if m != nil {
   669  		return m.BitArray
   670  	}
   671  	return nil
   672  }
   673  
   674  // CommitSig is a part of the Vote included in a Commit.
   675  type CommitSig struct {
   676  	BlockIdFlag          BlockIDFlag `protobuf:"varint,1,opt,name=block_id_flag,json=blockIdFlag,proto3,enum=tendermint.proto.types.BlockIDFlag" json:"block_id_flag,omitempty"`
   677  	ValidatorAddress     []byte      `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"`
   678  	Timestamp            time.Time   `protobuf:"bytes,3,opt,name=timestamp,proto3,stdtime" json:"timestamp"`
   679  	Signature            []byte      `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
   680  	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
   681  	XXX_unrecognized     []byte      `json:"-"`
   682  	XXX_sizecache        int32       `json:"-"`
   683  }
   684  
   685  func (m *CommitSig) Reset()         { *m = CommitSig{} }
   686  func (m *CommitSig) String() string { return proto.CompactTextString(m) }
   687  func (*CommitSig) ProtoMessage()    {}
   688  func (*CommitSig) Descriptor() ([]byte, []int) {
   689  	return fileDescriptor_ff06f8095857fb18, []int{7}
   690  }
   691  func (m *CommitSig) XXX_Unmarshal(b []byte) error {
   692  	return m.Unmarshal(b)
   693  }
   694  func (m *CommitSig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   695  	if deterministic {
   696  		return xxx_messageInfo_CommitSig.Marshal(b, m, deterministic)
   697  	} else {
   698  		b = b[:cap(b)]
   699  		n, err := m.MarshalToSizedBuffer(b)
   700  		if err != nil {
   701  			return nil, err
   702  		}
   703  		return b[:n], nil
   704  	}
   705  }
   706  func (m *CommitSig) XXX_Merge(src proto.Message) {
   707  	xxx_messageInfo_CommitSig.Merge(m, src)
   708  }
   709  func (m *CommitSig) XXX_Size() int {
   710  	return m.Size()
   711  }
   712  func (m *CommitSig) XXX_DiscardUnknown() {
   713  	xxx_messageInfo_CommitSig.DiscardUnknown(m)
   714  }
   715  
   716  var xxx_messageInfo_CommitSig proto.InternalMessageInfo
   717  
   718  func (m *CommitSig) GetBlockIdFlag() BlockIDFlag {
   719  	if m != nil {
   720  		return m.BlockIdFlag
   721  	}
   722  	return BLOCKD_ID_FLAG_UNKNOWN
   723  }
   724  
   725  func (m *CommitSig) GetValidatorAddress() []byte {
   726  	if m != nil {
   727  		return m.ValidatorAddress
   728  	}
   729  	return nil
   730  }
   731  
   732  func (m *CommitSig) GetTimestamp() time.Time {
   733  	if m != nil {
   734  		return m.Timestamp
   735  	}
   736  	return time.Time{}
   737  }
   738  
   739  func (m *CommitSig) GetSignature() []byte {
   740  	if m != nil {
   741  		return m.Signature
   742  	}
   743  	return nil
   744  }
   745  
   746  type Proposal struct {
   747  	Type                 SignedMsgType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.proto.types.SignedMsgType" json:"type,omitempty"`
   748  	Height               int64         `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
   749  	Round                int32         `protobuf:"varint,3,opt,name=round,proto3" json:"round,omitempty"`
   750  	PolRound             int32         `protobuf:"varint,4,opt,name=pol_round,json=polRound,proto3" json:"pol_round,omitempty"`
   751  	BlockID              BlockID       `protobuf:"bytes,5,opt,name=block_id,json=blockId,proto3" json:"block_id"`
   752  	Timestamp            time.Time     `protobuf:"bytes,6,opt,name=timestamp,proto3,stdtime" json:"timestamp"`
   753  	Signature            []byte        `protobuf:"bytes,7,opt,name=signature,proto3" json:"signature,omitempty"`
   754  	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
   755  	XXX_unrecognized     []byte        `json:"-"`
   756  	XXX_sizecache        int32         `json:"-"`
   757  }
   758  
   759  func (m *Proposal) Reset()         { *m = Proposal{} }
   760  func (m *Proposal) String() string { return proto.CompactTextString(m) }
   761  func (*Proposal) ProtoMessage()    {}
   762  func (*Proposal) Descriptor() ([]byte, []int) {
   763  	return fileDescriptor_ff06f8095857fb18, []int{8}
   764  }
   765  func (m *Proposal) XXX_Unmarshal(b []byte) error {
   766  	return m.Unmarshal(b)
   767  }
   768  func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   769  	if deterministic {
   770  		return xxx_messageInfo_Proposal.Marshal(b, m, deterministic)
   771  	} else {
   772  		b = b[:cap(b)]
   773  		n, err := m.MarshalToSizedBuffer(b)
   774  		if err != nil {
   775  			return nil, err
   776  		}
   777  		return b[:n], nil
   778  	}
   779  }
   780  func (m *Proposal) XXX_Merge(src proto.Message) {
   781  	xxx_messageInfo_Proposal.Merge(m, src)
   782  }
   783  func (m *Proposal) XXX_Size() int {
   784  	return m.Size()
   785  }
   786  func (m *Proposal) XXX_DiscardUnknown() {
   787  	xxx_messageInfo_Proposal.DiscardUnknown(m)
   788  }
   789  
   790  var xxx_messageInfo_Proposal proto.InternalMessageInfo
   791  
   792  func (m *Proposal) GetType() SignedMsgType {
   793  	if m != nil {
   794  		return m.Type
   795  	}
   796  	return SIGNED_MSG_TYPE_UNKNOWN
   797  }
   798  
   799  func (m *Proposal) GetHeight() int64 {
   800  	if m != nil {
   801  		return m.Height
   802  	}
   803  	return 0
   804  }
   805  
   806  func (m *Proposal) GetRound() int32 {
   807  	if m != nil {
   808  		return m.Round
   809  	}
   810  	return 0
   811  }
   812  
   813  func (m *Proposal) GetPolRound() int32 {
   814  	if m != nil {
   815  		return m.PolRound
   816  	}
   817  	return 0
   818  }
   819  
   820  func (m *Proposal) GetBlockID() BlockID {
   821  	if m != nil {
   822  		return m.BlockID
   823  	}
   824  	return BlockID{}
   825  }
   826  
   827  func (m *Proposal) GetTimestamp() time.Time {
   828  	if m != nil {
   829  		return m.Timestamp
   830  	}
   831  	return time.Time{}
   832  }
   833  
   834  func (m *Proposal) GetSignature() []byte {
   835  	if m != nil {
   836  		return m.Signature
   837  	}
   838  	return nil
   839  }
   840  
   841  type SignedHeader struct {
   842  	Header               *Header  `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
   843  	Commit               *Commit  `protobuf:"bytes,2,opt,name=commit,proto3" json:"commit,omitempty"`
   844  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   845  	XXX_unrecognized     []byte   `json:"-"`
   846  	XXX_sizecache        int32    `json:"-"`
   847  }
   848  
   849  func (m *SignedHeader) Reset()         { *m = SignedHeader{} }
   850  func (m *SignedHeader) String() string { return proto.CompactTextString(m) }
   851  func (*SignedHeader) ProtoMessage()    {}
   852  func (*SignedHeader) Descriptor() ([]byte, []int) {
   853  	return fileDescriptor_ff06f8095857fb18, []int{9}
   854  }
   855  func (m *SignedHeader) XXX_Unmarshal(b []byte) error {
   856  	return m.Unmarshal(b)
   857  }
   858  func (m *SignedHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   859  	if deterministic {
   860  		return xxx_messageInfo_SignedHeader.Marshal(b, m, deterministic)
   861  	} else {
   862  		b = b[:cap(b)]
   863  		n, err := m.MarshalToSizedBuffer(b)
   864  		if err != nil {
   865  			return nil, err
   866  		}
   867  		return b[:n], nil
   868  	}
   869  }
   870  func (m *SignedHeader) XXX_Merge(src proto.Message) {
   871  	xxx_messageInfo_SignedHeader.Merge(m, src)
   872  }
   873  func (m *SignedHeader) XXX_Size() int {
   874  	return m.Size()
   875  }
   876  func (m *SignedHeader) XXX_DiscardUnknown() {
   877  	xxx_messageInfo_SignedHeader.DiscardUnknown(m)
   878  }
   879  
   880  var xxx_messageInfo_SignedHeader proto.InternalMessageInfo
   881  
   882  func (m *SignedHeader) GetHeader() *Header {
   883  	if m != nil {
   884  		return m.Header
   885  	}
   886  	return nil
   887  }
   888  
   889  func (m *SignedHeader) GetCommit() *Commit {
   890  	if m != nil {
   891  		return m.Commit
   892  	}
   893  	return nil
   894  }
   895  
   896  type BlockMeta struct {
   897  	BlockID              BlockID  `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id"`
   898  	BlockSize            int64    `protobuf:"varint,2,opt,name=block_size,json=blockSize,proto3" json:"block_size,omitempty"`
   899  	Header               Header   `protobuf:"bytes,3,opt,name=header,proto3" json:"header"`
   900  	NumTxs               int64    `protobuf:"varint,4,opt,name=num_txs,json=numTxs,proto3" json:"num_txs,omitempty"`
   901  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   902  	XXX_unrecognized     []byte   `json:"-"`
   903  	XXX_sizecache        int32    `json:"-"`
   904  }
   905  
   906  func (m *BlockMeta) Reset()         { *m = BlockMeta{} }
   907  func (m *BlockMeta) String() string { return proto.CompactTextString(m) }
   908  func (*BlockMeta) ProtoMessage()    {}
   909  func (*BlockMeta) Descriptor() ([]byte, []int) {
   910  	return fileDescriptor_ff06f8095857fb18, []int{10}
   911  }
   912  func (m *BlockMeta) XXX_Unmarshal(b []byte) error {
   913  	return m.Unmarshal(b)
   914  }
   915  func (m *BlockMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   916  	if deterministic {
   917  		return xxx_messageInfo_BlockMeta.Marshal(b, m, deterministic)
   918  	} else {
   919  		b = b[:cap(b)]
   920  		n, err := m.MarshalToSizedBuffer(b)
   921  		if err != nil {
   922  			return nil, err
   923  		}
   924  		return b[:n], nil
   925  	}
   926  }
   927  func (m *BlockMeta) XXX_Merge(src proto.Message) {
   928  	xxx_messageInfo_BlockMeta.Merge(m, src)
   929  }
   930  func (m *BlockMeta) XXX_Size() int {
   931  	return m.Size()
   932  }
   933  func (m *BlockMeta) XXX_DiscardUnknown() {
   934  	xxx_messageInfo_BlockMeta.DiscardUnknown(m)
   935  }
   936  
   937  var xxx_messageInfo_BlockMeta proto.InternalMessageInfo
   938  
   939  func (m *BlockMeta) GetBlockID() BlockID {
   940  	if m != nil {
   941  		return m.BlockID
   942  	}
   943  	return BlockID{}
   944  }
   945  
   946  func (m *BlockMeta) GetBlockSize() int64 {
   947  	if m != nil {
   948  		return m.BlockSize
   949  	}
   950  	return 0
   951  }
   952  
   953  func (m *BlockMeta) GetHeader() Header {
   954  	if m != nil {
   955  		return m.Header
   956  	}
   957  	return Header{}
   958  }
   959  
   960  func (m *BlockMeta) GetNumTxs() int64 {
   961  	if m != nil {
   962  		return m.NumTxs
   963  	}
   964  	return 0
   965  }
   966  
   967  func init() {
   968  	proto.RegisterEnum("tendermint.proto.types.BlockIDFlag", BlockIDFlag_name, BlockIDFlag_value)
   969  	proto.RegisterEnum("tendermint.proto.types.SignedMsgType", SignedMsgType_name, SignedMsgType_value)
   970  	proto.RegisterType((*PartSetHeader)(nil), "tendermint.proto.types.PartSetHeader")
   971  	proto.RegisterType((*Part)(nil), "tendermint.proto.types.Part")
   972  	proto.RegisterType((*BlockID)(nil), "tendermint.proto.types.BlockID")
   973  	proto.RegisterType((*Header)(nil), "tendermint.proto.types.Header")
   974  	proto.RegisterType((*Data)(nil), "tendermint.proto.types.Data")
   975  	proto.RegisterType((*Vote)(nil), "tendermint.proto.types.Vote")
   976  	proto.RegisterType((*Commit)(nil), "tendermint.proto.types.Commit")
   977  	proto.RegisterType((*CommitSig)(nil), "tendermint.proto.types.CommitSig")
   978  	proto.RegisterType((*Proposal)(nil), "tendermint.proto.types.Proposal")
   979  	proto.RegisterType((*SignedHeader)(nil), "tendermint.proto.types.SignedHeader")
   980  	proto.RegisterType((*BlockMeta)(nil), "tendermint.proto.types.BlockMeta")
   981  }
   982  
   983  func init() { proto.RegisterFile("proto/types/types.proto", fileDescriptor_ff06f8095857fb18) }
   984  
   985  var fileDescriptor_ff06f8095857fb18 = []byte{
   986  	// 1293 bytes of a gzipped FileDescriptorProto
   987  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x5d, 0x6f, 0x1b, 0x45,
   988  	0x17, 0xce, 0xda, 0xeb, 0xd8, 0x3e, 0x6b, 0x27, 0xce, 0xbe, 0x79, 0x5b, 0xe3, 0x80, 0xed, 0x3a,
   989  	0xb4, 0xa4, 0x1f, 0x5a, 0xa3, 0x20, 0x21, 0x2a, 0x21, 0x24, 0x3b, 0x49, 0x53, 0xab, 0x89, 0x63,
   990  	0xad, 0x4d, 0xf9, 0xb8, 0x59, 0x8d, 0xbd, 0x53, 0x7b, 0xd5, 0xf5, 0xee, 0x6a, 0x67, 0x1c, 0x25,
   991  	0x45, 0x42, 0xe2, 0x0e, 0xe5, 0x8a, 0x4b, 0x6e, 0x72, 0x55, 0x90, 0xf8, 0x17, 0x70, 0xd9, 0x2b,
   992  	0xc4, 0x2f, 0x28, 0x28, 0xfd, 0x0b, 0xfc, 0x00, 0x34, 0x1f, 0xbb, 0xb6, 0x9b, 0x04, 0x2a, 0x5a,
   993  	0x6e, 0x92, 0x9d, 0x73, 0x9e, 0x73, 0x66, 0xce, 0x73, 0x9e, 0x33, 0x93, 0xc0, 0xd5, 0x20, 0xf4,
   994  	0xa9, 0x5f, 0xa7, 0xc7, 0x01, 0x26, 0xe2, 0xa7, 0xc1, 0x2d, 0xfa, 0x15, 0x8a, 0x3d, 0x1b, 0x87,
   995  	0x63, 0xc7, 0xa3, 0xc2, 0x62, 0x70, 0x6f, 0xe9, 0x06, 0x1d, 0x39, 0xa1, 0x6d, 0x05, 0x28, 0xa4,
   996  	0xc7, 0x75, 0x11, 0x3c, 0xf4, 0x87, 0xfe, 0xf4, 0x4b, 0xa0, 0x4b, 0x95, 0xa1, 0xef, 0x0f, 0x5d,
   997  	0x2c, 0x20, 0xfd, 0xc9, 0xa3, 0x3a, 0x75, 0xc6, 0x98, 0x50, 0x34, 0x0e, 0x24, 0x60, 0x4d, 0x84,
   998  	0xb8, 0x4e, 0x9f, 0xd4, 0xfb, 0x0e, 0x9d, 0xdb, 0xbd, 0x54, 0x11, 0xce, 0x41, 0x78, 0x1c, 0x50,
   999  	0xbf, 0x3e, 0xc6, 0xe1, 0x63, 0x17, 0xcf, 0x01, 0x64, 0xf4, 0x21, 0x0e, 0x89, 0xe3, 0x7b, 0xd1,
  1000  	0x6f, 0xe1, 0xac, 0xdd, 0x85, 0x7c, 0x07, 0x85, 0xb4, 0x8b, 0xe9, 0x7d, 0x8c, 0x6c, 0x1c, 0xea,
  1001  	0xab, 0x90, 0xa2, 0x3e, 0x45, 0x6e, 0x51, 0xa9, 0x2a, 0x1b, 0x49, 0x53, 0x2c, 0x74, 0x1d, 0xd4,
  1002  	0x11, 0x22, 0xa3, 0x62, 0xa2, 0xaa, 0x6c, 0xe4, 0x4c, 0xfe, 0x5d, 0xfb, 0x0a, 0x54, 0x16, 0xca,
  1003  	0x22, 0x1c, 0xcf, 0xc6, 0x47, 0x3c, 0x22, 0x6f, 0x8a, 0x05, 0xb3, 0xf6, 0x8f, 0x29, 0x26, 0x32,
  1004  	0x44, 0x2c, 0xf4, 0x5d, 0x48, 0x05, 0xa1, 0xef, 0x3f, 0x2a, 0x26, 0xab, 0xca, 0x86, 0xb6, 0x79,
  1005  	0xdb, 0x38, 0x47, 0x9d, 0xa8, 0xc3, 0x10, 0x75, 0x18, 0x5d, 0x67, 0x1c, 0xb8, 0xb8, 0xc3, 0x42,
  1006  	0x9a, 0xea, 0xb3, 0xe7, 0x95, 0x05, 0x53, 0xc4, 0xd7, 0xc6, 0x90, 0x6e, 0xba, 0xfe, 0xe0, 0x71,
  1007  	0x6b, 0x3b, 0x3e, 0x9b, 0x32, 0x3d, 0x9b, 0xde, 0x86, 0x1c, 0xa3, 0x9d, 0x58, 0x23, 0x5e, 0x15,
  1008  	0x3f, 0x84, 0xb6, 0x79, 0xdd, 0xb8, 0xb8, 0x53, 0xc6, 0x1c, 0x05, 0x72, 0x23, 0x8d, 0x27, 0x10,
  1009  	0xa6, 0xda, 0x37, 0x29, 0x58, 0x94, 0x04, 0x6d, 0x41, 0x5a, 0x52, 0xc8, 0x77, 0xd4, 0x36, 0xd7,
  1010  	0xcf, 0x67, 0x8d, 0x38, 0xde, 0xf2, 0x3d, 0x82, 0x3d, 0x32, 0x21, 0x32, 0x67, 0x14, 0xa9, 0xdf,
  1011  	0x80, 0xcc, 0x60, 0x84, 0x1c, 0xcf, 0x72, 0x6c, 0x7e, 0xb6, 0x6c, 0x53, 0x3b, 0x7b, 0x5e, 0x49,
  1012  	0x6f, 0x31, 0x5b, 0x6b, 0xdb, 0x4c, 0x73, 0x67, 0xcb, 0xd6, 0xaf, 0xc0, 0xe2, 0x08, 0x3b, 0xc3,
  1013  	0x11, 0xe5, 0x84, 0x25, 0x4d, 0xb9, 0xd2, 0x3f, 0x02, 0x95, 0x89, 0xa4, 0xa8, 0xf2, 0x13, 0x94,
  1014  	0x0c, 0xa1, 0x20, 0x23, 0x52, 0x90, 0xd1, 0x8b, 0x14, 0xd4, 0xcc, 0xb0, 0x8d, 0xbf, 0xfb, 0xbd,
  1015  	0xa2, 0x98, 0x3c, 0x42, 0xff, 0x1c, 0xf2, 0x2e, 0x22, 0xd4, 0xea, 0x33, 0xf6, 0xd8, 0xf6, 0x29,
  1016  	0x9e, 0xa2, 0x72, 0x19, 0x35, 0x92, 0xe5, 0xe6, 0xff, 0x58, 0x9e, 0xb3, 0xe7, 0x15, 0x6d, 0x0f,
  1017  	0x11, 0x2a, 0x8d, 0xa6, 0xe6, 0xc6, 0x0b, 0x5b, 0xdf, 0x80, 0x02, 0xcf, 0x3c, 0xf0, 0xc7, 0x63,
  1018  	0x87, 0x5a, 0xbc, 0x27, 0x8b, 0xbc, 0x27, 0x4b, 0xcc, 0xbe, 0xc5, 0xcd, 0xf7, 0x59, 0x77, 0xd6,
  1019  	0x20, 0x6b, 0x23, 0x8a, 0x04, 0x24, 0xcd, 0x21, 0x19, 0x66, 0xe0, 0xce, 0xf7, 0x60, 0xf9, 0x10,
  1020  	0xb9, 0x8e, 0x8d, 0xa8, 0x1f, 0x12, 0x01, 0xc9, 0x88, 0x2c, 0x53, 0x33, 0x07, 0xbe, 0x0f, 0xab,
  1021  	0x1e, 0x3e, 0xa2, 0xd6, 0xcb, 0xe8, 0x2c, 0x47, 0xeb, 0xcc, 0xf7, 0x70, 0x3e, 0xe2, 0x3a, 0x2c,
  1022  	0x0d, 0xa2, 0x8e, 0x08, 0x2c, 0x70, 0x6c, 0x3e, 0xb6, 0x72, 0xd8, 0x5b, 0x90, 0x41, 0x41, 0x20,
  1023  	0x00, 0x1a, 0x07, 0xa4, 0x51, 0x10, 0x70, 0xd7, 0x2d, 0x58, 0xe1, 0x35, 0x86, 0x98, 0x4c, 0x5c,
  1024  	0x2a, 0x93, 0xe4, 0x38, 0x66, 0x99, 0x39, 0x4c, 0x61, 0xe7, 0xd8, 0x75, 0xc8, 0xe3, 0x43, 0xc7,
  1025  	0xc6, 0xde, 0x00, 0x0b, 0x5c, 0x9e, 0xe3, 0x72, 0x91, 0x91, 0x83, 0x6e, 0x42, 0x21, 0x08, 0xfd,
  1026  	0xc0, 0x27, 0x38, 0xb4, 0x90, 0x6d, 0x87, 0x98, 0x90, 0xe2, 0x92, 0xc8, 0x17, 0xd9, 0x1b, 0xc2,
  1027  	0x5c, 0xbb, 0x03, 0xea, 0x36, 0xa2, 0x48, 0x2f, 0x40, 0x92, 0x1e, 0x91, 0xa2, 0x52, 0x4d, 0x6e,
  1028  	0xe4, 0x4c, 0xf6, 0x79, 0xe1, 0x74, 0xfe, 0x99, 0x00, 0xf5, 0xa1, 0x4f, 0xb1, 0x7e, 0x17, 0x54,
  1029  	0xd6, 0x49, 0x2e, 0xd6, 0xa5, 0xcb, 0x47, 0xa0, 0xeb, 0x0c, 0x3d, 0x6c, 0xef, 0x93, 0x61, 0xef,
  1030  	0x38, 0xc0, 0x26, 0x0f, 0x99, 0x51, 0x5f, 0x62, 0x4e, 0x7d, 0xab, 0x90, 0x0a, 0xfd, 0x89, 0x67,
  1031  	0x4b, 0x51, 0x8a, 0x85, 0xfe, 0x00, 0x32, 0xb1, 0xa8, 0xd4, 0x57, 0x13, 0xd5, 0xb2, 0x14, 0x55,
  1032  	0x34, 0xcb, 0x66, 0xba, 0x2f, 0xc5, 0xd4, 0x84, 0x6c, 0x7c, 0x0b, 0x4a, 0x89, 0xbe, 0x9a, 0xca,
  1033  	0xa7, 0x61, 0xfa, 0x6d, 0x58, 0x89, 0xb5, 0x11, 0x93, 0x2b, 0x14, 0x59, 0x88, 0x1d, 0x92, 0xdd,
  1034  	0x39, 0xd9, 0x59, 0xe2, 0x3e, 0x4b, 0xf3, 0xea, 0xa6, 0xb2, 0x6b, 0xf1, 0x8b, 0xed, 0x6d, 0xc8,
  1035  	0x12, 0x67, 0xe8, 0x21, 0x3a, 0x09, 0xb1, 0x54, 0xe6, 0xd4, 0x50, 0x7b, 0x9a, 0x80, 0x45, 0xa1,
  1036  	0xf4, 0x19, 0xf6, 0x94, 0x8b, 0xd9, 0x63, 0xa4, 0xa6, 0x2e, 0x62, 0x2f, 0xf9, 0xba, 0xec, 0xed,
  1037  	0x02, 0xc4, 0x47, 0x22, 0x45, 0xb5, 0x9a, 0xdc, 0xd0, 0x36, 0xaf, 0x5d, 0x96, 0x4e, 0x1c, 0xb7,
  1038  	0xeb, 0x0c, 0xe5, 0x25, 0x35, 0x13, 0x1a, 0x2b, 0x2b, 0x35, 0x73, 0xb7, 0x36, 0x20, 0xdb, 0x77,
  1039  	0xa8, 0x85, 0xc2, 0x10, 0x1d, 0x73, 0x3a, 0xb5, 0xcd, 0x77, 0xcf, 0xe7, 0x66, 0x8f, 0x95, 0xc1,
  1040  	0x1e, 0x2b, 0xa3, 0xe9, 0xd0, 0x06, 0xc3, 0x9a, 0x99, 0xbe, 0xfc, 0xaa, 0xbd, 0x50, 0x20, 0x1b,
  1041  	0x6f, 0xab, 0xef, 0x42, 0x3e, 0x2a, 0xdd, 0x7a, 0xe4, 0xa2, 0xa1, 0x94, 0xea, 0xfa, 0x3f, 0xd4,
  1042  	0x7f, 0xcf, 0x45, 0x43, 0x53, 0x93, 0x25, 0xb3, 0xc5, 0xc5, 0x0d, 0x4f, 0x5c, 0xd2, 0xf0, 0x39,
  1043  	0x85, 0x25, 0xff, 0x9d, 0xc2, 0xe6, 0xb4, 0xa0, 0xbe, 0xac, 0x85, 0x9f, 0x13, 0x90, 0xe9, 0xf0,
  1044  	0x21, 0x46, 0xee, 0x7f, 0x3e, 0x86, 0xb1, 0x90, 0xd6, 0x20, 0x1b, 0xf8, 0xae, 0x25, 0x3c, 0x2a,
  1045  	0xf7, 0x64, 0x02, 0xdf, 0x35, 0xcf, 0xa9, 0x2c, 0xf5, 0x46, 0x67, 0x74, 0xf1, 0x0d, 0x30, 0x98,
  1046  	0x7e, 0x99, 0xc1, 0xaf, 0x21, 0x27, 0x08, 0x91, 0x6f, 0xef, 0x87, 0x8c, 0x09, 0xfe, 0xa0, 0x8b,
  1047  	0xa7, 0xb7, 0x7c, 0xd9, 0xe1, 0x05, 0xde, 0x94, 0x68, 0x16, 0x27, 0x5e, 0x25, 0xf9, 0x87, 0x40,
  1048  	0xf9, 0xef, 0x67, 0xc1, 0x94, 0xe8, 0xda, 0xaf, 0x0a, 0x64, 0x79, 0xd9, 0xfb, 0x98, 0xa2, 0x39,
  1049  	0xf2, 0x94, 0xd7, 0x25, 0xef, 0x1d, 0x00, 0x91, 0x8c, 0x38, 0x4f, 0xb0, 0x6c, 0x6c, 0x96, 0x5b,
  1050  	0xba, 0xce, 0x13, 0xac, 0x7f, 0x1c, 0x57, 0x9a, 0x7c, 0x95, 0x4a, 0xe5, 0xe8, 0x46, 0xf5, 0x5e,
  1051  	0x85, 0xb4, 0x37, 0x19, 0x5b, 0xec, 0x99, 0x50, 0x85, 0x64, 0xbc, 0xc9, 0xb8, 0x77, 0x44, 0x6e,
  1052  	0xfd, 0xa2, 0x80, 0x36, 0x33, 0x3e, 0x7a, 0x09, 0xae, 0x34, 0xf7, 0x0e, 0xb6, 0x1e, 0x6c, 0x5b,
  1053  	0xad, 0x6d, 0xeb, 0xde, 0x5e, 0x63, 0xd7, 0xfa, 0xb4, 0xfd, 0xa0, 0x7d, 0xf0, 0x59, 0xbb, 0xb0,
  1054  	0xa0, 0xd7, 0x61, 0x95, 0xfb, 0x62, 0x57, 0xa3, 0xd9, 0xdd, 0x69, 0xf7, 0x0a, 0x4a, 0xe9, 0xff,
  1055  	0x27, 0xa7, 0xd5, 0x95, 0x99, 0x34, 0x8d, 0x3e, 0xc1, 0x1e, 0x3d, 0x1f, 0xb0, 0x75, 0xb0, 0xbf,
  1056  	0xdf, 0xea, 0x15, 0x12, 0xe7, 0x02, 0xe4, 0x0d, 0x79, 0x13, 0x56, 0xe6, 0x03, 0xda, 0xad, 0xbd,
  1057  	0x42, 0xb2, 0xa4, 0x9f, 0x9c, 0x56, 0x97, 0x66, 0xd0, 0x6d, 0xc7, 0x2d, 0x65, 0xbe, 0x7d, 0x5a,
  1058  	0x5e, 0xf8, 0xe9, 0x87, 0xf2, 0xc2, 0xad, 0x1f, 0x15, 0xc8, 0xcf, 0x4d, 0x89, 0xbe, 0x06, 0x57,
  1059  	0xbb, 0xad, 0xdd, 0xf6, 0xce, 0xb6, 0xb5, 0xdf, 0xdd, 0xb5, 0x7a, 0x5f, 0x74, 0x76, 0x66, 0xaa,
  1060  	0xb8, 0x06, 0xb9, 0x8e, 0xb9, 0xf3, 0xf0, 0xa0, 0xb7, 0xc3, 0x3d, 0x05, 0xa5, 0xb4, 0x7c, 0x72,
  1061  	0x5a, 0xd5, 0x3a, 0x21, 0x3e, 0xf4, 0x29, 0xe6, 0xf1, 0xd7, 0x61, 0xa9, 0x63, 0xee, 0x88, 0xc3,
  1062  	0x0a, 0x50, 0xa2, 0xb4, 0x72, 0x72, 0x5a, 0xcd, 0x77, 0x42, 0x2c, 0x84, 0xc0, 0x61, 0xeb, 0x90,
  1063  	0xef, 0x98, 0x07, 0x9d, 0x83, 0x6e, 0x63, 0x4f, 0xa0, 0x92, 0xa5, 0xc2, 0xc9, 0x69, 0x35, 0x17,
  1064  	0x8d, 0x38, 0x03, 0x4d, 0xcf, 0xd9, 0xfc, 0xe4, 0xd9, 0x59, 0x59, 0xf9, 0xed, 0xac, 0xac, 0xfc,
  1065  	0x71, 0x56, 0x56, 0xbe, 0x7f, 0x51, 0x5e, 0xf8, 0xf2, 0xce, 0xd0, 0xa1, 0xa3, 0x49, 0xdf, 0x18,
  1066  	0xf8, 0xe3, 0xfa, 0xb4, 0x9b, 0xb3, 0x9f, 0x33, 0xff, 0x61, 0xf4, 0x17, 0xf9, 0xe2, 0x83, 0xbf,
  1067  	0x02, 0x00, 0x00, 0xff, 0xff, 0x3a, 0x56, 0xb5, 0xab, 0x77, 0x0c, 0x00, 0x00,
  1068  }
  1069  
  1070  func (m *PartSetHeader) Marshal() (dAtA []byte, err error) {
  1071  	size := m.Size()
  1072  	dAtA = make([]byte, size)
  1073  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1074  	if err != nil {
  1075  		return nil, err
  1076  	}
  1077  	return dAtA[:n], nil
  1078  }
  1079  
  1080  func (m *PartSetHeader) MarshalTo(dAtA []byte) (int, error) {
  1081  	size := m.Size()
  1082  	return m.MarshalToSizedBuffer(dAtA[:size])
  1083  }
  1084  
  1085  func (m *PartSetHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1086  	i := len(dAtA)
  1087  	_ = i
  1088  	var l int
  1089  	_ = l
  1090  	if m.XXX_unrecognized != nil {
  1091  		i -= len(m.XXX_unrecognized)
  1092  		copy(dAtA[i:], m.XXX_unrecognized)
  1093  	}
  1094  	if len(m.Hash) > 0 {
  1095  		i -= len(m.Hash)
  1096  		copy(dAtA[i:], m.Hash)
  1097  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash)))
  1098  		i--
  1099  		dAtA[i] = 0x12
  1100  	}
  1101  	if m.Total != 0 {
  1102  		i = encodeVarintTypes(dAtA, i, uint64(m.Total))
  1103  		i--
  1104  		dAtA[i] = 0x8
  1105  	}
  1106  	return len(dAtA) - i, nil
  1107  }
  1108  
  1109  func (m *Part) Marshal() (dAtA []byte, err error) {
  1110  	size := m.Size()
  1111  	dAtA = make([]byte, size)
  1112  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1113  	if err != nil {
  1114  		return nil, err
  1115  	}
  1116  	return dAtA[:n], nil
  1117  }
  1118  
  1119  func (m *Part) MarshalTo(dAtA []byte) (int, error) {
  1120  	size := m.Size()
  1121  	return m.MarshalToSizedBuffer(dAtA[:size])
  1122  }
  1123  
  1124  func (m *Part) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1125  	i := len(dAtA)
  1126  	_ = i
  1127  	var l int
  1128  	_ = l
  1129  	if m.XXX_unrecognized != nil {
  1130  		i -= len(m.XXX_unrecognized)
  1131  		copy(dAtA[i:], m.XXX_unrecognized)
  1132  	}
  1133  	{
  1134  		size, err := m.Proof.MarshalToSizedBuffer(dAtA[:i])
  1135  		if err != nil {
  1136  			return 0, err
  1137  		}
  1138  		i -= size
  1139  		i = encodeVarintTypes(dAtA, i, uint64(size))
  1140  	}
  1141  	i--
  1142  	dAtA[i] = 0x1a
  1143  	if len(m.Bytes) > 0 {
  1144  		i -= len(m.Bytes)
  1145  		copy(dAtA[i:], m.Bytes)
  1146  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Bytes)))
  1147  		i--
  1148  		dAtA[i] = 0x12
  1149  	}
  1150  	if m.Index != 0 {
  1151  		i = encodeVarintTypes(dAtA, i, uint64(m.Index))
  1152  		i--
  1153  		dAtA[i] = 0x8
  1154  	}
  1155  	return len(dAtA) - i, nil
  1156  }
  1157  
  1158  func (m *BlockID) Marshal() (dAtA []byte, err error) {
  1159  	size := m.Size()
  1160  	dAtA = make([]byte, size)
  1161  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1162  	if err != nil {
  1163  		return nil, err
  1164  	}
  1165  	return dAtA[:n], nil
  1166  }
  1167  
  1168  func (m *BlockID) MarshalTo(dAtA []byte) (int, error) {
  1169  	size := m.Size()
  1170  	return m.MarshalToSizedBuffer(dAtA[:size])
  1171  }
  1172  
  1173  func (m *BlockID) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1174  	i := len(dAtA)
  1175  	_ = i
  1176  	var l int
  1177  	_ = l
  1178  	if m.XXX_unrecognized != nil {
  1179  		i -= len(m.XXX_unrecognized)
  1180  		copy(dAtA[i:], m.XXX_unrecognized)
  1181  	}
  1182  	{
  1183  		size, err := m.PartsHeader.MarshalToSizedBuffer(dAtA[:i])
  1184  		if err != nil {
  1185  			return 0, err
  1186  		}
  1187  		i -= size
  1188  		i = encodeVarintTypes(dAtA, i, uint64(size))
  1189  	}
  1190  	i--
  1191  	dAtA[i] = 0x12
  1192  	if len(m.Hash) > 0 {
  1193  		i -= len(m.Hash)
  1194  		copy(dAtA[i:], m.Hash)
  1195  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash)))
  1196  		i--
  1197  		dAtA[i] = 0xa
  1198  	}
  1199  	return len(dAtA) - i, nil
  1200  }
  1201  
  1202  func (m *Header) Marshal() (dAtA []byte, err error) {
  1203  	size := m.Size()
  1204  	dAtA = make([]byte, size)
  1205  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1206  	if err != nil {
  1207  		return nil, err
  1208  	}
  1209  	return dAtA[:n], nil
  1210  }
  1211  
  1212  func (m *Header) MarshalTo(dAtA []byte) (int, error) {
  1213  	size := m.Size()
  1214  	return m.MarshalToSizedBuffer(dAtA[:size])
  1215  }
  1216  
  1217  func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1218  	i := len(dAtA)
  1219  	_ = i
  1220  	var l int
  1221  	_ = l
  1222  	if m.XXX_unrecognized != nil {
  1223  		i -= len(m.XXX_unrecognized)
  1224  		copy(dAtA[i:], m.XXX_unrecognized)
  1225  	}
  1226  	if len(m.ProposerAddress) > 0 {
  1227  		i -= len(m.ProposerAddress)
  1228  		copy(dAtA[i:], m.ProposerAddress)
  1229  		i = encodeVarintTypes(dAtA, i, uint64(len(m.ProposerAddress)))
  1230  		i--
  1231  		dAtA[i] = 0x72
  1232  	}
  1233  	if len(m.EvidenceHash) > 0 {
  1234  		i -= len(m.EvidenceHash)
  1235  		copy(dAtA[i:], m.EvidenceHash)
  1236  		i = encodeVarintTypes(dAtA, i, uint64(len(m.EvidenceHash)))
  1237  		i--
  1238  		dAtA[i] = 0x6a
  1239  	}
  1240  	if len(m.LastResultsHash) > 0 {
  1241  		i -= len(m.LastResultsHash)
  1242  		copy(dAtA[i:], m.LastResultsHash)
  1243  		i = encodeVarintTypes(dAtA, i, uint64(len(m.LastResultsHash)))
  1244  		i--
  1245  		dAtA[i] = 0x62
  1246  	}
  1247  	if len(m.AppHash) > 0 {
  1248  		i -= len(m.AppHash)
  1249  		copy(dAtA[i:], m.AppHash)
  1250  		i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash)))
  1251  		i--
  1252  		dAtA[i] = 0x5a
  1253  	}
  1254  	if len(m.ConsensusHash) > 0 {
  1255  		i -= len(m.ConsensusHash)
  1256  		copy(dAtA[i:], m.ConsensusHash)
  1257  		i = encodeVarintTypes(dAtA, i, uint64(len(m.ConsensusHash)))
  1258  		i--
  1259  		dAtA[i] = 0x52
  1260  	}
  1261  	if len(m.NextValidatorsHash) > 0 {
  1262  		i -= len(m.NextValidatorsHash)
  1263  		copy(dAtA[i:], m.NextValidatorsHash)
  1264  		i = encodeVarintTypes(dAtA, i, uint64(len(m.NextValidatorsHash)))
  1265  		i--
  1266  		dAtA[i] = 0x4a
  1267  	}
  1268  	if len(m.ValidatorsHash) > 0 {
  1269  		i -= len(m.ValidatorsHash)
  1270  		copy(dAtA[i:], m.ValidatorsHash)
  1271  		i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorsHash)))
  1272  		i--
  1273  		dAtA[i] = 0x42
  1274  	}
  1275  	if len(m.DataHash) > 0 {
  1276  		i -= len(m.DataHash)
  1277  		copy(dAtA[i:], m.DataHash)
  1278  		i = encodeVarintTypes(dAtA, i, uint64(len(m.DataHash)))
  1279  		i--
  1280  		dAtA[i] = 0x3a
  1281  	}
  1282  	if len(m.LastCommitHash) > 0 {
  1283  		i -= len(m.LastCommitHash)
  1284  		copy(dAtA[i:], m.LastCommitHash)
  1285  		i = encodeVarintTypes(dAtA, i, uint64(len(m.LastCommitHash)))
  1286  		i--
  1287  		dAtA[i] = 0x32
  1288  	}
  1289  	{
  1290  		size, err := m.LastBlockID.MarshalToSizedBuffer(dAtA[:i])
  1291  		if err != nil {
  1292  			return 0, err
  1293  		}
  1294  		i -= size
  1295  		i = encodeVarintTypes(dAtA, i, uint64(size))
  1296  	}
  1297  	i--
  1298  	dAtA[i] = 0x2a
  1299  	n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):])
  1300  	if err4 != nil {
  1301  		return 0, err4
  1302  	}
  1303  	i -= n4
  1304  	i = encodeVarintTypes(dAtA, i, uint64(n4))
  1305  	i--
  1306  	dAtA[i] = 0x22
  1307  	if m.Height != 0 {
  1308  		i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  1309  		i--
  1310  		dAtA[i] = 0x18
  1311  	}
  1312  	if len(m.ChainID) > 0 {
  1313  		i -= len(m.ChainID)
  1314  		copy(dAtA[i:], m.ChainID)
  1315  		i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainID)))
  1316  		i--
  1317  		dAtA[i] = 0x12
  1318  	}
  1319  	{
  1320  		size, err := m.Version.MarshalToSizedBuffer(dAtA[:i])
  1321  		if err != nil {
  1322  			return 0, err
  1323  		}
  1324  		i -= size
  1325  		i = encodeVarintTypes(dAtA, i, uint64(size))
  1326  	}
  1327  	i--
  1328  	dAtA[i] = 0xa
  1329  	return len(dAtA) - i, nil
  1330  }
  1331  
  1332  func (m *Data) Marshal() (dAtA []byte, err error) {
  1333  	size := m.Size()
  1334  	dAtA = make([]byte, size)
  1335  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1336  	if err != nil {
  1337  		return nil, err
  1338  	}
  1339  	return dAtA[:n], nil
  1340  }
  1341  
  1342  func (m *Data) MarshalTo(dAtA []byte) (int, error) {
  1343  	size := m.Size()
  1344  	return m.MarshalToSizedBuffer(dAtA[:size])
  1345  }
  1346  
  1347  func (m *Data) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1348  	i := len(dAtA)
  1349  	_ = i
  1350  	var l int
  1351  	_ = l
  1352  	if m.XXX_unrecognized != nil {
  1353  		i -= len(m.XXX_unrecognized)
  1354  		copy(dAtA[i:], m.XXX_unrecognized)
  1355  	}
  1356  	if len(m.Hash) > 0 {
  1357  		i -= len(m.Hash)
  1358  		copy(dAtA[i:], m.Hash)
  1359  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash)))
  1360  		i--
  1361  		dAtA[i] = 0x12
  1362  	}
  1363  	if len(m.Txs) > 0 {
  1364  		for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- {
  1365  			i -= len(m.Txs[iNdEx])
  1366  			copy(dAtA[i:], m.Txs[iNdEx])
  1367  			i = encodeVarintTypes(dAtA, i, uint64(len(m.Txs[iNdEx])))
  1368  			i--
  1369  			dAtA[i] = 0xa
  1370  		}
  1371  	}
  1372  	return len(dAtA) - i, nil
  1373  }
  1374  
  1375  func (m *Vote) Marshal() (dAtA []byte, err error) {
  1376  	size := m.Size()
  1377  	dAtA = make([]byte, size)
  1378  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1379  	if err != nil {
  1380  		return nil, err
  1381  	}
  1382  	return dAtA[:n], nil
  1383  }
  1384  
  1385  func (m *Vote) MarshalTo(dAtA []byte) (int, error) {
  1386  	size := m.Size()
  1387  	return m.MarshalToSizedBuffer(dAtA[:size])
  1388  }
  1389  
  1390  func (m *Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1391  	i := len(dAtA)
  1392  	_ = i
  1393  	var l int
  1394  	_ = l
  1395  	if m.XXX_unrecognized != nil {
  1396  		i -= len(m.XXX_unrecognized)
  1397  		copy(dAtA[i:], m.XXX_unrecognized)
  1398  	}
  1399  	if len(m.Signature) > 0 {
  1400  		i -= len(m.Signature)
  1401  		copy(dAtA[i:], m.Signature)
  1402  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Signature)))
  1403  		i--
  1404  		dAtA[i] = 0x42
  1405  	}
  1406  	if m.ValidatorIndex != 0 {
  1407  		i = encodeVarintTypes(dAtA, i, uint64(m.ValidatorIndex))
  1408  		i--
  1409  		dAtA[i] = 0x38
  1410  	}
  1411  	if len(m.ValidatorAddress) > 0 {
  1412  		i -= len(m.ValidatorAddress)
  1413  		copy(dAtA[i:], m.ValidatorAddress)
  1414  		i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorAddress)))
  1415  		i--
  1416  		dAtA[i] = 0x32
  1417  	}
  1418  	n6, err6 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):])
  1419  	if err6 != nil {
  1420  		return 0, err6
  1421  	}
  1422  	i -= n6
  1423  	i = encodeVarintTypes(dAtA, i, uint64(n6))
  1424  	i--
  1425  	dAtA[i] = 0x2a
  1426  	{
  1427  		size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i])
  1428  		if err != nil {
  1429  			return 0, err
  1430  		}
  1431  		i -= size
  1432  		i = encodeVarintTypes(dAtA, i, uint64(size))
  1433  	}
  1434  	i--
  1435  	dAtA[i] = 0x22
  1436  	if m.Round != 0 {
  1437  		i = encodeVarintTypes(dAtA, i, uint64(m.Round))
  1438  		i--
  1439  		dAtA[i] = 0x18
  1440  	}
  1441  	if m.Height != 0 {
  1442  		i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  1443  		i--
  1444  		dAtA[i] = 0x10
  1445  	}
  1446  	if m.Type != 0 {
  1447  		i = encodeVarintTypes(dAtA, i, uint64(m.Type))
  1448  		i--
  1449  		dAtA[i] = 0x8
  1450  	}
  1451  	return len(dAtA) - i, nil
  1452  }
  1453  
  1454  func (m *Commit) Marshal() (dAtA []byte, err error) {
  1455  	size := m.Size()
  1456  	dAtA = make([]byte, size)
  1457  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1458  	if err != nil {
  1459  		return nil, err
  1460  	}
  1461  	return dAtA[:n], nil
  1462  }
  1463  
  1464  func (m *Commit) MarshalTo(dAtA []byte) (int, error) {
  1465  	size := m.Size()
  1466  	return m.MarshalToSizedBuffer(dAtA[:size])
  1467  }
  1468  
  1469  func (m *Commit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1470  	i := len(dAtA)
  1471  	_ = i
  1472  	var l int
  1473  	_ = l
  1474  	if m.XXX_unrecognized != nil {
  1475  		i -= len(m.XXX_unrecognized)
  1476  		copy(dAtA[i:], m.XXX_unrecognized)
  1477  	}
  1478  	if m.BitArray != nil {
  1479  		{
  1480  			size, err := m.BitArray.MarshalToSizedBuffer(dAtA[:i])
  1481  			if err != nil {
  1482  				return 0, err
  1483  			}
  1484  			i -= size
  1485  			i = encodeVarintTypes(dAtA, i, uint64(size))
  1486  		}
  1487  		i--
  1488  		dAtA[i] = 0x32
  1489  	}
  1490  	if len(m.Hash) > 0 {
  1491  		i -= len(m.Hash)
  1492  		copy(dAtA[i:], m.Hash)
  1493  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash)))
  1494  		i--
  1495  		dAtA[i] = 0x2a
  1496  	}
  1497  	if len(m.Signatures) > 0 {
  1498  		for iNdEx := len(m.Signatures) - 1; iNdEx >= 0; iNdEx-- {
  1499  			{
  1500  				size, err := m.Signatures[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1501  				if err != nil {
  1502  					return 0, err
  1503  				}
  1504  				i -= size
  1505  				i = encodeVarintTypes(dAtA, i, uint64(size))
  1506  			}
  1507  			i--
  1508  			dAtA[i] = 0x22
  1509  		}
  1510  	}
  1511  	{
  1512  		size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i])
  1513  		if err != nil {
  1514  			return 0, err
  1515  		}
  1516  		i -= size
  1517  		i = encodeVarintTypes(dAtA, i, uint64(size))
  1518  	}
  1519  	i--
  1520  	dAtA[i] = 0x1a
  1521  	if m.Round != 0 {
  1522  		i = encodeVarintTypes(dAtA, i, uint64(m.Round))
  1523  		i--
  1524  		dAtA[i] = 0x10
  1525  	}
  1526  	if m.Height != 0 {
  1527  		i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  1528  		i--
  1529  		dAtA[i] = 0x8
  1530  	}
  1531  	return len(dAtA) - i, nil
  1532  }
  1533  
  1534  func (m *CommitSig) Marshal() (dAtA []byte, err error) {
  1535  	size := m.Size()
  1536  	dAtA = make([]byte, size)
  1537  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1538  	if err != nil {
  1539  		return nil, err
  1540  	}
  1541  	return dAtA[:n], nil
  1542  }
  1543  
  1544  func (m *CommitSig) MarshalTo(dAtA []byte) (int, error) {
  1545  	size := m.Size()
  1546  	return m.MarshalToSizedBuffer(dAtA[:size])
  1547  }
  1548  
  1549  func (m *CommitSig) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1550  	i := len(dAtA)
  1551  	_ = i
  1552  	var l int
  1553  	_ = l
  1554  	if m.XXX_unrecognized != nil {
  1555  		i -= len(m.XXX_unrecognized)
  1556  		copy(dAtA[i:], m.XXX_unrecognized)
  1557  	}
  1558  	if len(m.Signature) > 0 {
  1559  		i -= len(m.Signature)
  1560  		copy(dAtA[i:], m.Signature)
  1561  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Signature)))
  1562  		i--
  1563  		dAtA[i] = 0x22
  1564  	}
  1565  	n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):])
  1566  	if err10 != nil {
  1567  		return 0, err10
  1568  	}
  1569  	i -= n10
  1570  	i = encodeVarintTypes(dAtA, i, uint64(n10))
  1571  	i--
  1572  	dAtA[i] = 0x1a
  1573  	if len(m.ValidatorAddress) > 0 {
  1574  		i -= len(m.ValidatorAddress)
  1575  		copy(dAtA[i:], m.ValidatorAddress)
  1576  		i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorAddress)))
  1577  		i--
  1578  		dAtA[i] = 0x12
  1579  	}
  1580  	if m.BlockIdFlag != 0 {
  1581  		i = encodeVarintTypes(dAtA, i, uint64(m.BlockIdFlag))
  1582  		i--
  1583  		dAtA[i] = 0x8
  1584  	}
  1585  	return len(dAtA) - i, nil
  1586  }
  1587  
  1588  func (m *Proposal) Marshal() (dAtA []byte, err error) {
  1589  	size := m.Size()
  1590  	dAtA = make([]byte, size)
  1591  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1592  	if err != nil {
  1593  		return nil, err
  1594  	}
  1595  	return dAtA[:n], nil
  1596  }
  1597  
  1598  func (m *Proposal) MarshalTo(dAtA []byte) (int, error) {
  1599  	size := m.Size()
  1600  	return m.MarshalToSizedBuffer(dAtA[:size])
  1601  }
  1602  
  1603  func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1604  	i := len(dAtA)
  1605  	_ = i
  1606  	var l int
  1607  	_ = l
  1608  	if m.XXX_unrecognized != nil {
  1609  		i -= len(m.XXX_unrecognized)
  1610  		copy(dAtA[i:], m.XXX_unrecognized)
  1611  	}
  1612  	if len(m.Signature) > 0 {
  1613  		i -= len(m.Signature)
  1614  		copy(dAtA[i:], m.Signature)
  1615  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Signature)))
  1616  		i--
  1617  		dAtA[i] = 0x3a
  1618  	}
  1619  	n11, err11 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):])
  1620  	if err11 != nil {
  1621  		return 0, err11
  1622  	}
  1623  	i -= n11
  1624  	i = encodeVarintTypes(dAtA, i, uint64(n11))
  1625  	i--
  1626  	dAtA[i] = 0x32
  1627  	{
  1628  		size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i])
  1629  		if err != nil {
  1630  			return 0, err
  1631  		}
  1632  		i -= size
  1633  		i = encodeVarintTypes(dAtA, i, uint64(size))
  1634  	}
  1635  	i--
  1636  	dAtA[i] = 0x2a
  1637  	if m.PolRound != 0 {
  1638  		i = encodeVarintTypes(dAtA, i, uint64(m.PolRound))
  1639  		i--
  1640  		dAtA[i] = 0x20
  1641  	}
  1642  	if m.Round != 0 {
  1643  		i = encodeVarintTypes(dAtA, i, uint64(m.Round))
  1644  		i--
  1645  		dAtA[i] = 0x18
  1646  	}
  1647  	if m.Height != 0 {
  1648  		i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  1649  		i--
  1650  		dAtA[i] = 0x10
  1651  	}
  1652  	if m.Type != 0 {
  1653  		i = encodeVarintTypes(dAtA, i, uint64(m.Type))
  1654  		i--
  1655  		dAtA[i] = 0x8
  1656  	}
  1657  	return len(dAtA) - i, nil
  1658  }
  1659  
  1660  func (m *SignedHeader) Marshal() (dAtA []byte, err error) {
  1661  	size := m.Size()
  1662  	dAtA = make([]byte, size)
  1663  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1664  	if err != nil {
  1665  		return nil, err
  1666  	}
  1667  	return dAtA[:n], nil
  1668  }
  1669  
  1670  func (m *SignedHeader) MarshalTo(dAtA []byte) (int, error) {
  1671  	size := m.Size()
  1672  	return m.MarshalToSizedBuffer(dAtA[:size])
  1673  }
  1674  
  1675  func (m *SignedHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1676  	i := len(dAtA)
  1677  	_ = i
  1678  	var l int
  1679  	_ = l
  1680  	if m.XXX_unrecognized != nil {
  1681  		i -= len(m.XXX_unrecognized)
  1682  		copy(dAtA[i:], m.XXX_unrecognized)
  1683  	}
  1684  	if m.Commit != nil {
  1685  		{
  1686  			size, err := m.Commit.MarshalToSizedBuffer(dAtA[:i])
  1687  			if err != nil {
  1688  				return 0, err
  1689  			}
  1690  			i -= size
  1691  			i = encodeVarintTypes(dAtA, i, uint64(size))
  1692  		}
  1693  		i--
  1694  		dAtA[i] = 0x12
  1695  	}
  1696  	if m.Header != nil {
  1697  		{
  1698  			size, err := m.Header.MarshalToSizedBuffer(dAtA[:i])
  1699  			if err != nil {
  1700  				return 0, err
  1701  			}
  1702  			i -= size
  1703  			i = encodeVarintTypes(dAtA, i, uint64(size))
  1704  		}
  1705  		i--
  1706  		dAtA[i] = 0xa
  1707  	}
  1708  	return len(dAtA) - i, nil
  1709  }
  1710  
  1711  func (m *BlockMeta) Marshal() (dAtA []byte, err error) {
  1712  	size := m.Size()
  1713  	dAtA = make([]byte, size)
  1714  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1715  	if err != nil {
  1716  		return nil, err
  1717  	}
  1718  	return dAtA[:n], nil
  1719  }
  1720  
  1721  func (m *BlockMeta) MarshalTo(dAtA []byte) (int, error) {
  1722  	size := m.Size()
  1723  	return m.MarshalToSizedBuffer(dAtA[:size])
  1724  }
  1725  
  1726  func (m *BlockMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1727  	i := len(dAtA)
  1728  	_ = i
  1729  	var l int
  1730  	_ = l
  1731  	if m.XXX_unrecognized != nil {
  1732  		i -= len(m.XXX_unrecognized)
  1733  		copy(dAtA[i:], m.XXX_unrecognized)
  1734  	}
  1735  	if m.NumTxs != 0 {
  1736  		i = encodeVarintTypes(dAtA, i, uint64(m.NumTxs))
  1737  		i--
  1738  		dAtA[i] = 0x20
  1739  	}
  1740  	{
  1741  		size, err := m.Header.MarshalToSizedBuffer(dAtA[:i])
  1742  		if err != nil {
  1743  			return 0, err
  1744  		}
  1745  		i -= size
  1746  		i = encodeVarintTypes(dAtA, i, uint64(size))
  1747  	}
  1748  	i--
  1749  	dAtA[i] = 0x1a
  1750  	if m.BlockSize != 0 {
  1751  		i = encodeVarintTypes(dAtA, i, uint64(m.BlockSize))
  1752  		i--
  1753  		dAtA[i] = 0x10
  1754  	}
  1755  	{
  1756  		size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i])
  1757  		if err != nil {
  1758  			return 0, err
  1759  		}
  1760  		i -= size
  1761  		i = encodeVarintTypes(dAtA, i, uint64(size))
  1762  	}
  1763  	i--
  1764  	dAtA[i] = 0xa
  1765  	return len(dAtA) - i, nil
  1766  }
  1767  
  1768  func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
  1769  	offset -= sovTypes(v)
  1770  	base := offset
  1771  	for v >= 1<<7 {
  1772  		dAtA[offset] = uint8(v&0x7f | 0x80)
  1773  		v >>= 7
  1774  		offset++
  1775  	}
  1776  	dAtA[offset] = uint8(v)
  1777  	return base
  1778  }
  1779  func (m *PartSetHeader) Size() (n int) {
  1780  	if m == nil {
  1781  		return 0
  1782  	}
  1783  	var l int
  1784  	_ = l
  1785  	if m.Total != 0 {
  1786  		n += 1 + sovTypes(uint64(m.Total))
  1787  	}
  1788  	l = len(m.Hash)
  1789  	if l > 0 {
  1790  		n += 1 + l + sovTypes(uint64(l))
  1791  	}
  1792  	if m.XXX_unrecognized != nil {
  1793  		n += len(m.XXX_unrecognized)
  1794  	}
  1795  	return n
  1796  }
  1797  
  1798  func (m *Part) Size() (n int) {
  1799  	if m == nil {
  1800  		return 0
  1801  	}
  1802  	var l int
  1803  	_ = l
  1804  	if m.Index != 0 {
  1805  		n += 1 + sovTypes(uint64(m.Index))
  1806  	}
  1807  	l = len(m.Bytes)
  1808  	if l > 0 {
  1809  		n += 1 + l + sovTypes(uint64(l))
  1810  	}
  1811  	l = m.Proof.Size()
  1812  	n += 1 + l + sovTypes(uint64(l))
  1813  	if m.XXX_unrecognized != nil {
  1814  		n += len(m.XXX_unrecognized)
  1815  	}
  1816  	return n
  1817  }
  1818  
  1819  func (m *BlockID) Size() (n int) {
  1820  	if m == nil {
  1821  		return 0
  1822  	}
  1823  	var l int
  1824  	_ = l
  1825  	l = len(m.Hash)
  1826  	if l > 0 {
  1827  		n += 1 + l + sovTypes(uint64(l))
  1828  	}
  1829  	l = m.PartsHeader.Size()
  1830  	n += 1 + l + sovTypes(uint64(l))
  1831  	if m.XXX_unrecognized != nil {
  1832  		n += len(m.XXX_unrecognized)
  1833  	}
  1834  	return n
  1835  }
  1836  
  1837  func (m *Header) Size() (n int) {
  1838  	if m == nil {
  1839  		return 0
  1840  	}
  1841  	var l int
  1842  	_ = l
  1843  	l = m.Version.Size()
  1844  	n += 1 + l + sovTypes(uint64(l))
  1845  	l = len(m.ChainID)
  1846  	if l > 0 {
  1847  		n += 1 + l + sovTypes(uint64(l))
  1848  	}
  1849  	if m.Height != 0 {
  1850  		n += 1 + sovTypes(uint64(m.Height))
  1851  	}
  1852  	l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time)
  1853  	n += 1 + l + sovTypes(uint64(l))
  1854  	l = m.LastBlockID.Size()
  1855  	n += 1 + l + sovTypes(uint64(l))
  1856  	l = len(m.LastCommitHash)
  1857  	if l > 0 {
  1858  		n += 1 + l + sovTypes(uint64(l))
  1859  	}
  1860  	l = len(m.DataHash)
  1861  	if l > 0 {
  1862  		n += 1 + l + sovTypes(uint64(l))
  1863  	}
  1864  	l = len(m.ValidatorsHash)
  1865  	if l > 0 {
  1866  		n += 1 + l + sovTypes(uint64(l))
  1867  	}
  1868  	l = len(m.NextValidatorsHash)
  1869  	if l > 0 {
  1870  		n += 1 + l + sovTypes(uint64(l))
  1871  	}
  1872  	l = len(m.ConsensusHash)
  1873  	if l > 0 {
  1874  		n += 1 + l + sovTypes(uint64(l))
  1875  	}
  1876  	l = len(m.AppHash)
  1877  	if l > 0 {
  1878  		n += 1 + l + sovTypes(uint64(l))
  1879  	}
  1880  	l = len(m.LastResultsHash)
  1881  	if l > 0 {
  1882  		n += 1 + l + sovTypes(uint64(l))
  1883  	}
  1884  	l = len(m.EvidenceHash)
  1885  	if l > 0 {
  1886  		n += 1 + l + sovTypes(uint64(l))
  1887  	}
  1888  	l = len(m.ProposerAddress)
  1889  	if l > 0 {
  1890  		n += 1 + l + sovTypes(uint64(l))
  1891  	}
  1892  	if m.XXX_unrecognized != nil {
  1893  		n += len(m.XXX_unrecognized)
  1894  	}
  1895  	return n
  1896  }
  1897  
  1898  func (m *Data) Size() (n int) {
  1899  	if m == nil {
  1900  		return 0
  1901  	}
  1902  	var l int
  1903  	_ = l
  1904  	if len(m.Txs) > 0 {
  1905  		for _, b := range m.Txs {
  1906  			l = len(b)
  1907  			n += 1 + l + sovTypes(uint64(l))
  1908  		}
  1909  	}
  1910  	l = len(m.Hash)
  1911  	if l > 0 {
  1912  		n += 1 + l + sovTypes(uint64(l))
  1913  	}
  1914  	if m.XXX_unrecognized != nil {
  1915  		n += len(m.XXX_unrecognized)
  1916  	}
  1917  	return n
  1918  }
  1919  
  1920  func (m *Vote) Size() (n int) {
  1921  	if m == nil {
  1922  		return 0
  1923  	}
  1924  	var l int
  1925  	_ = l
  1926  	if m.Type != 0 {
  1927  		n += 1 + sovTypes(uint64(m.Type))
  1928  	}
  1929  	if m.Height != 0 {
  1930  		n += 1 + sovTypes(uint64(m.Height))
  1931  	}
  1932  	if m.Round != 0 {
  1933  		n += 1 + sovTypes(uint64(m.Round))
  1934  	}
  1935  	l = m.BlockID.Size()
  1936  	n += 1 + l + sovTypes(uint64(l))
  1937  	l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp)
  1938  	n += 1 + l + sovTypes(uint64(l))
  1939  	l = len(m.ValidatorAddress)
  1940  	if l > 0 {
  1941  		n += 1 + l + sovTypes(uint64(l))
  1942  	}
  1943  	if m.ValidatorIndex != 0 {
  1944  		n += 1 + sovTypes(uint64(m.ValidatorIndex))
  1945  	}
  1946  	l = len(m.Signature)
  1947  	if l > 0 {
  1948  		n += 1 + l + sovTypes(uint64(l))
  1949  	}
  1950  	if m.XXX_unrecognized != nil {
  1951  		n += len(m.XXX_unrecognized)
  1952  	}
  1953  	return n
  1954  }
  1955  
  1956  func (m *Commit) Size() (n int) {
  1957  	if m == nil {
  1958  		return 0
  1959  	}
  1960  	var l int
  1961  	_ = l
  1962  	if m.Height != 0 {
  1963  		n += 1 + sovTypes(uint64(m.Height))
  1964  	}
  1965  	if m.Round != 0 {
  1966  		n += 1 + sovTypes(uint64(m.Round))
  1967  	}
  1968  	l = m.BlockID.Size()
  1969  	n += 1 + l + sovTypes(uint64(l))
  1970  	if len(m.Signatures) > 0 {
  1971  		for _, e := range m.Signatures {
  1972  			l = e.Size()
  1973  			n += 1 + l + sovTypes(uint64(l))
  1974  		}
  1975  	}
  1976  	l = len(m.Hash)
  1977  	if l > 0 {
  1978  		n += 1 + l + sovTypes(uint64(l))
  1979  	}
  1980  	if m.BitArray != nil {
  1981  		l = m.BitArray.Size()
  1982  		n += 1 + l + sovTypes(uint64(l))
  1983  	}
  1984  	if m.XXX_unrecognized != nil {
  1985  		n += len(m.XXX_unrecognized)
  1986  	}
  1987  	return n
  1988  }
  1989  
  1990  func (m *CommitSig) Size() (n int) {
  1991  	if m == nil {
  1992  		return 0
  1993  	}
  1994  	var l int
  1995  	_ = l
  1996  	if m.BlockIdFlag != 0 {
  1997  		n += 1 + sovTypes(uint64(m.BlockIdFlag))
  1998  	}
  1999  	l = len(m.ValidatorAddress)
  2000  	if l > 0 {
  2001  		n += 1 + l + sovTypes(uint64(l))
  2002  	}
  2003  	l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp)
  2004  	n += 1 + l + sovTypes(uint64(l))
  2005  	l = len(m.Signature)
  2006  	if l > 0 {
  2007  		n += 1 + l + sovTypes(uint64(l))
  2008  	}
  2009  	if m.XXX_unrecognized != nil {
  2010  		n += len(m.XXX_unrecognized)
  2011  	}
  2012  	return n
  2013  }
  2014  
  2015  func (m *Proposal) Size() (n int) {
  2016  	if m == nil {
  2017  		return 0
  2018  	}
  2019  	var l int
  2020  	_ = l
  2021  	if m.Type != 0 {
  2022  		n += 1 + sovTypes(uint64(m.Type))
  2023  	}
  2024  	if m.Height != 0 {
  2025  		n += 1 + sovTypes(uint64(m.Height))
  2026  	}
  2027  	if m.Round != 0 {
  2028  		n += 1 + sovTypes(uint64(m.Round))
  2029  	}
  2030  	if m.PolRound != 0 {
  2031  		n += 1 + sovTypes(uint64(m.PolRound))
  2032  	}
  2033  	l = m.BlockID.Size()
  2034  	n += 1 + l + sovTypes(uint64(l))
  2035  	l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp)
  2036  	n += 1 + l + sovTypes(uint64(l))
  2037  	l = len(m.Signature)
  2038  	if l > 0 {
  2039  		n += 1 + l + sovTypes(uint64(l))
  2040  	}
  2041  	if m.XXX_unrecognized != nil {
  2042  		n += len(m.XXX_unrecognized)
  2043  	}
  2044  	return n
  2045  }
  2046  
  2047  func (m *SignedHeader) Size() (n int) {
  2048  	if m == nil {
  2049  		return 0
  2050  	}
  2051  	var l int
  2052  	_ = l
  2053  	if m.Header != nil {
  2054  		l = m.Header.Size()
  2055  		n += 1 + l + sovTypes(uint64(l))
  2056  	}
  2057  	if m.Commit != nil {
  2058  		l = m.Commit.Size()
  2059  		n += 1 + l + sovTypes(uint64(l))
  2060  	}
  2061  	if m.XXX_unrecognized != nil {
  2062  		n += len(m.XXX_unrecognized)
  2063  	}
  2064  	return n
  2065  }
  2066  
  2067  func (m *BlockMeta) Size() (n int) {
  2068  	if m == nil {
  2069  		return 0
  2070  	}
  2071  	var l int
  2072  	_ = l
  2073  	l = m.BlockID.Size()
  2074  	n += 1 + l + sovTypes(uint64(l))
  2075  	if m.BlockSize != 0 {
  2076  		n += 1 + sovTypes(uint64(m.BlockSize))
  2077  	}
  2078  	l = m.Header.Size()
  2079  	n += 1 + l + sovTypes(uint64(l))
  2080  	if m.NumTxs != 0 {
  2081  		n += 1 + sovTypes(uint64(m.NumTxs))
  2082  	}
  2083  	if m.XXX_unrecognized != nil {
  2084  		n += len(m.XXX_unrecognized)
  2085  	}
  2086  	return n
  2087  }
  2088  
  2089  func sovTypes(x uint64) (n int) {
  2090  	return (math_bits.Len64(x|1) + 6) / 7
  2091  }
  2092  func sozTypes(x uint64) (n int) {
  2093  	return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  2094  }
  2095  func (m *PartSetHeader) Unmarshal(dAtA []byte) error {
  2096  	l := len(dAtA)
  2097  	iNdEx := 0
  2098  	for iNdEx < l {
  2099  		preIndex := iNdEx
  2100  		var wire uint64
  2101  		for shift := uint(0); ; shift += 7 {
  2102  			if shift >= 64 {
  2103  				return ErrIntOverflowTypes
  2104  			}
  2105  			if iNdEx >= l {
  2106  				return io.ErrUnexpectedEOF
  2107  			}
  2108  			b := dAtA[iNdEx]
  2109  			iNdEx++
  2110  			wire |= uint64(b&0x7F) << shift
  2111  			if b < 0x80 {
  2112  				break
  2113  			}
  2114  		}
  2115  		fieldNum := int32(wire >> 3)
  2116  		wireType := int(wire & 0x7)
  2117  		if wireType == 4 {
  2118  			return fmt.Errorf("proto: PartSetHeader: wiretype end group for non-group")
  2119  		}
  2120  		if fieldNum <= 0 {
  2121  			return fmt.Errorf("proto: PartSetHeader: illegal tag %d (wire type %d)", fieldNum, wire)
  2122  		}
  2123  		switch fieldNum {
  2124  		case 1:
  2125  			if wireType != 0 {
  2126  				return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType)
  2127  			}
  2128  			m.Total = 0
  2129  			for shift := uint(0); ; shift += 7 {
  2130  				if shift >= 64 {
  2131  					return ErrIntOverflowTypes
  2132  				}
  2133  				if iNdEx >= l {
  2134  					return io.ErrUnexpectedEOF
  2135  				}
  2136  				b := dAtA[iNdEx]
  2137  				iNdEx++
  2138  				m.Total |= int64(b&0x7F) << shift
  2139  				if b < 0x80 {
  2140  					break
  2141  				}
  2142  			}
  2143  		case 2:
  2144  			if wireType != 2 {
  2145  				return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
  2146  			}
  2147  			var byteLen int
  2148  			for shift := uint(0); ; shift += 7 {
  2149  				if shift >= 64 {
  2150  					return ErrIntOverflowTypes
  2151  				}
  2152  				if iNdEx >= l {
  2153  					return io.ErrUnexpectedEOF
  2154  				}
  2155  				b := dAtA[iNdEx]
  2156  				iNdEx++
  2157  				byteLen |= int(b&0x7F) << shift
  2158  				if b < 0x80 {
  2159  					break
  2160  				}
  2161  			}
  2162  			if byteLen < 0 {
  2163  				return ErrInvalidLengthTypes
  2164  			}
  2165  			postIndex := iNdEx + byteLen
  2166  			if postIndex < 0 {
  2167  				return ErrInvalidLengthTypes
  2168  			}
  2169  			if postIndex > l {
  2170  				return io.ErrUnexpectedEOF
  2171  			}
  2172  			m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...)
  2173  			if m.Hash == nil {
  2174  				m.Hash = []byte{}
  2175  			}
  2176  			iNdEx = postIndex
  2177  		default:
  2178  			iNdEx = preIndex
  2179  			skippy, err := skipTypes(dAtA[iNdEx:])
  2180  			if err != nil {
  2181  				return err
  2182  			}
  2183  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2184  				return ErrInvalidLengthTypes
  2185  			}
  2186  			if (iNdEx + skippy) > l {
  2187  				return io.ErrUnexpectedEOF
  2188  			}
  2189  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  2190  			iNdEx += skippy
  2191  		}
  2192  	}
  2193  
  2194  	if iNdEx > l {
  2195  		return io.ErrUnexpectedEOF
  2196  	}
  2197  	return nil
  2198  }
  2199  func (m *Part) Unmarshal(dAtA []byte) error {
  2200  	l := len(dAtA)
  2201  	iNdEx := 0
  2202  	for iNdEx < l {
  2203  		preIndex := iNdEx
  2204  		var wire uint64
  2205  		for shift := uint(0); ; shift += 7 {
  2206  			if shift >= 64 {
  2207  				return ErrIntOverflowTypes
  2208  			}
  2209  			if iNdEx >= l {
  2210  				return io.ErrUnexpectedEOF
  2211  			}
  2212  			b := dAtA[iNdEx]
  2213  			iNdEx++
  2214  			wire |= uint64(b&0x7F) << shift
  2215  			if b < 0x80 {
  2216  				break
  2217  			}
  2218  		}
  2219  		fieldNum := int32(wire >> 3)
  2220  		wireType := int(wire & 0x7)
  2221  		if wireType == 4 {
  2222  			return fmt.Errorf("proto: Part: wiretype end group for non-group")
  2223  		}
  2224  		if fieldNum <= 0 {
  2225  			return fmt.Errorf("proto: Part: illegal tag %d (wire type %d)", fieldNum, wire)
  2226  		}
  2227  		switch fieldNum {
  2228  		case 1:
  2229  			if wireType != 0 {
  2230  				return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  2231  			}
  2232  			m.Index = 0
  2233  			for shift := uint(0); ; shift += 7 {
  2234  				if shift >= 64 {
  2235  					return ErrIntOverflowTypes
  2236  				}
  2237  				if iNdEx >= l {
  2238  					return io.ErrUnexpectedEOF
  2239  				}
  2240  				b := dAtA[iNdEx]
  2241  				iNdEx++
  2242  				m.Index |= uint32(b&0x7F) << shift
  2243  				if b < 0x80 {
  2244  					break
  2245  				}
  2246  			}
  2247  		case 2:
  2248  			if wireType != 2 {
  2249  				return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType)
  2250  			}
  2251  			var byteLen int
  2252  			for shift := uint(0); ; shift += 7 {
  2253  				if shift >= 64 {
  2254  					return ErrIntOverflowTypes
  2255  				}
  2256  				if iNdEx >= l {
  2257  					return io.ErrUnexpectedEOF
  2258  				}
  2259  				b := dAtA[iNdEx]
  2260  				iNdEx++
  2261  				byteLen |= int(b&0x7F) << shift
  2262  				if b < 0x80 {
  2263  					break
  2264  				}
  2265  			}
  2266  			if byteLen < 0 {
  2267  				return ErrInvalidLengthTypes
  2268  			}
  2269  			postIndex := iNdEx + byteLen
  2270  			if postIndex < 0 {
  2271  				return ErrInvalidLengthTypes
  2272  			}
  2273  			if postIndex > l {
  2274  				return io.ErrUnexpectedEOF
  2275  			}
  2276  			m.Bytes = append(m.Bytes[:0], dAtA[iNdEx:postIndex]...)
  2277  			if m.Bytes == nil {
  2278  				m.Bytes = []byte{}
  2279  			}
  2280  			iNdEx = postIndex
  2281  		case 3:
  2282  			if wireType != 2 {
  2283  				return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType)
  2284  			}
  2285  			var msglen int
  2286  			for shift := uint(0); ; shift += 7 {
  2287  				if shift >= 64 {
  2288  					return ErrIntOverflowTypes
  2289  				}
  2290  				if iNdEx >= l {
  2291  					return io.ErrUnexpectedEOF
  2292  				}
  2293  				b := dAtA[iNdEx]
  2294  				iNdEx++
  2295  				msglen |= int(b&0x7F) << shift
  2296  				if b < 0x80 {
  2297  					break
  2298  				}
  2299  			}
  2300  			if msglen < 0 {
  2301  				return ErrInvalidLengthTypes
  2302  			}
  2303  			postIndex := iNdEx + msglen
  2304  			if postIndex < 0 {
  2305  				return ErrInvalidLengthTypes
  2306  			}
  2307  			if postIndex > l {
  2308  				return io.ErrUnexpectedEOF
  2309  			}
  2310  			if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2311  				return err
  2312  			}
  2313  			iNdEx = postIndex
  2314  		default:
  2315  			iNdEx = preIndex
  2316  			skippy, err := skipTypes(dAtA[iNdEx:])
  2317  			if err != nil {
  2318  				return err
  2319  			}
  2320  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2321  				return ErrInvalidLengthTypes
  2322  			}
  2323  			if (iNdEx + skippy) > l {
  2324  				return io.ErrUnexpectedEOF
  2325  			}
  2326  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  2327  			iNdEx += skippy
  2328  		}
  2329  	}
  2330  
  2331  	if iNdEx > l {
  2332  		return io.ErrUnexpectedEOF
  2333  	}
  2334  	return nil
  2335  }
  2336  func (m *BlockID) Unmarshal(dAtA []byte) error {
  2337  	l := len(dAtA)
  2338  	iNdEx := 0
  2339  	for iNdEx < l {
  2340  		preIndex := iNdEx
  2341  		var wire uint64
  2342  		for shift := uint(0); ; shift += 7 {
  2343  			if shift >= 64 {
  2344  				return ErrIntOverflowTypes
  2345  			}
  2346  			if iNdEx >= l {
  2347  				return io.ErrUnexpectedEOF
  2348  			}
  2349  			b := dAtA[iNdEx]
  2350  			iNdEx++
  2351  			wire |= uint64(b&0x7F) << shift
  2352  			if b < 0x80 {
  2353  				break
  2354  			}
  2355  		}
  2356  		fieldNum := int32(wire >> 3)
  2357  		wireType := int(wire & 0x7)
  2358  		if wireType == 4 {
  2359  			return fmt.Errorf("proto: BlockID: wiretype end group for non-group")
  2360  		}
  2361  		if fieldNum <= 0 {
  2362  			return fmt.Errorf("proto: BlockID: illegal tag %d (wire type %d)", fieldNum, wire)
  2363  		}
  2364  		switch fieldNum {
  2365  		case 1:
  2366  			if wireType != 2 {
  2367  				return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
  2368  			}
  2369  			var byteLen int
  2370  			for shift := uint(0); ; shift += 7 {
  2371  				if shift >= 64 {
  2372  					return ErrIntOverflowTypes
  2373  				}
  2374  				if iNdEx >= l {
  2375  					return io.ErrUnexpectedEOF
  2376  				}
  2377  				b := dAtA[iNdEx]
  2378  				iNdEx++
  2379  				byteLen |= int(b&0x7F) << shift
  2380  				if b < 0x80 {
  2381  					break
  2382  				}
  2383  			}
  2384  			if byteLen < 0 {
  2385  				return ErrInvalidLengthTypes
  2386  			}
  2387  			postIndex := iNdEx + byteLen
  2388  			if postIndex < 0 {
  2389  				return ErrInvalidLengthTypes
  2390  			}
  2391  			if postIndex > l {
  2392  				return io.ErrUnexpectedEOF
  2393  			}
  2394  			m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...)
  2395  			if m.Hash == nil {
  2396  				m.Hash = []byte{}
  2397  			}
  2398  			iNdEx = postIndex
  2399  		case 2:
  2400  			if wireType != 2 {
  2401  				return fmt.Errorf("proto: wrong wireType = %d for field PartsHeader", wireType)
  2402  			}
  2403  			var msglen int
  2404  			for shift := uint(0); ; shift += 7 {
  2405  				if shift >= 64 {
  2406  					return ErrIntOverflowTypes
  2407  				}
  2408  				if iNdEx >= l {
  2409  					return io.ErrUnexpectedEOF
  2410  				}
  2411  				b := dAtA[iNdEx]
  2412  				iNdEx++
  2413  				msglen |= int(b&0x7F) << shift
  2414  				if b < 0x80 {
  2415  					break
  2416  				}
  2417  			}
  2418  			if msglen < 0 {
  2419  				return ErrInvalidLengthTypes
  2420  			}
  2421  			postIndex := iNdEx + msglen
  2422  			if postIndex < 0 {
  2423  				return ErrInvalidLengthTypes
  2424  			}
  2425  			if postIndex > l {
  2426  				return io.ErrUnexpectedEOF
  2427  			}
  2428  			if err := m.PartsHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2429  				return err
  2430  			}
  2431  			iNdEx = postIndex
  2432  		default:
  2433  			iNdEx = preIndex
  2434  			skippy, err := skipTypes(dAtA[iNdEx:])
  2435  			if err != nil {
  2436  				return err
  2437  			}
  2438  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2439  				return ErrInvalidLengthTypes
  2440  			}
  2441  			if (iNdEx + skippy) > l {
  2442  				return io.ErrUnexpectedEOF
  2443  			}
  2444  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  2445  			iNdEx += skippy
  2446  		}
  2447  	}
  2448  
  2449  	if iNdEx > l {
  2450  		return io.ErrUnexpectedEOF
  2451  	}
  2452  	return nil
  2453  }
  2454  func (m *Header) Unmarshal(dAtA []byte) error {
  2455  	l := len(dAtA)
  2456  	iNdEx := 0
  2457  	for iNdEx < l {
  2458  		preIndex := iNdEx
  2459  		var wire uint64
  2460  		for shift := uint(0); ; shift += 7 {
  2461  			if shift >= 64 {
  2462  				return ErrIntOverflowTypes
  2463  			}
  2464  			if iNdEx >= l {
  2465  				return io.ErrUnexpectedEOF
  2466  			}
  2467  			b := dAtA[iNdEx]
  2468  			iNdEx++
  2469  			wire |= uint64(b&0x7F) << shift
  2470  			if b < 0x80 {
  2471  				break
  2472  			}
  2473  		}
  2474  		fieldNum := int32(wire >> 3)
  2475  		wireType := int(wire & 0x7)
  2476  		if wireType == 4 {
  2477  			return fmt.Errorf("proto: Header: wiretype end group for non-group")
  2478  		}
  2479  		if fieldNum <= 0 {
  2480  			return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire)
  2481  		}
  2482  		switch fieldNum {
  2483  		case 1:
  2484  			if wireType != 2 {
  2485  				return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  2486  			}
  2487  			var msglen int
  2488  			for shift := uint(0); ; shift += 7 {
  2489  				if shift >= 64 {
  2490  					return ErrIntOverflowTypes
  2491  				}
  2492  				if iNdEx >= l {
  2493  					return io.ErrUnexpectedEOF
  2494  				}
  2495  				b := dAtA[iNdEx]
  2496  				iNdEx++
  2497  				msglen |= int(b&0x7F) << shift
  2498  				if b < 0x80 {
  2499  					break
  2500  				}
  2501  			}
  2502  			if msglen < 0 {
  2503  				return ErrInvalidLengthTypes
  2504  			}
  2505  			postIndex := iNdEx + msglen
  2506  			if postIndex < 0 {
  2507  				return ErrInvalidLengthTypes
  2508  			}
  2509  			if postIndex > l {
  2510  				return io.ErrUnexpectedEOF
  2511  			}
  2512  			if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2513  				return err
  2514  			}
  2515  			iNdEx = postIndex
  2516  		case 2:
  2517  			if wireType != 2 {
  2518  				return fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType)
  2519  			}
  2520  			var stringLen uint64
  2521  			for shift := uint(0); ; shift += 7 {
  2522  				if shift >= 64 {
  2523  					return ErrIntOverflowTypes
  2524  				}
  2525  				if iNdEx >= l {
  2526  					return io.ErrUnexpectedEOF
  2527  				}
  2528  				b := dAtA[iNdEx]
  2529  				iNdEx++
  2530  				stringLen |= uint64(b&0x7F) << shift
  2531  				if b < 0x80 {
  2532  					break
  2533  				}
  2534  			}
  2535  			intStringLen := int(stringLen)
  2536  			if intStringLen < 0 {
  2537  				return ErrInvalidLengthTypes
  2538  			}
  2539  			postIndex := iNdEx + intStringLen
  2540  			if postIndex < 0 {
  2541  				return ErrInvalidLengthTypes
  2542  			}
  2543  			if postIndex > l {
  2544  				return io.ErrUnexpectedEOF
  2545  			}
  2546  			m.ChainID = string(dAtA[iNdEx:postIndex])
  2547  			iNdEx = postIndex
  2548  		case 3:
  2549  			if wireType != 0 {
  2550  				return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  2551  			}
  2552  			m.Height = 0
  2553  			for shift := uint(0); ; shift += 7 {
  2554  				if shift >= 64 {
  2555  					return ErrIntOverflowTypes
  2556  				}
  2557  				if iNdEx >= l {
  2558  					return io.ErrUnexpectedEOF
  2559  				}
  2560  				b := dAtA[iNdEx]
  2561  				iNdEx++
  2562  				m.Height |= int64(b&0x7F) << shift
  2563  				if b < 0x80 {
  2564  					break
  2565  				}
  2566  			}
  2567  		case 4:
  2568  			if wireType != 2 {
  2569  				return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
  2570  			}
  2571  			var msglen int
  2572  			for shift := uint(0); ; shift += 7 {
  2573  				if shift >= 64 {
  2574  					return ErrIntOverflowTypes
  2575  				}
  2576  				if iNdEx >= l {
  2577  					return io.ErrUnexpectedEOF
  2578  				}
  2579  				b := dAtA[iNdEx]
  2580  				iNdEx++
  2581  				msglen |= int(b&0x7F) << shift
  2582  				if b < 0x80 {
  2583  					break
  2584  				}
  2585  			}
  2586  			if msglen < 0 {
  2587  				return ErrInvalidLengthTypes
  2588  			}
  2589  			postIndex := iNdEx + msglen
  2590  			if postIndex < 0 {
  2591  				return ErrInvalidLengthTypes
  2592  			}
  2593  			if postIndex > l {
  2594  				return io.ErrUnexpectedEOF
  2595  			}
  2596  			if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil {
  2597  				return err
  2598  			}
  2599  			iNdEx = postIndex
  2600  		case 5:
  2601  			if wireType != 2 {
  2602  				return fmt.Errorf("proto: wrong wireType = %d for field LastBlockID", wireType)
  2603  			}
  2604  			var msglen int
  2605  			for shift := uint(0); ; shift += 7 {
  2606  				if shift >= 64 {
  2607  					return ErrIntOverflowTypes
  2608  				}
  2609  				if iNdEx >= l {
  2610  					return io.ErrUnexpectedEOF
  2611  				}
  2612  				b := dAtA[iNdEx]
  2613  				iNdEx++
  2614  				msglen |= int(b&0x7F) << shift
  2615  				if b < 0x80 {
  2616  					break
  2617  				}
  2618  			}
  2619  			if msglen < 0 {
  2620  				return ErrInvalidLengthTypes
  2621  			}
  2622  			postIndex := iNdEx + msglen
  2623  			if postIndex < 0 {
  2624  				return ErrInvalidLengthTypes
  2625  			}
  2626  			if postIndex > l {
  2627  				return io.ErrUnexpectedEOF
  2628  			}
  2629  			if err := m.LastBlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2630  				return err
  2631  			}
  2632  			iNdEx = postIndex
  2633  		case 6:
  2634  			if wireType != 2 {
  2635  				return fmt.Errorf("proto: wrong wireType = %d for field LastCommitHash", wireType)
  2636  			}
  2637  			var byteLen int
  2638  			for shift := uint(0); ; shift += 7 {
  2639  				if shift >= 64 {
  2640  					return ErrIntOverflowTypes
  2641  				}
  2642  				if iNdEx >= l {
  2643  					return io.ErrUnexpectedEOF
  2644  				}
  2645  				b := dAtA[iNdEx]
  2646  				iNdEx++
  2647  				byteLen |= int(b&0x7F) << shift
  2648  				if b < 0x80 {
  2649  					break
  2650  				}
  2651  			}
  2652  			if byteLen < 0 {
  2653  				return ErrInvalidLengthTypes
  2654  			}
  2655  			postIndex := iNdEx + byteLen
  2656  			if postIndex < 0 {
  2657  				return ErrInvalidLengthTypes
  2658  			}
  2659  			if postIndex > l {
  2660  				return io.ErrUnexpectedEOF
  2661  			}
  2662  			m.LastCommitHash = append(m.LastCommitHash[:0], dAtA[iNdEx:postIndex]...)
  2663  			if m.LastCommitHash == nil {
  2664  				m.LastCommitHash = []byte{}
  2665  			}
  2666  			iNdEx = postIndex
  2667  		case 7:
  2668  			if wireType != 2 {
  2669  				return fmt.Errorf("proto: wrong wireType = %d for field DataHash", wireType)
  2670  			}
  2671  			var byteLen int
  2672  			for shift := uint(0); ; shift += 7 {
  2673  				if shift >= 64 {
  2674  					return ErrIntOverflowTypes
  2675  				}
  2676  				if iNdEx >= l {
  2677  					return io.ErrUnexpectedEOF
  2678  				}
  2679  				b := dAtA[iNdEx]
  2680  				iNdEx++
  2681  				byteLen |= int(b&0x7F) << shift
  2682  				if b < 0x80 {
  2683  					break
  2684  				}
  2685  			}
  2686  			if byteLen < 0 {
  2687  				return ErrInvalidLengthTypes
  2688  			}
  2689  			postIndex := iNdEx + byteLen
  2690  			if postIndex < 0 {
  2691  				return ErrInvalidLengthTypes
  2692  			}
  2693  			if postIndex > l {
  2694  				return io.ErrUnexpectedEOF
  2695  			}
  2696  			m.DataHash = append(m.DataHash[:0], dAtA[iNdEx:postIndex]...)
  2697  			if m.DataHash == nil {
  2698  				m.DataHash = []byte{}
  2699  			}
  2700  			iNdEx = postIndex
  2701  		case 8:
  2702  			if wireType != 2 {
  2703  				return fmt.Errorf("proto: wrong wireType = %d for field ValidatorsHash", wireType)
  2704  			}
  2705  			var byteLen int
  2706  			for shift := uint(0); ; shift += 7 {
  2707  				if shift >= 64 {
  2708  					return ErrIntOverflowTypes
  2709  				}
  2710  				if iNdEx >= l {
  2711  					return io.ErrUnexpectedEOF
  2712  				}
  2713  				b := dAtA[iNdEx]
  2714  				iNdEx++
  2715  				byteLen |= int(b&0x7F) << shift
  2716  				if b < 0x80 {
  2717  					break
  2718  				}
  2719  			}
  2720  			if byteLen < 0 {
  2721  				return ErrInvalidLengthTypes
  2722  			}
  2723  			postIndex := iNdEx + byteLen
  2724  			if postIndex < 0 {
  2725  				return ErrInvalidLengthTypes
  2726  			}
  2727  			if postIndex > l {
  2728  				return io.ErrUnexpectedEOF
  2729  			}
  2730  			m.ValidatorsHash = append(m.ValidatorsHash[:0], dAtA[iNdEx:postIndex]...)
  2731  			if m.ValidatorsHash == nil {
  2732  				m.ValidatorsHash = []byte{}
  2733  			}
  2734  			iNdEx = postIndex
  2735  		case 9:
  2736  			if wireType != 2 {
  2737  				return fmt.Errorf("proto: wrong wireType = %d for field NextValidatorsHash", wireType)
  2738  			}
  2739  			var byteLen int
  2740  			for shift := uint(0); ; shift += 7 {
  2741  				if shift >= 64 {
  2742  					return ErrIntOverflowTypes
  2743  				}
  2744  				if iNdEx >= l {
  2745  					return io.ErrUnexpectedEOF
  2746  				}
  2747  				b := dAtA[iNdEx]
  2748  				iNdEx++
  2749  				byteLen |= int(b&0x7F) << shift
  2750  				if b < 0x80 {
  2751  					break
  2752  				}
  2753  			}
  2754  			if byteLen < 0 {
  2755  				return ErrInvalidLengthTypes
  2756  			}
  2757  			postIndex := iNdEx + byteLen
  2758  			if postIndex < 0 {
  2759  				return ErrInvalidLengthTypes
  2760  			}
  2761  			if postIndex > l {
  2762  				return io.ErrUnexpectedEOF
  2763  			}
  2764  			m.NextValidatorsHash = append(m.NextValidatorsHash[:0], dAtA[iNdEx:postIndex]...)
  2765  			if m.NextValidatorsHash == nil {
  2766  				m.NextValidatorsHash = []byte{}
  2767  			}
  2768  			iNdEx = postIndex
  2769  		case 10:
  2770  			if wireType != 2 {
  2771  				return fmt.Errorf("proto: wrong wireType = %d for field ConsensusHash", wireType)
  2772  			}
  2773  			var byteLen int
  2774  			for shift := uint(0); ; shift += 7 {
  2775  				if shift >= 64 {
  2776  					return ErrIntOverflowTypes
  2777  				}
  2778  				if iNdEx >= l {
  2779  					return io.ErrUnexpectedEOF
  2780  				}
  2781  				b := dAtA[iNdEx]
  2782  				iNdEx++
  2783  				byteLen |= int(b&0x7F) << shift
  2784  				if b < 0x80 {
  2785  					break
  2786  				}
  2787  			}
  2788  			if byteLen < 0 {
  2789  				return ErrInvalidLengthTypes
  2790  			}
  2791  			postIndex := iNdEx + byteLen
  2792  			if postIndex < 0 {
  2793  				return ErrInvalidLengthTypes
  2794  			}
  2795  			if postIndex > l {
  2796  				return io.ErrUnexpectedEOF
  2797  			}
  2798  			m.ConsensusHash = append(m.ConsensusHash[:0], dAtA[iNdEx:postIndex]...)
  2799  			if m.ConsensusHash == nil {
  2800  				m.ConsensusHash = []byte{}
  2801  			}
  2802  			iNdEx = postIndex
  2803  		case 11:
  2804  			if wireType != 2 {
  2805  				return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType)
  2806  			}
  2807  			var byteLen int
  2808  			for shift := uint(0); ; shift += 7 {
  2809  				if shift >= 64 {
  2810  					return ErrIntOverflowTypes
  2811  				}
  2812  				if iNdEx >= l {
  2813  					return io.ErrUnexpectedEOF
  2814  				}
  2815  				b := dAtA[iNdEx]
  2816  				iNdEx++
  2817  				byteLen |= int(b&0x7F) << shift
  2818  				if b < 0x80 {
  2819  					break
  2820  				}
  2821  			}
  2822  			if byteLen < 0 {
  2823  				return ErrInvalidLengthTypes
  2824  			}
  2825  			postIndex := iNdEx + byteLen
  2826  			if postIndex < 0 {
  2827  				return ErrInvalidLengthTypes
  2828  			}
  2829  			if postIndex > l {
  2830  				return io.ErrUnexpectedEOF
  2831  			}
  2832  			m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...)
  2833  			if m.AppHash == nil {
  2834  				m.AppHash = []byte{}
  2835  			}
  2836  			iNdEx = postIndex
  2837  		case 12:
  2838  			if wireType != 2 {
  2839  				return fmt.Errorf("proto: wrong wireType = %d for field LastResultsHash", wireType)
  2840  			}
  2841  			var byteLen int
  2842  			for shift := uint(0); ; shift += 7 {
  2843  				if shift >= 64 {
  2844  					return ErrIntOverflowTypes
  2845  				}
  2846  				if iNdEx >= l {
  2847  					return io.ErrUnexpectedEOF
  2848  				}
  2849  				b := dAtA[iNdEx]
  2850  				iNdEx++
  2851  				byteLen |= int(b&0x7F) << shift
  2852  				if b < 0x80 {
  2853  					break
  2854  				}
  2855  			}
  2856  			if byteLen < 0 {
  2857  				return ErrInvalidLengthTypes
  2858  			}
  2859  			postIndex := iNdEx + byteLen
  2860  			if postIndex < 0 {
  2861  				return ErrInvalidLengthTypes
  2862  			}
  2863  			if postIndex > l {
  2864  				return io.ErrUnexpectedEOF
  2865  			}
  2866  			m.LastResultsHash = append(m.LastResultsHash[:0], dAtA[iNdEx:postIndex]...)
  2867  			if m.LastResultsHash == nil {
  2868  				m.LastResultsHash = []byte{}
  2869  			}
  2870  			iNdEx = postIndex
  2871  		case 13:
  2872  			if wireType != 2 {
  2873  				return fmt.Errorf("proto: wrong wireType = %d for field EvidenceHash", wireType)
  2874  			}
  2875  			var byteLen int
  2876  			for shift := uint(0); ; shift += 7 {
  2877  				if shift >= 64 {
  2878  					return ErrIntOverflowTypes
  2879  				}
  2880  				if iNdEx >= l {
  2881  					return io.ErrUnexpectedEOF
  2882  				}
  2883  				b := dAtA[iNdEx]
  2884  				iNdEx++
  2885  				byteLen |= int(b&0x7F) << shift
  2886  				if b < 0x80 {
  2887  					break
  2888  				}
  2889  			}
  2890  			if byteLen < 0 {
  2891  				return ErrInvalidLengthTypes
  2892  			}
  2893  			postIndex := iNdEx + byteLen
  2894  			if postIndex < 0 {
  2895  				return ErrInvalidLengthTypes
  2896  			}
  2897  			if postIndex > l {
  2898  				return io.ErrUnexpectedEOF
  2899  			}
  2900  			m.EvidenceHash = append(m.EvidenceHash[:0], dAtA[iNdEx:postIndex]...)
  2901  			if m.EvidenceHash == nil {
  2902  				m.EvidenceHash = []byte{}
  2903  			}
  2904  			iNdEx = postIndex
  2905  		case 14:
  2906  			if wireType != 2 {
  2907  				return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType)
  2908  			}
  2909  			var byteLen int
  2910  			for shift := uint(0); ; shift += 7 {
  2911  				if shift >= 64 {
  2912  					return ErrIntOverflowTypes
  2913  				}
  2914  				if iNdEx >= l {
  2915  					return io.ErrUnexpectedEOF
  2916  				}
  2917  				b := dAtA[iNdEx]
  2918  				iNdEx++
  2919  				byteLen |= int(b&0x7F) << shift
  2920  				if b < 0x80 {
  2921  					break
  2922  				}
  2923  			}
  2924  			if byteLen < 0 {
  2925  				return ErrInvalidLengthTypes
  2926  			}
  2927  			postIndex := iNdEx + byteLen
  2928  			if postIndex < 0 {
  2929  				return ErrInvalidLengthTypes
  2930  			}
  2931  			if postIndex > l {
  2932  				return io.ErrUnexpectedEOF
  2933  			}
  2934  			m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...)
  2935  			if m.ProposerAddress == nil {
  2936  				m.ProposerAddress = []byte{}
  2937  			}
  2938  			iNdEx = postIndex
  2939  		default:
  2940  			iNdEx = preIndex
  2941  			skippy, err := skipTypes(dAtA[iNdEx:])
  2942  			if err != nil {
  2943  				return err
  2944  			}
  2945  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2946  				return ErrInvalidLengthTypes
  2947  			}
  2948  			if (iNdEx + skippy) > l {
  2949  				return io.ErrUnexpectedEOF
  2950  			}
  2951  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  2952  			iNdEx += skippy
  2953  		}
  2954  	}
  2955  
  2956  	if iNdEx > l {
  2957  		return io.ErrUnexpectedEOF
  2958  	}
  2959  	return nil
  2960  }
  2961  func (m *Data) Unmarshal(dAtA []byte) error {
  2962  	l := len(dAtA)
  2963  	iNdEx := 0
  2964  	for iNdEx < l {
  2965  		preIndex := iNdEx
  2966  		var wire uint64
  2967  		for shift := uint(0); ; shift += 7 {
  2968  			if shift >= 64 {
  2969  				return ErrIntOverflowTypes
  2970  			}
  2971  			if iNdEx >= l {
  2972  				return io.ErrUnexpectedEOF
  2973  			}
  2974  			b := dAtA[iNdEx]
  2975  			iNdEx++
  2976  			wire |= uint64(b&0x7F) << shift
  2977  			if b < 0x80 {
  2978  				break
  2979  			}
  2980  		}
  2981  		fieldNum := int32(wire >> 3)
  2982  		wireType := int(wire & 0x7)
  2983  		if wireType == 4 {
  2984  			return fmt.Errorf("proto: Data: wiretype end group for non-group")
  2985  		}
  2986  		if fieldNum <= 0 {
  2987  			return fmt.Errorf("proto: Data: illegal tag %d (wire type %d)", fieldNum, wire)
  2988  		}
  2989  		switch fieldNum {
  2990  		case 1:
  2991  			if wireType != 2 {
  2992  				return fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType)
  2993  			}
  2994  			var byteLen int
  2995  			for shift := uint(0); ; shift += 7 {
  2996  				if shift >= 64 {
  2997  					return ErrIntOverflowTypes
  2998  				}
  2999  				if iNdEx >= l {
  3000  					return io.ErrUnexpectedEOF
  3001  				}
  3002  				b := dAtA[iNdEx]
  3003  				iNdEx++
  3004  				byteLen |= int(b&0x7F) << shift
  3005  				if b < 0x80 {
  3006  					break
  3007  				}
  3008  			}
  3009  			if byteLen < 0 {
  3010  				return ErrInvalidLengthTypes
  3011  			}
  3012  			postIndex := iNdEx + byteLen
  3013  			if postIndex < 0 {
  3014  				return ErrInvalidLengthTypes
  3015  			}
  3016  			if postIndex > l {
  3017  				return io.ErrUnexpectedEOF
  3018  			}
  3019  			m.Txs = append(m.Txs, make([]byte, postIndex-iNdEx))
  3020  			copy(m.Txs[len(m.Txs)-1], dAtA[iNdEx:postIndex])
  3021  			iNdEx = postIndex
  3022  		case 2:
  3023  			if wireType != 2 {
  3024  				return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
  3025  			}
  3026  			var byteLen int
  3027  			for shift := uint(0); ; shift += 7 {
  3028  				if shift >= 64 {
  3029  					return ErrIntOverflowTypes
  3030  				}
  3031  				if iNdEx >= l {
  3032  					return io.ErrUnexpectedEOF
  3033  				}
  3034  				b := dAtA[iNdEx]
  3035  				iNdEx++
  3036  				byteLen |= int(b&0x7F) << shift
  3037  				if b < 0x80 {
  3038  					break
  3039  				}
  3040  			}
  3041  			if byteLen < 0 {
  3042  				return ErrInvalidLengthTypes
  3043  			}
  3044  			postIndex := iNdEx + byteLen
  3045  			if postIndex < 0 {
  3046  				return ErrInvalidLengthTypes
  3047  			}
  3048  			if postIndex > l {
  3049  				return io.ErrUnexpectedEOF
  3050  			}
  3051  			m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...)
  3052  			if m.Hash == nil {
  3053  				m.Hash = []byte{}
  3054  			}
  3055  			iNdEx = postIndex
  3056  		default:
  3057  			iNdEx = preIndex
  3058  			skippy, err := skipTypes(dAtA[iNdEx:])
  3059  			if err != nil {
  3060  				return err
  3061  			}
  3062  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  3063  				return ErrInvalidLengthTypes
  3064  			}
  3065  			if (iNdEx + skippy) > l {
  3066  				return io.ErrUnexpectedEOF
  3067  			}
  3068  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  3069  			iNdEx += skippy
  3070  		}
  3071  	}
  3072  
  3073  	if iNdEx > l {
  3074  		return io.ErrUnexpectedEOF
  3075  	}
  3076  	return nil
  3077  }
  3078  func (m *Vote) Unmarshal(dAtA []byte) error {
  3079  	l := len(dAtA)
  3080  	iNdEx := 0
  3081  	for iNdEx < l {
  3082  		preIndex := iNdEx
  3083  		var wire uint64
  3084  		for shift := uint(0); ; shift += 7 {
  3085  			if shift >= 64 {
  3086  				return ErrIntOverflowTypes
  3087  			}
  3088  			if iNdEx >= l {
  3089  				return io.ErrUnexpectedEOF
  3090  			}
  3091  			b := dAtA[iNdEx]
  3092  			iNdEx++
  3093  			wire |= uint64(b&0x7F) << shift
  3094  			if b < 0x80 {
  3095  				break
  3096  			}
  3097  		}
  3098  		fieldNum := int32(wire >> 3)
  3099  		wireType := int(wire & 0x7)
  3100  		if wireType == 4 {
  3101  			return fmt.Errorf("proto: Vote: wiretype end group for non-group")
  3102  		}
  3103  		if fieldNum <= 0 {
  3104  			return fmt.Errorf("proto: Vote: illegal tag %d (wire type %d)", fieldNum, wire)
  3105  		}
  3106  		switch fieldNum {
  3107  		case 1:
  3108  			if wireType != 0 {
  3109  				return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  3110  			}
  3111  			m.Type = 0
  3112  			for shift := uint(0); ; shift += 7 {
  3113  				if shift >= 64 {
  3114  					return ErrIntOverflowTypes
  3115  				}
  3116  				if iNdEx >= l {
  3117  					return io.ErrUnexpectedEOF
  3118  				}
  3119  				b := dAtA[iNdEx]
  3120  				iNdEx++
  3121  				m.Type |= SignedMsgType(b&0x7F) << shift
  3122  				if b < 0x80 {
  3123  					break
  3124  				}
  3125  			}
  3126  		case 2:
  3127  			if wireType != 0 {
  3128  				return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  3129  			}
  3130  			m.Height = 0
  3131  			for shift := uint(0); ; shift += 7 {
  3132  				if shift >= 64 {
  3133  					return ErrIntOverflowTypes
  3134  				}
  3135  				if iNdEx >= l {
  3136  					return io.ErrUnexpectedEOF
  3137  				}
  3138  				b := dAtA[iNdEx]
  3139  				iNdEx++
  3140  				m.Height |= int64(b&0x7F) << shift
  3141  				if b < 0x80 {
  3142  					break
  3143  				}
  3144  			}
  3145  		case 3:
  3146  			if wireType != 0 {
  3147  				return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType)
  3148  			}
  3149  			m.Round = 0
  3150  			for shift := uint(0); ; shift += 7 {
  3151  				if shift >= 64 {
  3152  					return ErrIntOverflowTypes
  3153  				}
  3154  				if iNdEx >= l {
  3155  					return io.ErrUnexpectedEOF
  3156  				}
  3157  				b := dAtA[iNdEx]
  3158  				iNdEx++
  3159  				m.Round |= int64(b&0x7F) << shift
  3160  				if b < 0x80 {
  3161  					break
  3162  				}
  3163  			}
  3164  		case 4:
  3165  			if wireType != 2 {
  3166  				return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType)
  3167  			}
  3168  			var msglen int
  3169  			for shift := uint(0); ; shift += 7 {
  3170  				if shift >= 64 {
  3171  					return ErrIntOverflowTypes
  3172  				}
  3173  				if iNdEx >= l {
  3174  					return io.ErrUnexpectedEOF
  3175  				}
  3176  				b := dAtA[iNdEx]
  3177  				iNdEx++
  3178  				msglen |= int(b&0x7F) << shift
  3179  				if b < 0x80 {
  3180  					break
  3181  				}
  3182  			}
  3183  			if msglen < 0 {
  3184  				return ErrInvalidLengthTypes
  3185  			}
  3186  			postIndex := iNdEx + msglen
  3187  			if postIndex < 0 {
  3188  				return ErrInvalidLengthTypes
  3189  			}
  3190  			if postIndex > l {
  3191  				return io.ErrUnexpectedEOF
  3192  			}
  3193  			if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3194  				return err
  3195  			}
  3196  			iNdEx = postIndex
  3197  		case 5:
  3198  			if wireType != 2 {
  3199  				return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
  3200  			}
  3201  			var msglen int
  3202  			for shift := uint(0); ; shift += 7 {
  3203  				if shift >= 64 {
  3204  					return ErrIntOverflowTypes
  3205  				}
  3206  				if iNdEx >= l {
  3207  					return io.ErrUnexpectedEOF
  3208  				}
  3209  				b := dAtA[iNdEx]
  3210  				iNdEx++
  3211  				msglen |= int(b&0x7F) << shift
  3212  				if b < 0x80 {
  3213  					break
  3214  				}
  3215  			}
  3216  			if msglen < 0 {
  3217  				return ErrInvalidLengthTypes
  3218  			}
  3219  			postIndex := iNdEx + msglen
  3220  			if postIndex < 0 {
  3221  				return ErrInvalidLengthTypes
  3222  			}
  3223  			if postIndex > l {
  3224  				return io.ErrUnexpectedEOF
  3225  			}
  3226  			if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil {
  3227  				return err
  3228  			}
  3229  			iNdEx = postIndex
  3230  		case 6:
  3231  			if wireType != 2 {
  3232  				return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType)
  3233  			}
  3234  			var byteLen int
  3235  			for shift := uint(0); ; shift += 7 {
  3236  				if shift >= 64 {
  3237  					return ErrIntOverflowTypes
  3238  				}
  3239  				if iNdEx >= l {
  3240  					return io.ErrUnexpectedEOF
  3241  				}
  3242  				b := dAtA[iNdEx]
  3243  				iNdEx++
  3244  				byteLen |= int(b&0x7F) << shift
  3245  				if b < 0x80 {
  3246  					break
  3247  				}
  3248  			}
  3249  			if byteLen < 0 {
  3250  				return ErrInvalidLengthTypes
  3251  			}
  3252  			postIndex := iNdEx + byteLen
  3253  			if postIndex < 0 {
  3254  				return ErrInvalidLengthTypes
  3255  			}
  3256  			if postIndex > l {
  3257  				return io.ErrUnexpectedEOF
  3258  			}
  3259  			m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...)
  3260  			if m.ValidatorAddress == nil {
  3261  				m.ValidatorAddress = []byte{}
  3262  			}
  3263  			iNdEx = postIndex
  3264  		case 7:
  3265  			if wireType != 0 {
  3266  				return fmt.Errorf("proto: wrong wireType = %d for field ValidatorIndex", wireType)
  3267  			}
  3268  			m.ValidatorIndex = 0
  3269  			for shift := uint(0); ; shift += 7 {
  3270  				if shift >= 64 {
  3271  					return ErrIntOverflowTypes
  3272  				}
  3273  				if iNdEx >= l {
  3274  					return io.ErrUnexpectedEOF
  3275  				}
  3276  				b := dAtA[iNdEx]
  3277  				iNdEx++
  3278  				m.ValidatorIndex |= int64(b&0x7F) << shift
  3279  				if b < 0x80 {
  3280  					break
  3281  				}
  3282  			}
  3283  		case 8:
  3284  			if wireType != 2 {
  3285  				return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType)
  3286  			}
  3287  			var byteLen int
  3288  			for shift := uint(0); ; shift += 7 {
  3289  				if shift >= 64 {
  3290  					return ErrIntOverflowTypes
  3291  				}
  3292  				if iNdEx >= l {
  3293  					return io.ErrUnexpectedEOF
  3294  				}
  3295  				b := dAtA[iNdEx]
  3296  				iNdEx++
  3297  				byteLen |= int(b&0x7F) << shift
  3298  				if b < 0x80 {
  3299  					break
  3300  				}
  3301  			}
  3302  			if byteLen < 0 {
  3303  				return ErrInvalidLengthTypes
  3304  			}
  3305  			postIndex := iNdEx + byteLen
  3306  			if postIndex < 0 {
  3307  				return ErrInvalidLengthTypes
  3308  			}
  3309  			if postIndex > l {
  3310  				return io.ErrUnexpectedEOF
  3311  			}
  3312  			m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...)
  3313  			if m.Signature == nil {
  3314  				m.Signature = []byte{}
  3315  			}
  3316  			iNdEx = postIndex
  3317  		default:
  3318  			iNdEx = preIndex
  3319  			skippy, err := skipTypes(dAtA[iNdEx:])
  3320  			if err != nil {
  3321  				return err
  3322  			}
  3323  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  3324  				return ErrInvalidLengthTypes
  3325  			}
  3326  			if (iNdEx + skippy) > l {
  3327  				return io.ErrUnexpectedEOF
  3328  			}
  3329  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  3330  			iNdEx += skippy
  3331  		}
  3332  	}
  3333  
  3334  	if iNdEx > l {
  3335  		return io.ErrUnexpectedEOF
  3336  	}
  3337  	return nil
  3338  }
  3339  func (m *Commit) Unmarshal(dAtA []byte) error {
  3340  	l := len(dAtA)
  3341  	iNdEx := 0
  3342  	for iNdEx < l {
  3343  		preIndex := iNdEx
  3344  		var wire uint64
  3345  		for shift := uint(0); ; shift += 7 {
  3346  			if shift >= 64 {
  3347  				return ErrIntOverflowTypes
  3348  			}
  3349  			if iNdEx >= l {
  3350  				return io.ErrUnexpectedEOF
  3351  			}
  3352  			b := dAtA[iNdEx]
  3353  			iNdEx++
  3354  			wire |= uint64(b&0x7F) << shift
  3355  			if b < 0x80 {
  3356  				break
  3357  			}
  3358  		}
  3359  		fieldNum := int32(wire >> 3)
  3360  		wireType := int(wire & 0x7)
  3361  		if wireType == 4 {
  3362  			return fmt.Errorf("proto: Commit: wiretype end group for non-group")
  3363  		}
  3364  		if fieldNum <= 0 {
  3365  			return fmt.Errorf("proto: Commit: illegal tag %d (wire type %d)", fieldNum, wire)
  3366  		}
  3367  		switch fieldNum {
  3368  		case 1:
  3369  			if wireType != 0 {
  3370  				return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  3371  			}
  3372  			m.Height = 0
  3373  			for shift := uint(0); ; shift += 7 {
  3374  				if shift >= 64 {
  3375  					return ErrIntOverflowTypes
  3376  				}
  3377  				if iNdEx >= l {
  3378  					return io.ErrUnexpectedEOF
  3379  				}
  3380  				b := dAtA[iNdEx]
  3381  				iNdEx++
  3382  				m.Height |= int64(b&0x7F) << shift
  3383  				if b < 0x80 {
  3384  					break
  3385  				}
  3386  			}
  3387  		case 2:
  3388  			if wireType != 0 {
  3389  				return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType)
  3390  			}
  3391  			m.Round = 0
  3392  			for shift := uint(0); ; shift += 7 {
  3393  				if shift >= 64 {
  3394  					return ErrIntOverflowTypes
  3395  				}
  3396  				if iNdEx >= l {
  3397  					return io.ErrUnexpectedEOF
  3398  				}
  3399  				b := dAtA[iNdEx]
  3400  				iNdEx++
  3401  				m.Round |= int32(b&0x7F) << shift
  3402  				if b < 0x80 {
  3403  					break
  3404  				}
  3405  			}
  3406  		case 3:
  3407  			if wireType != 2 {
  3408  				return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType)
  3409  			}
  3410  			var msglen int
  3411  			for shift := uint(0); ; shift += 7 {
  3412  				if shift >= 64 {
  3413  					return ErrIntOverflowTypes
  3414  				}
  3415  				if iNdEx >= l {
  3416  					return io.ErrUnexpectedEOF
  3417  				}
  3418  				b := dAtA[iNdEx]
  3419  				iNdEx++
  3420  				msglen |= int(b&0x7F) << shift
  3421  				if b < 0x80 {
  3422  					break
  3423  				}
  3424  			}
  3425  			if msglen < 0 {
  3426  				return ErrInvalidLengthTypes
  3427  			}
  3428  			postIndex := iNdEx + msglen
  3429  			if postIndex < 0 {
  3430  				return ErrInvalidLengthTypes
  3431  			}
  3432  			if postIndex > l {
  3433  				return io.ErrUnexpectedEOF
  3434  			}
  3435  			if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3436  				return err
  3437  			}
  3438  			iNdEx = postIndex
  3439  		case 4:
  3440  			if wireType != 2 {
  3441  				return fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType)
  3442  			}
  3443  			var msglen int
  3444  			for shift := uint(0); ; shift += 7 {
  3445  				if shift >= 64 {
  3446  					return ErrIntOverflowTypes
  3447  				}
  3448  				if iNdEx >= l {
  3449  					return io.ErrUnexpectedEOF
  3450  				}
  3451  				b := dAtA[iNdEx]
  3452  				iNdEx++
  3453  				msglen |= int(b&0x7F) << shift
  3454  				if b < 0x80 {
  3455  					break
  3456  				}
  3457  			}
  3458  			if msglen < 0 {
  3459  				return ErrInvalidLengthTypes
  3460  			}
  3461  			postIndex := iNdEx + msglen
  3462  			if postIndex < 0 {
  3463  				return ErrInvalidLengthTypes
  3464  			}
  3465  			if postIndex > l {
  3466  				return io.ErrUnexpectedEOF
  3467  			}
  3468  			m.Signatures = append(m.Signatures, CommitSig{})
  3469  			if err := m.Signatures[len(m.Signatures)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3470  				return err
  3471  			}
  3472  			iNdEx = postIndex
  3473  		case 5:
  3474  			if wireType != 2 {
  3475  				return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
  3476  			}
  3477  			var byteLen int
  3478  			for shift := uint(0); ; shift += 7 {
  3479  				if shift >= 64 {
  3480  					return ErrIntOverflowTypes
  3481  				}
  3482  				if iNdEx >= l {
  3483  					return io.ErrUnexpectedEOF
  3484  				}
  3485  				b := dAtA[iNdEx]
  3486  				iNdEx++
  3487  				byteLen |= int(b&0x7F) << shift
  3488  				if b < 0x80 {
  3489  					break
  3490  				}
  3491  			}
  3492  			if byteLen < 0 {
  3493  				return ErrInvalidLengthTypes
  3494  			}
  3495  			postIndex := iNdEx + byteLen
  3496  			if postIndex < 0 {
  3497  				return ErrInvalidLengthTypes
  3498  			}
  3499  			if postIndex > l {
  3500  				return io.ErrUnexpectedEOF
  3501  			}
  3502  			m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...)
  3503  			if m.Hash == nil {
  3504  				m.Hash = []byte{}
  3505  			}
  3506  			iNdEx = postIndex
  3507  		case 6:
  3508  			if wireType != 2 {
  3509  				return fmt.Errorf("proto: wrong wireType = %d for field BitArray", wireType)
  3510  			}
  3511  			var msglen int
  3512  			for shift := uint(0); ; shift += 7 {
  3513  				if shift >= 64 {
  3514  					return ErrIntOverflowTypes
  3515  				}
  3516  				if iNdEx >= l {
  3517  					return io.ErrUnexpectedEOF
  3518  				}
  3519  				b := dAtA[iNdEx]
  3520  				iNdEx++
  3521  				msglen |= int(b&0x7F) << shift
  3522  				if b < 0x80 {
  3523  					break
  3524  				}
  3525  			}
  3526  			if msglen < 0 {
  3527  				return ErrInvalidLengthTypes
  3528  			}
  3529  			postIndex := iNdEx + msglen
  3530  			if postIndex < 0 {
  3531  				return ErrInvalidLengthTypes
  3532  			}
  3533  			if postIndex > l {
  3534  				return io.ErrUnexpectedEOF
  3535  			}
  3536  			if m.BitArray == nil {
  3537  				m.BitArray = &bits.BitArray{}
  3538  			}
  3539  			if err := m.BitArray.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3540  				return err
  3541  			}
  3542  			iNdEx = postIndex
  3543  		default:
  3544  			iNdEx = preIndex
  3545  			skippy, err := skipTypes(dAtA[iNdEx:])
  3546  			if err != nil {
  3547  				return err
  3548  			}
  3549  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  3550  				return ErrInvalidLengthTypes
  3551  			}
  3552  			if (iNdEx + skippy) > l {
  3553  				return io.ErrUnexpectedEOF
  3554  			}
  3555  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  3556  			iNdEx += skippy
  3557  		}
  3558  	}
  3559  
  3560  	if iNdEx > l {
  3561  		return io.ErrUnexpectedEOF
  3562  	}
  3563  	return nil
  3564  }
  3565  func (m *CommitSig) Unmarshal(dAtA []byte) error {
  3566  	l := len(dAtA)
  3567  	iNdEx := 0
  3568  	for iNdEx < l {
  3569  		preIndex := iNdEx
  3570  		var wire uint64
  3571  		for shift := uint(0); ; shift += 7 {
  3572  			if shift >= 64 {
  3573  				return ErrIntOverflowTypes
  3574  			}
  3575  			if iNdEx >= l {
  3576  				return io.ErrUnexpectedEOF
  3577  			}
  3578  			b := dAtA[iNdEx]
  3579  			iNdEx++
  3580  			wire |= uint64(b&0x7F) << shift
  3581  			if b < 0x80 {
  3582  				break
  3583  			}
  3584  		}
  3585  		fieldNum := int32(wire >> 3)
  3586  		wireType := int(wire & 0x7)
  3587  		if wireType == 4 {
  3588  			return fmt.Errorf("proto: CommitSig: wiretype end group for non-group")
  3589  		}
  3590  		if fieldNum <= 0 {
  3591  			return fmt.Errorf("proto: CommitSig: illegal tag %d (wire type %d)", fieldNum, wire)
  3592  		}
  3593  		switch fieldNum {
  3594  		case 1:
  3595  			if wireType != 0 {
  3596  				return fmt.Errorf("proto: wrong wireType = %d for field BlockIdFlag", wireType)
  3597  			}
  3598  			m.BlockIdFlag = 0
  3599  			for shift := uint(0); ; shift += 7 {
  3600  				if shift >= 64 {
  3601  					return ErrIntOverflowTypes
  3602  				}
  3603  				if iNdEx >= l {
  3604  					return io.ErrUnexpectedEOF
  3605  				}
  3606  				b := dAtA[iNdEx]
  3607  				iNdEx++
  3608  				m.BlockIdFlag |= BlockIDFlag(b&0x7F) << shift
  3609  				if b < 0x80 {
  3610  					break
  3611  				}
  3612  			}
  3613  		case 2:
  3614  			if wireType != 2 {
  3615  				return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType)
  3616  			}
  3617  			var byteLen int
  3618  			for shift := uint(0); ; shift += 7 {
  3619  				if shift >= 64 {
  3620  					return ErrIntOverflowTypes
  3621  				}
  3622  				if iNdEx >= l {
  3623  					return io.ErrUnexpectedEOF
  3624  				}
  3625  				b := dAtA[iNdEx]
  3626  				iNdEx++
  3627  				byteLen |= int(b&0x7F) << shift
  3628  				if b < 0x80 {
  3629  					break
  3630  				}
  3631  			}
  3632  			if byteLen < 0 {
  3633  				return ErrInvalidLengthTypes
  3634  			}
  3635  			postIndex := iNdEx + byteLen
  3636  			if postIndex < 0 {
  3637  				return ErrInvalidLengthTypes
  3638  			}
  3639  			if postIndex > l {
  3640  				return io.ErrUnexpectedEOF
  3641  			}
  3642  			m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...)
  3643  			if m.ValidatorAddress == nil {
  3644  				m.ValidatorAddress = []byte{}
  3645  			}
  3646  			iNdEx = postIndex
  3647  		case 3:
  3648  			if wireType != 2 {
  3649  				return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
  3650  			}
  3651  			var msglen int
  3652  			for shift := uint(0); ; shift += 7 {
  3653  				if shift >= 64 {
  3654  					return ErrIntOverflowTypes
  3655  				}
  3656  				if iNdEx >= l {
  3657  					return io.ErrUnexpectedEOF
  3658  				}
  3659  				b := dAtA[iNdEx]
  3660  				iNdEx++
  3661  				msglen |= int(b&0x7F) << shift
  3662  				if b < 0x80 {
  3663  					break
  3664  				}
  3665  			}
  3666  			if msglen < 0 {
  3667  				return ErrInvalidLengthTypes
  3668  			}
  3669  			postIndex := iNdEx + msglen
  3670  			if postIndex < 0 {
  3671  				return ErrInvalidLengthTypes
  3672  			}
  3673  			if postIndex > l {
  3674  				return io.ErrUnexpectedEOF
  3675  			}
  3676  			if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil {
  3677  				return err
  3678  			}
  3679  			iNdEx = postIndex
  3680  		case 4:
  3681  			if wireType != 2 {
  3682  				return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType)
  3683  			}
  3684  			var byteLen int
  3685  			for shift := uint(0); ; shift += 7 {
  3686  				if shift >= 64 {
  3687  					return ErrIntOverflowTypes
  3688  				}
  3689  				if iNdEx >= l {
  3690  					return io.ErrUnexpectedEOF
  3691  				}
  3692  				b := dAtA[iNdEx]
  3693  				iNdEx++
  3694  				byteLen |= int(b&0x7F) << shift
  3695  				if b < 0x80 {
  3696  					break
  3697  				}
  3698  			}
  3699  			if byteLen < 0 {
  3700  				return ErrInvalidLengthTypes
  3701  			}
  3702  			postIndex := iNdEx + byteLen
  3703  			if postIndex < 0 {
  3704  				return ErrInvalidLengthTypes
  3705  			}
  3706  			if postIndex > l {
  3707  				return io.ErrUnexpectedEOF
  3708  			}
  3709  			m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...)
  3710  			if m.Signature == nil {
  3711  				m.Signature = []byte{}
  3712  			}
  3713  			iNdEx = postIndex
  3714  		default:
  3715  			iNdEx = preIndex
  3716  			skippy, err := skipTypes(dAtA[iNdEx:])
  3717  			if err != nil {
  3718  				return err
  3719  			}
  3720  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  3721  				return ErrInvalidLengthTypes
  3722  			}
  3723  			if (iNdEx + skippy) > l {
  3724  				return io.ErrUnexpectedEOF
  3725  			}
  3726  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  3727  			iNdEx += skippy
  3728  		}
  3729  	}
  3730  
  3731  	if iNdEx > l {
  3732  		return io.ErrUnexpectedEOF
  3733  	}
  3734  	return nil
  3735  }
  3736  func (m *Proposal) Unmarshal(dAtA []byte) error {
  3737  	l := len(dAtA)
  3738  	iNdEx := 0
  3739  	for iNdEx < l {
  3740  		preIndex := iNdEx
  3741  		var wire uint64
  3742  		for shift := uint(0); ; shift += 7 {
  3743  			if shift >= 64 {
  3744  				return ErrIntOverflowTypes
  3745  			}
  3746  			if iNdEx >= l {
  3747  				return io.ErrUnexpectedEOF
  3748  			}
  3749  			b := dAtA[iNdEx]
  3750  			iNdEx++
  3751  			wire |= uint64(b&0x7F) << shift
  3752  			if b < 0x80 {
  3753  				break
  3754  			}
  3755  		}
  3756  		fieldNum := int32(wire >> 3)
  3757  		wireType := int(wire & 0x7)
  3758  		if wireType == 4 {
  3759  			return fmt.Errorf("proto: Proposal: wiretype end group for non-group")
  3760  		}
  3761  		if fieldNum <= 0 {
  3762  			return fmt.Errorf("proto: Proposal: illegal tag %d (wire type %d)", fieldNum, wire)
  3763  		}
  3764  		switch fieldNum {
  3765  		case 1:
  3766  			if wireType != 0 {
  3767  				return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  3768  			}
  3769  			m.Type = 0
  3770  			for shift := uint(0); ; shift += 7 {
  3771  				if shift >= 64 {
  3772  					return ErrIntOverflowTypes
  3773  				}
  3774  				if iNdEx >= l {
  3775  					return io.ErrUnexpectedEOF
  3776  				}
  3777  				b := dAtA[iNdEx]
  3778  				iNdEx++
  3779  				m.Type |= SignedMsgType(b&0x7F) << shift
  3780  				if b < 0x80 {
  3781  					break
  3782  				}
  3783  			}
  3784  		case 2:
  3785  			if wireType != 0 {
  3786  				return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  3787  			}
  3788  			m.Height = 0
  3789  			for shift := uint(0); ; shift += 7 {
  3790  				if shift >= 64 {
  3791  					return ErrIntOverflowTypes
  3792  				}
  3793  				if iNdEx >= l {
  3794  					return io.ErrUnexpectedEOF
  3795  				}
  3796  				b := dAtA[iNdEx]
  3797  				iNdEx++
  3798  				m.Height |= int64(b&0x7F) << shift
  3799  				if b < 0x80 {
  3800  					break
  3801  				}
  3802  			}
  3803  		case 3:
  3804  			if wireType != 0 {
  3805  				return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType)
  3806  			}
  3807  			m.Round = 0
  3808  			for shift := uint(0); ; shift += 7 {
  3809  				if shift >= 64 {
  3810  					return ErrIntOverflowTypes
  3811  				}
  3812  				if iNdEx >= l {
  3813  					return io.ErrUnexpectedEOF
  3814  				}
  3815  				b := dAtA[iNdEx]
  3816  				iNdEx++
  3817  				m.Round |= int32(b&0x7F) << shift
  3818  				if b < 0x80 {
  3819  					break
  3820  				}
  3821  			}
  3822  		case 4:
  3823  			if wireType != 0 {
  3824  				return fmt.Errorf("proto: wrong wireType = %d for field PolRound", wireType)
  3825  			}
  3826  			m.PolRound = 0
  3827  			for shift := uint(0); ; shift += 7 {
  3828  				if shift >= 64 {
  3829  					return ErrIntOverflowTypes
  3830  				}
  3831  				if iNdEx >= l {
  3832  					return io.ErrUnexpectedEOF
  3833  				}
  3834  				b := dAtA[iNdEx]
  3835  				iNdEx++
  3836  				m.PolRound |= int32(b&0x7F) << shift
  3837  				if b < 0x80 {
  3838  					break
  3839  				}
  3840  			}
  3841  		case 5:
  3842  			if wireType != 2 {
  3843  				return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType)
  3844  			}
  3845  			var msglen int
  3846  			for shift := uint(0); ; shift += 7 {
  3847  				if shift >= 64 {
  3848  					return ErrIntOverflowTypes
  3849  				}
  3850  				if iNdEx >= l {
  3851  					return io.ErrUnexpectedEOF
  3852  				}
  3853  				b := dAtA[iNdEx]
  3854  				iNdEx++
  3855  				msglen |= int(b&0x7F) << shift
  3856  				if b < 0x80 {
  3857  					break
  3858  				}
  3859  			}
  3860  			if msglen < 0 {
  3861  				return ErrInvalidLengthTypes
  3862  			}
  3863  			postIndex := iNdEx + msglen
  3864  			if postIndex < 0 {
  3865  				return ErrInvalidLengthTypes
  3866  			}
  3867  			if postIndex > l {
  3868  				return io.ErrUnexpectedEOF
  3869  			}
  3870  			if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3871  				return err
  3872  			}
  3873  			iNdEx = postIndex
  3874  		case 6:
  3875  			if wireType != 2 {
  3876  				return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
  3877  			}
  3878  			var msglen int
  3879  			for shift := uint(0); ; shift += 7 {
  3880  				if shift >= 64 {
  3881  					return ErrIntOverflowTypes
  3882  				}
  3883  				if iNdEx >= l {
  3884  					return io.ErrUnexpectedEOF
  3885  				}
  3886  				b := dAtA[iNdEx]
  3887  				iNdEx++
  3888  				msglen |= int(b&0x7F) << shift
  3889  				if b < 0x80 {
  3890  					break
  3891  				}
  3892  			}
  3893  			if msglen < 0 {
  3894  				return ErrInvalidLengthTypes
  3895  			}
  3896  			postIndex := iNdEx + msglen
  3897  			if postIndex < 0 {
  3898  				return ErrInvalidLengthTypes
  3899  			}
  3900  			if postIndex > l {
  3901  				return io.ErrUnexpectedEOF
  3902  			}
  3903  			if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil {
  3904  				return err
  3905  			}
  3906  			iNdEx = postIndex
  3907  		case 7:
  3908  			if wireType != 2 {
  3909  				return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType)
  3910  			}
  3911  			var byteLen int
  3912  			for shift := uint(0); ; shift += 7 {
  3913  				if shift >= 64 {
  3914  					return ErrIntOverflowTypes
  3915  				}
  3916  				if iNdEx >= l {
  3917  					return io.ErrUnexpectedEOF
  3918  				}
  3919  				b := dAtA[iNdEx]
  3920  				iNdEx++
  3921  				byteLen |= int(b&0x7F) << shift
  3922  				if b < 0x80 {
  3923  					break
  3924  				}
  3925  			}
  3926  			if byteLen < 0 {
  3927  				return ErrInvalidLengthTypes
  3928  			}
  3929  			postIndex := iNdEx + byteLen
  3930  			if postIndex < 0 {
  3931  				return ErrInvalidLengthTypes
  3932  			}
  3933  			if postIndex > l {
  3934  				return io.ErrUnexpectedEOF
  3935  			}
  3936  			m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...)
  3937  			if m.Signature == nil {
  3938  				m.Signature = []byte{}
  3939  			}
  3940  			iNdEx = postIndex
  3941  		default:
  3942  			iNdEx = preIndex
  3943  			skippy, err := skipTypes(dAtA[iNdEx:])
  3944  			if err != nil {
  3945  				return err
  3946  			}
  3947  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  3948  				return ErrInvalidLengthTypes
  3949  			}
  3950  			if (iNdEx + skippy) > l {
  3951  				return io.ErrUnexpectedEOF
  3952  			}
  3953  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  3954  			iNdEx += skippy
  3955  		}
  3956  	}
  3957  
  3958  	if iNdEx > l {
  3959  		return io.ErrUnexpectedEOF
  3960  	}
  3961  	return nil
  3962  }
  3963  func (m *SignedHeader) Unmarshal(dAtA []byte) error {
  3964  	l := len(dAtA)
  3965  	iNdEx := 0
  3966  	for iNdEx < l {
  3967  		preIndex := iNdEx
  3968  		var wire uint64
  3969  		for shift := uint(0); ; shift += 7 {
  3970  			if shift >= 64 {
  3971  				return ErrIntOverflowTypes
  3972  			}
  3973  			if iNdEx >= l {
  3974  				return io.ErrUnexpectedEOF
  3975  			}
  3976  			b := dAtA[iNdEx]
  3977  			iNdEx++
  3978  			wire |= uint64(b&0x7F) << shift
  3979  			if b < 0x80 {
  3980  				break
  3981  			}
  3982  		}
  3983  		fieldNum := int32(wire >> 3)
  3984  		wireType := int(wire & 0x7)
  3985  		if wireType == 4 {
  3986  			return fmt.Errorf("proto: SignedHeader: wiretype end group for non-group")
  3987  		}
  3988  		if fieldNum <= 0 {
  3989  			return fmt.Errorf("proto: SignedHeader: illegal tag %d (wire type %d)", fieldNum, wire)
  3990  		}
  3991  		switch fieldNum {
  3992  		case 1:
  3993  			if wireType != 2 {
  3994  				return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  3995  			}
  3996  			var msglen int
  3997  			for shift := uint(0); ; shift += 7 {
  3998  				if shift >= 64 {
  3999  					return ErrIntOverflowTypes
  4000  				}
  4001  				if iNdEx >= l {
  4002  					return io.ErrUnexpectedEOF
  4003  				}
  4004  				b := dAtA[iNdEx]
  4005  				iNdEx++
  4006  				msglen |= int(b&0x7F) << shift
  4007  				if b < 0x80 {
  4008  					break
  4009  				}
  4010  			}
  4011  			if msglen < 0 {
  4012  				return ErrInvalidLengthTypes
  4013  			}
  4014  			postIndex := iNdEx + msglen
  4015  			if postIndex < 0 {
  4016  				return ErrInvalidLengthTypes
  4017  			}
  4018  			if postIndex > l {
  4019  				return io.ErrUnexpectedEOF
  4020  			}
  4021  			if m.Header == nil {
  4022  				m.Header = &Header{}
  4023  			}
  4024  			if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4025  				return err
  4026  			}
  4027  			iNdEx = postIndex
  4028  		case 2:
  4029  			if wireType != 2 {
  4030  				return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType)
  4031  			}
  4032  			var msglen int
  4033  			for shift := uint(0); ; shift += 7 {
  4034  				if shift >= 64 {
  4035  					return ErrIntOverflowTypes
  4036  				}
  4037  				if iNdEx >= l {
  4038  					return io.ErrUnexpectedEOF
  4039  				}
  4040  				b := dAtA[iNdEx]
  4041  				iNdEx++
  4042  				msglen |= int(b&0x7F) << shift
  4043  				if b < 0x80 {
  4044  					break
  4045  				}
  4046  			}
  4047  			if msglen < 0 {
  4048  				return ErrInvalidLengthTypes
  4049  			}
  4050  			postIndex := iNdEx + msglen
  4051  			if postIndex < 0 {
  4052  				return ErrInvalidLengthTypes
  4053  			}
  4054  			if postIndex > l {
  4055  				return io.ErrUnexpectedEOF
  4056  			}
  4057  			if m.Commit == nil {
  4058  				m.Commit = &Commit{}
  4059  			}
  4060  			if err := m.Commit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4061  				return err
  4062  			}
  4063  			iNdEx = postIndex
  4064  		default:
  4065  			iNdEx = preIndex
  4066  			skippy, err := skipTypes(dAtA[iNdEx:])
  4067  			if err != nil {
  4068  				return err
  4069  			}
  4070  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  4071  				return ErrInvalidLengthTypes
  4072  			}
  4073  			if (iNdEx + skippy) > l {
  4074  				return io.ErrUnexpectedEOF
  4075  			}
  4076  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  4077  			iNdEx += skippy
  4078  		}
  4079  	}
  4080  
  4081  	if iNdEx > l {
  4082  		return io.ErrUnexpectedEOF
  4083  	}
  4084  	return nil
  4085  }
  4086  func (m *BlockMeta) Unmarshal(dAtA []byte) error {
  4087  	l := len(dAtA)
  4088  	iNdEx := 0
  4089  	for iNdEx < l {
  4090  		preIndex := iNdEx
  4091  		var wire uint64
  4092  		for shift := uint(0); ; shift += 7 {
  4093  			if shift >= 64 {
  4094  				return ErrIntOverflowTypes
  4095  			}
  4096  			if iNdEx >= l {
  4097  				return io.ErrUnexpectedEOF
  4098  			}
  4099  			b := dAtA[iNdEx]
  4100  			iNdEx++
  4101  			wire |= uint64(b&0x7F) << shift
  4102  			if b < 0x80 {
  4103  				break
  4104  			}
  4105  		}
  4106  		fieldNum := int32(wire >> 3)
  4107  		wireType := int(wire & 0x7)
  4108  		if wireType == 4 {
  4109  			return fmt.Errorf("proto: BlockMeta: wiretype end group for non-group")
  4110  		}
  4111  		if fieldNum <= 0 {
  4112  			return fmt.Errorf("proto: BlockMeta: illegal tag %d (wire type %d)", fieldNum, wire)
  4113  		}
  4114  		switch fieldNum {
  4115  		case 1:
  4116  			if wireType != 2 {
  4117  				return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType)
  4118  			}
  4119  			var msglen int
  4120  			for shift := uint(0); ; shift += 7 {
  4121  				if shift >= 64 {
  4122  					return ErrIntOverflowTypes
  4123  				}
  4124  				if iNdEx >= l {
  4125  					return io.ErrUnexpectedEOF
  4126  				}
  4127  				b := dAtA[iNdEx]
  4128  				iNdEx++
  4129  				msglen |= int(b&0x7F) << shift
  4130  				if b < 0x80 {
  4131  					break
  4132  				}
  4133  			}
  4134  			if msglen < 0 {
  4135  				return ErrInvalidLengthTypes
  4136  			}
  4137  			postIndex := iNdEx + msglen
  4138  			if postIndex < 0 {
  4139  				return ErrInvalidLengthTypes
  4140  			}
  4141  			if postIndex > l {
  4142  				return io.ErrUnexpectedEOF
  4143  			}
  4144  			if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4145  				return err
  4146  			}
  4147  			iNdEx = postIndex
  4148  		case 2:
  4149  			if wireType != 0 {
  4150  				return fmt.Errorf("proto: wrong wireType = %d for field BlockSize", wireType)
  4151  			}
  4152  			m.BlockSize = 0
  4153  			for shift := uint(0); ; shift += 7 {
  4154  				if shift >= 64 {
  4155  					return ErrIntOverflowTypes
  4156  				}
  4157  				if iNdEx >= l {
  4158  					return io.ErrUnexpectedEOF
  4159  				}
  4160  				b := dAtA[iNdEx]
  4161  				iNdEx++
  4162  				m.BlockSize |= int64(b&0x7F) << shift
  4163  				if b < 0x80 {
  4164  					break
  4165  				}
  4166  			}
  4167  		case 3:
  4168  			if wireType != 2 {
  4169  				return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  4170  			}
  4171  			var msglen int
  4172  			for shift := uint(0); ; shift += 7 {
  4173  				if shift >= 64 {
  4174  					return ErrIntOverflowTypes
  4175  				}
  4176  				if iNdEx >= l {
  4177  					return io.ErrUnexpectedEOF
  4178  				}
  4179  				b := dAtA[iNdEx]
  4180  				iNdEx++
  4181  				msglen |= int(b&0x7F) << shift
  4182  				if b < 0x80 {
  4183  					break
  4184  				}
  4185  			}
  4186  			if msglen < 0 {
  4187  				return ErrInvalidLengthTypes
  4188  			}
  4189  			postIndex := iNdEx + msglen
  4190  			if postIndex < 0 {
  4191  				return ErrInvalidLengthTypes
  4192  			}
  4193  			if postIndex > l {
  4194  				return io.ErrUnexpectedEOF
  4195  			}
  4196  			if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4197  				return err
  4198  			}
  4199  			iNdEx = postIndex
  4200  		case 4:
  4201  			if wireType != 0 {
  4202  				return fmt.Errorf("proto: wrong wireType = %d for field NumTxs", wireType)
  4203  			}
  4204  			m.NumTxs = 0
  4205  			for shift := uint(0); ; shift += 7 {
  4206  				if shift >= 64 {
  4207  					return ErrIntOverflowTypes
  4208  				}
  4209  				if iNdEx >= l {
  4210  					return io.ErrUnexpectedEOF
  4211  				}
  4212  				b := dAtA[iNdEx]
  4213  				iNdEx++
  4214  				m.NumTxs |= int64(b&0x7F) << shift
  4215  				if b < 0x80 {
  4216  					break
  4217  				}
  4218  			}
  4219  		default:
  4220  			iNdEx = preIndex
  4221  			skippy, err := skipTypes(dAtA[iNdEx:])
  4222  			if err != nil {
  4223  				return err
  4224  			}
  4225  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  4226  				return ErrInvalidLengthTypes
  4227  			}
  4228  			if (iNdEx + skippy) > l {
  4229  				return io.ErrUnexpectedEOF
  4230  			}
  4231  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  4232  			iNdEx += skippy
  4233  		}
  4234  	}
  4235  
  4236  	if iNdEx > l {
  4237  		return io.ErrUnexpectedEOF
  4238  	}
  4239  	return nil
  4240  }
  4241  func skipTypes(dAtA []byte) (n int, err error) {
  4242  	l := len(dAtA)
  4243  	iNdEx := 0
  4244  	depth := 0
  4245  	for iNdEx < l {
  4246  		var wire uint64
  4247  		for shift := uint(0); ; shift += 7 {
  4248  			if shift >= 64 {
  4249  				return 0, ErrIntOverflowTypes
  4250  			}
  4251  			if iNdEx >= l {
  4252  				return 0, io.ErrUnexpectedEOF
  4253  			}
  4254  			b := dAtA[iNdEx]
  4255  			iNdEx++
  4256  			wire |= (uint64(b) & 0x7F) << shift
  4257  			if b < 0x80 {
  4258  				break
  4259  			}
  4260  		}
  4261  		wireType := int(wire & 0x7)
  4262  		switch wireType {
  4263  		case 0:
  4264  			for shift := uint(0); ; shift += 7 {
  4265  				if shift >= 64 {
  4266  					return 0, ErrIntOverflowTypes
  4267  				}
  4268  				if iNdEx >= l {
  4269  					return 0, io.ErrUnexpectedEOF
  4270  				}
  4271  				iNdEx++
  4272  				if dAtA[iNdEx-1] < 0x80 {
  4273  					break
  4274  				}
  4275  			}
  4276  		case 1:
  4277  			iNdEx += 8
  4278  		case 2:
  4279  			var length int
  4280  			for shift := uint(0); ; shift += 7 {
  4281  				if shift >= 64 {
  4282  					return 0, ErrIntOverflowTypes
  4283  				}
  4284  				if iNdEx >= l {
  4285  					return 0, io.ErrUnexpectedEOF
  4286  				}
  4287  				b := dAtA[iNdEx]
  4288  				iNdEx++
  4289  				length |= (int(b) & 0x7F) << shift
  4290  				if b < 0x80 {
  4291  					break
  4292  				}
  4293  			}
  4294  			if length < 0 {
  4295  				return 0, ErrInvalidLengthTypes
  4296  			}
  4297  			iNdEx += length
  4298  		case 3:
  4299  			depth++
  4300  		case 4:
  4301  			if depth == 0 {
  4302  				return 0, ErrUnexpectedEndOfGroupTypes
  4303  			}
  4304  			depth--
  4305  		case 5:
  4306  			iNdEx += 4
  4307  		default:
  4308  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  4309  		}
  4310  		if iNdEx < 0 {
  4311  			return 0, ErrInvalidLengthTypes
  4312  		}
  4313  		if depth == 0 {
  4314  			return iNdEx, nil
  4315  		}
  4316  	}
  4317  	return 0, io.ErrUnexpectedEOF
  4318  }
  4319  
  4320  var (
  4321  	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
  4322  	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
  4323  	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
  4324  )