github.com/cosmos/cosmos-sdk@v0.50.10/client/grpc/cmtservice/types.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: cosmos/base/tendermint/v1beta1/types.proto
     3  
     4  package cmtservice
     5  
     6  import (
     7  	fmt "fmt"
     8  	types "github.com/cometbft/cometbft/proto/tendermint/types"
     9  	version "github.com/cometbft/cometbft/proto/tendermint/version"
    10  	_ "github.com/cosmos/cosmos-sdk/types/tx/amino"
    11  	_ "github.com/cosmos/gogoproto/gogoproto"
    12  	proto "github.com/cosmos/gogoproto/proto"
    13  	github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types"
    14  	_ "google.golang.org/protobuf/types/known/timestamppb"
    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  // Block is tendermint type Block, with the Header proposer address
    34  // field converted to bech32 string.
    35  type Block struct {
    36  	Header     Header             `protobuf:"bytes,1,opt,name=header,proto3" json:"header"`
    37  	Data       types.Data         `protobuf:"bytes,2,opt,name=data,proto3" json:"data"`
    38  	Evidence   types.EvidenceList `protobuf:"bytes,3,opt,name=evidence,proto3" json:"evidence"`
    39  	LastCommit *types.Commit      `protobuf:"bytes,4,opt,name=last_commit,json=lastCommit,proto3" json:"last_commit,omitempty"`
    40  }
    41  
    42  func (m *Block) Reset()         { *m = Block{} }
    43  func (m *Block) String() string { return proto.CompactTextString(m) }
    44  func (*Block) ProtoMessage()    {}
    45  func (*Block) Descriptor() ([]byte, []int) {
    46  	return fileDescriptor_bb9931519c08e0d6, []int{0}
    47  }
    48  func (m *Block) XXX_Unmarshal(b []byte) error {
    49  	return m.Unmarshal(b)
    50  }
    51  func (m *Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    52  	if deterministic {
    53  		return xxx_messageInfo_Block.Marshal(b, m, deterministic)
    54  	} else {
    55  		b = b[:cap(b)]
    56  		n, err := m.MarshalToSizedBuffer(b)
    57  		if err != nil {
    58  			return nil, err
    59  		}
    60  		return b[:n], nil
    61  	}
    62  }
    63  func (m *Block) XXX_Merge(src proto.Message) {
    64  	xxx_messageInfo_Block.Merge(m, src)
    65  }
    66  func (m *Block) XXX_Size() int {
    67  	return m.Size()
    68  }
    69  func (m *Block) XXX_DiscardUnknown() {
    70  	xxx_messageInfo_Block.DiscardUnknown(m)
    71  }
    72  
    73  var xxx_messageInfo_Block proto.InternalMessageInfo
    74  
    75  func (m *Block) GetHeader() Header {
    76  	if m != nil {
    77  		return m.Header
    78  	}
    79  	return Header{}
    80  }
    81  
    82  func (m *Block) GetData() types.Data {
    83  	if m != nil {
    84  		return m.Data
    85  	}
    86  	return types.Data{}
    87  }
    88  
    89  func (m *Block) GetEvidence() types.EvidenceList {
    90  	if m != nil {
    91  		return m.Evidence
    92  	}
    93  	return types.EvidenceList{}
    94  }
    95  
    96  func (m *Block) GetLastCommit() *types.Commit {
    97  	if m != nil {
    98  		return m.LastCommit
    99  	}
   100  	return nil
   101  }
   102  
   103  // Header defines the structure of a Tendermint block header.
   104  type Header struct {
   105  	// basic block info
   106  	Version version.Consensus `protobuf:"bytes,1,opt,name=version,proto3" json:"version"`
   107  	ChainID string            `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
   108  	Height  int64             `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
   109  	Time    time.Time         `protobuf:"bytes,4,opt,name=time,proto3,stdtime" json:"time"`
   110  	// prev block info
   111  	LastBlockId types.BlockID `protobuf:"bytes,5,opt,name=last_block_id,json=lastBlockId,proto3" json:"last_block_id"`
   112  	// hashes of block data
   113  	LastCommitHash []byte `protobuf:"bytes,6,opt,name=last_commit_hash,json=lastCommitHash,proto3" json:"last_commit_hash,omitempty"`
   114  	DataHash       []byte `protobuf:"bytes,7,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"`
   115  	// hashes from the app output from the prev block
   116  	ValidatorsHash     []byte `protobuf:"bytes,8,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"`
   117  	NextValidatorsHash []byte `protobuf:"bytes,9,opt,name=next_validators_hash,json=nextValidatorsHash,proto3" json:"next_validators_hash,omitempty"`
   118  	ConsensusHash      []byte `protobuf:"bytes,10,opt,name=consensus_hash,json=consensusHash,proto3" json:"consensus_hash,omitempty"`
   119  	AppHash            []byte `protobuf:"bytes,11,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"`
   120  	LastResultsHash    []byte `protobuf:"bytes,12,opt,name=last_results_hash,json=lastResultsHash,proto3" json:"last_results_hash,omitempty"`
   121  	// consensus info
   122  	EvidenceHash []byte `protobuf:"bytes,13,opt,name=evidence_hash,json=evidenceHash,proto3" json:"evidence_hash,omitempty"`
   123  	// proposer_address is the original block proposer address, formatted as a Bech32 string.
   124  	// In Tendermint, this type is `bytes`, but in the SDK, we convert it to a Bech32 string
   125  	// for better UX.
   126  	ProposerAddress string `protobuf:"bytes,14,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"`
   127  }
   128  
   129  func (m *Header) Reset()         { *m = Header{} }
   130  func (m *Header) String() string { return proto.CompactTextString(m) }
   131  func (*Header) ProtoMessage()    {}
   132  func (*Header) Descriptor() ([]byte, []int) {
   133  	return fileDescriptor_bb9931519c08e0d6, []int{1}
   134  }
   135  func (m *Header) XXX_Unmarshal(b []byte) error {
   136  	return m.Unmarshal(b)
   137  }
   138  func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   139  	if deterministic {
   140  		return xxx_messageInfo_Header.Marshal(b, m, deterministic)
   141  	} else {
   142  		b = b[:cap(b)]
   143  		n, err := m.MarshalToSizedBuffer(b)
   144  		if err != nil {
   145  			return nil, err
   146  		}
   147  		return b[:n], nil
   148  	}
   149  }
   150  func (m *Header) XXX_Merge(src proto.Message) {
   151  	xxx_messageInfo_Header.Merge(m, src)
   152  }
   153  func (m *Header) XXX_Size() int {
   154  	return m.Size()
   155  }
   156  func (m *Header) XXX_DiscardUnknown() {
   157  	xxx_messageInfo_Header.DiscardUnknown(m)
   158  }
   159  
   160  var xxx_messageInfo_Header proto.InternalMessageInfo
   161  
   162  func (m *Header) GetVersion() version.Consensus {
   163  	if m != nil {
   164  		return m.Version
   165  	}
   166  	return version.Consensus{}
   167  }
   168  
   169  func (m *Header) GetChainID() string {
   170  	if m != nil {
   171  		return m.ChainID
   172  	}
   173  	return ""
   174  }
   175  
   176  func (m *Header) GetHeight() int64 {
   177  	if m != nil {
   178  		return m.Height
   179  	}
   180  	return 0
   181  }
   182  
   183  func (m *Header) GetTime() time.Time {
   184  	if m != nil {
   185  		return m.Time
   186  	}
   187  	return time.Time{}
   188  }
   189  
   190  func (m *Header) GetLastBlockId() types.BlockID {
   191  	if m != nil {
   192  		return m.LastBlockId
   193  	}
   194  	return types.BlockID{}
   195  }
   196  
   197  func (m *Header) GetLastCommitHash() []byte {
   198  	if m != nil {
   199  		return m.LastCommitHash
   200  	}
   201  	return nil
   202  }
   203  
   204  func (m *Header) GetDataHash() []byte {
   205  	if m != nil {
   206  		return m.DataHash
   207  	}
   208  	return nil
   209  }
   210  
   211  func (m *Header) GetValidatorsHash() []byte {
   212  	if m != nil {
   213  		return m.ValidatorsHash
   214  	}
   215  	return nil
   216  }
   217  
   218  func (m *Header) GetNextValidatorsHash() []byte {
   219  	if m != nil {
   220  		return m.NextValidatorsHash
   221  	}
   222  	return nil
   223  }
   224  
   225  func (m *Header) GetConsensusHash() []byte {
   226  	if m != nil {
   227  		return m.ConsensusHash
   228  	}
   229  	return nil
   230  }
   231  
   232  func (m *Header) GetAppHash() []byte {
   233  	if m != nil {
   234  		return m.AppHash
   235  	}
   236  	return nil
   237  }
   238  
   239  func (m *Header) GetLastResultsHash() []byte {
   240  	if m != nil {
   241  		return m.LastResultsHash
   242  	}
   243  	return nil
   244  }
   245  
   246  func (m *Header) GetEvidenceHash() []byte {
   247  	if m != nil {
   248  		return m.EvidenceHash
   249  	}
   250  	return nil
   251  }
   252  
   253  func (m *Header) GetProposerAddress() string {
   254  	if m != nil {
   255  		return m.ProposerAddress
   256  	}
   257  	return ""
   258  }
   259  
   260  func init() {
   261  	proto.RegisterType((*Block)(nil), "cosmos.base.tendermint.v1beta1.Block")
   262  	proto.RegisterType((*Header)(nil), "cosmos.base.tendermint.v1beta1.Header")
   263  }
   264  
   265  func init() {
   266  	proto.RegisterFile("cosmos/base/tendermint/v1beta1/types.proto", fileDescriptor_bb9931519c08e0d6)
   267  }
   268  
   269  var fileDescriptor_bb9931519c08e0d6 = []byte{
   270  	// 647 bytes of a gzipped FileDescriptorProto
   271  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x94, 0xcd, 0x6e, 0xd3, 0x4e,
   272  	0x14, 0xc5, 0xe3, 0x36, 0xcd, 0xc7, 0xa4, 0xe9, 0xc7, 0xa8, 0xaa, 0xdc, 0xfc, 0xff, 0x38, 0x55,
   273  	0x11, 0xa5, 0x54, 0xc2, 0xa6, 0x54, 0x2c, 0x58, 0xb0, 0x20, 0x6d, 0xa5, 0x46, 0x82, 0x8d, 0x85,
   274  	0x58, 0xb0, 0x89, 0x26, 0xf6, 0x60, 0x8f, 0x6a, 0x7b, 0x2c, 0xcf, 0x24, 0x82, 0x67, 0x60, 0xd3,
   275  	0xc7, 0x60, 0xc9, 0x63, 0x74, 0xd9, 0x25, 0xab, 0x82, 0xd2, 0x05, 0x4f, 0xc0, 0x1e, 0xcd, 0x9d,
   276  	0x71, 0xeb, 0x10, 0x89, 0x4d, 0x62, 0x9f, 0xfb, 0xbb, 0x27, 0x73, 0xcf, 0x1d, 0x05, 0x1d, 0x06,
   277  	0x5c, 0xa4, 0x5c, 0x78, 0x63, 0x22, 0xa8, 0x27, 0x69, 0x16, 0xd2, 0x22, 0x65, 0x99, 0xf4, 0xa6,
   278  	0x47, 0x63, 0x2a, 0xc9, 0x91, 0x27, 0x3f, 0xe7, 0x54, 0xb8, 0x79, 0xc1, 0x25, 0xc7, 0x8e, 0x66,
   279  	0x5d, 0xc5, 0xba, 0xf7, 0xac, 0x6b, 0xd8, 0xde, 0x56, 0xc4, 0x23, 0x0e, 0xa8, 0xa7, 0x9e, 0x74,
   280  	0x57, 0xef, 0xff, 0x8a, 0x2b, 0xb8, 0x55, 0x3d, 0x7b, 0xfd, 0x85, 0x2a, 0x9d, 0xb2, 0x90, 0x66,
   281  	0x01, 0x35, 0x80, 0x53, 0x3d, 0x14, 0x2d, 0x04, 0xe3, 0xd9, 0xbc, 0x41, 0xc4, 0x79, 0x94, 0x50,
   282  	0x0f, 0xde, 0xc6, 0x93, 0x8f, 0x9e, 0x64, 0x29, 0x15, 0x92, 0xa4, 0xb9, 0x01, 0x36, 0x49, 0xca,
   283  	0x32, 0xee, 0xc1, 0xa7, 0x96, 0xf6, 0xbe, 0x2c, 0xa1, 0x95, 0x41, 0xc2, 0x83, 0x0b, 0x3c, 0x44,
   284  	0x8d, 0x98, 0x92, 0x90, 0x16, 0xb6, 0xb5, 0x6b, 0x1d, 0x74, 0x9e, 0xef, 0xbb, 0xff, 0x9e, 0xd1,
   285  	0x3d, 0x07, 0x7a, 0xd0, 0xbe, 0xba, 0xe9, 0xd7, 0xbe, 0xfe, 0xfa, 0x76, 0x68, 0xf9, 0xc6, 0x00,
   286  	0xbf, 0x40, 0xf5, 0x90, 0x48, 0x62, 0x2f, 0x81, 0xd1, 0x76, 0xb5, 0x59, 0x9f, 0xf7, 0x94, 0x48,
   287  	0x52, 0x6d, 0x04, 0x1c, 0x9f, 0xa1, 0x56, 0x39, 0xb1, 0xbd, 0x0c, 0xad, 0xce, 0x62, 0xeb, 0x99,
   288  	0x21, 0xde, 0x30, 0x21, 0xab, 0x16, 0x77, 0xad, 0xf8, 0x25, 0xea, 0x24, 0x44, 0xc8, 0x51, 0xc0,
   289  	0xd3, 0x94, 0x49, 0xbb, 0x0e, 0x4e, 0xf6, 0xa2, 0xd3, 0x09, 0xd4, 0x7d, 0xa4, 0x60, 0xfd, 0xbc,
   290  	0xf7, 0xbb, 0x8e, 0x1a, 0x7a, 0x2c, 0x3c, 0x40, 0x4d, 0x93, 0xb1, 0xc9, 0xe3, 0xc1, 0x5c, 0x06,
   291  	0xba, 0xe4, 0x9e, 0xf0, 0x4c, 0xd0, 0x4c, 0x4c, 0x44, 0xf5, 0x28, 0x65, 0x23, 0xde, 0x47, 0xad,
   292  	0x20, 0x26, 0x2c, 0x1b, 0xb1, 0x10, 0xb2, 0x68, 0x0f, 0x3a, 0xb3, 0x9b, 0x7e, 0xf3, 0x44, 0x69,
   293  	0xc3, 0x53, 0xbf, 0x09, 0xc5, 0x61, 0x88, 0xb7, 0x55, 0xf4, 0x2c, 0x8a, 0x25, 0x8c, 0xbd, 0xec,
   294  	0x9b, 0x37, 0xfc, 0x0a, 0xd5, 0xd5, 0x0a, 0xcd, 0x08, 0x3d, 0x57, 0xef, 0xd7, 0x2d, 0xf7, 0xeb,
   295  	0xbe, 0x2b, 0xf7, 0x3b, 0xe8, 0xaa, 0x5f, 0xbf, 0xfc, 0xd1, 0xb7, 0x4c, 0x9e, 0xaa, 0x0d, 0x9f,
   296  	0xa3, 0x2e, 0x04, 0x31, 0x56, 0xfb, 0x55, 0x67, 0x58, 0x01, 0x9f, 0x9d, 0xc5, 0x28, 0xe0, 0x06,
   297  	0x0c, 0x4f, 0xab, 0x43, 0x40, 0x86, 0x5a, 0x0f, 0xf1, 0x01, 0xda, 0xa8, 0x44, 0x3a, 0x8a, 0x89,
   298  	0x88, 0xed, 0xc6, 0xae, 0x75, 0xb0, 0xea, 0xaf, 0xdd, 0xa7, 0x77, 0x4e, 0x44, 0x8c, 0xff, 0x43,
   299  	0x6d, 0xb5, 0x4b, 0x8d, 0x34, 0x01, 0x69, 0x29, 0x01, 0x8a, 0x8f, 0xd1, 0xfa, 0x94, 0x24, 0x2c,
   300  	0x24, 0x92, 0x17, 0x42, 0x23, 0x2d, 0xed, 0x72, 0x2f, 0x03, 0xf8, 0x0c, 0x6d, 0x65, 0xf4, 0x93,
   301  	0x1c, 0xfd, 0x4d, 0xb7, 0x81, 0xc6, 0xaa, 0xf6, 0x7e, 0xbe, 0xe3, 0x11, 0x5a, 0x0b, 0xca, 0x5d,
   302  	0x68, 0x16, 0x01, 0xdb, 0xbd, 0x53, 0x01, 0xdb, 0x41, 0x2d, 0x92, 0xe7, 0x1a, 0xe8, 0x00, 0xd0,
   303  	0x24, 0x79, 0x0e, 0xa5, 0x43, 0xb4, 0x09, 0x33, 0x16, 0x54, 0x4c, 0x12, 0x69, 0x4c, 0x56, 0x81,
   304  	0x59, 0x57, 0x05, 0x5f, 0xeb, 0xc0, 0x3e, 0x44, 0xdd, 0xf2, 0xba, 0x69, 0xae, 0x0b, 0xdc, 0x6a,
   305  	0x29, 0x02, 0xf4, 0x04, 0x6d, 0xe4, 0x05, 0xcf, 0xb9, 0xa0, 0xc5, 0x88, 0x84, 0x61, 0x41, 0x85,
   306  	0xb0, 0xd7, 0xd4, 0x2d, 0xf0, 0xd7, 0x4b, 0xfd, 0xb5, 0x96, 0x07, 0x6f, 0xaf, 0x66, 0x8e, 0x75,
   307  	0x3d, 0x73, 0xac, 0x9f, 0x33, 0xc7, 0xba, 0xbc, 0x75, 0x6a, 0xd7, 0xb7, 0x4e, 0xed, 0xfb, 0xad,
   308  	0x53, 0xfb, 0x70, 0x1c, 0x31, 0x19, 0x4f, 0xc6, 0x6e, 0xc0, 0x53, 0xcf, 0xfc, 0x3f, 0xe9, 0xaf,
   309  	0xa7, 0x22, 0xbc, 0xf0, 0x82, 0x84, 0xd1, 0x4c, 0x7a, 0x51, 0x91, 0x07, 0x5e, 0x90, 0x4a, 0x41,
   310  	0x8b, 0x29, 0x0b, 0xe8, 0xb8, 0x01, 0x37, 0xe4, 0xf8, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00,
   311  	0x0c, 0x32, 0xb7, 0xd2, 0x04, 0x00, 0x00,
   312  }
   313  
   314  func (m *Block) Marshal() (dAtA []byte, err error) {
   315  	size := m.Size()
   316  	dAtA = make([]byte, size)
   317  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   318  	if err != nil {
   319  		return nil, err
   320  	}
   321  	return dAtA[:n], nil
   322  }
   323  
   324  func (m *Block) MarshalTo(dAtA []byte) (int, error) {
   325  	size := m.Size()
   326  	return m.MarshalToSizedBuffer(dAtA[:size])
   327  }
   328  
   329  func (m *Block) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   330  	i := len(dAtA)
   331  	_ = i
   332  	var l int
   333  	_ = l
   334  	if m.LastCommit != nil {
   335  		{
   336  			size, err := m.LastCommit.MarshalToSizedBuffer(dAtA[:i])
   337  			if err != nil {
   338  				return 0, err
   339  			}
   340  			i -= size
   341  			i = encodeVarintTypes(dAtA, i, uint64(size))
   342  		}
   343  		i--
   344  		dAtA[i] = 0x22
   345  	}
   346  	{
   347  		size, err := m.Evidence.MarshalToSizedBuffer(dAtA[:i])
   348  		if err != nil {
   349  			return 0, err
   350  		}
   351  		i -= size
   352  		i = encodeVarintTypes(dAtA, i, uint64(size))
   353  	}
   354  	i--
   355  	dAtA[i] = 0x1a
   356  	{
   357  		size, err := m.Data.MarshalToSizedBuffer(dAtA[:i])
   358  		if err != nil {
   359  			return 0, err
   360  		}
   361  		i -= size
   362  		i = encodeVarintTypes(dAtA, i, uint64(size))
   363  	}
   364  	i--
   365  	dAtA[i] = 0x12
   366  	{
   367  		size, err := m.Header.MarshalToSizedBuffer(dAtA[:i])
   368  		if err != nil {
   369  			return 0, err
   370  		}
   371  		i -= size
   372  		i = encodeVarintTypes(dAtA, i, uint64(size))
   373  	}
   374  	i--
   375  	dAtA[i] = 0xa
   376  	return len(dAtA) - i, nil
   377  }
   378  
   379  func (m *Header) Marshal() (dAtA []byte, err error) {
   380  	size := m.Size()
   381  	dAtA = make([]byte, size)
   382  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   383  	if err != nil {
   384  		return nil, err
   385  	}
   386  	return dAtA[:n], nil
   387  }
   388  
   389  func (m *Header) MarshalTo(dAtA []byte) (int, error) {
   390  	size := m.Size()
   391  	return m.MarshalToSizedBuffer(dAtA[:size])
   392  }
   393  
   394  func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   395  	i := len(dAtA)
   396  	_ = i
   397  	var l int
   398  	_ = l
   399  	if len(m.ProposerAddress) > 0 {
   400  		i -= len(m.ProposerAddress)
   401  		copy(dAtA[i:], m.ProposerAddress)
   402  		i = encodeVarintTypes(dAtA, i, uint64(len(m.ProposerAddress)))
   403  		i--
   404  		dAtA[i] = 0x72
   405  	}
   406  	if len(m.EvidenceHash) > 0 {
   407  		i -= len(m.EvidenceHash)
   408  		copy(dAtA[i:], m.EvidenceHash)
   409  		i = encodeVarintTypes(dAtA, i, uint64(len(m.EvidenceHash)))
   410  		i--
   411  		dAtA[i] = 0x6a
   412  	}
   413  	if len(m.LastResultsHash) > 0 {
   414  		i -= len(m.LastResultsHash)
   415  		copy(dAtA[i:], m.LastResultsHash)
   416  		i = encodeVarintTypes(dAtA, i, uint64(len(m.LastResultsHash)))
   417  		i--
   418  		dAtA[i] = 0x62
   419  	}
   420  	if len(m.AppHash) > 0 {
   421  		i -= len(m.AppHash)
   422  		copy(dAtA[i:], m.AppHash)
   423  		i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash)))
   424  		i--
   425  		dAtA[i] = 0x5a
   426  	}
   427  	if len(m.ConsensusHash) > 0 {
   428  		i -= len(m.ConsensusHash)
   429  		copy(dAtA[i:], m.ConsensusHash)
   430  		i = encodeVarintTypes(dAtA, i, uint64(len(m.ConsensusHash)))
   431  		i--
   432  		dAtA[i] = 0x52
   433  	}
   434  	if len(m.NextValidatorsHash) > 0 {
   435  		i -= len(m.NextValidatorsHash)
   436  		copy(dAtA[i:], m.NextValidatorsHash)
   437  		i = encodeVarintTypes(dAtA, i, uint64(len(m.NextValidatorsHash)))
   438  		i--
   439  		dAtA[i] = 0x4a
   440  	}
   441  	if len(m.ValidatorsHash) > 0 {
   442  		i -= len(m.ValidatorsHash)
   443  		copy(dAtA[i:], m.ValidatorsHash)
   444  		i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorsHash)))
   445  		i--
   446  		dAtA[i] = 0x42
   447  	}
   448  	if len(m.DataHash) > 0 {
   449  		i -= len(m.DataHash)
   450  		copy(dAtA[i:], m.DataHash)
   451  		i = encodeVarintTypes(dAtA, i, uint64(len(m.DataHash)))
   452  		i--
   453  		dAtA[i] = 0x3a
   454  	}
   455  	if len(m.LastCommitHash) > 0 {
   456  		i -= len(m.LastCommitHash)
   457  		copy(dAtA[i:], m.LastCommitHash)
   458  		i = encodeVarintTypes(dAtA, i, uint64(len(m.LastCommitHash)))
   459  		i--
   460  		dAtA[i] = 0x32
   461  	}
   462  	{
   463  		size, err := m.LastBlockId.MarshalToSizedBuffer(dAtA[:i])
   464  		if err != nil {
   465  			return 0, err
   466  		}
   467  		i -= size
   468  		i = encodeVarintTypes(dAtA, i, uint64(size))
   469  	}
   470  	i--
   471  	dAtA[i] = 0x2a
   472  	n6, err6 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):])
   473  	if err6 != nil {
   474  		return 0, err6
   475  	}
   476  	i -= n6
   477  	i = encodeVarintTypes(dAtA, i, uint64(n6))
   478  	i--
   479  	dAtA[i] = 0x22
   480  	if m.Height != 0 {
   481  		i = encodeVarintTypes(dAtA, i, uint64(m.Height))
   482  		i--
   483  		dAtA[i] = 0x18
   484  	}
   485  	if len(m.ChainID) > 0 {
   486  		i -= len(m.ChainID)
   487  		copy(dAtA[i:], m.ChainID)
   488  		i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainID)))
   489  		i--
   490  		dAtA[i] = 0x12
   491  	}
   492  	{
   493  		size, err := m.Version.MarshalToSizedBuffer(dAtA[:i])
   494  		if err != nil {
   495  			return 0, err
   496  		}
   497  		i -= size
   498  		i = encodeVarintTypes(dAtA, i, uint64(size))
   499  	}
   500  	i--
   501  	dAtA[i] = 0xa
   502  	return len(dAtA) - i, nil
   503  }
   504  
   505  func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
   506  	offset -= sovTypes(v)
   507  	base := offset
   508  	for v >= 1<<7 {
   509  		dAtA[offset] = uint8(v&0x7f | 0x80)
   510  		v >>= 7
   511  		offset++
   512  	}
   513  	dAtA[offset] = uint8(v)
   514  	return base
   515  }
   516  func (m *Block) Size() (n int) {
   517  	if m == nil {
   518  		return 0
   519  	}
   520  	var l int
   521  	_ = l
   522  	l = m.Header.Size()
   523  	n += 1 + l + sovTypes(uint64(l))
   524  	l = m.Data.Size()
   525  	n += 1 + l + sovTypes(uint64(l))
   526  	l = m.Evidence.Size()
   527  	n += 1 + l + sovTypes(uint64(l))
   528  	if m.LastCommit != nil {
   529  		l = m.LastCommit.Size()
   530  		n += 1 + l + sovTypes(uint64(l))
   531  	}
   532  	return n
   533  }
   534  
   535  func (m *Header) Size() (n int) {
   536  	if m == nil {
   537  		return 0
   538  	}
   539  	var l int
   540  	_ = l
   541  	l = m.Version.Size()
   542  	n += 1 + l + sovTypes(uint64(l))
   543  	l = len(m.ChainID)
   544  	if l > 0 {
   545  		n += 1 + l + sovTypes(uint64(l))
   546  	}
   547  	if m.Height != 0 {
   548  		n += 1 + sovTypes(uint64(m.Height))
   549  	}
   550  	l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time)
   551  	n += 1 + l + sovTypes(uint64(l))
   552  	l = m.LastBlockId.Size()
   553  	n += 1 + l + sovTypes(uint64(l))
   554  	l = len(m.LastCommitHash)
   555  	if l > 0 {
   556  		n += 1 + l + sovTypes(uint64(l))
   557  	}
   558  	l = len(m.DataHash)
   559  	if l > 0 {
   560  		n += 1 + l + sovTypes(uint64(l))
   561  	}
   562  	l = len(m.ValidatorsHash)
   563  	if l > 0 {
   564  		n += 1 + l + sovTypes(uint64(l))
   565  	}
   566  	l = len(m.NextValidatorsHash)
   567  	if l > 0 {
   568  		n += 1 + l + sovTypes(uint64(l))
   569  	}
   570  	l = len(m.ConsensusHash)
   571  	if l > 0 {
   572  		n += 1 + l + sovTypes(uint64(l))
   573  	}
   574  	l = len(m.AppHash)
   575  	if l > 0 {
   576  		n += 1 + l + sovTypes(uint64(l))
   577  	}
   578  	l = len(m.LastResultsHash)
   579  	if l > 0 {
   580  		n += 1 + l + sovTypes(uint64(l))
   581  	}
   582  	l = len(m.EvidenceHash)
   583  	if l > 0 {
   584  		n += 1 + l + sovTypes(uint64(l))
   585  	}
   586  	l = len(m.ProposerAddress)
   587  	if l > 0 {
   588  		n += 1 + l + sovTypes(uint64(l))
   589  	}
   590  	return n
   591  }
   592  
   593  func sovTypes(x uint64) (n int) {
   594  	return (math_bits.Len64(x|1) + 6) / 7
   595  }
   596  func sozTypes(x uint64) (n int) {
   597  	return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   598  }
   599  func (m *Block) Unmarshal(dAtA []byte) error {
   600  	l := len(dAtA)
   601  	iNdEx := 0
   602  	for iNdEx < l {
   603  		preIndex := iNdEx
   604  		var wire uint64
   605  		for shift := uint(0); ; shift += 7 {
   606  			if shift >= 64 {
   607  				return ErrIntOverflowTypes
   608  			}
   609  			if iNdEx >= l {
   610  				return io.ErrUnexpectedEOF
   611  			}
   612  			b := dAtA[iNdEx]
   613  			iNdEx++
   614  			wire |= uint64(b&0x7F) << shift
   615  			if b < 0x80 {
   616  				break
   617  			}
   618  		}
   619  		fieldNum := int32(wire >> 3)
   620  		wireType := int(wire & 0x7)
   621  		if wireType == 4 {
   622  			return fmt.Errorf("proto: Block: wiretype end group for non-group")
   623  		}
   624  		if fieldNum <= 0 {
   625  			return fmt.Errorf("proto: Block: illegal tag %d (wire type %d)", fieldNum, wire)
   626  		}
   627  		switch fieldNum {
   628  		case 1:
   629  			if wireType != 2 {
   630  				return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
   631  			}
   632  			var msglen int
   633  			for shift := uint(0); ; shift += 7 {
   634  				if shift >= 64 {
   635  					return ErrIntOverflowTypes
   636  				}
   637  				if iNdEx >= l {
   638  					return io.ErrUnexpectedEOF
   639  				}
   640  				b := dAtA[iNdEx]
   641  				iNdEx++
   642  				msglen |= int(b&0x7F) << shift
   643  				if b < 0x80 {
   644  					break
   645  				}
   646  			}
   647  			if msglen < 0 {
   648  				return ErrInvalidLengthTypes
   649  			}
   650  			postIndex := iNdEx + msglen
   651  			if postIndex < 0 {
   652  				return ErrInvalidLengthTypes
   653  			}
   654  			if postIndex > l {
   655  				return io.ErrUnexpectedEOF
   656  			}
   657  			if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   658  				return err
   659  			}
   660  			iNdEx = postIndex
   661  		case 2:
   662  			if wireType != 2 {
   663  				return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
   664  			}
   665  			var msglen int
   666  			for shift := uint(0); ; shift += 7 {
   667  				if shift >= 64 {
   668  					return ErrIntOverflowTypes
   669  				}
   670  				if iNdEx >= l {
   671  					return io.ErrUnexpectedEOF
   672  				}
   673  				b := dAtA[iNdEx]
   674  				iNdEx++
   675  				msglen |= int(b&0x7F) << shift
   676  				if b < 0x80 {
   677  					break
   678  				}
   679  			}
   680  			if msglen < 0 {
   681  				return ErrInvalidLengthTypes
   682  			}
   683  			postIndex := iNdEx + msglen
   684  			if postIndex < 0 {
   685  				return ErrInvalidLengthTypes
   686  			}
   687  			if postIndex > l {
   688  				return io.ErrUnexpectedEOF
   689  			}
   690  			if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   691  				return err
   692  			}
   693  			iNdEx = postIndex
   694  		case 3:
   695  			if wireType != 2 {
   696  				return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType)
   697  			}
   698  			var msglen int
   699  			for shift := uint(0); ; shift += 7 {
   700  				if shift >= 64 {
   701  					return ErrIntOverflowTypes
   702  				}
   703  				if iNdEx >= l {
   704  					return io.ErrUnexpectedEOF
   705  				}
   706  				b := dAtA[iNdEx]
   707  				iNdEx++
   708  				msglen |= int(b&0x7F) << shift
   709  				if b < 0x80 {
   710  					break
   711  				}
   712  			}
   713  			if msglen < 0 {
   714  				return ErrInvalidLengthTypes
   715  			}
   716  			postIndex := iNdEx + msglen
   717  			if postIndex < 0 {
   718  				return ErrInvalidLengthTypes
   719  			}
   720  			if postIndex > l {
   721  				return io.ErrUnexpectedEOF
   722  			}
   723  			if err := m.Evidence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   724  				return err
   725  			}
   726  			iNdEx = postIndex
   727  		case 4:
   728  			if wireType != 2 {
   729  				return fmt.Errorf("proto: wrong wireType = %d for field LastCommit", wireType)
   730  			}
   731  			var msglen int
   732  			for shift := uint(0); ; shift += 7 {
   733  				if shift >= 64 {
   734  					return ErrIntOverflowTypes
   735  				}
   736  				if iNdEx >= l {
   737  					return io.ErrUnexpectedEOF
   738  				}
   739  				b := dAtA[iNdEx]
   740  				iNdEx++
   741  				msglen |= int(b&0x7F) << shift
   742  				if b < 0x80 {
   743  					break
   744  				}
   745  			}
   746  			if msglen < 0 {
   747  				return ErrInvalidLengthTypes
   748  			}
   749  			postIndex := iNdEx + msglen
   750  			if postIndex < 0 {
   751  				return ErrInvalidLengthTypes
   752  			}
   753  			if postIndex > l {
   754  				return io.ErrUnexpectedEOF
   755  			}
   756  			if m.LastCommit == nil {
   757  				m.LastCommit = &types.Commit{}
   758  			}
   759  			if err := m.LastCommit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   760  				return err
   761  			}
   762  			iNdEx = postIndex
   763  		default:
   764  			iNdEx = preIndex
   765  			skippy, err := skipTypes(dAtA[iNdEx:])
   766  			if err != nil {
   767  				return err
   768  			}
   769  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   770  				return ErrInvalidLengthTypes
   771  			}
   772  			if (iNdEx + skippy) > l {
   773  				return io.ErrUnexpectedEOF
   774  			}
   775  			iNdEx += skippy
   776  		}
   777  	}
   778  
   779  	if iNdEx > l {
   780  		return io.ErrUnexpectedEOF
   781  	}
   782  	return nil
   783  }
   784  func (m *Header) Unmarshal(dAtA []byte) error {
   785  	l := len(dAtA)
   786  	iNdEx := 0
   787  	for iNdEx < l {
   788  		preIndex := iNdEx
   789  		var wire uint64
   790  		for shift := uint(0); ; shift += 7 {
   791  			if shift >= 64 {
   792  				return ErrIntOverflowTypes
   793  			}
   794  			if iNdEx >= l {
   795  				return io.ErrUnexpectedEOF
   796  			}
   797  			b := dAtA[iNdEx]
   798  			iNdEx++
   799  			wire |= uint64(b&0x7F) << shift
   800  			if b < 0x80 {
   801  				break
   802  			}
   803  		}
   804  		fieldNum := int32(wire >> 3)
   805  		wireType := int(wire & 0x7)
   806  		if wireType == 4 {
   807  			return fmt.Errorf("proto: Header: wiretype end group for non-group")
   808  		}
   809  		if fieldNum <= 0 {
   810  			return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire)
   811  		}
   812  		switch fieldNum {
   813  		case 1:
   814  			if wireType != 2 {
   815  				return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
   816  			}
   817  			var msglen int
   818  			for shift := uint(0); ; shift += 7 {
   819  				if shift >= 64 {
   820  					return ErrIntOverflowTypes
   821  				}
   822  				if iNdEx >= l {
   823  					return io.ErrUnexpectedEOF
   824  				}
   825  				b := dAtA[iNdEx]
   826  				iNdEx++
   827  				msglen |= int(b&0x7F) << shift
   828  				if b < 0x80 {
   829  					break
   830  				}
   831  			}
   832  			if msglen < 0 {
   833  				return ErrInvalidLengthTypes
   834  			}
   835  			postIndex := iNdEx + msglen
   836  			if postIndex < 0 {
   837  				return ErrInvalidLengthTypes
   838  			}
   839  			if postIndex > l {
   840  				return io.ErrUnexpectedEOF
   841  			}
   842  			if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   843  				return err
   844  			}
   845  			iNdEx = postIndex
   846  		case 2:
   847  			if wireType != 2 {
   848  				return fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType)
   849  			}
   850  			var stringLen uint64
   851  			for shift := uint(0); ; shift += 7 {
   852  				if shift >= 64 {
   853  					return ErrIntOverflowTypes
   854  				}
   855  				if iNdEx >= l {
   856  					return io.ErrUnexpectedEOF
   857  				}
   858  				b := dAtA[iNdEx]
   859  				iNdEx++
   860  				stringLen |= uint64(b&0x7F) << shift
   861  				if b < 0x80 {
   862  					break
   863  				}
   864  			}
   865  			intStringLen := int(stringLen)
   866  			if intStringLen < 0 {
   867  				return ErrInvalidLengthTypes
   868  			}
   869  			postIndex := iNdEx + intStringLen
   870  			if postIndex < 0 {
   871  				return ErrInvalidLengthTypes
   872  			}
   873  			if postIndex > l {
   874  				return io.ErrUnexpectedEOF
   875  			}
   876  			m.ChainID = string(dAtA[iNdEx:postIndex])
   877  			iNdEx = postIndex
   878  		case 3:
   879  			if wireType != 0 {
   880  				return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
   881  			}
   882  			m.Height = 0
   883  			for shift := uint(0); ; shift += 7 {
   884  				if shift >= 64 {
   885  					return ErrIntOverflowTypes
   886  				}
   887  				if iNdEx >= l {
   888  					return io.ErrUnexpectedEOF
   889  				}
   890  				b := dAtA[iNdEx]
   891  				iNdEx++
   892  				m.Height |= int64(b&0x7F) << shift
   893  				if b < 0x80 {
   894  					break
   895  				}
   896  			}
   897  		case 4:
   898  			if wireType != 2 {
   899  				return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
   900  			}
   901  			var msglen int
   902  			for shift := uint(0); ; shift += 7 {
   903  				if shift >= 64 {
   904  					return ErrIntOverflowTypes
   905  				}
   906  				if iNdEx >= l {
   907  					return io.ErrUnexpectedEOF
   908  				}
   909  				b := dAtA[iNdEx]
   910  				iNdEx++
   911  				msglen |= int(b&0x7F) << shift
   912  				if b < 0x80 {
   913  					break
   914  				}
   915  			}
   916  			if msglen < 0 {
   917  				return ErrInvalidLengthTypes
   918  			}
   919  			postIndex := iNdEx + msglen
   920  			if postIndex < 0 {
   921  				return ErrInvalidLengthTypes
   922  			}
   923  			if postIndex > l {
   924  				return io.ErrUnexpectedEOF
   925  			}
   926  			if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil {
   927  				return err
   928  			}
   929  			iNdEx = postIndex
   930  		case 5:
   931  			if wireType != 2 {
   932  				return fmt.Errorf("proto: wrong wireType = %d for field LastBlockId", wireType)
   933  			}
   934  			var msglen int
   935  			for shift := uint(0); ; shift += 7 {
   936  				if shift >= 64 {
   937  					return ErrIntOverflowTypes
   938  				}
   939  				if iNdEx >= l {
   940  					return io.ErrUnexpectedEOF
   941  				}
   942  				b := dAtA[iNdEx]
   943  				iNdEx++
   944  				msglen |= int(b&0x7F) << shift
   945  				if b < 0x80 {
   946  					break
   947  				}
   948  			}
   949  			if msglen < 0 {
   950  				return ErrInvalidLengthTypes
   951  			}
   952  			postIndex := iNdEx + msglen
   953  			if postIndex < 0 {
   954  				return ErrInvalidLengthTypes
   955  			}
   956  			if postIndex > l {
   957  				return io.ErrUnexpectedEOF
   958  			}
   959  			if err := m.LastBlockId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   960  				return err
   961  			}
   962  			iNdEx = postIndex
   963  		case 6:
   964  			if wireType != 2 {
   965  				return fmt.Errorf("proto: wrong wireType = %d for field LastCommitHash", wireType)
   966  			}
   967  			var byteLen int
   968  			for shift := uint(0); ; shift += 7 {
   969  				if shift >= 64 {
   970  					return ErrIntOverflowTypes
   971  				}
   972  				if iNdEx >= l {
   973  					return io.ErrUnexpectedEOF
   974  				}
   975  				b := dAtA[iNdEx]
   976  				iNdEx++
   977  				byteLen |= int(b&0x7F) << shift
   978  				if b < 0x80 {
   979  					break
   980  				}
   981  			}
   982  			if byteLen < 0 {
   983  				return ErrInvalidLengthTypes
   984  			}
   985  			postIndex := iNdEx + byteLen
   986  			if postIndex < 0 {
   987  				return ErrInvalidLengthTypes
   988  			}
   989  			if postIndex > l {
   990  				return io.ErrUnexpectedEOF
   991  			}
   992  			m.LastCommitHash = append(m.LastCommitHash[:0], dAtA[iNdEx:postIndex]...)
   993  			if m.LastCommitHash == nil {
   994  				m.LastCommitHash = []byte{}
   995  			}
   996  			iNdEx = postIndex
   997  		case 7:
   998  			if wireType != 2 {
   999  				return fmt.Errorf("proto: wrong wireType = %d for field DataHash", wireType)
  1000  			}
  1001  			var byteLen int
  1002  			for shift := uint(0); ; shift += 7 {
  1003  				if shift >= 64 {
  1004  					return ErrIntOverflowTypes
  1005  				}
  1006  				if iNdEx >= l {
  1007  					return io.ErrUnexpectedEOF
  1008  				}
  1009  				b := dAtA[iNdEx]
  1010  				iNdEx++
  1011  				byteLen |= int(b&0x7F) << shift
  1012  				if b < 0x80 {
  1013  					break
  1014  				}
  1015  			}
  1016  			if byteLen < 0 {
  1017  				return ErrInvalidLengthTypes
  1018  			}
  1019  			postIndex := iNdEx + byteLen
  1020  			if postIndex < 0 {
  1021  				return ErrInvalidLengthTypes
  1022  			}
  1023  			if postIndex > l {
  1024  				return io.ErrUnexpectedEOF
  1025  			}
  1026  			m.DataHash = append(m.DataHash[:0], dAtA[iNdEx:postIndex]...)
  1027  			if m.DataHash == nil {
  1028  				m.DataHash = []byte{}
  1029  			}
  1030  			iNdEx = postIndex
  1031  		case 8:
  1032  			if wireType != 2 {
  1033  				return fmt.Errorf("proto: wrong wireType = %d for field ValidatorsHash", wireType)
  1034  			}
  1035  			var byteLen int
  1036  			for shift := uint(0); ; shift += 7 {
  1037  				if shift >= 64 {
  1038  					return ErrIntOverflowTypes
  1039  				}
  1040  				if iNdEx >= l {
  1041  					return io.ErrUnexpectedEOF
  1042  				}
  1043  				b := dAtA[iNdEx]
  1044  				iNdEx++
  1045  				byteLen |= int(b&0x7F) << shift
  1046  				if b < 0x80 {
  1047  					break
  1048  				}
  1049  			}
  1050  			if byteLen < 0 {
  1051  				return ErrInvalidLengthTypes
  1052  			}
  1053  			postIndex := iNdEx + byteLen
  1054  			if postIndex < 0 {
  1055  				return ErrInvalidLengthTypes
  1056  			}
  1057  			if postIndex > l {
  1058  				return io.ErrUnexpectedEOF
  1059  			}
  1060  			m.ValidatorsHash = append(m.ValidatorsHash[:0], dAtA[iNdEx:postIndex]...)
  1061  			if m.ValidatorsHash == nil {
  1062  				m.ValidatorsHash = []byte{}
  1063  			}
  1064  			iNdEx = postIndex
  1065  		case 9:
  1066  			if wireType != 2 {
  1067  				return fmt.Errorf("proto: wrong wireType = %d for field NextValidatorsHash", wireType)
  1068  			}
  1069  			var byteLen int
  1070  			for shift := uint(0); ; shift += 7 {
  1071  				if shift >= 64 {
  1072  					return ErrIntOverflowTypes
  1073  				}
  1074  				if iNdEx >= l {
  1075  					return io.ErrUnexpectedEOF
  1076  				}
  1077  				b := dAtA[iNdEx]
  1078  				iNdEx++
  1079  				byteLen |= int(b&0x7F) << shift
  1080  				if b < 0x80 {
  1081  					break
  1082  				}
  1083  			}
  1084  			if byteLen < 0 {
  1085  				return ErrInvalidLengthTypes
  1086  			}
  1087  			postIndex := iNdEx + byteLen
  1088  			if postIndex < 0 {
  1089  				return ErrInvalidLengthTypes
  1090  			}
  1091  			if postIndex > l {
  1092  				return io.ErrUnexpectedEOF
  1093  			}
  1094  			m.NextValidatorsHash = append(m.NextValidatorsHash[:0], dAtA[iNdEx:postIndex]...)
  1095  			if m.NextValidatorsHash == nil {
  1096  				m.NextValidatorsHash = []byte{}
  1097  			}
  1098  			iNdEx = postIndex
  1099  		case 10:
  1100  			if wireType != 2 {
  1101  				return fmt.Errorf("proto: wrong wireType = %d for field ConsensusHash", wireType)
  1102  			}
  1103  			var byteLen int
  1104  			for shift := uint(0); ; shift += 7 {
  1105  				if shift >= 64 {
  1106  					return ErrIntOverflowTypes
  1107  				}
  1108  				if iNdEx >= l {
  1109  					return io.ErrUnexpectedEOF
  1110  				}
  1111  				b := dAtA[iNdEx]
  1112  				iNdEx++
  1113  				byteLen |= int(b&0x7F) << shift
  1114  				if b < 0x80 {
  1115  					break
  1116  				}
  1117  			}
  1118  			if byteLen < 0 {
  1119  				return ErrInvalidLengthTypes
  1120  			}
  1121  			postIndex := iNdEx + byteLen
  1122  			if postIndex < 0 {
  1123  				return ErrInvalidLengthTypes
  1124  			}
  1125  			if postIndex > l {
  1126  				return io.ErrUnexpectedEOF
  1127  			}
  1128  			m.ConsensusHash = append(m.ConsensusHash[:0], dAtA[iNdEx:postIndex]...)
  1129  			if m.ConsensusHash == nil {
  1130  				m.ConsensusHash = []byte{}
  1131  			}
  1132  			iNdEx = postIndex
  1133  		case 11:
  1134  			if wireType != 2 {
  1135  				return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType)
  1136  			}
  1137  			var byteLen int
  1138  			for shift := uint(0); ; shift += 7 {
  1139  				if shift >= 64 {
  1140  					return ErrIntOverflowTypes
  1141  				}
  1142  				if iNdEx >= l {
  1143  					return io.ErrUnexpectedEOF
  1144  				}
  1145  				b := dAtA[iNdEx]
  1146  				iNdEx++
  1147  				byteLen |= int(b&0x7F) << shift
  1148  				if b < 0x80 {
  1149  					break
  1150  				}
  1151  			}
  1152  			if byteLen < 0 {
  1153  				return ErrInvalidLengthTypes
  1154  			}
  1155  			postIndex := iNdEx + byteLen
  1156  			if postIndex < 0 {
  1157  				return ErrInvalidLengthTypes
  1158  			}
  1159  			if postIndex > l {
  1160  				return io.ErrUnexpectedEOF
  1161  			}
  1162  			m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...)
  1163  			if m.AppHash == nil {
  1164  				m.AppHash = []byte{}
  1165  			}
  1166  			iNdEx = postIndex
  1167  		case 12:
  1168  			if wireType != 2 {
  1169  				return fmt.Errorf("proto: wrong wireType = %d for field LastResultsHash", wireType)
  1170  			}
  1171  			var byteLen int
  1172  			for shift := uint(0); ; shift += 7 {
  1173  				if shift >= 64 {
  1174  					return ErrIntOverflowTypes
  1175  				}
  1176  				if iNdEx >= l {
  1177  					return io.ErrUnexpectedEOF
  1178  				}
  1179  				b := dAtA[iNdEx]
  1180  				iNdEx++
  1181  				byteLen |= int(b&0x7F) << shift
  1182  				if b < 0x80 {
  1183  					break
  1184  				}
  1185  			}
  1186  			if byteLen < 0 {
  1187  				return ErrInvalidLengthTypes
  1188  			}
  1189  			postIndex := iNdEx + byteLen
  1190  			if postIndex < 0 {
  1191  				return ErrInvalidLengthTypes
  1192  			}
  1193  			if postIndex > l {
  1194  				return io.ErrUnexpectedEOF
  1195  			}
  1196  			m.LastResultsHash = append(m.LastResultsHash[:0], dAtA[iNdEx:postIndex]...)
  1197  			if m.LastResultsHash == nil {
  1198  				m.LastResultsHash = []byte{}
  1199  			}
  1200  			iNdEx = postIndex
  1201  		case 13:
  1202  			if wireType != 2 {
  1203  				return fmt.Errorf("proto: wrong wireType = %d for field EvidenceHash", wireType)
  1204  			}
  1205  			var byteLen int
  1206  			for shift := uint(0); ; shift += 7 {
  1207  				if shift >= 64 {
  1208  					return ErrIntOverflowTypes
  1209  				}
  1210  				if iNdEx >= l {
  1211  					return io.ErrUnexpectedEOF
  1212  				}
  1213  				b := dAtA[iNdEx]
  1214  				iNdEx++
  1215  				byteLen |= int(b&0x7F) << shift
  1216  				if b < 0x80 {
  1217  					break
  1218  				}
  1219  			}
  1220  			if byteLen < 0 {
  1221  				return ErrInvalidLengthTypes
  1222  			}
  1223  			postIndex := iNdEx + byteLen
  1224  			if postIndex < 0 {
  1225  				return ErrInvalidLengthTypes
  1226  			}
  1227  			if postIndex > l {
  1228  				return io.ErrUnexpectedEOF
  1229  			}
  1230  			m.EvidenceHash = append(m.EvidenceHash[:0], dAtA[iNdEx:postIndex]...)
  1231  			if m.EvidenceHash == nil {
  1232  				m.EvidenceHash = []byte{}
  1233  			}
  1234  			iNdEx = postIndex
  1235  		case 14:
  1236  			if wireType != 2 {
  1237  				return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType)
  1238  			}
  1239  			var stringLen uint64
  1240  			for shift := uint(0); ; shift += 7 {
  1241  				if shift >= 64 {
  1242  					return ErrIntOverflowTypes
  1243  				}
  1244  				if iNdEx >= l {
  1245  					return io.ErrUnexpectedEOF
  1246  				}
  1247  				b := dAtA[iNdEx]
  1248  				iNdEx++
  1249  				stringLen |= uint64(b&0x7F) << shift
  1250  				if b < 0x80 {
  1251  					break
  1252  				}
  1253  			}
  1254  			intStringLen := int(stringLen)
  1255  			if intStringLen < 0 {
  1256  				return ErrInvalidLengthTypes
  1257  			}
  1258  			postIndex := iNdEx + intStringLen
  1259  			if postIndex < 0 {
  1260  				return ErrInvalidLengthTypes
  1261  			}
  1262  			if postIndex > l {
  1263  				return io.ErrUnexpectedEOF
  1264  			}
  1265  			m.ProposerAddress = string(dAtA[iNdEx:postIndex])
  1266  			iNdEx = postIndex
  1267  		default:
  1268  			iNdEx = preIndex
  1269  			skippy, err := skipTypes(dAtA[iNdEx:])
  1270  			if err != nil {
  1271  				return err
  1272  			}
  1273  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1274  				return ErrInvalidLengthTypes
  1275  			}
  1276  			if (iNdEx + skippy) > l {
  1277  				return io.ErrUnexpectedEOF
  1278  			}
  1279  			iNdEx += skippy
  1280  		}
  1281  	}
  1282  
  1283  	if iNdEx > l {
  1284  		return io.ErrUnexpectedEOF
  1285  	}
  1286  	return nil
  1287  }
  1288  func skipTypes(dAtA []byte) (n int, err error) {
  1289  	l := len(dAtA)
  1290  	iNdEx := 0
  1291  	depth := 0
  1292  	for iNdEx < l {
  1293  		var wire uint64
  1294  		for shift := uint(0); ; shift += 7 {
  1295  			if shift >= 64 {
  1296  				return 0, ErrIntOverflowTypes
  1297  			}
  1298  			if iNdEx >= l {
  1299  				return 0, io.ErrUnexpectedEOF
  1300  			}
  1301  			b := dAtA[iNdEx]
  1302  			iNdEx++
  1303  			wire |= (uint64(b) & 0x7F) << shift
  1304  			if b < 0x80 {
  1305  				break
  1306  			}
  1307  		}
  1308  		wireType := int(wire & 0x7)
  1309  		switch wireType {
  1310  		case 0:
  1311  			for shift := uint(0); ; shift += 7 {
  1312  				if shift >= 64 {
  1313  					return 0, ErrIntOverflowTypes
  1314  				}
  1315  				if iNdEx >= l {
  1316  					return 0, io.ErrUnexpectedEOF
  1317  				}
  1318  				iNdEx++
  1319  				if dAtA[iNdEx-1] < 0x80 {
  1320  					break
  1321  				}
  1322  			}
  1323  		case 1:
  1324  			iNdEx += 8
  1325  		case 2:
  1326  			var length int
  1327  			for shift := uint(0); ; shift += 7 {
  1328  				if shift >= 64 {
  1329  					return 0, ErrIntOverflowTypes
  1330  				}
  1331  				if iNdEx >= l {
  1332  					return 0, io.ErrUnexpectedEOF
  1333  				}
  1334  				b := dAtA[iNdEx]
  1335  				iNdEx++
  1336  				length |= (int(b) & 0x7F) << shift
  1337  				if b < 0x80 {
  1338  					break
  1339  				}
  1340  			}
  1341  			if length < 0 {
  1342  				return 0, ErrInvalidLengthTypes
  1343  			}
  1344  			iNdEx += length
  1345  		case 3:
  1346  			depth++
  1347  		case 4:
  1348  			if depth == 0 {
  1349  				return 0, ErrUnexpectedEndOfGroupTypes
  1350  			}
  1351  			depth--
  1352  		case 5:
  1353  			iNdEx += 4
  1354  		default:
  1355  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1356  		}
  1357  		if iNdEx < 0 {
  1358  			return 0, ErrInvalidLengthTypes
  1359  		}
  1360  		if depth == 0 {
  1361  			return iNdEx, nil
  1362  		}
  1363  	}
  1364  	return 0, io.ErrUnexpectedEOF
  1365  }
  1366  
  1367  var (
  1368  	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
  1369  	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
  1370  	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
  1371  )