github.com/Finschia/ostracon@v1.1.5/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 state "github.com/tendermint/tendermint/proto/tendermint/state" 13 types "github.com/tendermint/tendermint/proto/tendermint/types" 14 io "io" 15 math "math" 16 math_bits "math/bits" 17 time "time" 18 ) 19 20 // Reference imports to suppress errors if they are not otherwise used. 21 var _ = proto.Marshal 22 var _ = fmt.Errorf 23 var _ = math.Inf 24 var _ = time.Kitchen 25 26 // This is a compile-time assertion to ensure that this generated file 27 // is compatible with the proto package it is being compiled against. 28 // A compilation error at this line likely means your copy of the 29 // proto package needs to be updated. 30 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 31 32 type State struct { 33 Version state.Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version"` 34 // immutable 35 ChainID string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` 36 InitialHeight int64 `protobuf:"varint,14,opt,name=initial_height,json=initialHeight,proto3" json:"initial_height,omitempty"` 37 // LastBlockHeight=0 at genesis (ie. block(H=0) does not exist) 38 LastBlockHeight int64 `protobuf:"varint,3,opt,name=last_block_height,json=lastBlockHeight,proto3" json:"last_block_height,omitempty"` 39 LastBlockID types.BlockID `protobuf:"bytes,4,opt,name=last_block_id,json=lastBlockId,proto3" json:"last_block_id"` 40 LastBlockTime time.Time `protobuf:"bytes,5,opt,name=last_block_time,json=lastBlockTime,proto3,stdtime" json:"last_block_time"` 41 // LastValidators is used to validate block.LastCommit. 42 // Validators are persisted to the database separately every time they change, 43 // so we can query for historical validator sets. 44 // Note that if s.LastBlockHeight causes a valset change, 45 // we set s.LastHeightValidatorsChanged = s.LastBlockHeight + 1 + 1 46 // Extra +1 due to nextValSet delay. 47 NextValidators *types.ValidatorSet `protobuf:"bytes,6,opt,name=next_validators,json=nextValidators,proto3" json:"next_validators,omitempty"` 48 Validators *types.ValidatorSet `protobuf:"bytes,7,opt,name=validators,proto3" json:"validators,omitempty"` 49 LastValidators *types.ValidatorSet `protobuf:"bytes,8,opt,name=last_validators,json=lastValidators,proto3" json:"last_validators,omitempty"` 50 LastHeightValidatorsChanged int64 `protobuf:"varint,9,opt,name=last_height_validators_changed,json=lastHeightValidatorsChanged,proto3" json:"last_height_validators_changed,omitempty"` 51 // Consensus parameters used for validating blocks. 52 // Changes returned by EndBlock and updated after Commit. 53 ConsensusParams types.ConsensusParams `protobuf:"bytes,10,opt,name=consensus_params,json=consensusParams,proto3" json:"consensus_params"` 54 LastHeightConsensusParamsChanged int64 `protobuf:"varint,11,opt,name=last_height_consensus_params_changed,json=lastHeightConsensusParamsChanged,proto3" json:"last_height_consensus_params_changed,omitempty"` 55 // Merkle root of the results from executing prev block 56 LastResultsHash []byte `protobuf:"bytes,12,opt,name=last_results_hash,json=lastResultsHash,proto3" json:"last_results_hash,omitempty"` 57 // the latest AppHash we've received from calling abci.Commit() 58 AppHash []byte `protobuf:"bytes,13,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` 59 // the VRF Proof value generated by the last Proposer 60 LastProofHash []byte `protobuf:"bytes,1000,opt,name=last_proof_hash,json=lastProofHash,proto3" json:"last_proof_hash,omitempty"` 61 } 62 63 func (m *State) Reset() { *m = State{} } 64 func (m *State) String() string { return proto.CompactTextString(m) } 65 func (*State) ProtoMessage() {} 66 func (*State) Descriptor() ([]byte, []int) { 67 return fileDescriptor_898987a4421067cd, []int{0} 68 } 69 func (m *State) XXX_Unmarshal(b []byte) error { 70 return m.Unmarshal(b) 71 } 72 func (m *State) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 73 if deterministic { 74 return xxx_messageInfo_State.Marshal(b, m, deterministic) 75 } else { 76 b = b[:cap(b)] 77 n, err := m.MarshalToSizedBuffer(b) 78 if err != nil { 79 return nil, err 80 } 81 return b[:n], nil 82 } 83 } 84 func (m *State) XXX_Merge(src proto.Message) { 85 xxx_messageInfo_State.Merge(m, src) 86 } 87 func (m *State) XXX_Size() int { 88 return m.Size() 89 } 90 func (m *State) XXX_DiscardUnknown() { 91 xxx_messageInfo_State.DiscardUnknown(m) 92 } 93 94 var xxx_messageInfo_State proto.InternalMessageInfo 95 96 func (m *State) GetVersion() state.Version { 97 if m != nil { 98 return m.Version 99 } 100 return state.Version{} 101 } 102 103 func (m *State) GetChainID() string { 104 if m != nil { 105 return m.ChainID 106 } 107 return "" 108 } 109 110 func (m *State) GetInitialHeight() int64 { 111 if m != nil { 112 return m.InitialHeight 113 } 114 return 0 115 } 116 117 func (m *State) GetLastBlockHeight() int64 { 118 if m != nil { 119 return m.LastBlockHeight 120 } 121 return 0 122 } 123 124 func (m *State) GetLastBlockID() types.BlockID { 125 if m != nil { 126 return m.LastBlockID 127 } 128 return types.BlockID{} 129 } 130 131 func (m *State) GetLastBlockTime() time.Time { 132 if m != nil { 133 return m.LastBlockTime 134 } 135 return time.Time{} 136 } 137 138 func (m *State) GetNextValidators() *types.ValidatorSet { 139 if m != nil { 140 return m.NextValidators 141 } 142 return nil 143 } 144 145 func (m *State) GetValidators() *types.ValidatorSet { 146 if m != nil { 147 return m.Validators 148 } 149 return nil 150 } 151 152 func (m *State) GetLastValidators() *types.ValidatorSet { 153 if m != nil { 154 return m.LastValidators 155 } 156 return nil 157 } 158 159 func (m *State) GetLastHeightValidatorsChanged() int64 { 160 if m != nil { 161 return m.LastHeightValidatorsChanged 162 } 163 return 0 164 } 165 166 func (m *State) GetConsensusParams() types.ConsensusParams { 167 if m != nil { 168 return m.ConsensusParams 169 } 170 return types.ConsensusParams{} 171 } 172 173 func (m *State) GetLastHeightConsensusParamsChanged() int64 { 174 if m != nil { 175 return m.LastHeightConsensusParamsChanged 176 } 177 return 0 178 } 179 180 func (m *State) GetLastResultsHash() []byte { 181 if m != nil { 182 return m.LastResultsHash 183 } 184 return nil 185 } 186 187 func (m *State) GetAppHash() []byte { 188 if m != nil { 189 return m.AppHash 190 } 191 return nil 192 } 193 194 func (m *State) GetLastProofHash() []byte { 195 if m != nil { 196 return m.LastProofHash 197 } 198 return nil 199 } 200 201 func init() { 202 proto.RegisterType((*State)(nil), "ostracon.state.State") 203 } 204 205 func init() { proto.RegisterFile("ostracon/state/types.proto", fileDescriptor_898987a4421067cd) } 206 207 var fileDescriptor_898987a4421067cd = []byte{ 208 // 593 bytes of a gzipped FileDescriptorProto 209 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x3f, 0x6f, 0xd3, 0x40, 210 0x18, 0xc6, 0x63, 0xfa, 0xc7, 0xe9, 0xa5, 0x49, 0xc0, 0x30, 0xb8, 0x06, 0x1c, 0x83, 0xf8, 0x13, 211 0x31, 0xd8, 0x02, 0x26, 0x16, 0x06, 0xa7, 0x82, 0x46, 0x54, 0xa8, 0x72, 0x51, 0x07, 0x16, 0xeb, 212 0x62, 0x5f, 0xed, 0x13, 0xce, 0x9d, 0xe5, 0xbb, 0x54, 0xf0, 0x15, 0x98, 0xfa, 0xb1, 0x3a, 0x76, 213 0x64, 0x2a, 0x28, 0x59, 0xf8, 0x18, 0xe8, 0xee, 0x6c, 0xc7, 0xad, 0x19, 0xba, 0x25, 0xcf, 0xfb, 214 0x7b, 0x1f, 0x3f, 0xf7, 0xde, 0xab, 0x03, 0x16, 0x65, 0xbc, 0x80, 0x11, 0x25, 0x1e, 0xe3, 0x90, 215 0x23, 0x8f, 0xff, 0xc8, 0x11, 0x73, 0xf3, 0x82, 0x72, 0x6a, 0x0c, 0xaa, 0x9a, 0x2b, 0x6b, 0xd6, 216 0x83, 0x84, 0x26, 0x54, 0x96, 0x3c, 0xf1, 0x4b, 0x51, 0x96, 0xc3, 0x11, 0x89, 0x51, 0x31, 0xc7, 217 0x84, 0xab, 0x6e, 0xef, 0x0c, 0x66, 0x38, 0x86, 0x9c, 0x16, 0x25, 0xf1, 0xb8, 0x45, 0xe4, 0xb0, 218 0x80, 0xf3, 0xf2, 0x33, 0xd6, 0xa3, 0x56, 0xb9, 0x11, 0xc2, 0x1a, 0x25, 0x94, 0x26, 0x19, 0xf2, 219 0xe4, 0xbf, 0xd9, 0xe2, 0xd4, 0xe3, 0x78, 0x8e, 0x18, 0x87, 0xf3, 0xfc, 0x3f, 0xed, 0xad, 0x33, 220 0x3c, 0xfd, 0xa9, 0x83, 0xad, 0x63, 0xa1, 0x1a, 0xef, 0x80, 0x7e, 0x86, 0x0a, 0x86, 0x29, 0x31, 221 0x35, 0x47, 0x1b, 0xf7, 0xde, 0xec, 0xb9, 0xeb, 0x4e, 0x75, 0x42, 0xf7, 0x44, 0x01, 0xfe, 0xe6, 222 0xc5, 0xd5, 0xa8, 0x13, 0x54, 0xbc, 0xf1, 0x02, 0x74, 0xa3, 0x14, 0x62, 0x12, 0xe2, 0xd8, 0xbc, 223 0xe3, 0x68, 0xe3, 0x1d, 0xbf, 0xb7, 0xbc, 0x1a, 0xe9, 0x13, 0xa1, 0x4d, 0xf7, 0x03, 0x5d, 0x16, 224 0xa7, 0xb1, 0xf1, 0x1c, 0x0c, 0x30, 0xc1, 0x1c, 0xc3, 0x2c, 0x4c, 0x11, 0x4e, 0x52, 0x6e, 0x0e, 225 0x1c, 0x6d, 0xbc, 0x11, 0xf4, 0x4b, 0xf5, 0x40, 0x8a, 0xc6, 0x2b, 0x70, 0x2f, 0x83, 0x8c, 0x87, 226 0xb3, 0x8c, 0x46, 0xdf, 0x2a, 0x72, 0x43, 0x92, 0x43, 0x51, 0xf0, 0x85, 0x5e, 0xb2, 0x01, 0xe8, 227 0x37, 0x58, 0x1c, 0x9b, 0x9b, 0xed, 0xec, 0xea, 0xbc, 0xb2, 0x6b, 0xba, 0xef, 0xdf, 0x17, 0xd9, 228 0x97, 0x57, 0xa3, 0xde, 0x61, 0x65, 0x35, 0xdd, 0x0f, 0x7a, 0xb5, 0xef, 0x34, 0x36, 0x0e, 0xc1, 229 0xb0, 0xe1, 0x29, 0xe6, 0x69, 0x6e, 0x49, 0x57, 0xcb, 0x55, 0xc3, 0x76, 0xab, 0x61, 0xbb, 0x5f, 230 0xaa, 0x61, 0xfb, 0x5d, 0x61, 0x7b, 0xfe, 0x7b, 0xa4, 0x05, 0xfd, 0xda, 0x4b, 0x54, 0x8d, 0x8f, 231 0x60, 0x48, 0xd0, 0x77, 0x1e, 0xd6, 0xb7, 0xce, 0xcc, 0x6d, 0xe9, 0x66, 0xb7, 0x33, 0x9e, 0x54, 232 0xcc, 0x31, 0xe2, 0xc1, 0x40, 0xb4, 0xd5, 0x0a, 0x33, 0xde, 0x03, 0xd0, 0xf0, 0xd0, 0x6f, 0xe5, 233 0xd1, 0xe8, 0x10, 0x41, 0xe4, 0xb1, 0x1a, 0x26, 0xdd, 0xdb, 0x05, 0x11, 0x6d, 0x8d, 0x20, 0x13, 234 0x60, 0x4b, 0x23, 0x75, 0x33, 0x0d, 0xbf, 0x30, 0x4a, 0x21, 0x49, 0x50, 0x6c, 0xee, 0xc8, 0xcb, 235 0x7a, 0x28, 0x28, 0x75, 0x4f, 0xeb, 0xee, 0x89, 0x42, 0x8c, 0x00, 0xdc, 0x8d, 0x28, 0x61, 0x88, 236 0xb0, 0x05, 0x0b, 0xd5, 0xbe, 0x9b, 0x40, 0xc6, 0x79, 0xd2, 0x8e, 0x33, 0xa9, 0xc8, 0x23, 0x09, 237 0x96, 0xfb, 0x37, 0x8c, 0xae, 0xcb, 0xc6, 0x67, 0xf0, 0xac, 0x19, 0xec, 0xa6, 0x7f, 0x1d, 0xaf, 238 0x27, 0xe3, 0x39, 0xeb, 0x78, 0x37, 0xfc, 0xab, 0x8c, 0xd5, 0x22, 0x16, 0x88, 0x2d, 0x32, 0xce, 239 0xc2, 0x14, 0xb2, 0xd4, 0xdc, 0x75, 0xb4, 0xf1, 0xae, 0x5a, 0xc4, 0x40, 0xe9, 0x07, 0x90, 0xa5, 240 0xc6, 0x1e, 0xe8, 0xc2, 0x3c, 0x57, 0x48, 0x5f, 0x22, 0x3a, 0xcc, 0x73, 0x59, 0x7a, 0x59, 0x0e, 241 0x3e, 0x2f, 0x28, 0x3d, 0x55, 0xc4, 0x5f, 0x5d, 0x22, 0x72, 0x55, 0x8e, 0x84, 0x2c, 0x40, 0xff, 242 0xd3, 0xc5, 0xd2, 0xd6, 0x2e, 0x97, 0xb6, 0xf6, 0x67, 0x69, 0x6b, 0xe7, 0x2b, 0xbb, 0x73, 0xb9, 243 0xb2, 0x3b, 0xbf, 0x56, 0x76, 0xe7, 0xeb, 0xeb, 0x04, 0xf3, 0x74, 0x31, 0x73, 0x23, 0x3a, 0xf7, 244 0x3e, 0x60, 0xc2, 0xa2, 0x14, 0x43, 0xaf, 0x7e, 0x9a, 0xd4, 0x9b, 0x73, 0xfd, 0xa5, 0x9a, 0x6d, 245 0x4b, 0xf5, 0xed, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0xbb, 0x81, 0xf5, 0xc2, 0x04, 0x00, 246 0x00, 247 } 248 249 func (m *State) Marshal() (dAtA []byte, err error) { 250 size := m.Size() 251 dAtA = make([]byte, size) 252 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 253 if err != nil { 254 return nil, err 255 } 256 return dAtA[:n], nil 257 } 258 259 func (m *State) MarshalTo(dAtA []byte) (int, error) { 260 size := m.Size() 261 return m.MarshalToSizedBuffer(dAtA[:size]) 262 } 263 264 func (m *State) MarshalToSizedBuffer(dAtA []byte) (int, error) { 265 i := len(dAtA) 266 _ = i 267 var l int 268 _ = l 269 if len(m.LastProofHash) > 0 { 270 i -= len(m.LastProofHash) 271 copy(dAtA[i:], m.LastProofHash) 272 i = encodeVarintTypes(dAtA, i, uint64(len(m.LastProofHash))) 273 i-- 274 dAtA[i] = 0x3e 275 i-- 276 dAtA[i] = 0xc2 277 } 278 if m.InitialHeight != 0 { 279 i = encodeVarintTypes(dAtA, i, uint64(m.InitialHeight)) 280 i-- 281 dAtA[i] = 0x70 282 } 283 if len(m.AppHash) > 0 { 284 i -= len(m.AppHash) 285 copy(dAtA[i:], m.AppHash) 286 i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash))) 287 i-- 288 dAtA[i] = 0x6a 289 } 290 if len(m.LastResultsHash) > 0 { 291 i -= len(m.LastResultsHash) 292 copy(dAtA[i:], m.LastResultsHash) 293 i = encodeVarintTypes(dAtA, i, uint64(len(m.LastResultsHash))) 294 i-- 295 dAtA[i] = 0x62 296 } 297 if m.LastHeightConsensusParamsChanged != 0 { 298 i = encodeVarintTypes(dAtA, i, uint64(m.LastHeightConsensusParamsChanged)) 299 i-- 300 dAtA[i] = 0x58 301 } 302 { 303 size, err := m.ConsensusParams.MarshalToSizedBuffer(dAtA[:i]) 304 if err != nil { 305 return 0, err 306 } 307 i -= size 308 i = encodeVarintTypes(dAtA, i, uint64(size)) 309 } 310 i-- 311 dAtA[i] = 0x52 312 if m.LastHeightValidatorsChanged != 0 { 313 i = encodeVarintTypes(dAtA, i, uint64(m.LastHeightValidatorsChanged)) 314 i-- 315 dAtA[i] = 0x48 316 } 317 if m.LastValidators != nil { 318 { 319 size, err := m.LastValidators.MarshalToSizedBuffer(dAtA[:i]) 320 if err != nil { 321 return 0, err 322 } 323 i -= size 324 i = encodeVarintTypes(dAtA, i, uint64(size)) 325 } 326 i-- 327 dAtA[i] = 0x42 328 } 329 if m.Validators != nil { 330 { 331 size, err := m.Validators.MarshalToSizedBuffer(dAtA[:i]) 332 if err != nil { 333 return 0, err 334 } 335 i -= size 336 i = encodeVarintTypes(dAtA, i, uint64(size)) 337 } 338 i-- 339 dAtA[i] = 0x3a 340 } 341 if m.NextValidators != nil { 342 { 343 size, err := m.NextValidators.MarshalToSizedBuffer(dAtA[:i]) 344 if err != nil { 345 return 0, err 346 } 347 i -= size 348 i = encodeVarintTypes(dAtA, i, uint64(size)) 349 } 350 i-- 351 dAtA[i] = 0x32 352 } 353 n5, err5 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LastBlockTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LastBlockTime):]) 354 if err5 != nil { 355 return 0, err5 356 } 357 i -= n5 358 i = encodeVarintTypes(dAtA, i, uint64(n5)) 359 i-- 360 dAtA[i] = 0x2a 361 { 362 size, err := m.LastBlockID.MarshalToSizedBuffer(dAtA[:i]) 363 if err != nil { 364 return 0, err 365 } 366 i -= size 367 i = encodeVarintTypes(dAtA, i, uint64(size)) 368 } 369 i-- 370 dAtA[i] = 0x22 371 if m.LastBlockHeight != 0 { 372 i = encodeVarintTypes(dAtA, i, uint64(m.LastBlockHeight)) 373 i-- 374 dAtA[i] = 0x18 375 } 376 if len(m.ChainID) > 0 { 377 i -= len(m.ChainID) 378 copy(dAtA[i:], m.ChainID) 379 i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainID))) 380 i-- 381 dAtA[i] = 0x12 382 } 383 { 384 size, err := m.Version.MarshalToSizedBuffer(dAtA[:i]) 385 if err != nil { 386 return 0, err 387 } 388 i -= size 389 i = encodeVarintTypes(dAtA, i, uint64(size)) 390 } 391 i-- 392 dAtA[i] = 0xa 393 return len(dAtA) - i, nil 394 } 395 396 func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { 397 offset -= sovTypes(v) 398 base := offset 399 for v >= 1<<7 { 400 dAtA[offset] = uint8(v&0x7f | 0x80) 401 v >>= 7 402 offset++ 403 } 404 dAtA[offset] = uint8(v) 405 return base 406 } 407 func (m *State) Size() (n int) { 408 if m == nil { 409 return 0 410 } 411 var l int 412 _ = l 413 l = m.Version.Size() 414 n += 1 + l + sovTypes(uint64(l)) 415 l = len(m.ChainID) 416 if l > 0 { 417 n += 1 + l + sovTypes(uint64(l)) 418 } 419 if m.LastBlockHeight != 0 { 420 n += 1 + sovTypes(uint64(m.LastBlockHeight)) 421 } 422 l = m.LastBlockID.Size() 423 n += 1 + l + sovTypes(uint64(l)) 424 l = github_com_gogo_protobuf_types.SizeOfStdTime(m.LastBlockTime) 425 n += 1 + l + sovTypes(uint64(l)) 426 if m.NextValidators != nil { 427 l = m.NextValidators.Size() 428 n += 1 + l + sovTypes(uint64(l)) 429 } 430 if m.Validators != nil { 431 l = m.Validators.Size() 432 n += 1 + l + sovTypes(uint64(l)) 433 } 434 if m.LastValidators != nil { 435 l = m.LastValidators.Size() 436 n += 1 + l + sovTypes(uint64(l)) 437 } 438 if m.LastHeightValidatorsChanged != 0 { 439 n += 1 + sovTypes(uint64(m.LastHeightValidatorsChanged)) 440 } 441 l = m.ConsensusParams.Size() 442 n += 1 + l + sovTypes(uint64(l)) 443 if m.LastHeightConsensusParamsChanged != 0 { 444 n += 1 + sovTypes(uint64(m.LastHeightConsensusParamsChanged)) 445 } 446 l = len(m.LastResultsHash) 447 if l > 0 { 448 n += 1 + l + sovTypes(uint64(l)) 449 } 450 l = len(m.AppHash) 451 if l > 0 { 452 n += 1 + l + sovTypes(uint64(l)) 453 } 454 if m.InitialHeight != 0 { 455 n += 1 + sovTypes(uint64(m.InitialHeight)) 456 } 457 l = len(m.LastProofHash) 458 if l > 0 { 459 n += 2 + l + sovTypes(uint64(l)) 460 } 461 return n 462 } 463 464 func sovTypes(x uint64) (n int) { 465 return (math_bits.Len64(x|1) + 6) / 7 466 } 467 func sozTypes(x uint64) (n int) { 468 return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 469 } 470 func (m *State) Unmarshal(dAtA []byte) error { 471 l := len(dAtA) 472 iNdEx := 0 473 for iNdEx < l { 474 preIndex := iNdEx 475 var wire uint64 476 for shift := uint(0); ; shift += 7 { 477 if shift >= 64 { 478 return ErrIntOverflowTypes 479 } 480 if iNdEx >= l { 481 return io.ErrUnexpectedEOF 482 } 483 b := dAtA[iNdEx] 484 iNdEx++ 485 wire |= uint64(b&0x7F) << shift 486 if b < 0x80 { 487 break 488 } 489 } 490 fieldNum := int32(wire >> 3) 491 wireType := int(wire & 0x7) 492 if wireType == 4 { 493 return fmt.Errorf("proto: State: wiretype end group for non-group") 494 } 495 if fieldNum <= 0 { 496 return fmt.Errorf("proto: State: illegal tag %d (wire type %d)", fieldNum, wire) 497 } 498 switch fieldNum { 499 case 1: 500 if wireType != 2 { 501 return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) 502 } 503 var msglen int 504 for shift := uint(0); ; shift += 7 { 505 if shift >= 64 { 506 return ErrIntOverflowTypes 507 } 508 if iNdEx >= l { 509 return io.ErrUnexpectedEOF 510 } 511 b := dAtA[iNdEx] 512 iNdEx++ 513 msglen |= int(b&0x7F) << shift 514 if b < 0x80 { 515 break 516 } 517 } 518 if msglen < 0 { 519 return ErrInvalidLengthTypes 520 } 521 postIndex := iNdEx + msglen 522 if postIndex < 0 { 523 return ErrInvalidLengthTypes 524 } 525 if postIndex > l { 526 return io.ErrUnexpectedEOF 527 } 528 if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 529 return err 530 } 531 iNdEx = postIndex 532 case 2: 533 if wireType != 2 { 534 return fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType) 535 } 536 var stringLen uint64 537 for shift := uint(0); ; shift += 7 { 538 if shift >= 64 { 539 return ErrIntOverflowTypes 540 } 541 if iNdEx >= l { 542 return io.ErrUnexpectedEOF 543 } 544 b := dAtA[iNdEx] 545 iNdEx++ 546 stringLen |= uint64(b&0x7F) << shift 547 if b < 0x80 { 548 break 549 } 550 } 551 intStringLen := int(stringLen) 552 if intStringLen < 0 { 553 return ErrInvalidLengthTypes 554 } 555 postIndex := iNdEx + intStringLen 556 if postIndex < 0 { 557 return ErrInvalidLengthTypes 558 } 559 if postIndex > l { 560 return io.ErrUnexpectedEOF 561 } 562 m.ChainID = string(dAtA[iNdEx:postIndex]) 563 iNdEx = postIndex 564 case 3: 565 if wireType != 0 { 566 return fmt.Errorf("proto: wrong wireType = %d for field LastBlockHeight", wireType) 567 } 568 m.LastBlockHeight = 0 569 for shift := uint(0); ; shift += 7 { 570 if shift >= 64 { 571 return ErrIntOverflowTypes 572 } 573 if iNdEx >= l { 574 return io.ErrUnexpectedEOF 575 } 576 b := dAtA[iNdEx] 577 iNdEx++ 578 m.LastBlockHeight |= int64(b&0x7F) << shift 579 if b < 0x80 { 580 break 581 } 582 } 583 case 4: 584 if wireType != 2 { 585 return fmt.Errorf("proto: wrong wireType = %d for field LastBlockID", wireType) 586 } 587 var msglen int 588 for shift := uint(0); ; shift += 7 { 589 if shift >= 64 { 590 return ErrIntOverflowTypes 591 } 592 if iNdEx >= l { 593 return io.ErrUnexpectedEOF 594 } 595 b := dAtA[iNdEx] 596 iNdEx++ 597 msglen |= int(b&0x7F) << shift 598 if b < 0x80 { 599 break 600 } 601 } 602 if msglen < 0 { 603 return ErrInvalidLengthTypes 604 } 605 postIndex := iNdEx + msglen 606 if postIndex < 0 { 607 return ErrInvalidLengthTypes 608 } 609 if postIndex > l { 610 return io.ErrUnexpectedEOF 611 } 612 if err := m.LastBlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 613 return err 614 } 615 iNdEx = postIndex 616 case 5: 617 if wireType != 2 { 618 return fmt.Errorf("proto: wrong wireType = %d for field LastBlockTime", wireType) 619 } 620 var msglen int 621 for shift := uint(0); ; shift += 7 { 622 if shift >= 64 { 623 return ErrIntOverflowTypes 624 } 625 if iNdEx >= l { 626 return io.ErrUnexpectedEOF 627 } 628 b := dAtA[iNdEx] 629 iNdEx++ 630 msglen |= int(b&0x7F) << shift 631 if b < 0x80 { 632 break 633 } 634 } 635 if msglen < 0 { 636 return ErrInvalidLengthTypes 637 } 638 postIndex := iNdEx + msglen 639 if postIndex < 0 { 640 return ErrInvalidLengthTypes 641 } 642 if postIndex > l { 643 return io.ErrUnexpectedEOF 644 } 645 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.LastBlockTime, dAtA[iNdEx:postIndex]); err != nil { 646 return err 647 } 648 iNdEx = postIndex 649 case 6: 650 if wireType != 2 { 651 return fmt.Errorf("proto: wrong wireType = %d for field NextValidators", wireType) 652 } 653 var msglen int 654 for shift := uint(0); ; shift += 7 { 655 if shift >= 64 { 656 return ErrIntOverflowTypes 657 } 658 if iNdEx >= l { 659 return io.ErrUnexpectedEOF 660 } 661 b := dAtA[iNdEx] 662 iNdEx++ 663 msglen |= int(b&0x7F) << shift 664 if b < 0x80 { 665 break 666 } 667 } 668 if msglen < 0 { 669 return ErrInvalidLengthTypes 670 } 671 postIndex := iNdEx + msglen 672 if postIndex < 0 { 673 return ErrInvalidLengthTypes 674 } 675 if postIndex > l { 676 return io.ErrUnexpectedEOF 677 } 678 if m.NextValidators == nil { 679 m.NextValidators = &types.ValidatorSet{} 680 } 681 if err := m.NextValidators.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 682 return err 683 } 684 iNdEx = postIndex 685 case 7: 686 if wireType != 2 { 687 return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) 688 } 689 var msglen int 690 for shift := uint(0); ; shift += 7 { 691 if shift >= 64 { 692 return ErrIntOverflowTypes 693 } 694 if iNdEx >= l { 695 return io.ErrUnexpectedEOF 696 } 697 b := dAtA[iNdEx] 698 iNdEx++ 699 msglen |= int(b&0x7F) << shift 700 if b < 0x80 { 701 break 702 } 703 } 704 if msglen < 0 { 705 return ErrInvalidLengthTypes 706 } 707 postIndex := iNdEx + msglen 708 if postIndex < 0 { 709 return ErrInvalidLengthTypes 710 } 711 if postIndex > l { 712 return io.ErrUnexpectedEOF 713 } 714 if m.Validators == nil { 715 m.Validators = &types.ValidatorSet{} 716 } 717 if err := m.Validators.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 718 return err 719 } 720 iNdEx = postIndex 721 case 8: 722 if wireType != 2 { 723 return fmt.Errorf("proto: wrong wireType = %d for field LastValidators", wireType) 724 } 725 var msglen int 726 for shift := uint(0); ; shift += 7 { 727 if shift >= 64 { 728 return ErrIntOverflowTypes 729 } 730 if iNdEx >= l { 731 return io.ErrUnexpectedEOF 732 } 733 b := dAtA[iNdEx] 734 iNdEx++ 735 msglen |= int(b&0x7F) << shift 736 if b < 0x80 { 737 break 738 } 739 } 740 if msglen < 0 { 741 return ErrInvalidLengthTypes 742 } 743 postIndex := iNdEx + msglen 744 if postIndex < 0 { 745 return ErrInvalidLengthTypes 746 } 747 if postIndex > l { 748 return io.ErrUnexpectedEOF 749 } 750 if m.LastValidators == nil { 751 m.LastValidators = &types.ValidatorSet{} 752 } 753 if err := m.LastValidators.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 754 return err 755 } 756 iNdEx = postIndex 757 case 9: 758 if wireType != 0 { 759 return fmt.Errorf("proto: wrong wireType = %d for field LastHeightValidatorsChanged", wireType) 760 } 761 m.LastHeightValidatorsChanged = 0 762 for shift := uint(0); ; shift += 7 { 763 if shift >= 64 { 764 return ErrIntOverflowTypes 765 } 766 if iNdEx >= l { 767 return io.ErrUnexpectedEOF 768 } 769 b := dAtA[iNdEx] 770 iNdEx++ 771 m.LastHeightValidatorsChanged |= int64(b&0x7F) << shift 772 if b < 0x80 { 773 break 774 } 775 } 776 case 10: 777 if wireType != 2 { 778 return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParams", wireType) 779 } 780 var msglen int 781 for shift := uint(0); ; shift += 7 { 782 if shift >= 64 { 783 return ErrIntOverflowTypes 784 } 785 if iNdEx >= l { 786 return io.ErrUnexpectedEOF 787 } 788 b := dAtA[iNdEx] 789 iNdEx++ 790 msglen |= int(b&0x7F) << shift 791 if b < 0x80 { 792 break 793 } 794 } 795 if msglen < 0 { 796 return ErrInvalidLengthTypes 797 } 798 postIndex := iNdEx + msglen 799 if postIndex < 0 { 800 return ErrInvalidLengthTypes 801 } 802 if postIndex > l { 803 return io.ErrUnexpectedEOF 804 } 805 if err := m.ConsensusParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 806 return err 807 } 808 iNdEx = postIndex 809 case 11: 810 if wireType != 0 { 811 return fmt.Errorf("proto: wrong wireType = %d for field LastHeightConsensusParamsChanged", wireType) 812 } 813 m.LastHeightConsensusParamsChanged = 0 814 for shift := uint(0); ; shift += 7 { 815 if shift >= 64 { 816 return ErrIntOverflowTypes 817 } 818 if iNdEx >= l { 819 return io.ErrUnexpectedEOF 820 } 821 b := dAtA[iNdEx] 822 iNdEx++ 823 m.LastHeightConsensusParamsChanged |= int64(b&0x7F) << shift 824 if b < 0x80 { 825 break 826 } 827 } 828 case 12: 829 if wireType != 2 { 830 return fmt.Errorf("proto: wrong wireType = %d for field LastResultsHash", wireType) 831 } 832 var byteLen int 833 for shift := uint(0); ; shift += 7 { 834 if shift >= 64 { 835 return ErrIntOverflowTypes 836 } 837 if iNdEx >= l { 838 return io.ErrUnexpectedEOF 839 } 840 b := dAtA[iNdEx] 841 iNdEx++ 842 byteLen |= int(b&0x7F) << shift 843 if b < 0x80 { 844 break 845 } 846 } 847 if byteLen < 0 { 848 return ErrInvalidLengthTypes 849 } 850 postIndex := iNdEx + byteLen 851 if postIndex < 0 { 852 return ErrInvalidLengthTypes 853 } 854 if postIndex > l { 855 return io.ErrUnexpectedEOF 856 } 857 m.LastResultsHash = append(m.LastResultsHash[:0], dAtA[iNdEx:postIndex]...) 858 if m.LastResultsHash == nil { 859 m.LastResultsHash = []byte{} 860 } 861 iNdEx = postIndex 862 case 13: 863 if wireType != 2 { 864 return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType) 865 } 866 var byteLen int 867 for shift := uint(0); ; shift += 7 { 868 if shift >= 64 { 869 return ErrIntOverflowTypes 870 } 871 if iNdEx >= l { 872 return io.ErrUnexpectedEOF 873 } 874 b := dAtA[iNdEx] 875 iNdEx++ 876 byteLen |= int(b&0x7F) << shift 877 if b < 0x80 { 878 break 879 } 880 } 881 if byteLen < 0 { 882 return ErrInvalidLengthTypes 883 } 884 postIndex := iNdEx + byteLen 885 if postIndex < 0 { 886 return ErrInvalidLengthTypes 887 } 888 if postIndex > l { 889 return io.ErrUnexpectedEOF 890 } 891 m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...) 892 if m.AppHash == nil { 893 m.AppHash = []byte{} 894 } 895 iNdEx = postIndex 896 case 14: 897 if wireType != 0 { 898 return fmt.Errorf("proto: wrong wireType = %d for field InitialHeight", wireType) 899 } 900 m.InitialHeight = 0 901 for shift := uint(0); ; shift += 7 { 902 if shift >= 64 { 903 return ErrIntOverflowTypes 904 } 905 if iNdEx >= l { 906 return io.ErrUnexpectedEOF 907 } 908 b := dAtA[iNdEx] 909 iNdEx++ 910 m.InitialHeight |= int64(b&0x7F) << shift 911 if b < 0x80 { 912 break 913 } 914 } 915 case 1000: 916 if wireType != 2 { 917 return fmt.Errorf("proto: wrong wireType = %d for field LastProofHash", wireType) 918 } 919 var byteLen int 920 for shift := uint(0); ; shift += 7 { 921 if shift >= 64 { 922 return ErrIntOverflowTypes 923 } 924 if iNdEx >= l { 925 return io.ErrUnexpectedEOF 926 } 927 b := dAtA[iNdEx] 928 iNdEx++ 929 byteLen |= int(b&0x7F) << shift 930 if b < 0x80 { 931 break 932 } 933 } 934 if byteLen < 0 { 935 return ErrInvalidLengthTypes 936 } 937 postIndex := iNdEx + byteLen 938 if postIndex < 0 { 939 return ErrInvalidLengthTypes 940 } 941 if postIndex > l { 942 return io.ErrUnexpectedEOF 943 } 944 m.LastProofHash = append(m.LastProofHash[:0], dAtA[iNdEx:postIndex]...) 945 if m.LastProofHash == nil { 946 m.LastProofHash = []byte{} 947 } 948 iNdEx = postIndex 949 default: 950 iNdEx = preIndex 951 skippy, err := skipTypes(dAtA[iNdEx:]) 952 if err != nil { 953 return err 954 } 955 if (skippy < 0) || (iNdEx+skippy) < 0 { 956 return ErrInvalidLengthTypes 957 } 958 if (iNdEx + skippy) > l { 959 return io.ErrUnexpectedEOF 960 } 961 iNdEx += skippy 962 } 963 } 964 965 if iNdEx > l { 966 return io.ErrUnexpectedEOF 967 } 968 return nil 969 } 970 func skipTypes(dAtA []byte) (n int, err error) { 971 l := len(dAtA) 972 iNdEx := 0 973 depth := 0 974 for iNdEx < l { 975 var wire uint64 976 for shift := uint(0); ; shift += 7 { 977 if shift >= 64 { 978 return 0, ErrIntOverflowTypes 979 } 980 if iNdEx >= l { 981 return 0, io.ErrUnexpectedEOF 982 } 983 b := dAtA[iNdEx] 984 iNdEx++ 985 wire |= (uint64(b) & 0x7F) << shift 986 if b < 0x80 { 987 break 988 } 989 } 990 wireType := int(wire & 0x7) 991 switch wireType { 992 case 0: 993 for shift := uint(0); ; shift += 7 { 994 if shift >= 64 { 995 return 0, ErrIntOverflowTypes 996 } 997 if iNdEx >= l { 998 return 0, io.ErrUnexpectedEOF 999 } 1000 iNdEx++ 1001 if dAtA[iNdEx-1] < 0x80 { 1002 break 1003 } 1004 } 1005 case 1: 1006 iNdEx += 8 1007 case 2: 1008 var length int 1009 for shift := uint(0); ; shift += 7 { 1010 if shift >= 64 { 1011 return 0, ErrIntOverflowTypes 1012 } 1013 if iNdEx >= l { 1014 return 0, io.ErrUnexpectedEOF 1015 } 1016 b := dAtA[iNdEx] 1017 iNdEx++ 1018 length |= (int(b) & 0x7F) << shift 1019 if b < 0x80 { 1020 break 1021 } 1022 } 1023 if length < 0 { 1024 return 0, ErrInvalidLengthTypes 1025 } 1026 iNdEx += length 1027 case 3: 1028 depth++ 1029 case 4: 1030 if depth == 0 { 1031 return 0, ErrUnexpectedEndOfGroupTypes 1032 } 1033 depth-- 1034 case 5: 1035 iNdEx += 4 1036 default: 1037 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1038 } 1039 if iNdEx < 0 { 1040 return 0, ErrInvalidLengthTypes 1041 } 1042 if depth == 0 { 1043 return iNdEx, nil 1044 } 1045 } 1046 return 0, io.ErrUnexpectedEOF 1047 } 1048 1049 var ( 1050 ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") 1051 ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") 1052 ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") 1053 )