github.com/adoriasoft/tendermint@v0.34.0-dev1.0.20200722151356-96d84601a75a/proto/tendermint/types/types.pb.go (about)

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