github.com/line/ostracon@v1.0.10-0.20230328032236-7f20145f065d/proto/ostracon/state/types.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: ostracon/state/types.proto
     3  
     4  package state
     5  
     6  import (
     7  	fmt "fmt"
     8  	_ "github.com/gogo/protobuf/gogoproto"
     9  	proto "github.com/gogo/protobuf/proto"
    10  	_ "github.com/gogo/protobuf/types"
    11  	github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
    12  	_ "github.com/line/ostracon/abci/types"
    13  	_ "github.com/line/ostracon/proto/ostracon/types"
    14  	types "github.com/tendermint/tendermint/abci/types"
    15  	state "github.com/tendermint/tendermint/proto/tendermint/state"
    16  	types1 "github.com/tendermint/tendermint/proto/tendermint/types"
    17  	_ "github.com/tendermint/tendermint/proto/tendermint/version"
    18  	io "io"
    19  	math "math"
    20  	math_bits "math/bits"
    21  	time "time"
    22  )
    23  
    24  // Reference imports to suppress errors if they are not otherwise used.
    25  var _ = proto.Marshal
    26  var _ = fmt.Errorf
    27  var _ = math.Inf
    28  var _ = time.Kitchen
    29  
    30  // This is a compile-time assertion to ensure that this generated file
    31  // is compatible with the proto package it is being compiled against.
    32  // A compilation error at this line likely means your copy of the
    33  // proto package needs to be updated.
    34  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    35  
    36  // ABCIResponses retains the responses
    37  // of the various ABCI calls during block processing.
    38  // It is persisted to disk for each height before calling Commit.
    39  type ABCIResponses struct {
    40  	DeliverTxs []*types.ResponseDeliverTx `protobuf:"bytes,1,rep,name=deliver_txs,json=deliverTxs,proto3" json:"deliver_txs,omitempty"`
    41  	EndBlock   *types.ResponseEndBlock    `protobuf:"bytes,2,opt,name=end_block,json=endBlock,proto3" json:"end_block,omitempty"`
    42  	BeginBlock *types.ResponseBeginBlock  `protobuf:"bytes,3,opt,name=begin_block,json=beginBlock,proto3" json:"begin_block,omitempty"`
    43  }
    44  
    45  func (m *ABCIResponses) Reset()         { *m = ABCIResponses{} }
    46  func (m *ABCIResponses) String() string { return proto.CompactTextString(m) }
    47  func (*ABCIResponses) ProtoMessage()    {}
    48  func (*ABCIResponses) Descriptor() ([]byte, []int) {
    49  	return fileDescriptor_898987a4421067cd, []int{0}
    50  }
    51  func (m *ABCIResponses) XXX_Unmarshal(b []byte) error {
    52  	return m.Unmarshal(b)
    53  }
    54  func (m *ABCIResponses) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    55  	if deterministic {
    56  		return xxx_messageInfo_ABCIResponses.Marshal(b, m, deterministic)
    57  	} else {
    58  		b = b[:cap(b)]
    59  		n, err := m.MarshalToSizedBuffer(b)
    60  		if err != nil {
    61  			return nil, err
    62  		}
    63  		return b[:n], nil
    64  	}
    65  }
    66  func (m *ABCIResponses) XXX_Merge(src proto.Message) {
    67  	xxx_messageInfo_ABCIResponses.Merge(m, src)
    68  }
    69  func (m *ABCIResponses) XXX_Size() int {
    70  	return m.Size()
    71  }
    72  func (m *ABCIResponses) XXX_DiscardUnknown() {
    73  	xxx_messageInfo_ABCIResponses.DiscardUnknown(m)
    74  }
    75  
    76  var xxx_messageInfo_ABCIResponses proto.InternalMessageInfo
    77  
    78  func (m *ABCIResponses) GetDeliverTxs() []*types.ResponseDeliverTx {
    79  	if m != nil {
    80  		return m.DeliverTxs
    81  	}
    82  	return nil
    83  }
    84  
    85  func (m *ABCIResponses) GetEndBlock() *types.ResponseEndBlock {
    86  	if m != nil {
    87  		return m.EndBlock
    88  	}
    89  	return nil
    90  }
    91  
    92  func (m *ABCIResponses) GetBeginBlock() *types.ResponseBeginBlock {
    93  	if m != nil {
    94  		return m.BeginBlock
    95  	}
    96  	return nil
    97  }
    98  
    99  type State struct {
   100  	Version state.Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version"`
   101  	// immutable
   102  	ChainID       string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
   103  	InitialHeight int64  `protobuf:"varint,14,opt,name=initial_height,json=initialHeight,proto3" json:"initial_height,omitempty"`
   104  	// LastBlockHeight=0 at genesis (ie. block(H=0) does not exist)
   105  	LastBlockHeight int64          `protobuf:"varint,3,opt,name=last_block_height,json=lastBlockHeight,proto3" json:"last_block_height,omitempty"`
   106  	LastBlockID     types1.BlockID `protobuf:"bytes,4,opt,name=last_block_id,json=lastBlockId,proto3" json:"last_block_id"`
   107  	LastBlockTime   time.Time      `protobuf:"bytes,5,opt,name=last_block_time,json=lastBlockTime,proto3,stdtime" json:"last_block_time"`
   108  	// LastValidators is used to validate block.LastCommit.
   109  	// Validators are persisted to the database separately every time they change,
   110  	// so we can query for historical validator sets.
   111  	// Note that if s.LastBlockHeight causes a valset change,
   112  	// we set s.LastHeightValidatorsChanged = s.LastBlockHeight + 1 + 1
   113  	// Extra +1 due to nextValSet delay.
   114  	NextValidators              *types1.ValidatorSet `protobuf:"bytes,6,opt,name=next_validators,json=nextValidators,proto3" json:"next_validators,omitempty"`
   115  	Validators                  *types1.ValidatorSet `protobuf:"bytes,7,opt,name=validators,proto3" json:"validators,omitempty"`
   116  	LastValidators              *types1.ValidatorSet `protobuf:"bytes,8,opt,name=last_validators,json=lastValidators,proto3" json:"last_validators,omitempty"`
   117  	LastHeightValidatorsChanged int64                `protobuf:"varint,9,opt,name=last_height_validators_changed,json=lastHeightValidatorsChanged,proto3" json:"last_height_validators_changed,omitempty"`
   118  	// Consensus parameters used for validating blocks.
   119  	// Changes returned by EndBlock and updated after Commit.
   120  	ConsensusParams                  types1.ConsensusParams `protobuf:"bytes,10,opt,name=consensus_params,json=consensusParams,proto3" json:"consensus_params"`
   121  	LastHeightConsensusParamsChanged int64                  `protobuf:"varint,11,opt,name=last_height_consensus_params_changed,json=lastHeightConsensusParamsChanged,proto3" json:"last_height_consensus_params_changed,omitempty"`
   122  	// Merkle root of the results from executing prev block
   123  	LastResultsHash []byte `protobuf:"bytes,12,opt,name=last_results_hash,json=lastResultsHash,proto3" json:"last_results_hash,omitempty"`
   124  	// the latest AppHash we've received from calling abci.Commit()
   125  	AppHash []byte `protobuf:"bytes,13,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"`
   126  	// the VRF Proof value generated by the last Proposer
   127  	LastProofHash []byte `protobuf:"bytes,1000,opt,name=last_proof_hash,json=lastProofHash,proto3" json:"last_proof_hash,omitempty"`
   128  }
   129  
   130  func (m *State) Reset()         { *m = State{} }
   131  func (m *State) String() string { return proto.CompactTextString(m) }
   132  func (*State) ProtoMessage()    {}
   133  func (*State) Descriptor() ([]byte, []int) {
   134  	return fileDescriptor_898987a4421067cd, []int{1}
   135  }
   136  func (m *State) XXX_Unmarshal(b []byte) error {
   137  	return m.Unmarshal(b)
   138  }
   139  func (m *State) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   140  	if deterministic {
   141  		return xxx_messageInfo_State.Marshal(b, m, deterministic)
   142  	} else {
   143  		b = b[:cap(b)]
   144  		n, err := m.MarshalToSizedBuffer(b)
   145  		if err != nil {
   146  			return nil, err
   147  		}
   148  		return b[:n], nil
   149  	}
   150  }
   151  func (m *State) XXX_Merge(src proto.Message) {
   152  	xxx_messageInfo_State.Merge(m, src)
   153  }
   154  func (m *State) XXX_Size() int {
   155  	return m.Size()
   156  }
   157  func (m *State) XXX_DiscardUnknown() {
   158  	xxx_messageInfo_State.DiscardUnknown(m)
   159  }
   160  
   161  var xxx_messageInfo_State proto.InternalMessageInfo
   162  
   163  func (m *State) GetVersion() state.Version {
   164  	if m != nil {
   165  		return m.Version
   166  	}
   167  	return state.Version{}
   168  }
   169  
   170  func (m *State) GetChainID() string {
   171  	if m != nil {
   172  		return m.ChainID
   173  	}
   174  	return ""
   175  }
   176  
   177  func (m *State) GetInitialHeight() int64 {
   178  	if m != nil {
   179  		return m.InitialHeight
   180  	}
   181  	return 0
   182  }
   183  
   184  func (m *State) GetLastBlockHeight() int64 {
   185  	if m != nil {
   186  		return m.LastBlockHeight
   187  	}
   188  	return 0
   189  }
   190  
   191  func (m *State) GetLastBlockID() types1.BlockID {
   192  	if m != nil {
   193  		return m.LastBlockID
   194  	}
   195  	return types1.BlockID{}
   196  }
   197  
   198  func (m *State) GetLastBlockTime() time.Time {
   199  	if m != nil {
   200  		return m.LastBlockTime
   201  	}
   202  	return time.Time{}
   203  }
   204  
   205  func (m *State) GetNextValidators() *types1.ValidatorSet {
   206  	if m != nil {
   207  		return m.NextValidators
   208  	}
   209  	return nil
   210  }
   211  
   212  func (m *State) GetValidators() *types1.ValidatorSet {
   213  	if m != nil {
   214  		return m.Validators
   215  	}
   216  	return nil
   217  }
   218  
   219  func (m *State) GetLastValidators() *types1.ValidatorSet {
   220  	if m != nil {
   221  		return m.LastValidators
   222  	}
   223  	return nil
   224  }
   225  
   226  func (m *State) GetLastHeightValidatorsChanged() int64 {
   227  	if m != nil {
   228  		return m.LastHeightValidatorsChanged
   229  	}
   230  	return 0
   231  }
   232  
   233  func (m *State) GetConsensusParams() types1.ConsensusParams {
   234  	if m != nil {
   235  		return m.ConsensusParams
   236  	}
   237  	return types1.ConsensusParams{}
   238  }
   239  
   240  func (m *State) GetLastHeightConsensusParamsChanged() int64 {
   241  	if m != nil {
   242  		return m.LastHeightConsensusParamsChanged
   243  	}
   244  	return 0
   245  }
   246  
   247  func (m *State) GetLastResultsHash() []byte {
   248  	if m != nil {
   249  		return m.LastResultsHash
   250  	}
   251  	return nil
   252  }
   253  
   254  func (m *State) GetAppHash() []byte {
   255  	if m != nil {
   256  		return m.AppHash
   257  	}
   258  	return nil
   259  }
   260  
   261  func (m *State) GetLastProofHash() []byte {
   262  	if m != nil {
   263  		return m.LastProofHash
   264  	}
   265  	return nil
   266  }
   267  
   268  func init() {
   269  	proto.RegisterType((*ABCIResponses)(nil), "ostracon.state.ABCIResponses")
   270  	proto.RegisterType((*State)(nil), "ostracon.state.State")
   271  }
   272  
   273  func init() { proto.RegisterFile("ostracon/state/types.proto", fileDescriptor_898987a4421067cd) }
   274  
   275  var fileDescriptor_898987a4421067cd = []byte{
   276  	// 703 bytes of a gzipped FileDescriptorProto
   277  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x4f, 0x6f, 0xd3, 0x30,
   278  	0x18, 0xc6, 0x1b, 0xba, 0xad, 0x9d, 0xb3, 0xb6, 0x10, 0x38, 0x64, 0x1d, 0xa4, 0x65, 0xfc, 0xab,
   279  	0x90, 0x48, 0xa5, 0x71, 0xe2, 0x82, 0x44, 0x5a, 0xb4, 0x55, 0x9a, 0xd0, 0x94, 0x4d, 0x3b, 0x70,
   280  	0x89, 0x9c, 0xc4, 0x4b, 0x2c, 0xd2, 0x38, 0x8a, 0xdd, 0x69, 0x7c, 0x05, 0x4e, 0xfb, 0x58, 0x3b,
   281  	0xee, 0x88, 0x38, 0x0c, 0xd4, 0x5d, 0xf8, 0x18, 0xc8, 0x76, 0x9c, 0x66, 0x2b, 0x93, 0x76, 0x73,
   282  	0xde, 0xe7, 0x79, 0x7f, 0x7a, 0x6c, 0xbf, 0x31, 0xe8, 0x12, 0xca, 0x72, 0x18, 0x90, 0x74, 0x48,
   283  	0x19, 0x64, 0x68, 0xc8, 0xbe, 0x67, 0x88, 0xda, 0x59, 0x4e, 0x18, 0x31, 0xda, 0x4a, 0xb3, 0x85,
   284  	0xd6, 0x7d, 0x12, 0x91, 0x88, 0x08, 0x69, 0xc8, 0x57, 0xd2, 0xd5, 0xdd, 0x2c, 0x09, 0xd0, 0x0f,
   285  	0x70, 0x15, 0xd0, 0x5d, 0xc0, 0x45, 0xf5, 0x86, 0xd6, 0x67, 0x28, 0x0d, 0x51, 0x3e, 0xc5, 0x29,
   286  	0x2b, 0xd4, 0x53, 0x98, 0xe0, 0x10, 0x32, 0x92, 0x17, 0x8e, 0x67, 0x4b, 0x8e, 0x0c, 0xe6, 0x70,
   287  	0xaa, 0x00, 0x4f, 0x97, 0xe4, 0x2a, 0xde, 0xaa, 0xa8, 0xa7, 0x28, 0xa7, 0x58, 0x85, 0x28, 0xf4,
   288  	0x5e, 0x44, 0x48, 0x94, 0xa0, 0xa1, 0xf8, 0xf2, 0x67, 0x27, 0x43, 0x86, 0xa7, 0x88, 0x32, 0x38,
   289  	0xcd, 0xfe, 0x83, 0x5f, 0x3a, 0x9a, 0xee, 0x56, 0x45, 0xbd, 0xbd, 0xed, 0xed, 0x5f, 0x1a, 0x68,
   290  	0x7d, 0x72, 0x46, 0x13, 0x17, 0xd1, 0x8c, 0xa4, 0x14, 0x51, 0x63, 0x04, 0xf4, 0x10, 0x25, 0xf8,
   291  	0x14, 0xe5, 0x1e, 0x3b, 0xa3, 0xa6, 0xd6, 0xaf, 0x0f, 0xf4, 0x9d, 0x6d, 0x7b, 0x01, 0xb1, 0x39,
   292  	0xc4, 0x56, 0x0d, 0x63, 0xe9, 0x3d, 0x3a, 0x73, 0x41, 0xa8, 0x96, 0xd4, 0xf8, 0x08, 0xd6, 0x51,
   293  	0x1a, 0x7a, 0x7e, 0x42, 0x82, 0x6f, 0xe6, 0x83, 0xbe, 0x36, 0xd0, 0x77, 0x9e, 0xdf, 0x89, 0xf8,
   294  	0x9c, 0x86, 0x0e, 0x37, 0xba, 0x4d, 0x54, 0xac, 0x8c, 0x31, 0xd0, 0x7d, 0x14, 0xe1, 0xb4, 0x20,
   295  	0xd4, 0x05, 0xe1, 0xc5, 0x9d, 0x04, 0x87, 0x7b, 0x25, 0x03, 0xf8, 0xe5, 0x7a, 0xfb, 0x47, 0x03,
   296  	0xac, 0x1e, 0xf2, 0xf3, 0x30, 0x3e, 0x80, 0x46, 0x71, 0xb2, 0xa6, 0x26, 0x58, 0x9b, 0x55, 0x96,
   297  	0x38, 0x33, 0xfb, 0x58, 0x1a, 0x9c, 0x95, 0x8b, 0xab, 0x5e, 0xcd, 0x55, 0x7e, 0xe3, 0x35, 0x68,
   298  	0x06, 0x31, 0xc4, 0xa9, 0x87, 0x43, 0xb1, 0x93, 0x75, 0x47, 0x9f, 0x5f, 0xf5, 0x1a, 0x23, 0x5e,
   299  	0x9b, 0x8c, 0xdd, 0x86, 0x10, 0x27, 0xa1, 0xf1, 0x0a, 0xb4, 0x71, 0x8a, 0x19, 0x86, 0x89, 0x17,
   300  	0x23, 0x1c, 0xc5, 0xcc, 0x6c, 0xf7, 0xb5, 0x41, 0xdd, 0x6d, 0x15, 0xd5, 0x3d, 0x51, 0x34, 0xde,
   301  	0x82, 0x47, 0x09, 0xa4, 0x4c, 0x6e, 0x4c, 0x39, 0xeb, 0xc2, 0xd9, 0xe1, 0x82, 0x48, 0x5e, 0x78,
   302  	0x5d, 0xd0, 0xaa, 0x78, 0x71, 0x68, 0xae, 0x2c, 0x67, 0x97, 0x97, 0x29, 0xba, 0x26, 0x63, 0xe7,
   303  	0x31, 0xcf, 0x3e, 0xbf, 0xea, 0xe9, 0xfb, 0x0a, 0x35, 0x19, 0xbb, 0x7a, 0xc9, 0x9d, 0x84, 0xc6,
   304  	0x3e, 0xe8, 0x54, 0x98, 0x7c, 0x92, 0xcc, 0x55, 0x41, 0xed, 0xda, 0x72, 0xcc, 0x6c, 0x35, 0x66,
   305  	0xf6, 0x91, 0x1a, 0x33, 0xa7, 0xc9, 0xb1, 0xe7, 0xbf, 0x7b, 0x9a, 0xdb, 0x2a, 0x59, 0x5c, 0x35,
   306  	0x76, 0x41, 0x27, 0x45, 0x67, 0xcc, 0x2b, 0xff, 0x07, 0x6a, 0xae, 0x09, 0x9a, 0xb5, 0x9c, 0xf1,
   307  	0x58, 0x79, 0x0e, 0x11, 0x73, 0xdb, 0xbc, 0xad, 0xac, 0xf0, 0x81, 0x01, 0x15, 0x46, 0xe3, 0x5e,
   308  	0x8c, 0x4a, 0x07, 0x0f, 0x22, 0xb6, 0x55, 0x81, 0x34, 0xef, 0x17, 0x84, 0xb7, 0x55, 0x82, 0x8c,
   309  	0x80, 0x25, 0x40, 0xf2, 0x66, 0x2a, 0x3c, 0x2f, 0x88, 0x61, 0x1a, 0xa1, 0xd0, 0x5c, 0x17, 0x97,
   310  	0xb5, 0xc5, 0x5d, 0xf2, 0x9e, 0x16, 0xdd, 0x23, 0x69, 0x31, 0x5c, 0xf0, 0x30, 0xe0, 0x73, 0x99,
   311  	0xd2, 0x19, 0xf5, 0xe4, 0x4b, 0x60, 0x82, 0xe5, 0xbf, 0x40, 0xc6, 0x19, 0x29, 0xe7, 0x81, 0x30,
   312  	0x16, 0xf3, 0xd7, 0x09, 0x6e, 0x96, 0x8d, 0x2f, 0xe0, 0x65, 0x35, 0xd8, 0x6d, 0x7e, 0x19, 0x4f,
   313  	0x17, 0xf1, 0xfa, 0x8b, 0x78, 0xb7, 0xf8, 0x2a, 0xa3, 0x1a, 0xc4, 0x1c, 0xd1, 0x59, 0xc2, 0xa8,
   314  	0x17, 0x43, 0x1a, 0x9b, 0x1b, 0x7d, 0x6d, 0xb0, 0x21, 0x07, 0xd1, 0x95, 0xf5, 0x3d, 0x48, 0x63,
   315  	0x63, 0x13, 0x34, 0x61, 0x96, 0x49, 0x4b, 0x4b, 0x58, 0x1a, 0x30, 0xcb, 0x84, 0xf4, 0xa6, 0x38,
   316  	0xf8, 0x2c, 0x27, 0xe4, 0x44, 0x3a, 0xfe, 0x36, 0x84, 0x45, 0x8c, 0xca, 0x01, 0x2f, 0x73, 0xa3,
   317  	0xb3, 0x7b, 0x31, 0xb7, 0xb4, 0xcb, 0xb9, 0xa5, 0xfd, 0x99, 0x5b, 0xda, 0xf9, 0xb5, 0x55, 0xbb,
   318  	0xbc, 0xb6, 0x6a, 0x3f, 0xaf, 0xad, 0xda, 0xd7, 0x77, 0x11, 0x66, 0xf1, 0xcc, 0xb7, 0x03, 0x32,
   319  	0x1d, 0x26, 0x38, 0x45, 0xc3, 0xf2, 0x29, 0x96, 0x0f, 0xf8, 0xcd, 0x67, 0xdf, 0x5f, 0x13, 0xd5,
   320  	0xf7, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xe7, 0x82, 0xd1, 0xeb, 0x0f, 0x06, 0x00, 0x00,
   321  }
   322  
   323  func (m *ABCIResponses) Marshal() (dAtA []byte, err error) {
   324  	size := m.Size()
   325  	dAtA = make([]byte, size)
   326  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   327  	if err != nil {
   328  		return nil, err
   329  	}
   330  	return dAtA[:n], nil
   331  }
   332  
   333  func (m *ABCIResponses) MarshalTo(dAtA []byte) (int, error) {
   334  	size := m.Size()
   335  	return m.MarshalToSizedBuffer(dAtA[:size])
   336  }
   337  
   338  func (m *ABCIResponses) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   339  	i := len(dAtA)
   340  	_ = i
   341  	var l int
   342  	_ = l
   343  	if m.BeginBlock != nil {
   344  		{
   345  			size, err := m.BeginBlock.MarshalToSizedBuffer(dAtA[:i])
   346  			if err != nil {
   347  				return 0, err
   348  			}
   349  			i -= size
   350  			i = encodeVarintTypes(dAtA, i, uint64(size))
   351  		}
   352  		i--
   353  		dAtA[i] = 0x1a
   354  	}
   355  	if m.EndBlock != nil {
   356  		{
   357  			size, err := m.EndBlock.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  	if len(m.DeliverTxs) > 0 {
   368  		for iNdEx := len(m.DeliverTxs) - 1; iNdEx >= 0; iNdEx-- {
   369  			{
   370  				size, err := m.DeliverTxs[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   371  				if err != nil {
   372  					return 0, err
   373  				}
   374  				i -= size
   375  				i = encodeVarintTypes(dAtA, i, uint64(size))
   376  			}
   377  			i--
   378  			dAtA[i] = 0xa
   379  		}
   380  	}
   381  	return len(dAtA) - i, nil
   382  }
   383  
   384  func (m *State) Marshal() (dAtA []byte, err error) {
   385  	size := m.Size()
   386  	dAtA = make([]byte, size)
   387  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   388  	if err != nil {
   389  		return nil, err
   390  	}
   391  	return dAtA[:n], nil
   392  }
   393  
   394  func (m *State) MarshalTo(dAtA []byte) (int, error) {
   395  	size := m.Size()
   396  	return m.MarshalToSizedBuffer(dAtA[:size])
   397  }
   398  
   399  func (m *State) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   400  	i := len(dAtA)
   401  	_ = i
   402  	var l int
   403  	_ = l
   404  	if len(m.LastProofHash) > 0 {
   405  		i -= len(m.LastProofHash)
   406  		copy(dAtA[i:], m.LastProofHash)
   407  		i = encodeVarintTypes(dAtA, i, uint64(len(m.LastProofHash)))
   408  		i--
   409  		dAtA[i] = 0x3e
   410  		i--
   411  		dAtA[i] = 0xc2
   412  	}
   413  	if m.InitialHeight != 0 {
   414  		i = encodeVarintTypes(dAtA, i, uint64(m.InitialHeight))
   415  		i--
   416  		dAtA[i] = 0x70
   417  	}
   418  	if len(m.AppHash) > 0 {
   419  		i -= len(m.AppHash)
   420  		copy(dAtA[i:], m.AppHash)
   421  		i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash)))
   422  		i--
   423  		dAtA[i] = 0x6a
   424  	}
   425  	if len(m.LastResultsHash) > 0 {
   426  		i -= len(m.LastResultsHash)
   427  		copy(dAtA[i:], m.LastResultsHash)
   428  		i = encodeVarintTypes(dAtA, i, uint64(len(m.LastResultsHash)))
   429  		i--
   430  		dAtA[i] = 0x62
   431  	}
   432  	if m.LastHeightConsensusParamsChanged != 0 {
   433  		i = encodeVarintTypes(dAtA, i, uint64(m.LastHeightConsensusParamsChanged))
   434  		i--
   435  		dAtA[i] = 0x58
   436  	}
   437  	{
   438  		size, err := m.ConsensusParams.MarshalToSizedBuffer(dAtA[:i])
   439  		if err != nil {
   440  			return 0, err
   441  		}
   442  		i -= size
   443  		i = encodeVarintTypes(dAtA, i, uint64(size))
   444  	}
   445  	i--
   446  	dAtA[i] = 0x52
   447  	if m.LastHeightValidatorsChanged != 0 {
   448  		i = encodeVarintTypes(dAtA, i, uint64(m.LastHeightValidatorsChanged))
   449  		i--
   450  		dAtA[i] = 0x48
   451  	}
   452  	if m.LastValidators != nil {
   453  		{
   454  			size, err := m.LastValidators.MarshalToSizedBuffer(dAtA[:i])
   455  			if err != nil {
   456  				return 0, err
   457  			}
   458  			i -= size
   459  			i = encodeVarintTypes(dAtA, i, uint64(size))
   460  		}
   461  		i--
   462  		dAtA[i] = 0x42
   463  	}
   464  	if m.Validators != nil {
   465  		{
   466  			size, err := m.Validators.MarshalToSizedBuffer(dAtA[:i])
   467  			if err != nil {
   468  				return 0, err
   469  			}
   470  			i -= size
   471  			i = encodeVarintTypes(dAtA, i, uint64(size))
   472  		}
   473  		i--
   474  		dAtA[i] = 0x3a
   475  	}
   476  	if m.NextValidators != nil {
   477  		{
   478  			size, err := m.NextValidators.MarshalToSizedBuffer(dAtA[:i])
   479  			if err != nil {
   480  				return 0, err
   481  			}
   482  			i -= size
   483  			i = encodeVarintTypes(dAtA, i, uint64(size))
   484  		}
   485  		i--
   486  		dAtA[i] = 0x32
   487  	}
   488  	n7, err7 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LastBlockTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LastBlockTime):])
   489  	if err7 != nil {
   490  		return 0, err7
   491  	}
   492  	i -= n7
   493  	i = encodeVarintTypes(dAtA, i, uint64(n7))
   494  	i--
   495  	dAtA[i] = 0x2a
   496  	{
   497  		size, err := m.LastBlockID.MarshalToSizedBuffer(dAtA[:i])
   498  		if err != nil {
   499  			return 0, err
   500  		}
   501  		i -= size
   502  		i = encodeVarintTypes(dAtA, i, uint64(size))
   503  	}
   504  	i--
   505  	dAtA[i] = 0x22
   506  	if m.LastBlockHeight != 0 {
   507  		i = encodeVarintTypes(dAtA, i, uint64(m.LastBlockHeight))
   508  		i--
   509  		dAtA[i] = 0x18
   510  	}
   511  	if len(m.ChainID) > 0 {
   512  		i -= len(m.ChainID)
   513  		copy(dAtA[i:], m.ChainID)
   514  		i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainID)))
   515  		i--
   516  		dAtA[i] = 0x12
   517  	}
   518  	{
   519  		size, err := m.Version.MarshalToSizedBuffer(dAtA[:i])
   520  		if err != nil {
   521  			return 0, err
   522  		}
   523  		i -= size
   524  		i = encodeVarintTypes(dAtA, i, uint64(size))
   525  	}
   526  	i--
   527  	dAtA[i] = 0xa
   528  	return len(dAtA) - i, nil
   529  }
   530  
   531  func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
   532  	offset -= sovTypes(v)
   533  	base := offset
   534  	for v >= 1<<7 {
   535  		dAtA[offset] = uint8(v&0x7f | 0x80)
   536  		v >>= 7
   537  		offset++
   538  	}
   539  	dAtA[offset] = uint8(v)
   540  	return base
   541  }
   542  func (m *ABCIResponses) Size() (n int) {
   543  	if m == nil {
   544  		return 0
   545  	}
   546  	var l int
   547  	_ = l
   548  	if len(m.DeliverTxs) > 0 {
   549  		for _, e := range m.DeliverTxs {
   550  			l = e.Size()
   551  			n += 1 + l + sovTypes(uint64(l))
   552  		}
   553  	}
   554  	if m.EndBlock != nil {
   555  		l = m.EndBlock.Size()
   556  		n += 1 + l + sovTypes(uint64(l))
   557  	}
   558  	if m.BeginBlock != nil {
   559  		l = m.BeginBlock.Size()
   560  		n += 1 + l + sovTypes(uint64(l))
   561  	}
   562  	return n
   563  }
   564  
   565  func (m *State) Size() (n int) {
   566  	if m == nil {
   567  		return 0
   568  	}
   569  	var l int
   570  	_ = l
   571  	l = m.Version.Size()
   572  	n += 1 + l + sovTypes(uint64(l))
   573  	l = len(m.ChainID)
   574  	if l > 0 {
   575  		n += 1 + l + sovTypes(uint64(l))
   576  	}
   577  	if m.LastBlockHeight != 0 {
   578  		n += 1 + sovTypes(uint64(m.LastBlockHeight))
   579  	}
   580  	l = m.LastBlockID.Size()
   581  	n += 1 + l + sovTypes(uint64(l))
   582  	l = github_com_gogo_protobuf_types.SizeOfStdTime(m.LastBlockTime)
   583  	n += 1 + l + sovTypes(uint64(l))
   584  	if m.NextValidators != nil {
   585  		l = m.NextValidators.Size()
   586  		n += 1 + l + sovTypes(uint64(l))
   587  	}
   588  	if m.Validators != nil {
   589  		l = m.Validators.Size()
   590  		n += 1 + l + sovTypes(uint64(l))
   591  	}
   592  	if m.LastValidators != nil {
   593  		l = m.LastValidators.Size()
   594  		n += 1 + l + sovTypes(uint64(l))
   595  	}
   596  	if m.LastHeightValidatorsChanged != 0 {
   597  		n += 1 + sovTypes(uint64(m.LastHeightValidatorsChanged))
   598  	}
   599  	l = m.ConsensusParams.Size()
   600  	n += 1 + l + sovTypes(uint64(l))
   601  	if m.LastHeightConsensusParamsChanged != 0 {
   602  		n += 1 + sovTypes(uint64(m.LastHeightConsensusParamsChanged))
   603  	}
   604  	l = len(m.LastResultsHash)
   605  	if l > 0 {
   606  		n += 1 + l + sovTypes(uint64(l))
   607  	}
   608  	l = len(m.AppHash)
   609  	if l > 0 {
   610  		n += 1 + l + sovTypes(uint64(l))
   611  	}
   612  	if m.InitialHeight != 0 {
   613  		n += 1 + sovTypes(uint64(m.InitialHeight))
   614  	}
   615  	l = len(m.LastProofHash)
   616  	if l > 0 {
   617  		n += 2 + l + sovTypes(uint64(l))
   618  	}
   619  	return n
   620  }
   621  
   622  func sovTypes(x uint64) (n int) {
   623  	return (math_bits.Len64(x|1) + 6) / 7
   624  }
   625  func sozTypes(x uint64) (n int) {
   626  	return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   627  }
   628  func (m *ABCIResponses) Unmarshal(dAtA []byte) error {
   629  	l := len(dAtA)
   630  	iNdEx := 0
   631  	for iNdEx < l {
   632  		preIndex := iNdEx
   633  		var wire uint64
   634  		for shift := uint(0); ; shift += 7 {
   635  			if shift >= 64 {
   636  				return ErrIntOverflowTypes
   637  			}
   638  			if iNdEx >= l {
   639  				return io.ErrUnexpectedEOF
   640  			}
   641  			b := dAtA[iNdEx]
   642  			iNdEx++
   643  			wire |= uint64(b&0x7F) << shift
   644  			if b < 0x80 {
   645  				break
   646  			}
   647  		}
   648  		fieldNum := int32(wire >> 3)
   649  		wireType := int(wire & 0x7)
   650  		if wireType == 4 {
   651  			return fmt.Errorf("proto: ABCIResponses: wiretype end group for non-group")
   652  		}
   653  		if fieldNum <= 0 {
   654  			return fmt.Errorf("proto: ABCIResponses: illegal tag %d (wire type %d)", fieldNum, wire)
   655  		}
   656  		switch fieldNum {
   657  		case 1:
   658  			if wireType != 2 {
   659  				return fmt.Errorf("proto: wrong wireType = %d for field DeliverTxs", wireType)
   660  			}
   661  			var msglen int
   662  			for shift := uint(0); ; shift += 7 {
   663  				if shift >= 64 {
   664  					return ErrIntOverflowTypes
   665  				}
   666  				if iNdEx >= l {
   667  					return io.ErrUnexpectedEOF
   668  				}
   669  				b := dAtA[iNdEx]
   670  				iNdEx++
   671  				msglen |= int(b&0x7F) << shift
   672  				if b < 0x80 {
   673  					break
   674  				}
   675  			}
   676  			if msglen < 0 {
   677  				return ErrInvalidLengthTypes
   678  			}
   679  			postIndex := iNdEx + msglen
   680  			if postIndex < 0 {
   681  				return ErrInvalidLengthTypes
   682  			}
   683  			if postIndex > l {
   684  				return io.ErrUnexpectedEOF
   685  			}
   686  			m.DeliverTxs = append(m.DeliverTxs, &types.ResponseDeliverTx{})
   687  			if err := m.DeliverTxs[len(m.DeliverTxs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   688  				return err
   689  			}
   690  			iNdEx = postIndex
   691  		case 2:
   692  			if wireType != 2 {
   693  				return fmt.Errorf("proto: wrong wireType = %d for field EndBlock", wireType)
   694  			}
   695  			var msglen int
   696  			for shift := uint(0); ; shift += 7 {
   697  				if shift >= 64 {
   698  					return ErrIntOverflowTypes
   699  				}
   700  				if iNdEx >= l {
   701  					return io.ErrUnexpectedEOF
   702  				}
   703  				b := dAtA[iNdEx]
   704  				iNdEx++
   705  				msglen |= int(b&0x7F) << shift
   706  				if b < 0x80 {
   707  					break
   708  				}
   709  			}
   710  			if msglen < 0 {
   711  				return ErrInvalidLengthTypes
   712  			}
   713  			postIndex := iNdEx + msglen
   714  			if postIndex < 0 {
   715  				return ErrInvalidLengthTypes
   716  			}
   717  			if postIndex > l {
   718  				return io.ErrUnexpectedEOF
   719  			}
   720  			if m.EndBlock == nil {
   721  				m.EndBlock = &types.ResponseEndBlock{}
   722  			}
   723  			if err := m.EndBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   724  				return err
   725  			}
   726  			iNdEx = postIndex
   727  		case 3:
   728  			if wireType != 2 {
   729  				return fmt.Errorf("proto: wrong wireType = %d for field BeginBlock", 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.BeginBlock == nil {
   757  				m.BeginBlock = &types.ResponseBeginBlock{}
   758  			}
   759  			if err := m.BeginBlock.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 *State) 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: State: wiretype end group for non-group")
   808  		}
   809  		if fieldNum <= 0 {
   810  			return fmt.Errorf("proto: State: 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 LastBlockHeight", wireType)
   881  			}
   882  			m.LastBlockHeight = 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.LastBlockHeight |= 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 LastBlockID", 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 := m.LastBlockID.Unmarshal(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 LastBlockTime", 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 := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.LastBlockTime, 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 NextValidators", wireType)
   966  			}
   967  			var msglen 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  				msglen |= int(b&0x7F) << shift
   978  				if b < 0x80 {
   979  					break
   980  				}
   981  			}
   982  			if msglen < 0 {
   983  				return ErrInvalidLengthTypes
   984  			}
   985  			postIndex := iNdEx + msglen
   986  			if postIndex < 0 {
   987  				return ErrInvalidLengthTypes
   988  			}
   989  			if postIndex > l {
   990  				return io.ErrUnexpectedEOF
   991  			}
   992  			if m.NextValidators == nil {
   993  				m.NextValidators = &types1.ValidatorSet{}
   994  			}
   995  			if err := m.NextValidators.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   996  				return err
   997  			}
   998  			iNdEx = postIndex
   999  		case 7:
  1000  			if wireType != 2 {
  1001  				return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType)
  1002  			}
  1003  			var msglen int
  1004  			for shift := uint(0); ; shift += 7 {
  1005  				if shift >= 64 {
  1006  					return ErrIntOverflowTypes
  1007  				}
  1008  				if iNdEx >= l {
  1009  					return io.ErrUnexpectedEOF
  1010  				}
  1011  				b := dAtA[iNdEx]
  1012  				iNdEx++
  1013  				msglen |= int(b&0x7F) << shift
  1014  				if b < 0x80 {
  1015  					break
  1016  				}
  1017  			}
  1018  			if msglen < 0 {
  1019  				return ErrInvalidLengthTypes
  1020  			}
  1021  			postIndex := iNdEx + msglen
  1022  			if postIndex < 0 {
  1023  				return ErrInvalidLengthTypes
  1024  			}
  1025  			if postIndex > l {
  1026  				return io.ErrUnexpectedEOF
  1027  			}
  1028  			if m.Validators == nil {
  1029  				m.Validators = &types1.ValidatorSet{}
  1030  			}
  1031  			if err := m.Validators.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1032  				return err
  1033  			}
  1034  			iNdEx = postIndex
  1035  		case 8:
  1036  			if wireType != 2 {
  1037  				return fmt.Errorf("proto: wrong wireType = %d for field LastValidators", wireType)
  1038  			}
  1039  			var msglen int
  1040  			for shift := uint(0); ; shift += 7 {
  1041  				if shift >= 64 {
  1042  					return ErrIntOverflowTypes
  1043  				}
  1044  				if iNdEx >= l {
  1045  					return io.ErrUnexpectedEOF
  1046  				}
  1047  				b := dAtA[iNdEx]
  1048  				iNdEx++
  1049  				msglen |= int(b&0x7F) << shift
  1050  				if b < 0x80 {
  1051  					break
  1052  				}
  1053  			}
  1054  			if msglen < 0 {
  1055  				return ErrInvalidLengthTypes
  1056  			}
  1057  			postIndex := iNdEx + msglen
  1058  			if postIndex < 0 {
  1059  				return ErrInvalidLengthTypes
  1060  			}
  1061  			if postIndex > l {
  1062  				return io.ErrUnexpectedEOF
  1063  			}
  1064  			if m.LastValidators == nil {
  1065  				m.LastValidators = &types1.ValidatorSet{}
  1066  			}
  1067  			if err := m.LastValidators.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1068  				return err
  1069  			}
  1070  			iNdEx = postIndex
  1071  		case 9:
  1072  			if wireType != 0 {
  1073  				return fmt.Errorf("proto: wrong wireType = %d for field LastHeightValidatorsChanged", wireType)
  1074  			}
  1075  			m.LastHeightValidatorsChanged = 0
  1076  			for shift := uint(0); ; shift += 7 {
  1077  				if shift >= 64 {
  1078  					return ErrIntOverflowTypes
  1079  				}
  1080  				if iNdEx >= l {
  1081  					return io.ErrUnexpectedEOF
  1082  				}
  1083  				b := dAtA[iNdEx]
  1084  				iNdEx++
  1085  				m.LastHeightValidatorsChanged |= int64(b&0x7F) << shift
  1086  				if b < 0x80 {
  1087  					break
  1088  				}
  1089  			}
  1090  		case 10:
  1091  			if wireType != 2 {
  1092  				return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParams", wireType)
  1093  			}
  1094  			var msglen int
  1095  			for shift := uint(0); ; shift += 7 {
  1096  				if shift >= 64 {
  1097  					return ErrIntOverflowTypes
  1098  				}
  1099  				if iNdEx >= l {
  1100  					return io.ErrUnexpectedEOF
  1101  				}
  1102  				b := dAtA[iNdEx]
  1103  				iNdEx++
  1104  				msglen |= int(b&0x7F) << shift
  1105  				if b < 0x80 {
  1106  					break
  1107  				}
  1108  			}
  1109  			if msglen < 0 {
  1110  				return ErrInvalidLengthTypes
  1111  			}
  1112  			postIndex := iNdEx + msglen
  1113  			if postIndex < 0 {
  1114  				return ErrInvalidLengthTypes
  1115  			}
  1116  			if postIndex > l {
  1117  				return io.ErrUnexpectedEOF
  1118  			}
  1119  			if err := m.ConsensusParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1120  				return err
  1121  			}
  1122  			iNdEx = postIndex
  1123  		case 11:
  1124  			if wireType != 0 {
  1125  				return fmt.Errorf("proto: wrong wireType = %d for field LastHeightConsensusParamsChanged", wireType)
  1126  			}
  1127  			m.LastHeightConsensusParamsChanged = 0
  1128  			for shift := uint(0); ; shift += 7 {
  1129  				if shift >= 64 {
  1130  					return ErrIntOverflowTypes
  1131  				}
  1132  				if iNdEx >= l {
  1133  					return io.ErrUnexpectedEOF
  1134  				}
  1135  				b := dAtA[iNdEx]
  1136  				iNdEx++
  1137  				m.LastHeightConsensusParamsChanged |= int64(b&0x7F) << shift
  1138  				if b < 0x80 {
  1139  					break
  1140  				}
  1141  			}
  1142  		case 12:
  1143  			if wireType != 2 {
  1144  				return fmt.Errorf("proto: wrong wireType = %d for field LastResultsHash", wireType)
  1145  			}
  1146  			var byteLen int
  1147  			for shift := uint(0); ; shift += 7 {
  1148  				if shift >= 64 {
  1149  					return ErrIntOverflowTypes
  1150  				}
  1151  				if iNdEx >= l {
  1152  					return io.ErrUnexpectedEOF
  1153  				}
  1154  				b := dAtA[iNdEx]
  1155  				iNdEx++
  1156  				byteLen |= int(b&0x7F) << shift
  1157  				if b < 0x80 {
  1158  					break
  1159  				}
  1160  			}
  1161  			if byteLen < 0 {
  1162  				return ErrInvalidLengthTypes
  1163  			}
  1164  			postIndex := iNdEx + byteLen
  1165  			if postIndex < 0 {
  1166  				return ErrInvalidLengthTypes
  1167  			}
  1168  			if postIndex > l {
  1169  				return io.ErrUnexpectedEOF
  1170  			}
  1171  			m.LastResultsHash = append(m.LastResultsHash[:0], dAtA[iNdEx:postIndex]...)
  1172  			if m.LastResultsHash == nil {
  1173  				m.LastResultsHash = []byte{}
  1174  			}
  1175  			iNdEx = postIndex
  1176  		case 13:
  1177  			if wireType != 2 {
  1178  				return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType)
  1179  			}
  1180  			var byteLen int
  1181  			for shift := uint(0); ; shift += 7 {
  1182  				if shift >= 64 {
  1183  					return ErrIntOverflowTypes
  1184  				}
  1185  				if iNdEx >= l {
  1186  					return io.ErrUnexpectedEOF
  1187  				}
  1188  				b := dAtA[iNdEx]
  1189  				iNdEx++
  1190  				byteLen |= int(b&0x7F) << shift
  1191  				if b < 0x80 {
  1192  					break
  1193  				}
  1194  			}
  1195  			if byteLen < 0 {
  1196  				return ErrInvalidLengthTypes
  1197  			}
  1198  			postIndex := iNdEx + byteLen
  1199  			if postIndex < 0 {
  1200  				return ErrInvalidLengthTypes
  1201  			}
  1202  			if postIndex > l {
  1203  				return io.ErrUnexpectedEOF
  1204  			}
  1205  			m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...)
  1206  			if m.AppHash == nil {
  1207  				m.AppHash = []byte{}
  1208  			}
  1209  			iNdEx = postIndex
  1210  		case 14:
  1211  			if wireType != 0 {
  1212  				return fmt.Errorf("proto: wrong wireType = %d for field InitialHeight", wireType)
  1213  			}
  1214  			m.InitialHeight = 0
  1215  			for shift := uint(0); ; shift += 7 {
  1216  				if shift >= 64 {
  1217  					return ErrIntOverflowTypes
  1218  				}
  1219  				if iNdEx >= l {
  1220  					return io.ErrUnexpectedEOF
  1221  				}
  1222  				b := dAtA[iNdEx]
  1223  				iNdEx++
  1224  				m.InitialHeight |= int64(b&0x7F) << shift
  1225  				if b < 0x80 {
  1226  					break
  1227  				}
  1228  			}
  1229  		case 1000:
  1230  			if wireType != 2 {
  1231  				return fmt.Errorf("proto: wrong wireType = %d for field LastProofHash", wireType)
  1232  			}
  1233  			var byteLen int
  1234  			for shift := uint(0); ; shift += 7 {
  1235  				if shift >= 64 {
  1236  					return ErrIntOverflowTypes
  1237  				}
  1238  				if iNdEx >= l {
  1239  					return io.ErrUnexpectedEOF
  1240  				}
  1241  				b := dAtA[iNdEx]
  1242  				iNdEx++
  1243  				byteLen |= int(b&0x7F) << shift
  1244  				if b < 0x80 {
  1245  					break
  1246  				}
  1247  			}
  1248  			if byteLen < 0 {
  1249  				return ErrInvalidLengthTypes
  1250  			}
  1251  			postIndex := iNdEx + byteLen
  1252  			if postIndex < 0 {
  1253  				return ErrInvalidLengthTypes
  1254  			}
  1255  			if postIndex > l {
  1256  				return io.ErrUnexpectedEOF
  1257  			}
  1258  			m.LastProofHash = append(m.LastProofHash[:0], dAtA[iNdEx:postIndex]...)
  1259  			if m.LastProofHash == nil {
  1260  				m.LastProofHash = []byte{}
  1261  			}
  1262  			iNdEx = postIndex
  1263  		default:
  1264  			iNdEx = preIndex
  1265  			skippy, err := skipTypes(dAtA[iNdEx:])
  1266  			if err != nil {
  1267  				return err
  1268  			}
  1269  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1270  				return ErrInvalidLengthTypes
  1271  			}
  1272  			if (iNdEx + skippy) > l {
  1273  				return io.ErrUnexpectedEOF
  1274  			}
  1275  			iNdEx += skippy
  1276  		}
  1277  	}
  1278  
  1279  	if iNdEx > l {
  1280  		return io.ErrUnexpectedEOF
  1281  	}
  1282  	return nil
  1283  }
  1284  func skipTypes(dAtA []byte) (n int, err error) {
  1285  	l := len(dAtA)
  1286  	iNdEx := 0
  1287  	depth := 0
  1288  	for iNdEx < l {
  1289  		var wire uint64
  1290  		for shift := uint(0); ; shift += 7 {
  1291  			if shift >= 64 {
  1292  				return 0, ErrIntOverflowTypes
  1293  			}
  1294  			if iNdEx >= l {
  1295  				return 0, io.ErrUnexpectedEOF
  1296  			}
  1297  			b := dAtA[iNdEx]
  1298  			iNdEx++
  1299  			wire |= (uint64(b) & 0x7F) << shift
  1300  			if b < 0x80 {
  1301  				break
  1302  			}
  1303  		}
  1304  		wireType := int(wire & 0x7)
  1305  		switch wireType {
  1306  		case 0:
  1307  			for shift := uint(0); ; shift += 7 {
  1308  				if shift >= 64 {
  1309  					return 0, ErrIntOverflowTypes
  1310  				}
  1311  				if iNdEx >= l {
  1312  					return 0, io.ErrUnexpectedEOF
  1313  				}
  1314  				iNdEx++
  1315  				if dAtA[iNdEx-1] < 0x80 {
  1316  					break
  1317  				}
  1318  			}
  1319  		case 1:
  1320  			iNdEx += 8
  1321  		case 2:
  1322  			var length int
  1323  			for shift := uint(0); ; shift += 7 {
  1324  				if shift >= 64 {
  1325  					return 0, ErrIntOverflowTypes
  1326  				}
  1327  				if iNdEx >= l {
  1328  					return 0, io.ErrUnexpectedEOF
  1329  				}
  1330  				b := dAtA[iNdEx]
  1331  				iNdEx++
  1332  				length |= (int(b) & 0x7F) << shift
  1333  				if b < 0x80 {
  1334  					break
  1335  				}
  1336  			}
  1337  			if length < 0 {
  1338  				return 0, ErrInvalidLengthTypes
  1339  			}
  1340  			iNdEx += length
  1341  		case 3:
  1342  			depth++
  1343  		case 4:
  1344  			if depth == 0 {
  1345  				return 0, ErrUnexpectedEndOfGroupTypes
  1346  			}
  1347  			depth--
  1348  		case 5:
  1349  			iNdEx += 4
  1350  		default:
  1351  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1352  		}
  1353  		if iNdEx < 0 {
  1354  			return 0, ErrInvalidLengthTypes
  1355  		}
  1356  		if depth == 0 {
  1357  			return iNdEx, nil
  1358  		}
  1359  	}
  1360  	return 0, io.ErrUnexpectedEOF
  1361  }
  1362  
  1363  var (
  1364  	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
  1365  	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
  1366  	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
  1367  )