github.com/ari-anchor/sei-tendermint@v0.0.0-20230519144642-dc826b7b56bb/proto/tendermint/types/types.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: tendermint/types/types.proto 3 4 package types 5 6 import ( 7 fmt "fmt" 8 crypto "github.com/ari-anchor/sei-tendermint/proto/tendermint/crypto" 9 version "github.com/ari-anchor/sei-tendermint/proto/tendermint/version" 10 _ "github.com/gogo/protobuf/gogoproto" 11 proto "github.com/gogo/protobuf/proto" 12 _ "github.com/gogo/protobuf/types" 13 github_com_gogo_protobuf_types "github.com/gogo/protobuf/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 // BlockIdFlag indicates which BlockID the signature is for 33 type BlockIDFlag int32 34 35 const ( 36 BlockIDFlagUnknown BlockIDFlag = 0 37 BlockIDFlagAbsent BlockIDFlag = 1 38 BlockIDFlagCommit BlockIDFlag = 2 39 BlockIDFlagNil BlockIDFlag = 3 40 ) 41 42 var BlockIDFlag_name = map[int32]string{ 43 0: "BLOCK_ID_FLAG_UNKNOWN", 44 1: "BLOCK_ID_FLAG_ABSENT", 45 2: "BLOCK_ID_FLAG_COMMIT", 46 3: "BLOCK_ID_FLAG_NIL", 47 } 48 49 var BlockIDFlag_value = map[string]int32{ 50 "BLOCK_ID_FLAG_UNKNOWN": 0, 51 "BLOCK_ID_FLAG_ABSENT": 1, 52 "BLOCK_ID_FLAG_COMMIT": 2, 53 "BLOCK_ID_FLAG_NIL": 3, 54 } 55 56 func (x BlockIDFlag) String() string { 57 return proto.EnumName(BlockIDFlag_name, int32(x)) 58 } 59 60 func (BlockIDFlag) EnumDescriptor() ([]byte, []int) { 61 return fileDescriptor_d3a6e55e2345de56, []int{0} 62 } 63 64 // SignedMsgType is a type of signed message in the consensus. 65 type SignedMsgType int32 66 67 const ( 68 UnknownType SignedMsgType = 0 69 // Votes 70 PrevoteType SignedMsgType = 1 71 PrecommitType SignedMsgType = 2 72 // Proposals 73 ProposalType SignedMsgType = 32 74 ) 75 76 var SignedMsgType_name = map[int32]string{ 77 0: "SIGNED_MSG_TYPE_UNKNOWN", 78 1: "SIGNED_MSG_TYPE_PREVOTE", 79 2: "SIGNED_MSG_TYPE_PRECOMMIT", 80 32: "SIGNED_MSG_TYPE_PROPOSAL", 81 } 82 83 var SignedMsgType_value = map[string]int32{ 84 "SIGNED_MSG_TYPE_UNKNOWN": 0, 85 "SIGNED_MSG_TYPE_PREVOTE": 1, 86 "SIGNED_MSG_TYPE_PRECOMMIT": 2, 87 "SIGNED_MSG_TYPE_PROPOSAL": 32, 88 } 89 90 func (x SignedMsgType) String() string { 91 return proto.EnumName(SignedMsgType_name, int32(x)) 92 } 93 94 func (SignedMsgType) EnumDescriptor() ([]byte, []int) { 95 return fileDescriptor_d3a6e55e2345de56, []int{1} 96 } 97 98 // PartsetHeader 99 type PartSetHeader struct { 100 Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` 101 Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` 102 } 103 104 func (m *PartSetHeader) Reset() { *m = PartSetHeader{} } 105 func (m *PartSetHeader) String() string { return proto.CompactTextString(m) } 106 func (*PartSetHeader) ProtoMessage() {} 107 func (*PartSetHeader) Descriptor() ([]byte, []int) { 108 return fileDescriptor_d3a6e55e2345de56, []int{0} 109 } 110 func (m *PartSetHeader) XXX_Unmarshal(b []byte) error { 111 return m.Unmarshal(b) 112 } 113 func (m *PartSetHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 114 if deterministic { 115 return xxx_messageInfo_PartSetHeader.Marshal(b, m, deterministic) 116 } else { 117 b = b[:cap(b)] 118 n, err := m.MarshalToSizedBuffer(b) 119 if err != nil { 120 return nil, err 121 } 122 return b[:n], nil 123 } 124 } 125 func (m *PartSetHeader) XXX_Merge(src proto.Message) { 126 xxx_messageInfo_PartSetHeader.Merge(m, src) 127 } 128 func (m *PartSetHeader) XXX_Size() int { 129 return m.Size() 130 } 131 func (m *PartSetHeader) XXX_DiscardUnknown() { 132 xxx_messageInfo_PartSetHeader.DiscardUnknown(m) 133 } 134 135 var xxx_messageInfo_PartSetHeader proto.InternalMessageInfo 136 137 func (m *PartSetHeader) GetTotal() uint32 { 138 if m != nil { 139 return m.Total 140 } 141 return 0 142 } 143 144 func (m *PartSetHeader) GetHash() []byte { 145 if m != nil { 146 return m.Hash 147 } 148 return nil 149 } 150 151 type Part struct { 152 Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` 153 Bytes []byte `protobuf:"bytes,2,opt,name=bytes,proto3" json:"bytes,omitempty"` 154 Proof crypto.Proof `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof"` 155 } 156 157 func (m *Part) Reset() { *m = Part{} } 158 func (m *Part) String() string { return proto.CompactTextString(m) } 159 func (*Part) ProtoMessage() {} 160 func (*Part) Descriptor() ([]byte, []int) { 161 return fileDescriptor_d3a6e55e2345de56, []int{1} 162 } 163 func (m *Part) XXX_Unmarshal(b []byte) error { 164 return m.Unmarshal(b) 165 } 166 func (m *Part) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 167 if deterministic { 168 return xxx_messageInfo_Part.Marshal(b, m, deterministic) 169 } else { 170 b = b[:cap(b)] 171 n, err := m.MarshalToSizedBuffer(b) 172 if err != nil { 173 return nil, err 174 } 175 return b[:n], nil 176 } 177 } 178 func (m *Part) XXX_Merge(src proto.Message) { 179 xxx_messageInfo_Part.Merge(m, src) 180 } 181 func (m *Part) XXX_Size() int { 182 return m.Size() 183 } 184 func (m *Part) XXX_DiscardUnknown() { 185 xxx_messageInfo_Part.DiscardUnknown(m) 186 } 187 188 var xxx_messageInfo_Part proto.InternalMessageInfo 189 190 func (m *Part) GetIndex() uint32 { 191 if m != nil { 192 return m.Index 193 } 194 return 0 195 } 196 197 func (m *Part) GetBytes() []byte { 198 if m != nil { 199 return m.Bytes 200 } 201 return nil 202 } 203 204 func (m *Part) GetProof() crypto.Proof { 205 if m != nil { 206 return m.Proof 207 } 208 return crypto.Proof{} 209 } 210 211 // BlockID 212 type BlockID struct { 213 Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` 214 PartSetHeader PartSetHeader `protobuf:"bytes,2,opt,name=part_set_header,json=partSetHeader,proto3" json:"part_set_header"` 215 } 216 217 func (m *BlockID) Reset() { *m = BlockID{} } 218 func (m *BlockID) String() string { return proto.CompactTextString(m) } 219 func (*BlockID) ProtoMessage() {} 220 func (*BlockID) Descriptor() ([]byte, []int) { 221 return fileDescriptor_d3a6e55e2345de56, []int{2} 222 } 223 func (m *BlockID) XXX_Unmarshal(b []byte) error { 224 return m.Unmarshal(b) 225 } 226 func (m *BlockID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 227 if deterministic { 228 return xxx_messageInfo_BlockID.Marshal(b, m, deterministic) 229 } else { 230 b = b[:cap(b)] 231 n, err := m.MarshalToSizedBuffer(b) 232 if err != nil { 233 return nil, err 234 } 235 return b[:n], nil 236 } 237 } 238 func (m *BlockID) XXX_Merge(src proto.Message) { 239 xxx_messageInfo_BlockID.Merge(m, src) 240 } 241 func (m *BlockID) XXX_Size() int { 242 return m.Size() 243 } 244 func (m *BlockID) XXX_DiscardUnknown() { 245 xxx_messageInfo_BlockID.DiscardUnknown(m) 246 } 247 248 var xxx_messageInfo_BlockID proto.InternalMessageInfo 249 250 func (m *BlockID) GetHash() []byte { 251 if m != nil { 252 return m.Hash 253 } 254 return nil 255 } 256 257 func (m *BlockID) GetPartSetHeader() PartSetHeader { 258 if m != nil { 259 return m.PartSetHeader 260 } 261 return PartSetHeader{} 262 } 263 264 // Header defines the structure of a Tendermint block header. 265 type Header struct { 266 // basic block info 267 Version version.Consensus `protobuf:"bytes,1,opt,name=version,proto3" json:"version"` 268 ChainID string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` 269 Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` 270 Time time.Time `protobuf:"bytes,4,opt,name=time,proto3,stdtime" json:"time"` 271 // prev block info 272 LastBlockId BlockID `protobuf:"bytes,5,opt,name=last_block_id,json=lastBlockId,proto3" json:"last_block_id"` 273 // hashes of block data 274 LastCommitHash []byte `protobuf:"bytes,6,opt,name=last_commit_hash,json=lastCommitHash,proto3" json:"last_commit_hash,omitempty"` 275 DataHash []byte `protobuf:"bytes,7,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"` 276 // hashes from the app output from the prev block 277 ValidatorsHash []byte `protobuf:"bytes,8,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"` 278 NextValidatorsHash []byte `protobuf:"bytes,9,opt,name=next_validators_hash,json=nextValidatorsHash,proto3" json:"next_validators_hash,omitempty"` 279 ConsensusHash []byte `protobuf:"bytes,10,opt,name=consensus_hash,json=consensusHash,proto3" json:"consensus_hash,omitempty"` 280 AppHash []byte `protobuf:"bytes,11,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` 281 LastResultsHash []byte `protobuf:"bytes,12,opt,name=last_results_hash,json=lastResultsHash,proto3" json:"last_results_hash,omitempty"` 282 // consensus info 283 EvidenceHash []byte `protobuf:"bytes,13,opt,name=evidence_hash,json=evidenceHash,proto3" json:"evidence_hash,omitempty"` 284 ProposerAddress []byte `protobuf:"bytes,14,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` 285 } 286 287 func (m *Header) Reset() { *m = Header{} } 288 func (m *Header) String() string { return proto.CompactTextString(m) } 289 func (*Header) ProtoMessage() {} 290 func (*Header) Descriptor() ([]byte, []int) { 291 return fileDescriptor_d3a6e55e2345de56, []int{3} 292 } 293 func (m *Header) XXX_Unmarshal(b []byte) error { 294 return m.Unmarshal(b) 295 } 296 func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 297 if deterministic { 298 return xxx_messageInfo_Header.Marshal(b, m, deterministic) 299 } else { 300 b = b[:cap(b)] 301 n, err := m.MarshalToSizedBuffer(b) 302 if err != nil { 303 return nil, err 304 } 305 return b[:n], nil 306 } 307 } 308 func (m *Header) XXX_Merge(src proto.Message) { 309 xxx_messageInfo_Header.Merge(m, src) 310 } 311 func (m *Header) XXX_Size() int { 312 return m.Size() 313 } 314 func (m *Header) XXX_DiscardUnknown() { 315 xxx_messageInfo_Header.DiscardUnknown(m) 316 } 317 318 var xxx_messageInfo_Header proto.InternalMessageInfo 319 320 func (m *Header) GetVersion() version.Consensus { 321 if m != nil { 322 return m.Version 323 } 324 return version.Consensus{} 325 } 326 327 func (m *Header) GetChainID() string { 328 if m != nil { 329 return m.ChainID 330 } 331 return "" 332 } 333 334 func (m *Header) GetHeight() int64 { 335 if m != nil { 336 return m.Height 337 } 338 return 0 339 } 340 341 func (m *Header) GetTime() time.Time { 342 if m != nil { 343 return m.Time 344 } 345 return time.Time{} 346 } 347 348 func (m *Header) GetLastBlockId() BlockID { 349 if m != nil { 350 return m.LastBlockId 351 } 352 return BlockID{} 353 } 354 355 func (m *Header) GetLastCommitHash() []byte { 356 if m != nil { 357 return m.LastCommitHash 358 } 359 return nil 360 } 361 362 func (m *Header) GetDataHash() []byte { 363 if m != nil { 364 return m.DataHash 365 } 366 return nil 367 } 368 369 func (m *Header) GetValidatorsHash() []byte { 370 if m != nil { 371 return m.ValidatorsHash 372 } 373 return nil 374 } 375 376 func (m *Header) GetNextValidatorsHash() []byte { 377 if m != nil { 378 return m.NextValidatorsHash 379 } 380 return nil 381 } 382 383 func (m *Header) GetConsensusHash() []byte { 384 if m != nil { 385 return m.ConsensusHash 386 } 387 return nil 388 } 389 390 func (m *Header) GetAppHash() []byte { 391 if m != nil { 392 return m.AppHash 393 } 394 return nil 395 } 396 397 func (m *Header) GetLastResultsHash() []byte { 398 if m != nil { 399 return m.LastResultsHash 400 } 401 return nil 402 } 403 404 func (m *Header) GetEvidenceHash() []byte { 405 if m != nil { 406 return m.EvidenceHash 407 } 408 return nil 409 } 410 411 func (m *Header) GetProposerAddress() []byte { 412 if m != nil { 413 return m.ProposerAddress 414 } 415 return nil 416 } 417 418 // Data contains the set of transactions included in the block 419 type Data struct { 420 // Txs that will be applied by state @ block.Height+1. 421 // NOTE: not all txs here are valid. We're just agreeing on the order first. 422 // This means that block.AppHash does not include these txs. 423 Txs [][]byte `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"` 424 } 425 426 func (m *Data) Reset() { *m = Data{} } 427 func (m *Data) String() string { return proto.CompactTextString(m) } 428 func (*Data) ProtoMessage() {} 429 func (*Data) Descriptor() ([]byte, []int) { 430 return fileDescriptor_d3a6e55e2345de56, []int{4} 431 } 432 func (m *Data) XXX_Unmarshal(b []byte) error { 433 return m.Unmarshal(b) 434 } 435 func (m *Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 436 if deterministic { 437 return xxx_messageInfo_Data.Marshal(b, m, deterministic) 438 } else { 439 b = b[:cap(b)] 440 n, err := m.MarshalToSizedBuffer(b) 441 if err != nil { 442 return nil, err 443 } 444 return b[:n], nil 445 } 446 } 447 func (m *Data) XXX_Merge(src proto.Message) { 448 xxx_messageInfo_Data.Merge(m, src) 449 } 450 func (m *Data) XXX_Size() int { 451 return m.Size() 452 } 453 func (m *Data) XXX_DiscardUnknown() { 454 xxx_messageInfo_Data.DiscardUnknown(m) 455 } 456 457 var xxx_messageInfo_Data proto.InternalMessageInfo 458 459 func (m *Data) GetTxs() [][]byte { 460 if m != nil { 461 return m.Txs 462 } 463 return nil 464 } 465 466 type TxKey struct { 467 TxKey []byte `protobuf:"bytes,1,opt,name=tx_key,json=txKey,proto3" json:"tx_key,omitempty"` 468 } 469 470 func (m *TxKey) Reset() { *m = TxKey{} } 471 func (m *TxKey) String() string { return proto.CompactTextString(m) } 472 func (*TxKey) ProtoMessage() {} 473 func (*TxKey) Descriptor() ([]byte, []int) { 474 return fileDescriptor_d3a6e55e2345de56, []int{5} 475 } 476 func (m *TxKey) XXX_Unmarshal(b []byte) error { 477 return m.Unmarshal(b) 478 } 479 func (m *TxKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 480 if deterministic { 481 return xxx_messageInfo_TxKey.Marshal(b, m, deterministic) 482 } else { 483 b = b[:cap(b)] 484 n, err := m.MarshalToSizedBuffer(b) 485 if err != nil { 486 return nil, err 487 } 488 return b[:n], nil 489 } 490 } 491 func (m *TxKey) XXX_Merge(src proto.Message) { 492 xxx_messageInfo_TxKey.Merge(m, src) 493 } 494 func (m *TxKey) XXX_Size() int { 495 return m.Size() 496 } 497 func (m *TxKey) XXX_DiscardUnknown() { 498 xxx_messageInfo_TxKey.DiscardUnknown(m) 499 } 500 501 var xxx_messageInfo_TxKey proto.InternalMessageInfo 502 503 func (m *TxKey) GetTxKey() []byte { 504 if m != nil { 505 return m.TxKey 506 } 507 return nil 508 } 509 510 // Vote represents a prevote, precommit, or commit vote from validators for 511 // consensus. 512 type Vote struct { 513 Type SignedMsgType `protobuf:"varint,1,opt,name=type,proto3,enum=seitendermint.types.SignedMsgType" json:"type,omitempty"` 514 Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` 515 Round int32 `protobuf:"varint,3,opt,name=round,proto3" json:"round,omitempty"` 516 BlockID BlockID `protobuf:"bytes,4,opt,name=block_id,json=blockId,proto3" json:"block_id"` 517 Timestamp time.Time `protobuf:"bytes,5,opt,name=timestamp,proto3,stdtime" json:"timestamp"` 518 ValidatorAddress []byte `protobuf:"bytes,6,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` 519 ValidatorIndex int32 `protobuf:"varint,7,opt,name=validator_index,json=validatorIndex,proto3" json:"validator_index,omitempty"` 520 // Vote signature by the validator if they participated in consensus for the 521 // associated block. 522 Signature []byte `protobuf:"bytes,8,opt,name=signature,proto3" json:"signature,omitempty"` 523 // Vote extension provided by the application. Only valid for precommit 524 // messages. 525 Extension []byte `protobuf:"bytes,9,opt,name=extension,proto3" json:"extension,omitempty"` 526 // Vote extension signature by the validator if they participated in 527 // consensus for the associated block. Only valid for precommit messages. 528 ExtensionSignature []byte `protobuf:"bytes,10,opt,name=extension_signature,json=extensionSignature,proto3" json:"extension_signature,omitempty"` 529 } 530 531 func (m *Vote) Reset() { *m = Vote{} } 532 func (m *Vote) String() string { return proto.CompactTextString(m) } 533 func (*Vote) ProtoMessage() {} 534 func (*Vote) Descriptor() ([]byte, []int) { 535 return fileDescriptor_d3a6e55e2345de56, []int{6} 536 } 537 func (m *Vote) XXX_Unmarshal(b []byte) error { 538 return m.Unmarshal(b) 539 } 540 func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 541 if deterministic { 542 return xxx_messageInfo_Vote.Marshal(b, m, deterministic) 543 } else { 544 b = b[:cap(b)] 545 n, err := m.MarshalToSizedBuffer(b) 546 if err != nil { 547 return nil, err 548 } 549 return b[:n], nil 550 } 551 } 552 func (m *Vote) XXX_Merge(src proto.Message) { 553 xxx_messageInfo_Vote.Merge(m, src) 554 } 555 func (m *Vote) XXX_Size() int { 556 return m.Size() 557 } 558 func (m *Vote) XXX_DiscardUnknown() { 559 xxx_messageInfo_Vote.DiscardUnknown(m) 560 } 561 562 var xxx_messageInfo_Vote proto.InternalMessageInfo 563 564 func (m *Vote) GetType() SignedMsgType { 565 if m != nil { 566 return m.Type 567 } 568 return UnknownType 569 } 570 571 func (m *Vote) GetHeight() int64 { 572 if m != nil { 573 return m.Height 574 } 575 return 0 576 } 577 578 func (m *Vote) GetRound() int32 { 579 if m != nil { 580 return m.Round 581 } 582 return 0 583 } 584 585 func (m *Vote) GetBlockID() BlockID { 586 if m != nil { 587 return m.BlockID 588 } 589 return BlockID{} 590 } 591 592 func (m *Vote) GetTimestamp() time.Time { 593 if m != nil { 594 return m.Timestamp 595 } 596 return time.Time{} 597 } 598 599 func (m *Vote) GetValidatorAddress() []byte { 600 if m != nil { 601 return m.ValidatorAddress 602 } 603 return nil 604 } 605 606 func (m *Vote) GetValidatorIndex() int32 { 607 if m != nil { 608 return m.ValidatorIndex 609 } 610 return 0 611 } 612 613 func (m *Vote) GetSignature() []byte { 614 if m != nil { 615 return m.Signature 616 } 617 return nil 618 } 619 620 func (m *Vote) GetExtension() []byte { 621 if m != nil { 622 return m.Extension 623 } 624 return nil 625 } 626 627 func (m *Vote) GetExtensionSignature() []byte { 628 if m != nil { 629 return m.ExtensionSignature 630 } 631 return nil 632 } 633 634 // Commit contains the evidence that a block was committed by a set of 635 // validators. 636 type Commit struct { 637 Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` 638 Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"` 639 BlockID BlockID `protobuf:"bytes,3,opt,name=block_id,json=blockId,proto3" json:"block_id"` 640 Signatures []CommitSig `protobuf:"bytes,4,rep,name=signatures,proto3" json:"signatures"` 641 } 642 643 func (m *Commit) Reset() { *m = Commit{} } 644 func (m *Commit) String() string { return proto.CompactTextString(m) } 645 func (*Commit) ProtoMessage() {} 646 func (*Commit) Descriptor() ([]byte, []int) { 647 return fileDescriptor_d3a6e55e2345de56, []int{7} 648 } 649 func (m *Commit) XXX_Unmarshal(b []byte) error { 650 return m.Unmarshal(b) 651 } 652 func (m *Commit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 653 if deterministic { 654 return xxx_messageInfo_Commit.Marshal(b, m, deterministic) 655 } else { 656 b = b[:cap(b)] 657 n, err := m.MarshalToSizedBuffer(b) 658 if err != nil { 659 return nil, err 660 } 661 return b[:n], nil 662 } 663 } 664 func (m *Commit) XXX_Merge(src proto.Message) { 665 xxx_messageInfo_Commit.Merge(m, src) 666 } 667 func (m *Commit) XXX_Size() int { 668 return m.Size() 669 } 670 func (m *Commit) XXX_DiscardUnknown() { 671 xxx_messageInfo_Commit.DiscardUnknown(m) 672 } 673 674 var xxx_messageInfo_Commit proto.InternalMessageInfo 675 676 func (m *Commit) GetHeight() int64 { 677 if m != nil { 678 return m.Height 679 } 680 return 0 681 } 682 683 func (m *Commit) GetRound() int32 { 684 if m != nil { 685 return m.Round 686 } 687 return 0 688 } 689 690 func (m *Commit) GetBlockID() BlockID { 691 if m != nil { 692 return m.BlockID 693 } 694 return BlockID{} 695 } 696 697 func (m *Commit) GetSignatures() []CommitSig { 698 if m != nil { 699 return m.Signatures 700 } 701 return nil 702 } 703 704 // CommitSig is a part of the Vote included in a Commit. 705 type CommitSig struct { 706 BlockIdFlag BlockIDFlag `protobuf:"varint,1,opt,name=block_id_flag,json=blockIdFlag,proto3,enum=seitendermint.types.BlockIDFlag" json:"block_id_flag,omitempty"` 707 ValidatorAddress []byte `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` 708 Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,proto3,stdtime" json:"timestamp"` 709 Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` 710 } 711 712 func (m *CommitSig) Reset() { *m = CommitSig{} } 713 func (m *CommitSig) String() string { return proto.CompactTextString(m) } 714 func (*CommitSig) ProtoMessage() {} 715 func (*CommitSig) Descriptor() ([]byte, []int) { 716 return fileDescriptor_d3a6e55e2345de56, []int{8} 717 } 718 func (m *CommitSig) XXX_Unmarshal(b []byte) error { 719 return m.Unmarshal(b) 720 } 721 func (m *CommitSig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 722 if deterministic { 723 return xxx_messageInfo_CommitSig.Marshal(b, m, deterministic) 724 } else { 725 b = b[:cap(b)] 726 n, err := m.MarshalToSizedBuffer(b) 727 if err != nil { 728 return nil, err 729 } 730 return b[:n], nil 731 } 732 } 733 func (m *CommitSig) XXX_Merge(src proto.Message) { 734 xxx_messageInfo_CommitSig.Merge(m, src) 735 } 736 func (m *CommitSig) XXX_Size() int { 737 return m.Size() 738 } 739 func (m *CommitSig) XXX_DiscardUnknown() { 740 xxx_messageInfo_CommitSig.DiscardUnknown(m) 741 } 742 743 var xxx_messageInfo_CommitSig proto.InternalMessageInfo 744 745 func (m *CommitSig) GetBlockIdFlag() BlockIDFlag { 746 if m != nil { 747 return m.BlockIdFlag 748 } 749 return BlockIDFlagUnknown 750 } 751 752 func (m *CommitSig) GetValidatorAddress() []byte { 753 if m != nil { 754 return m.ValidatorAddress 755 } 756 return nil 757 } 758 759 func (m *CommitSig) GetTimestamp() time.Time { 760 if m != nil { 761 return m.Timestamp 762 } 763 return time.Time{} 764 } 765 766 func (m *CommitSig) GetSignature() []byte { 767 if m != nil { 768 return m.Signature 769 } 770 return nil 771 } 772 773 type ExtendedCommit struct { 774 Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` 775 Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"` 776 BlockID BlockID `protobuf:"bytes,3,opt,name=block_id,json=blockId,proto3" json:"block_id"` 777 ExtendedSignatures []ExtendedCommitSig `protobuf:"bytes,4,rep,name=extended_signatures,json=extendedSignatures,proto3" json:"extended_signatures"` 778 } 779 780 func (m *ExtendedCommit) Reset() { *m = ExtendedCommit{} } 781 func (m *ExtendedCommit) String() string { return proto.CompactTextString(m) } 782 func (*ExtendedCommit) ProtoMessage() {} 783 func (*ExtendedCommit) Descriptor() ([]byte, []int) { 784 return fileDescriptor_d3a6e55e2345de56, []int{9} 785 } 786 func (m *ExtendedCommit) XXX_Unmarshal(b []byte) error { 787 return m.Unmarshal(b) 788 } 789 func (m *ExtendedCommit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 790 if deterministic { 791 return xxx_messageInfo_ExtendedCommit.Marshal(b, m, deterministic) 792 } else { 793 b = b[:cap(b)] 794 n, err := m.MarshalToSizedBuffer(b) 795 if err != nil { 796 return nil, err 797 } 798 return b[:n], nil 799 } 800 } 801 func (m *ExtendedCommit) XXX_Merge(src proto.Message) { 802 xxx_messageInfo_ExtendedCommit.Merge(m, src) 803 } 804 func (m *ExtendedCommit) XXX_Size() int { 805 return m.Size() 806 } 807 func (m *ExtendedCommit) XXX_DiscardUnknown() { 808 xxx_messageInfo_ExtendedCommit.DiscardUnknown(m) 809 } 810 811 var xxx_messageInfo_ExtendedCommit proto.InternalMessageInfo 812 813 func (m *ExtendedCommit) GetHeight() int64 { 814 if m != nil { 815 return m.Height 816 } 817 return 0 818 } 819 820 func (m *ExtendedCommit) GetRound() int32 { 821 if m != nil { 822 return m.Round 823 } 824 return 0 825 } 826 827 func (m *ExtendedCommit) GetBlockID() BlockID { 828 if m != nil { 829 return m.BlockID 830 } 831 return BlockID{} 832 } 833 834 func (m *ExtendedCommit) GetExtendedSignatures() []ExtendedCommitSig { 835 if m != nil { 836 return m.ExtendedSignatures 837 } 838 return nil 839 } 840 841 // ExtendedCommitSig retains all the same fields as CommitSig but adds vote 842 // extension-related fields. 843 type ExtendedCommitSig struct { 844 BlockIdFlag BlockIDFlag `protobuf:"varint,1,opt,name=block_id_flag,json=blockIdFlag,proto3,enum=seitendermint.types.BlockIDFlag" json:"block_id_flag,omitempty"` 845 ValidatorAddress []byte `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` 846 Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,proto3,stdtime" json:"timestamp"` 847 Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` 848 // Vote extension data 849 Extension []byte `protobuf:"bytes,5,opt,name=extension,proto3" json:"extension,omitempty"` 850 // Vote extension signature 851 ExtensionSignature []byte `protobuf:"bytes,6,opt,name=extension_signature,json=extensionSignature,proto3" json:"extension_signature,omitempty"` 852 } 853 854 func (m *ExtendedCommitSig) Reset() { *m = ExtendedCommitSig{} } 855 func (m *ExtendedCommitSig) String() string { return proto.CompactTextString(m) } 856 func (*ExtendedCommitSig) ProtoMessage() {} 857 func (*ExtendedCommitSig) Descriptor() ([]byte, []int) { 858 return fileDescriptor_d3a6e55e2345de56, []int{10} 859 } 860 func (m *ExtendedCommitSig) XXX_Unmarshal(b []byte) error { 861 return m.Unmarshal(b) 862 } 863 func (m *ExtendedCommitSig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 864 if deterministic { 865 return xxx_messageInfo_ExtendedCommitSig.Marshal(b, m, deterministic) 866 } else { 867 b = b[:cap(b)] 868 n, err := m.MarshalToSizedBuffer(b) 869 if err != nil { 870 return nil, err 871 } 872 return b[:n], nil 873 } 874 } 875 func (m *ExtendedCommitSig) XXX_Merge(src proto.Message) { 876 xxx_messageInfo_ExtendedCommitSig.Merge(m, src) 877 } 878 func (m *ExtendedCommitSig) XXX_Size() int { 879 return m.Size() 880 } 881 func (m *ExtendedCommitSig) XXX_DiscardUnknown() { 882 xxx_messageInfo_ExtendedCommitSig.DiscardUnknown(m) 883 } 884 885 var xxx_messageInfo_ExtendedCommitSig proto.InternalMessageInfo 886 887 func (m *ExtendedCommitSig) GetBlockIdFlag() BlockIDFlag { 888 if m != nil { 889 return m.BlockIdFlag 890 } 891 return BlockIDFlagUnknown 892 } 893 894 func (m *ExtendedCommitSig) GetValidatorAddress() []byte { 895 if m != nil { 896 return m.ValidatorAddress 897 } 898 return nil 899 } 900 901 func (m *ExtendedCommitSig) GetTimestamp() time.Time { 902 if m != nil { 903 return m.Timestamp 904 } 905 return time.Time{} 906 } 907 908 func (m *ExtendedCommitSig) GetSignature() []byte { 909 if m != nil { 910 return m.Signature 911 } 912 return nil 913 } 914 915 func (m *ExtendedCommitSig) GetExtension() []byte { 916 if m != nil { 917 return m.Extension 918 } 919 return nil 920 } 921 922 func (m *ExtendedCommitSig) GetExtensionSignature() []byte { 923 if m != nil { 924 return m.ExtensionSignature 925 } 926 return nil 927 } 928 929 type Proposal struct { 930 Type SignedMsgType `protobuf:"varint,1,opt,name=type,proto3,enum=seitendermint.types.SignedMsgType" json:"type,omitempty"` 931 Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` 932 Round int32 `protobuf:"varint,3,opt,name=round,proto3" json:"round,omitempty"` 933 PolRound int32 `protobuf:"varint,4,opt,name=pol_round,json=polRound,proto3" json:"pol_round,omitempty"` 934 BlockID BlockID `protobuf:"bytes,5,opt,name=block_id,json=blockId,proto3" json:"block_id"` 935 Timestamp time.Time `protobuf:"bytes,6,opt,name=timestamp,proto3,stdtime" json:"timestamp"` 936 Signature []byte `protobuf:"bytes,7,opt,name=signature,proto3" json:"signature,omitempty"` 937 TxKeys []*TxKey `protobuf:"bytes,8,rep,name=tx_keys,json=txKeys,proto3" json:"tx_keys,omitempty"` 938 Evidence *EvidenceList `protobuf:"bytes,9,opt,name=evidence,proto3" json:"evidence,omitempty"` 939 LastCommit *Commit `protobuf:"bytes,10,opt,name=last_commit,json=lastCommit,proto3" json:"last_commit,omitempty"` 940 Header Header `protobuf:"bytes,11,opt,name=header,proto3" json:"header"` 941 ProposerAddress []byte `protobuf:"bytes,12,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` 942 } 943 944 func (m *Proposal) Reset() { *m = Proposal{} } 945 func (m *Proposal) String() string { return proto.CompactTextString(m) } 946 func (*Proposal) ProtoMessage() {} 947 func (*Proposal) Descriptor() ([]byte, []int) { 948 return fileDescriptor_d3a6e55e2345de56, []int{11} 949 } 950 func (m *Proposal) XXX_Unmarshal(b []byte) error { 951 return m.Unmarshal(b) 952 } 953 func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 954 if deterministic { 955 return xxx_messageInfo_Proposal.Marshal(b, m, deterministic) 956 } else { 957 b = b[:cap(b)] 958 n, err := m.MarshalToSizedBuffer(b) 959 if err != nil { 960 return nil, err 961 } 962 return b[:n], nil 963 } 964 } 965 func (m *Proposal) XXX_Merge(src proto.Message) { 966 xxx_messageInfo_Proposal.Merge(m, src) 967 } 968 func (m *Proposal) XXX_Size() int { 969 return m.Size() 970 } 971 func (m *Proposal) XXX_DiscardUnknown() { 972 xxx_messageInfo_Proposal.DiscardUnknown(m) 973 } 974 975 var xxx_messageInfo_Proposal proto.InternalMessageInfo 976 977 func (m *Proposal) GetType() SignedMsgType { 978 if m != nil { 979 return m.Type 980 } 981 return UnknownType 982 } 983 984 func (m *Proposal) GetHeight() int64 { 985 if m != nil { 986 return m.Height 987 } 988 return 0 989 } 990 991 func (m *Proposal) GetRound() int32 { 992 if m != nil { 993 return m.Round 994 } 995 return 0 996 } 997 998 func (m *Proposal) GetPolRound() int32 { 999 if m != nil { 1000 return m.PolRound 1001 } 1002 return 0 1003 } 1004 1005 func (m *Proposal) GetBlockID() BlockID { 1006 if m != nil { 1007 return m.BlockID 1008 } 1009 return BlockID{} 1010 } 1011 1012 func (m *Proposal) GetTimestamp() time.Time { 1013 if m != nil { 1014 return m.Timestamp 1015 } 1016 return time.Time{} 1017 } 1018 1019 func (m *Proposal) GetSignature() []byte { 1020 if m != nil { 1021 return m.Signature 1022 } 1023 return nil 1024 } 1025 1026 func (m *Proposal) GetTxKeys() []*TxKey { 1027 if m != nil { 1028 return m.TxKeys 1029 } 1030 return nil 1031 } 1032 1033 func (m *Proposal) GetEvidence() *EvidenceList { 1034 if m != nil { 1035 return m.Evidence 1036 } 1037 return nil 1038 } 1039 1040 func (m *Proposal) GetLastCommit() *Commit { 1041 if m != nil { 1042 return m.LastCommit 1043 } 1044 return nil 1045 } 1046 1047 func (m *Proposal) GetHeader() Header { 1048 if m != nil { 1049 return m.Header 1050 } 1051 return Header{} 1052 } 1053 1054 func (m *Proposal) GetProposerAddress() []byte { 1055 if m != nil { 1056 return m.ProposerAddress 1057 } 1058 return nil 1059 } 1060 1061 type SignedHeader struct { 1062 Header *Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` 1063 Commit *Commit `protobuf:"bytes,2,opt,name=commit,proto3" json:"commit,omitempty"` 1064 } 1065 1066 func (m *SignedHeader) Reset() { *m = SignedHeader{} } 1067 func (m *SignedHeader) String() string { return proto.CompactTextString(m) } 1068 func (*SignedHeader) ProtoMessage() {} 1069 func (*SignedHeader) Descriptor() ([]byte, []int) { 1070 return fileDescriptor_d3a6e55e2345de56, []int{12} 1071 } 1072 func (m *SignedHeader) XXX_Unmarshal(b []byte) error { 1073 return m.Unmarshal(b) 1074 } 1075 func (m *SignedHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1076 if deterministic { 1077 return xxx_messageInfo_SignedHeader.Marshal(b, m, deterministic) 1078 } else { 1079 b = b[:cap(b)] 1080 n, err := m.MarshalToSizedBuffer(b) 1081 if err != nil { 1082 return nil, err 1083 } 1084 return b[:n], nil 1085 } 1086 } 1087 func (m *SignedHeader) XXX_Merge(src proto.Message) { 1088 xxx_messageInfo_SignedHeader.Merge(m, src) 1089 } 1090 func (m *SignedHeader) XXX_Size() int { 1091 return m.Size() 1092 } 1093 func (m *SignedHeader) XXX_DiscardUnknown() { 1094 xxx_messageInfo_SignedHeader.DiscardUnknown(m) 1095 } 1096 1097 var xxx_messageInfo_SignedHeader proto.InternalMessageInfo 1098 1099 func (m *SignedHeader) GetHeader() *Header { 1100 if m != nil { 1101 return m.Header 1102 } 1103 return nil 1104 } 1105 1106 func (m *SignedHeader) GetCommit() *Commit { 1107 if m != nil { 1108 return m.Commit 1109 } 1110 return nil 1111 } 1112 1113 type LightBlock struct { 1114 SignedHeader *SignedHeader `protobuf:"bytes,1,opt,name=signed_header,json=signedHeader,proto3" json:"signed_header,omitempty"` 1115 ValidatorSet *ValidatorSet `protobuf:"bytes,2,opt,name=validator_set,json=validatorSet,proto3" json:"validator_set,omitempty"` 1116 } 1117 1118 func (m *LightBlock) Reset() { *m = LightBlock{} } 1119 func (m *LightBlock) String() string { return proto.CompactTextString(m) } 1120 func (*LightBlock) ProtoMessage() {} 1121 func (*LightBlock) Descriptor() ([]byte, []int) { 1122 return fileDescriptor_d3a6e55e2345de56, []int{13} 1123 } 1124 func (m *LightBlock) XXX_Unmarshal(b []byte) error { 1125 return m.Unmarshal(b) 1126 } 1127 func (m *LightBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1128 if deterministic { 1129 return xxx_messageInfo_LightBlock.Marshal(b, m, deterministic) 1130 } else { 1131 b = b[:cap(b)] 1132 n, err := m.MarshalToSizedBuffer(b) 1133 if err != nil { 1134 return nil, err 1135 } 1136 return b[:n], nil 1137 } 1138 } 1139 func (m *LightBlock) XXX_Merge(src proto.Message) { 1140 xxx_messageInfo_LightBlock.Merge(m, src) 1141 } 1142 func (m *LightBlock) XXX_Size() int { 1143 return m.Size() 1144 } 1145 func (m *LightBlock) XXX_DiscardUnknown() { 1146 xxx_messageInfo_LightBlock.DiscardUnknown(m) 1147 } 1148 1149 var xxx_messageInfo_LightBlock proto.InternalMessageInfo 1150 1151 func (m *LightBlock) GetSignedHeader() *SignedHeader { 1152 if m != nil { 1153 return m.SignedHeader 1154 } 1155 return nil 1156 } 1157 1158 func (m *LightBlock) GetValidatorSet() *ValidatorSet { 1159 if m != nil { 1160 return m.ValidatorSet 1161 } 1162 return nil 1163 } 1164 1165 type BlockMeta struct { 1166 BlockID BlockID `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id"` 1167 BlockSize int64 `protobuf:"varint,2,opt,name=block_size,json=blockSize,proto3" json:"block_size,omitempty"` 1168 Header Header `protobuf:"bytes,3,opt,name=header,proto3" json:"header"` 1169 NumTxs int64 `protobuf:"varint,4,opt,name=num_txs,json=numTxs,proto3" json:"num_txs,omitempty"` 1170 } 1171 1172 func (m *BlockMeta) Reset() { *m = BlockMeta{} } 1173 func (m *BlockMeta) String() string { return proto.CompactTextString(m) } 1174 func (*BlockMeta) ProtoMessage() {} 1175 func (*BlockMeta) Descriptor() ([]byte, []int) { 1176 return fileDescriptor_d3a6e55e2345de56, []int{14} 1177 } 1178 func (m *BlockMeta) XXX_Unmarshal(b []byte) error { 1179 return m.Unmarshal(b) 1180 } 1181 func (m *BlockMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1182 if deterministic { 1183 return xxx_messageInfo_BlockMeta.Marshal(b, m, deterministic) 1184 } else { 1185 b = b[:cap(b)] 1186 n, err := m.MarshalToSizedBuffer(b) 1187 if err != nil { 1188 return nil, err 1189 } 1190 return b[:n], nil 1191 } 1192 } 1193 func (m *BlockMeta) XXX_Merge(src proto.Message) { 1194 xxx_messageInfo_BlockMeta.Merge(m, src) 1195 } 1196 func (m *BlockMeta) XXX_Size() int { 1197 return m.Size() 1198 } 1199 func (m *BlockMeta) XXX_DiscardUnknown() { 1200 xxx_messageInfo_BlockMeta.DiscardUnknown(m) 1201 } 1202 1203 var xxx_messageInfo_BlockMeta proto.InternalMessageInfo 1204 1205 func (m *BlockMeta) GetBlockID() BlockID { 1206 if m != nil { 1207 return m.BlockID 1208 } 1209 return BlockID{} 1210 } 1211 1212 func (m *BlockMeta) GetBlockSize() int64 { 1213 if m != nil { 1214 return m.BlockSize 1215 } 1216 return 0 1217 } 1218 1219 func (m *BlockMeta) GetHeader() Header { 1220 if m != nil { 1221 return m.Header 1222 } 1223 return Header{} 1224 } 1225 1226 func (m *BlockMeta) GetNumTxs() int64 { 1227 if m != nil { 1228 return m.NumTxs 1229 } 1230 return 0 1231 } 1232 1233 // TxProof represents a Merkle proof of the presence of a transaction in the 1234 // Merkle tree. 1235 type TxProof struct { 1236 RootHash []byte `protobuf:"bytes,1,opt,name=root_hash,json=rootHash,proto3" json:"root_hash,omitempty"` 1237 Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` 1238 Proof *crypto.Proof `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"` 1239 } 1240 1241 func (m *TxProof) Reset() { *m = TxProof{} } 1242 func (m *TxProof) String() string { return proto.CompactTextString(m) } 1243 func (*TxProof) ProtoMessage() {} 1244 func (*TxProof) Descriptor() ([]byte, []int) { 1245 return fileDescriptor_d3a6e55e2345de56, []int{15} 1246 } 1247 func (m *TxProof) XXX_Unmarshal(b []byte) error { 1248 return m.Unmarshal(b) 1249 } 1250 func (m *TxProof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1251 if deterministic { 1252 return xxx_messageInfo_TxProof.Marshal(b, m, deterministic) 1253 } else { 1254 b = b[:cap(b)] 1255 n, err := m.MarshalToSizedBuffer(b) 1256 if err != nil { 1257 return nil, err 1258 } 1259 return b[:n], nil 1260 } 1261 } 1262 func (m *TxProof) XXX_Merge(src proto.Message) { 1263 xxx_messageInfo_TxProof.Merge(m, src) 1264 } 1265 func (m *TxProof) XXX_Size() int { 1266 return m.Size() 1267 } 1268 func (m *TxProof) XXX_DiscardUnknown() { 1269 xxx_messageInfo_TxProof.DiscardUnknown(m) 1270 } 1271 1272 var xxx_messageInfo_TxProof proto.InternalMessageInfo 1273 1274 func (m *TxProof) GetRootHash() []byte { 1275 if m != nil { 1276 return m.RootHash 1277 } 1278 return nil 1279 } 1280 1281 func (m *TxProof) GetData() []byte { 1282 if m != nil { 1283 return m.Data 1284 } 1285 return nil 1286 } 1287 1288 func (m *TxProof) GetProof() *crypto.Proof { 1289 if m != nil { 1290 return m.Proof 1291 } 1292 return nil 1293 } 1294 1295 type Evidence struct { 1296 // Types that are valid to be assigned to Sum: 1297 // 1298 // *Evidence_DuplicateVoteEvidence 1299 // *Evidence_LightClientAttackEvidence 1300 Sum isEvidence_Sum `protobuf_oneof:"sum"` 1301 } 1302 1303 func (m *Evidence) Reset() { *m = Evidence{} } 1304 func (m *Evidence) String() string { return proto.CompactTextString(m) } 1305 func (*Evidence) ProtoMessage() {} 1306 func (*Evidence) Descriptor() ([]byte, []int) { 1307 return fileDescriptor_d3a6e55e2345de56, []int{16} 1308 } 1309 func (m *Evidence) XXX_Unmarshal(b []byte) error { 1310 return m.Unmarshal(b) 1311 } 1312 func (m *Evidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1313 if deterministic { 1314 return xxx_messageInfo_Evidence.Marshal(b, m, deterministic) 1315 } else { 1316 b = b[:cap(b)] 1317 n, err := m.MarshalToSizedBuffer(b) 1318 if err != nil { 1319 return nil, err 1320 } 1321 return b[:n], nil 1322 } 1323 } 1324 func (m *Evidence) XXX_Merge(src proto.Message) { 1325 xxx_messageInfo_Evidence.Merge(m, src) 1326 } 1327 func (m *Evidence) XXX_Size() int { 1328 return m.Size() 1329 } 1330 func (m *Evidence) XXX_DiscardUnknown() { 1331 xxx_messageInfo_Evidence.DiscardUnknown(m) 1332 } 1333 1334 var xxx_messageInfo_Evidence proto.InternalMessageInfo 1335 1336 type isEvidence_Sum interface { 1337 isEvidence_Sum() 1338 MarshalTo([]byte) (int, error) 1339 Size() int 1340 } 1341 1342 type Evidence_DuplicateVoteEvidence struct { 1343 DuplicateVoteEvidence *DuplicateVoteEvidence `protobuf:"bytes,1,opt,name=duplicate_vote_evidence,json=duplicateVoteEvidence,proto3,oneof" json:"duplicate_vote_evidence,omitempty"` 1344 } 1345 type Evidence_LightClientAttackEvidence struct { 1346 LightClientAttackEvidence *LightClientAttackEvidence `protobuf:"bytes,2,opt,name=light_client_attack_evidence,json=lightClientAttackEvidence,proto3,oneof" json:"light_client_attack_evidence,omitempty"` 1347 } 1348 1349 func (*Evidence_DuplicateVoteEvidence) isEvidence_Sum() {} 1350 func (*Evidence_LightClientAttackEvidence) isEvidence_Sum() {} 1351 1352 func (m *Evidence) GetSum() isEvidence_Sum { 1353 if m != nil { 1354 return m.Sum 1355 } 1356 return nil 1357 } 1358 1359 func (m *Evidence) GetDuplicateVoteEvidence() *DuplicateVoteEvidence { 1360 if x, ok := m.GetSum().(*Evidence_DuplicateVoteEvidence); ok { 1361 return x.DuplicateVoteEvidence 1362 } 1363 return nil 1364 } 1365 1366 func (m *Evidence) GetLightClientAttackEvidence() *LightClientAttackEvidence { 1367 if x, ok := m.GetSum().(*Evidence_LightClientAttackEvidence); ok { 1368 return x.LightClientAttackEvidence 1369 } 1370 return nil 1371 } 1372 1373 // XXX_OneofWrappers is for the internal use of the proto package. 1374 func (*Evidence) XXX_OneofWrappers() []interface{} { 1375 return []interface{}{ 1376 (*Evidence_DuplicateVoteEvidence)(nil), 1377 (*Evidence_LightClientAttackEvidence)(nil), 1378 } 1379 } 1380 1381 // DuplicateVoteEvidence contains evidence of a validator signed two conflicting 1382 // votes. 1383 type DuplicateVoteEvidence struct { 1384 VoteA *Vote `protobuf:"bytes,1,opt,name=vote_a,json=voteA,proto3" json:"vote_a,omitempty"` 1385 VoteB *Vote `protobuf:"bytes,2,opt,name=vote_b,json=voteB,proto3" json:"vote_b,omitempty"` 1386 TotalVotingPower int64 `protobuf:"varint,3,opt,name=total_voting_power,json=totalVotingPower,proto3" json:"total_voting_power,omitempty"` 1387 ValidatorPower int64 `protobuf:"varint,4,opt,name=validator_power,json=validatorPower,proto3" json:"validator_power,omitempty"` 1388 Timestamp time.Time `protobuf:"bytes,5,opt,name=timestamp,proto3,stdtime" json:"timestamp"` 1389 } 1390 1391 func (m *DuplicateVoteEvidence) Reset() { *m = DuplicateVoteEvidence{} } 1392 func (m *DuplicateVoteEvidence) String() string { return proto.CompactTextString(m) } 1393 func (*DuplicateVoteEvidence) ProtoMessage() {} 1394 func (*DuplicateVoteEvidence) Descriptor() ([]byte, []int) { 1395 return fileDescriptor_d3a6e55e2345de56, []int{17} 1396 } 1397 func (m *DuplicateVoteEvidence) XXX_Unmarshal(b []byte) error { 1398 return m.Unmarshal(b) 1399 } 1400 func (m *DuplicateVoteEvidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1401 if deterministic { 1402 return xxx_messageInfo_DuplicateVoteEvidence.Marshal(b, m, deterministic) 1403 } else { 1404 b = b[:cap(b)] 1405 n, err := m.MarshalToSizedBuffer(b) 1406 if err != nil { 1407 return nil, err 1408 } 1409 return b[:n], nil 1410 } 1411 } 1412 func (m *DuplicateVoteEvidence) XXX_Merge(src proto.Message) { 1413 xxx_messageInfo_DuplicateVoteEvidence.Merge(m, src) 1414 } 1415 func (m *DuplicateVoteEvidence) XXX_Size() int { 1416 return m.Size() 1417 } 1418 func (m *DuplicateVoteEvidence) XXX_DiscardUnknown() { 1419 xxx_messageInfo_DuplicateVoteEvidence.DiscardUnknown(m) 1420 } 1421 1422 var xxx_messageInfo_DuplicateVoteEvidence proto.InternalMessageInfo 1423 1424 func (m *DuplicateVoteEvidence) GetVoteA() *Vote { 1425 if m != nil { 1426 return m.VoteA 1427 } 1428 return nil 1429 } 1430 1431 func (m *DuplicateVoteEvidence) GetVoteB() *Vote { 1432 if m != nil { 1433 return m.VoteB 1434 } 1435 return nil 1436 } 1437 1438 func (m *DuplicateVoteEvidence) GetTotalVotingPower() int64 { 1439 if m != nil { 1440 return m.TotalVotingPower 1441 } 1442 return 0 1443 } 1444 1445 func (m *DuplicateVoteEvidence) GetValidatorPower() int64 { 1446 if m != nil { 1447 return m.ValidatorPower 1448 } 1449 return 0 1450 } 1451 1452 func (m *DuplicateVoteEvidence) GetTimestamp() time.Time { 1453 if m != nil { 1454 return m.Timestamp 1455 } 1456 return time.Time{} 1457 } 1458 1459 // LightClientAttackEvidence contains evidence of a set of validators attempting 1460 // to mislead a light client. 1461 type LightClientAttackEvidence struct { 1462 ConflictingBlock *LightBlock `protobuf:"bytes,1,opt,name=conflicting_block,json=conflictingBlock,proto3" json:"conflicting_block,omitempty"` 1463 CommonHeight int64 `protobuf:"varint,2,opt,name=common_height,json=commonHeight,proto3" json:"common_height,omitempty"` 1464 ByzantineValidators []*Validator `protobuf:"bytes,3,rep,name=byzantine_validators,json=byzantineValidators,proto3" json:"byzantine_validators,omitempty"` 1465 TotalVotingPower int64 `protobuf:"varint,4,opt,name=total_voting_power,json=totalVotingPower,proto3" json:"total_voting_power,omitempty"` 1466 Timestamp time.Time `protobuf:"bytes,5,opt,name=timestamp,proto3,stdtime" json:"timestamp"` 1467 } 1468 1469 func (m *LightClientAttackEvidence) Reset() { *m = LightClientAttackEvidence{} } 1470 func (m *LightClientAttackEvidence) String() string { return proto.CompactTextString(m) } 1471 func (*LightClientAttackEvidence) ProtoMessage() {} 1472 func (*LightClientAttackEvidence) Descriptor() ([]byte, []int) { 1473 return fileDescriptor_d3a6e55e2345de56, []int{18} 1474 } 1475 func (m *LightClientAttackEvidence) XXX_Unmarshal(b []byte) error { 1476 return m.Unmarshal(b) 1477 } 1478 func (m *LightClientAttackEvidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1479 if deterministic { 1480 return xxx_messageInfo_LightClientAttackEvidence.Marshal(b, m, deterministic) 1481 } else { 1482 b = b[:cap(b)] 1483 n, err := m.MarshalToSizedBuffer(b) 1484 if err != nil { 1485 return nil, err 1486 } 1487 return b[:n], nil 1488 } 1489 } 1490 func (m *LightClientAttackEvidence) XXX_Merge(src proto.Message) { 1491 xxx_messageInfo_LightClientAttackEvidence.Merge(m, src) 1492 } 1493 func (m *LightClientAttackEvidence) XXX_Size() int { 1494 return m.Size() 1495 } 1496 func (m *LightClientAttackEvidence) XXX_DiscardUnknown() { 1497 xxx_messageInfo_LightClientAttackEvidence.DiscardUnknown(m) 1498 } 1499 1500 var xxx_messageInfo_LightClientAttackEvidence proto.InternalMessageInfo 1501 1502 func (m *LightClientAttackEvidence) GetConflictingBlock() *LightBlock { 1503 if m != nil { 1504 return m.ConflictingBlock 1505 } 1506 return nil 1507 } 1508 1509 func (m *LightClientAttackEvidence) GetCommonHeight() int64 { 1510 if m != nil { 1511 return m.CommonHeight 1512 } 1513 return 0 1514 } 1515 1516 func (m *LightClientAttackEvidence) GetByzantineValidators() []*Validator { 1517 if m != nil { 1518 return m.ByzantineValidators 1519 } 1520 return nil 1521 } 1522 1523 func (m *LightClientAttackEvidence) GetTotalVotingPower() int64 { 1524 if m != nil { 1525 return m.TotalVotingPower 1526 } 1527 return 0 1528 } 1529 1530 func (m *LightClientAttackEvidence) GetTimestamp() time.Time { 1531 if m != nil { 1532 return m.Timestamp 1533 } 1534 return time.Time{} 1535 } 1536 1537 type EvidenceList struct { 1538 Evidence []Evidence `protobuf:"bytes,1,rep,name=evidence,proto3" json:"evidence"` 1539 } 1540 1541 func (m *EvidenceList) Reset() { *m = EvidenceList{} } 1542 func (m *EvidenceList) String() string { return proto.CompactTextString(m) } 1543 func (*EvidenceList) ProtoMessage() {} 1544 func (*EvidenceList) Descriptor() ([]byte, []int) { 1545 return fileDescriptor_d3a6e55e2345de56, []int{19} 1546 } 1547 func (m *EvidenceList) XXX_Unmarshal(b []byte) error { 1548 return m.Unmarshal(b) 1549 } 1550 func (m *EvidenceList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1551 if deterministic { 1552 return xxx_messageInfo_EvidenceList.Marshal(b, m, deterministic) 1553 } else { 1554 b = b[:cap(b)] 1555 n, err := m.MarshalToSizedBuffer(b) 1556 if err != nil { 1557 return nil, err 1558 } 1559 return b[:n], nil 1560 } 1561 } 1562 func (m *EvidenceList) XXX_Merge(src proto.Message) { 1563 xxx_messageInfo_EvidenceList.Merge(m, src) 1564 } 1565 func (m *EvidenceList) XXX_Size() int { 1566 return m.Size() 1567 } 1568 func (m *EvidenceList) XXX_DiscardUnknown() { 1569 xxx_messageInfo_EvidenceList.DiscardUnknown(m) 1570 } 1571 1572 var xxx_messageInfo_EvidenceList proto.InternalMessageInfo 1573 1574 func (m *EvidenceList) GetEvidence() []Evidence { 1575 if m != nil { 1576 return m.Evidence 1577 } 1578 return nil 1579 } 1580 1581 func init() { 1582 proto.RegisterEnum("seitendermint.types.BlockIDFlag", BlockIDFlag_name, BlockIDFlag_value) 1583 proto.RegisterEnum("seitendermint.types.SignedMsgType", SignedMsgType_name, SignedMsgType_value) 1584 proto.RegisterType((*PartSetHeader)(nil), "seitendermint.types.PartSetHeader") 1585 proto.RegisterType((*Part)(nil), "seitendermint.types.Part") 1586 proto.RegisterType((*BlockID)(nil), "seitendermint.types.BlockID") 1587 proto.RegisterType((*Header)(nil), "seitendermint.types.Header") 1588 proto.RegisterType((*Data)(nil), "seitendermint.types.Data") 1589 proto.RegisterType((*TxKey)(nil), "seitendermint.types.TxKey") 1590 proto.RegisterType((*Vote)(nil), "seitendermint.types.Vote") 1591 proto.RegisterType((*Commit)(nil), "seitendermint.types.Commit") 1592 proto.RegisterType((*CommitSig)(nil), "seitendermint.types.CommitSig") 1593 proto.RegisterType((*ExtendedCommit)(nil), "seitendermint.types.ExtendedCommit") 1594 proto.RegisterType((*ExtendedCommitSig)(nil), "seitendermint.types.ExtendedCommitSig") 1595 proto.RegisterType((*Proposal)(nil), "seitendermint.types.Proposal") 1596 proto.RegisterType((*SignedHeader)(nil), "seitendermint.types.SignedHeader") 1597 proto.RegisterType((*LightBlock)(nil), "seitendermint.types.LightBlock") 1598 proto.RegisterType((*BlockMeta)(nil), "seitendermint.types.BlockMeta") 1599 proto.RegisterType((*TxProof)(nil), "seitendermint.types.TxProof") 1600 proto.RegisterType((*Evidence)(nil), "seitendermint.types.Evidence") 1601 proto.RegisterType((*DuplicateVoteEvidence)(nil), "seitendermint.types.DuplicateVoteEvidence") 1602 proto.RegisterType((*LightClientAttackEvidence)(nil), "seitendermint.types.LightClientAttackEvidence") 1603 proto.RegisterType((*EvidenceList)(nil), "seitendermint.types.EvidenceList") 1604 } 1605 1606 func init() { proto.RegisterFile("tendermint/types/types.proto", fileDescriptor_d3a6e55e2345de56) } 1607 1608 var fileDescriptor_d3a6e55e2345de56 = []byte{ 1609 // 1767 bytes of a gzipped FileDescriptorProto 1610 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0x4f, 0x6f, 0x23, 0x49, 1611 0x15, 0x4f, 0xfb, 0xbf, 0x9f, 0xed, 0xc4, 0xa9, 0x49, 0x76, 0x1c, 0xcf, 0x8c, 0xe3, 0xf5, 0x8a, 1612 0x25, 0x3b, 0xec, 0x3a, 0xb3, 0x19, 0x09, 0x58, 0x01, 0x82, 0x38, 0xc9, 0x4c, 0xa2, 0xc9, 0x1f, 1613 0xd3, 0xf6, 0x0c, 0x02, 0x09, 0xb5, 0xda, 0xee, 0x1a, 0xa7, 0x15, 0xbb, 0xbb, 0xe9, 0x2e, 0x67, 1614 0x9d, 0xf9, 0x04, 0x28, 0xa7, 0x3d, 0x71, 0x22, 0x27, 0x38, 0xf0, 0x0d, 0x38, 0x71, 0x45, 0x73, 1615 0x5c, 0xc4, 0x01, 0x4e, 0xcb, 0x6a, 0xe6, 0x80, 0x84, 0xf8, 0x10, 0xa8, 0x5e, 0x55, 0xb7, 0xbb, 1616 0x93, 0x76, 0x66, 0x60, 0x22, 0x90, 0xb8, 0x44, 0xae, 0xf7, 0x7e, 0xaf, 0xea, 0xfd, 0xf9, 0xd5, 1617 0xab, 0xd7, 0x81, 0xbb, 0x8c, 0x5a, 0x06, 0x75, 0x47, 0xa6, 0xc5, 0xd6, 0xd9, 0x99, 0x43, 0x3d, 1618 0xf1, 0xb7, 0xe9, 0xb8, 0x36, 0xb3, 0xc9, 0x2d, 0x8f, 0x9a, 0x53, 0x40, 0x13, 0x55, 0xd5, 0xa5, 1619 0x81, 0x3d, 0xb0, 0x51, 0xbf, 0xce, 0x7f, 0x09, 0x68, 0x75, 0x75, 0x60, 0xdb, 0x83, 0x21, 0x5d, 1620 0xc7, 0x55, 0x6f, 0xfc, 0x7c, 0x9d, 0x99, 0x23, 0xea, 0x31, 0x7d, 0xe4, 0x48, 0xc0, 0xbd, 0xd0, 1621 0x49, 0x7d, 0xf7, 0xcc, 0x61, 0x36, 0xc7, 0xda, 0xcf, 0xa5, 0xba, 0x16, 0x52, 0x9f, 0x52, 0xd7, 1622 0x33, 0x6d, 0x2b, 0xec, 0x4a, 0xb5, 0x7e, 0xc5, 0xd1, 0x53, 0x7d, 0x68, 0x1a, 0x3a, 0xb3, 0x5d, 1623 0x81, 0x68, 0x7c, 0x06, 0xa5, 0xb6, 0xee, 0xb2, 0x0e, 0x65, 0xbb, 0x54, 0x37, 0xa8, 0x4b, 0x96, 1624 0x20, 0xcd, 0x6c, 0xa6, 0x0f, 0x2b, 0x4a, 0x5d, 0x59, 0x2b, 0xa9, 0x62, 0x41, 0x08, 0xa4, 0x8e, 1625 0x75, 0xef, 0xb8, 0x92, 0xa8, 0x2b, 0x6b, 0x45, 0x15, 0x7f, 0x37, 0x4e, 0x20, 0xc5, 0x4d, 0xb9, 1626 0x85, 0x69, 0x19, 0x74, 0xe2, 0x5b, 0xe0, 0x82, 0x4b, 0x7b, 0x67, 0x8c, 0x7a, 0xd2, 0x44, 0x2c, 1627 0xc8, 0x77, 0x20, 0x8d, 0xfe, 0x57, 0x92, 0x75, 0x65, 0xad, 0xb0, 0x71, 0xa7, 0x19, 0xcd, 0x95, 1628 0x08, 0xb1, 0xd9, 0xe6, 0x90, 0x56, 0xea, 0xe5, 0x57, 0xab, 0x73, 0xaa, 0xc0, 0x37, 0x6c, 0xc8, 1629 0xb6, 0x86, 0x76, 0xff, 0x64, 0x6f, 0x3b, 0xf0, 0x45, 0x99, 0xfa, 0x42, 0xda, 0xb0, 0xe0, 0xe8, 1630 0x2e, 0xd3, 0x3c, 0xca, 0xb4, 0x63, 0x0c, 0x04, 0xcf, 0x2d, 0x6c, 0x34, 0x9a, 0x31, 0xd5, 0x68, 1631 0x46, 0x42, 0x96, 0x07, 0x95, 0x9c, 0xb0, 0xb0, 0xf1, 0xcf, 0x14, 0x64, 0x64, 0x4a, 0x7e, 0x04, 1632 0x59, 0x99, 0x5c, 0x3c, 0xb3, 0xb0, 0x51, 0xbf, 0xb4, 0xa9, 0xd4, 0x36, 0xb7, 0x6c, 0xcb, 0xa3, 1633 0x96, 0x37, 0xf6, 0xe4, 0x96, 0xbe, 0x19, 0xf9, 0x10, 0x72, 0xfd, 0x63, 0xdd, 0xb4, 0x34, 0xd3, 1634 0x40, 0xbf, 0xf2, 0xad, 0xc2, 0xab, 0xaf, 0x56, 0xb3, 0x5b, 0x5c, 0xb6, 0xb7, 0xad, 0x66, 0x51, 1635 0xb9, 0x67, 0x90, 0xf7, 0x20, 0x73, 0x4c, 0xcd, 0xc1, 0x31, 0xc3, 0xfc, 0x24, 0x55, 0xb9, 0x22, 1636 0xdf, 0x85, 0x14, 0x67, 0x46, 0x25, 0x85, 0xc7, 0x57, 0x9b, 0x82, 0x36, 0x4d, 0x9f, 0x36, 0xcd, 1637 0xae, 0x4f, 0x9b, 0x56, 0x8e, 0x1f, 0xfc, 0xc5, 0xdf, 0x56, 0x15, 0x15, 0x2d, 0xc8, 0x23, 0x28, 1638 0x0d, 0x75, 0x8f, 0x69, 0x3d, 0x9e, 0x3c, 0x7e, 0x7c, 0x1a, 0xb7, 0xb8, 0x1b, 0x9b, 0x16, 0x99, 1639 0x61, 0xe9, 0x7d, 0x81, 0x1b, 0x0a, 0x91, 0x41, 0xd6, 0xa0, 0x8c, 0xfb, 0xf4, 0xed, 0xd1, 0xc8, 1640 0x64, 0x1a, 0x16, 0x20, 0x83, 0x05, 0x98, 0xe7, 0xf2, 0x2d, 0x14, 0xef, 0xf2, 0x52, 0xdc, 0x81, 1641 0xbc, 0xa1, 0x33, 0x5d, 0x40, 0xb2, 0x08, 0xc9, 0x71, 0x01, 0x2a, 0xbf, 0x09, 0x0b, 0x01, 0x03, 1642 0x3d, 0x01, 0xc9, 0x89, 0x5d, 0xa6, 0x62, 0x04, 0x3e, 0x80, 0x25, 0x8b, 0x4e, 0x98, 0x76, 0x19, 1643 0x9d, 0x47, 0x34, 0xe1, 0xba, 0x67, 0x51, 0x8b, 0x6f, 0xc0, 0x7c, 0xdf, 0xcf, 0xbf, 0xc0, 0x02, 1644 0x62, 0x4b, 0x81, 0x14, 0x61, 0x2b, 0x90, 0xd3, 0x1d, 0x47, 0x00, 0x0a, 0x08, 0xc8, 0xea, 0x8e, 1645 0x83, 0xaa, 0xfb, 0xb0, 0x88, 0x31, 0xba, 0xd4, 0x1b, 0x0f, 0x99, 0xdc, 0xa4, 0x88, 0x98, 0x05, 1646 0xae, 0x50, 0x85, 0x1c, 0xb1, 0x1f, 0x40, 0x89, 0x9e, 0x9a, 0x06, 0xb5, 0xfa, 0x54, 0xe0, 0x4a, 1647 0x88, 0x2b, 0xfa, 0x42, 0x04, 0x7d, 0x04, 0x65, 0xc7, 0xb5, 0x1d, 0xdb, 0xa3, 0xae, 0xa6, 0x1b, 1648 0x86, 0x4b, 0x3d, 0xaf, 0x32, 0x2f, 0xf6, 0xf3, 0xe5, 0x9b, 0x42, 0xdc, 0xa8, 0x40, 0x6a, 0x5b, 1649 0x67, 0x3a, 0x29, 0x43, 0x92, 0x4d, 0xbc, 0x8a, 0x52, 0x4f, 0xae, 0x15, 0x55, 0xfe, 0xb3, 0x51, 1650 0x83, 0x74, 0x77, 0xf2, 0x84, 0x9e, 0x91, 0x65, 0xc8, 0xb0, 0x89, 0x76, 0x42, 0xcf, 0x24, 0xf3, 1651 0xd3, 0x8c, 0x8b, 0x1b, 0x7f, 0x48, 0x42, 0xea, 0x99, 0xcd, 0x28, 0xf9, 0x36, 0xa4, 0x78, 0x19, 1652 0x51, 0x3b, 0x3f, 0x83, 0xf8, 0x1d, 0x73, 0x60, 0x51, 0xe3, 0xc0, 0x1b, 0x74, 0xcf, 0x1c, 0xaa, 1653 0x22, 0x3e, 0x44, 0xba, 0x44, 0x84, 0x74, 0x4b, 0x90, 0x76, 0xed, 0xb1, 0x65, 0x20, 0x17, 0xd3, 1654 0xaa, 0x58, 0x90, 0x5d, 0xc8, 0x05, 0x5c, 0x4a, 0xbd, 0x05, 0x97, 0x16, 0x38, 0x97, 0x38, 0xd9, 1655 0xa5, 0x40, 0xcd, 0xf6, 0x24, 0xa5, 0x5a, 0x90, 0x0f, 0xda, 0x9d, 0xa4, 0xe5, 0xdb, 0x31, 0x7b, 1656 0x6a, 0x46, 0xbe, 0x05, 0x8b, 0x01, 0x43, 0x82, 0x14, 0x0b, 0x5e, 0x96, 0x03, 0x85, 0xcc, 0x71, 1657 0x84, 0x7c, 0x9a, 0x68, 0x59, 0x59, 0x0c, 0x6d, 0x4a, 0xbe, 0x3d, 0xec, 0x5d, 0x77, 0x21, 0xef, 1658 0x99, 0x03, 0x4b, 0x67, 0x63, 0x97, 0x4a, 0x7e, 0x4e, 0x05, 0x5c, 0x4b, 0x27, 0x8c, 0x5a, 0xd8, 1659 0x10, 0x04, 0x1f, 0xa7, 0x02, 0xb2, 0x0e, 0xb7, 0x82, 0x85, 0x36, 0xdd, 0x45, 0x70, 0x91, 0x04, 1660 0xaa, 0x8e, 0xaf, 0x69, 0xfc, 0x51, 0x81, 0x8c, 0xb8, 0x3e, 0xa1, 0x4a, 0x28, 0xf1, 0x95, 0x48, 1661 0xcc, 0xaa, 0x44, 0xf2, 0x9d, 0x2a, 0xb1, 0x0d, 0x10, 0x78, 0xea, 0x55, 0x52, 0xf5, 0xe4, 0x5a, 1662 0x61, 0xa3, 0x16, 0xbb, 0x97, 0x70, 0xb4, 0x63, 0x0e, 0x64, 0x8f, 0x08, 0xd9, 0x35, 0xbe, 0x56, 1663 0x20, 0x1f, 0xe8, 0xc9, 0x36, 0x94, 0x7c, 0xef, 0xb4, 0xe7, 0x43, 0x7d, 0x20, 0x69, 0x59, 0xbf, 1664 0xce, 0xc5, 0x47, 0x43, 0x7d, 0xa0, 0x16, 0xa4, 0x57, 0x7c, 0x11, 0x5f, 0xdf, 0xc4, 0x8c, 0xfa, 1665 0x46, 0x08, 0x95, 0xfc, 0xcf, 0x08, 0x15, 0x29, 0x7d, 0xea, 0x52, 0xe9, 0x1b, 0x7f, 0x57, 0x60, 1666 0x7e, 0x67, 0x82, 0xee, 0x1b, 0xff, 0xe3, 0x9a, 0xfd, 0x5c, 0xf2, 0xcc, 0xa0, 0x86, 0x76, 0xa5, 1667 0x78, 0x1f, 0xc6, 0x6e, 0x1a, 0xf5, 0x7c, 0x5a, 0x44, 0xe2, 0x6f, 0xd4, 0x99, 0x16, 0xf3, 0xf7, 1668 0x09, 0x58, 0xbc, 0x82, 0xff, 0xbf, 0x2c, 0x6a, 0xf4, 0x3e, 0xa7, 0xdf, 0xf2, 0x3e, 0x67, 0x66, 1669 0xde, 0xe7, 0x3f, 0xa5, 0x20, 0xd7, 0xc6, 0xee, 0xae, 0x0f, 0xff, 0x4b, 0x3d, 0xf9, 0x0e, 0xe4, 1670 0x1d, 0x7b, 0xa8, 0x09, 0x4d, 0x0a, 0x35, 0x39, 0xc7, 0x1e, 0xaa, 0x57, 0x28, 0x97, 0xbe, 0xb9, 1671 0x86, 0x9d, 0xb9, 0x81, 0x52, 0x64, 0x2f, 0x97, 0xe2, 0x21, 0x64, 0xc5, 0x13, 0xe7, 0x55, 0x72, 1672 0x48, 0xe4, 0x6a, 0xac, 0xab, 0xf8, 0x1e, 0xaa, 0x19, 0x7c, 0xff, 0x3c, 0xf2, 0x03, 0xc8, 0xf9, 1673 0xaf, 0x2e, 0xb6, 0xe3, 0xc2, 0xc6, 0xfb, 0xf1, 0xf4, 0x97, 0xa0, 0x7d, 0xd3, 0x63, 0x6a, 0x60, 1674 0x42, 0xbe, 0x0f, 0x85, 0xd0, 0x64, 0x83, 0x8d, 0xfa, 0xea, 0x60, 0x1a, 0xee, 0x7e, 0x2a, 0x4c, 1675 0x27, 0x1e, 0xf2, 0x19, 0x2f, 0x14, 0xce, 0x9b, 0x85, 0x6b, 0x0c, 0x23, 0x83, 0xa6, 0x34, 0x88, 1676 0x9d, 0x0e, 0x8a, 0xf1, 0xd3, 0xc1, 0x04, 0x8a, 0x82, 0x25, 0x72, 0x22, 0x7d, 0x18, 0x9c, 0xaa, 1677 0xbc, 0xf1, 0xd4, 0xe0, 0xbc, 0x87, 0x90, 0x91, 0x31, 0x26, 0xde, 0x1c, 0xa3, 0x84, 0x36, 0x7e, 1678 0xad, 0x00, 0xec, 0x73, 0xea, 0x21, 0x1b, 0xf8, 0x38, 0xe9, 0xa1, 0x23, 0x5a, 0xe4, 0xfc, 0xf7, 1679 0xaf, 0x21, 0xb6, 0xf4, 0xa2, 0xe8, 0x85, 0x03, 0x78, 0x04, 0xa5, 0x69, 0x0b, 0xf0, 0xa8, 0xef, 1680 0x52, 0xfc, 0x3e, 0xc1, 0xa0, 0xd7, 0xa1, 0x4c, 0x2d, 0x9e, 0x86, 0x56, 0x8d, 0x97, 0x0a, 0xe4, 1681 0xd1, 0xb3, 0x03, 0xca, 0xf4, 0x08, 0xd5, 0x95, 0x77, 0xa2, 0xfa, 0x3d, 0x00, 0xb1, 0x93, 0x67, 1682 0xbe, 0xa0, 0xf2, 0x0e, 0xe6, 0x51, 0xd2, 0x31, 0x5f, 0xd0, 0x50, 0xd5, 0x93, 0xff, 0x6e, 0xd5, 1683 0x6f, 0x43, 0xd6, 0x1a, 0x8f, 0x34, 0x3e, 0xe4, 0xa5, 0xc4, 0xd5, 0xb6, 0xc6, 0xa3, 0xee, 0xc4, 1684 0x6b, 0x8c, 0x20, 0xdb, 0x9d, 0xe0, 0x97, 0x0f, 0xbf, 0xcf, 0xae, 0x6d, 0xcb, 0x29, 0x5b, 0x0c, 1685 0x7b, 0x39, 0x2e, 0xc0, 0xa1, 0x92, 0x40, 0x8a, 0x8f, 0xd3, 0xfe, 0xa7, 0x18, 0xff, 0x4d, 0x3e, 1686 0x7d, 0xfb, 0xcf, 0x2a, 0xff, 0x83, 0xea, 0x1f, 0x0a, 0xe4, 0xfc, 0x1b, 0x41, 0x0c, 0xb8, 0x6d, 1687 0x8c, 0x9d, 0xa1, 0xd9, 0xd7, 0x19, 0xd5, 0x4e, 0x6d, 0x46, 0xb5, 0xe0, 0x46, 0x89, 0x3c, 0xde, 1688 0x8f, 0x0d, 0x70, 0xdb, 0xb7, 0xe1, 0xf3, 0xa7, 0xbf, 0xd9, 0xee, 0x9c, 0xba, 0x6c, 0xc4, 0x29, 1689 0xc8, 0x2f, 0xe0, 0xee, 0x90, 0x53, 0x49, 0xeb, 0x0f, 0x4d, 0x6a, 0x31, 0x4d, 0x67, 0x4c, 0xef, 1690 0x9f, 0x4c, 0x8f, 0x12, 0x1c, 0x68, 0xc6, 0x1e, 0x85, 0x1c, 0xdc, 0x42, 0xbb, 0x4d, 0x34, 0x0b, 1691 0x1d, 0xb7, 0x32, 0x9c, 0xa5, 0x6c, 0xa5, 0x21, 0xe9, 0x8d, 0x47, 0x8d, 0x5f, 0x25, 0x60, 0x39, 1692 0xd6, 0x59, 0xf2, 0x00, 0x32, 0x18, 0xaf, 0x2e, 0x03, 0x5d, 0x89, 0x67, 0xa0, 0xcd, 0xa8, 0x9a, 1693 0xe6, 0xc0, 0xcd, 0xc0, 0xa2, 0x27, 0xfd, 0x7d, 0x93, 0x45, 0x8b, 0x7c, 0x0c, 0x04, 0xbf, 0xa2, 1694 0x79, 0x66, 0x4d, 0x6b, 0xa0, 0x39, 0xf6, 0xe7, 0x92, 0x39, 0x49, 0xb5, 0x8c, 0x9a, 0x67, 0xa8, 1695 0x68, 0x73, 0x79, 0x74, 0x4a, 0x15, 0x50, 0x41, 0x94, 0xe9, 0x94, 0x2a, 0x80, 0x37, 0x30, 0x3f, 1696 0x37, 0xfe, 0x9c, 0x80, 0x95, 0x99, 0xa9, 0x25, 0xfb, 0xb0, 0xd8, 0xb7, 0xad, 0xe7, 0x43, 0xb3, 1697 0x8f, 0x7e, 0x23, 0xff, 0x65, 0x9e, 0x56, 0x67, 0x57, 0x09, 0x2f, 0x93, 0x5a, 0x0e, 0x59, 0x8a, 1698 0xde, 0xf1, 0x01, 0x94, 0x78, 0x53, 0xb1, 0x2d, 0x2d, 0xf2, 0xb4, 0x15, 0x85, 0x70, 0x57, 0x3c, 1699 0x70, 0x3f, 0x86, 0xa5, 0xde, 0xd9, 0x0b, 0xdd, 0x62, 0xa6, 0x45, 0x43, 0x1f, 0x7f, 0x95, 0xe4, 1700 0x35, 0x43, 0x69, 0xd0, 0x1f, 0xd4, 0x5b, 0x81, 0xed, 0xf4, 0xe3, 0x70, 0x46, 0xfa, 0x53, 0x33, 1701 0xd2, 0x7f, 0x13, 0x59, 0x3d, 0x82, 0x62, 0xf8, 0xb1, 0x21, 0x3f, 0x0c, 0xbd, 0x50, 0x0a, 0x06, 1702 0x72, 0xef, 0xda, 0x17, 0x4a, 0xb6, 0x8c, 0xc0, 0xe8, 0xfe, 0x5f, 0x14, 0x28, 0x84, 0xc6, 0x29, 1703 0xf2, 0x29, 0x2c, 0xb7, 0xf6, 0x8f, 0xb6, 0x9e, 0x68, 0x7b, 0xdb, 0xda, 0xa3, 0xfd, 0xcd, 0xc7, 1704 0xda, 0xd3, 0xc3, 0x27, 0x87, 0x47, 0x3f, 0x39, 0x2c, 0xcf, 0x55, 0xdf, 0x3b, 0xbf, 0xa8, 0x93, 1705 0x10, 0xf6, 0xa9, 0x75, 0x62, 0xd9, 0x9f, 0xf3, 0x39, 0x66, 0x29, 0x6a, 0xb2, 0xd9, 0xea, 0xec, 1706 0x1c, 0x76, 0xcb, 0x4a, 0x75, 0xf9, 0xfc, 0xa2, 0xbe, 0x18, 0xb2, 0xd8, 0xec, 0x79, 0xd4, 0x62, 1707 0x57, 0x0d, 0xb6, 0x8e, 0x0e, 0x0e, 0xf6, 0xba, 0xe5, 0xc4, 0x15, 0x03, 0xf9, 0x14, 0x7e, 0x04, 1708 0x8b, 0x51, 0x83, 0xc3, 0xbd, 0xfd, 0x72, 0xb2, 0x4a, 0xce, 0x2f, 0xea, 0xf3, 0x21, 0xf4, 0xa1, 1709 0x39, 0xac, 0xe6, 0x7e, 0xf9, 0x9b, 0xda, 0xdc, 0xef, 0x7e, 0x5b, 0x53, 0x78, 0x64, 0xa5, 0xc8, 1710 0x00, 0x44, 0x3e, 0x86, 0xdb, 0x9d, 0xbd, 0xc7, 0x87, 0x3b, 0xdb, 0xda, 0x41, 0xe7, 0xb1, 0xd6, 1711 0xfd, 0x69, 0x7b, 0x27, 0x14, 0xdd, 0xc2, 0xf9, 0x45, 0xbd, 0x20, 0x43, 0x9a, 0x85, 0x6e, 0xab, 1712 0x3b, 0xcf, 0x8e, 0xba, 0x3b, 0x65, 0x45, 0xa0, 0xdb, 0x2e, 0xe5, 0xd7, 0x10, 0xd1, 0x0f, 0x60, 1713 0x25, 0x06, 0x1d, 0x04, 0xb6, 0x78, 0x7e, 0x51, 0x2f, 0xb5, 0x5d, 0x2a, 0xde, 0x3e, 0xb4, 0x68, 1714 0x42, 0xe5, 0xaa, 0xc5, 0x51, 0xfb, 0xa8, 0xb3, 0xb9, 0x5f, 0xae, 0x57, 0xcb, 0xe7, 0x17, 0xf5, 1715 0xa2, 0x3f, 0xec, 0x71, 0xfc, 0x34, 0xb2, 0xd6, 0xd3, 0x97, 0xaf, 0x6a, 0xca, 0x97, 0xaf, 0x6a, 1716 0xca, 0xd7, 0xaf, 0x6a, 0xca, 0x17, 0xaf, 0x6b, 0x73, 0x5f, 0xbe, 0xae, 0xcd, 0xfd, 0xf5, 0x75, 1717 0x6d, 0xee, 0x67, 0xdf, 0x1b, 0x98, 0xec, 0x78, 0xdc, 0x6b, 0xf6, 0xed, 0xd1, 0xba, 0xee, 0x9a, 1718 0x9f, 0xe8, 0x56, 0xff, 0xd8, 0x76, 0xd7, 0x3d, 0x6a, 0x7e, 0x12, 0xfa, 0x7f, 0x9d, 0xf8, 0x67, 1719 0xe1, 0xe5, 0x7f, 0xe0, 0xf5, 0x32, 0x28, 0x7f, 0xf8, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xec, 1720 0x3d, 0xa3, 0xa7, 0x84, 0x14, 0x00, 0x00, 1721 } 1722 1723 func (m *PartSetHeader) Marshal() (dAtA []byte, err error) { 1724 size := m.Size() 1725 dAtA = make([]byte, size) 1726 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1727 if err != nil { 1728 return nil, err 1729 } 1730 return dAtA[:n], nil 1731 } 1732 1733 func (m *PartSetHeader) MarshalTo(dAtA []byte) (int, error) { 1734 size := m.Size() 1735 return m.MarshalToSizedBuffer(dAtA[:size]) 1736 } 1737 1738 func (m *PartSetHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1739 i := len(dAtA) 1740 _ = i 1741 var l int 1742 _ = l 1743 if len(m.Hash) > 0 { 1744 i -= len(m.Hash) 1745 copy(dAtA[i:], m.Hash) 1746 i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) 1747 i-- 1748 dAtA[i] = 0x12 1749 } 1750 if m.Total != 0 { 1751 i = encodeVarintTypes(dAtA, i, uint64(m.Total)) 1752 i-- 1753 dAtA[i] = 0x8 1754 } 1755 return len(dAtA) - i, nil 1756 } 1757 1758 func (m *Part) Marshal() (dAtA []byte, err error) { 1759 size := m.Size() 1760 dAtA = make([]byte, size) 1761 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1762 if err != nil { 1763 return nil, err 1764 } 1765 return dAtA[:n], nil 1766 } 1767 1768 func (m *Part) MarshalTo(dAtA []byte) (int, error) { 1769 size := m.Size() 1770 return m.MarshalToSizedBuffer(dAtA[:size]) 1771 } 1772 1773 func (m *Part) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1774 i := len(dAtA) 1775 _ = i 1776 var l int 1777 _ = l 1778 { 1779 size, err := m.Proof.MarshalToSizedBuffer(dAtA[:i]) 1780 if err != nil { 1781 return 0, err 1782 } 1783 i -= size 1784 i = encodeVarintTypes(dAtA, i, uint64(size)) 1785 } 1786 i-- 1787 dAtA[i] = 0x1a 1788 if len(m.Bytes) > 0 { 1789 i -= len(m.Bytes) 1790 copy(dAtA[i:], m.Bytes) 1791 i = encodeVarintTypes(dAtA, i, uint64(len(m.Bytes))) 1792 i-- 1793 dAtA[i] = 0x12 1794 } 1795 if m.Index != 0 { 1796 i = encodeVarintTypes(dAtA, i, uint64(m.Index)) 1797 i-- 1798 dAtA[i] = 0x8 1799 } 1800 return len(dAtA) - i, nil 1801 } 1802 1803 func (m *BlockID) Marshal() (dAtA []byte, err error) { 1804 size := m.Size() 1805 dAtA = make([]byte, size) 1806 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1807 if err != nil { 1808 return nil, err 1809 } 1810 return dAtA[:n], nil 1811 } 1812 1813 func (m *BlockID) MarshalTo(dAtA []byte) (int, error) { 1814 size := m.Size() 1815 return m.MarshalToSizedBuffer(dAtA[:size]) 1816 } 1817 1818 func (m *BlockID) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1819 i := len(dAtA) 1820 _ = i 1821 var l int 1822 _ = l 1823 { 1824 size, err := m.PartSetHeader.MarshalToSizedBuffer(dAtA[:i]) 1825 if err != nil { 1826 return 0, err 1827 } 1828 i -= size 1829 i = encodeVarintTypes(dAtA, i, uint64(size)) 1830 } 1831 i-- 1832 dAtA[i] = 0x12 1833 if len(m.Hash) > 0 { 1834 i -= len(m.Hash) 1835 copy(dAtA[i:], m.Hash) 1836 i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) 1837 i-- 1838 dAtA[i] = 0xa 1839 } 1840 return len(dAtA) - i, nil 1841 } 1842 1843 func (m *Header) Marshal() (dAtA []byte, err error) { 1844 size := m.Size() 1845 dAtA = make([]byte, size) 1846 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1847 if err != nil { 1848 return nil, err 1849 } 1850 return dAtA[:n], nil 1851 } 1852 1853 func (m *Header) MarshalTo(dAtA []byte) (int, error) { 1854 size := m.Size() 1855 return m.MarshalToSizedBuffer(dAtA[:size]) 1856 } 1857 1858 func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1859 i := len(dAtA) 1860 _ = i 1861 var l int 1862 _ = l 1863 if len(m.ProposerAddress) > 0 { 1864 i -= len(m.ProposerAddress) 1865 copy(dAtA[i:], m.ProposerAddress) 1866 i = encodeVarintTypes(dAtA, i, uint64(len(m.ProposerAddress))) 1867 i-- 1868 dAtA[i] = 0x72 1869 } 1870 if len(m.EvidenceHash) > 0 { 1871 i -= len(m.EvidenceHash) 1872 copy(dAtA[i:], m.EvidenceHash) 1873 i = encodeVarintTypes(dAtA, i, uint64(len(m.EvidenceHash))) 1874 i-- 1875 dAtA[i] = 0x6a 1876 } 1877 if len(m.LastResultsHash) > 0 { 1878 i -= len(m.LastResultsHash) 1879 copy(dAtA[i:], m.LastResultsHash) 1880 i = encodeVarintTypes(dAtA, i, uint64(len(m.LastResultsHash))) 1881 i-- 1882 dAtA[i] = 0x62 1883 } 1884 if len(m.AppHash) > 0 { 1885 i -= len(m.AppHash) 1886 copy(dAtA[i:], m.AppHash) 1887 i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash))) 1888 i-- 1889 dAtA[i] = 0x5a 1890 } 1891 if len(m.ConsensusHash) > 0 { 1892 i -= len(m.ConsensusHash) 1893 copy(dAtA[i:], m.ConsensusHash) 1894 i = encodeVarintTypes(dAtA, i, uint64(len(m.ConsensusHash))) 1895 i-- 1896 dAtA[i] = 0x52 1897 } 1898 if len(m.NextValidatorsHash) > 0 { 1899 i -= len(m.NextValidatorsHash) 1900 copy(dAtA[i:], m.NextValidatorsHash) 1901 i = encodeVarintTypes(dAtA, i, uint64(len(m.NextValidatorsHash))) 1902 i-- 1903 dAtA[i] = 0x4a 1904 } 1905 if len(m.ValidatorsHash) > 0 { 1906 i -= len(m.ValidatorsHash) 1907 copy(dAtA[i:], m.ValidatorsHash) 1908 i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorsHash))) 1909 i-- 1910 dAtA[i] = 0x42 1911 } 1912 if len(m.DataHash) > 0 { 1913 i -= len(m.DataHash) 1914 copy(dAtA[i:], m.DataHash) 1915 i = encodeVarintTypes(dAtA, i, uint64(len(m.DataHash))) 1916 i-- 1917 dAtA[i] = 0x3a 1918 } 1919 if len(m.LastCommitHash) > 0 { 1920 i -= len(m.LastCommitHash) 1921 copy(dAtA[i:], m.LastCommitHash) 1922 i = encodeVarintTypes(dAtA, i, uint64(len(m.LastCommitHash))) 1923 i-- 1924 dAtA[i] = 0x32 1925 } 1926 { 1927 size, err := m.LastBlockId.MarshalToSizedBuffer(dAtA[:i]) 1928 if err != nil { 1929 return 0, err 1930 } 1931 i -= size 1932 i = encodeVarintTypes(dAtA, i, uint64(size)) 1933 } 1934 i-- 1935 dAtA[i] = 0x2a 1936 n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) 1937 if err4 != nil { 1938 return 0, err4 1939 } 1940 i -= n4 1941 i = encodeVarintTypes(dAtA, i, uint64(n4)) 1942 i-- 1943 dAtA[i] = 0x22 1944 if m.Height != 0 { 1945 i = encodeVarintTypes(dAtA, i, uint64(m.Height)) 1946 i-- 1947 dAtA[i] = 0x18 1948 } 1949 if len(m.ChainID) > 0 { 1950 i -= len(m.ChainID) 1951 copy(dAtA[i:], m.ChainID) 1952 i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainID))) 1953 i-- 1954 dAtA[i] = 0x12 1955 } 1956 { 1957 size, err := m.Version.MarshalToSizedBuffer(dAtA[:i]) 1958 if err != nil { 1959 return 0, err 1960 } 1961 i -= size 1962 i = encodeVarintTypes(dAtA, i, uint64(size)) 1963 } 1964 i-- 1965 dAtA[i] = 0xa 1966 return len(dAtA) - i, nil 1967 } 1968 1969 func (m *Data) Marshal() (dAtA []byte, err error) { 1970 size := m.Size() 1971 dAtA = make([]byte, size) 1972 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1973 if err != nil { 1974 return nil, err 1975 } 1976 return dAtA[:n], nil 1977 } 1978 1979 func (m *Data) MarshalTo(dAtA []byte) (int, error) { 1980 size := m.Size() 1981 return m.MarshalToSizedBuffer(dAtA[:size]) 1982 } 1983 1984 func (m *Data) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1985 i := len(dAtA) 1986 _ = i 1987 var l int 1988 _ = l 1989 if len(m.Txs) > 0 { 1990 for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- { 1991 i -= len(m.Txs[iNdEx]) 1992 copy(dAtA[i:], m.Txs[iNdEx]) 1993 i = encodeVarintTypes(dAtA, i, uint64(len(m.Txs[iNdEx]))) 1994 i-- 1995 dAtA[i] = 0xa 1996 } 1997 } 1998 return len(dAtA) - i, nil 1999 } 2000 2001 func (m *TxKey) Marshal() (dAtA []byte, err error) { 2002 size := m.Size() 2003 dAtA = make([]byte, size) 2004 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2005 if err != nil { 2006 return nil, err 2007 } 2008 return dAtA[:n], nil 2009 } 2010 2011 func (m *TxKey) MarshalTo(dAtA []byte) (int, error) { 2012 size := m.Size() 2013 return m.MarshalToSizedBuffer(dAtA[:size]) 2014 } 2015 2016 func (m *TxKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2017 i := len(dAtA) 2018 _ = i 2019 var l int 2020 _ = l 2021 if len(m.TxKey) > 0 { 2022 i -= len(m.TxKey) 2023 copy(dAtA[i:], m.TxKey) 2024 i = encodeVarintTypes(dAtA, i, uint64(len(m.TxKey))) 2025 i-- 2026 dAtA[i] = 0xa 2027 } 2028 return len(dAtA) - i, nil 2029 } 2030 2031 func (m *Vote) Marshal() (dAtA []byte, err error) { 2032 size := m.Size() 2033 dAtA = make([]byte, size) 2034 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2035 if err != nil { 2036 return nil, err 2037 } 2038 return dAtA[:n], nil 2039 } 2040 2041 func (m *Vote) MarshalTo(dAtA []byte) (int, error) { 2042 size := m.Size() 2043 return m.MarshalToSizedBuffer(dAtA[:size]) 2044 } 2045 2046 func (m *Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2047 i := len(dAtA) 2048 _ = i 2049 var l int 2050 _ = l 2051 if len(m.ExtensionSignature) > 0 { 2052 i -= len(m.ExtensionSignature) 2053 copy(dAtA[i:], m.ExtensionSignature) 2054 i = encodeVarintTypes(dAtA, i, uint64(len(m.ExtensionSignature))) 2055 i-- 2056 dAtA[i] = 0x52 2057 } 2058 if len(m.Extension) > 0 { 2059 i -= len(m.Extension) 2060 copy(dAtA[i:], m.Extension) 2061 i = encodeVarintTypes(dAtA, i, uint64(len(m.Extension))) 2062 i-- 2063 dAtA[i] = 0x4a 2064 } 2065 if len(m.Signature) > 0 { 2066 i -= len(m.Signature) 2067 copy(dAtA[i:], m.Signature) 2068 i = encodeVarintTypes(dAtA, i, uint64(len(m.Signature))) 2069 i-- 2070 dAtA[i] = 0x42 2071 } 2072 if m.ValidatorIndex != 0 { 2073 i = encodeVarintTypes(dAtA, i, uint64(m.ValidatorIndex)) 2074 i-- 2075 dAtA[i] = 0x38 2076 } 2077 if len(m.ValidatorAddress) > 0 { 2078 i -= len(m.ValidatorAddress) 2079 copy(dAtA[i:], m.ValidatorAddress) 2080 i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorAddress))) 2081 i-- 2082 dAtA[i] = 0x32 2083 } 2084 n6, err6 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) 2085 if err6 != nil { 2086 return 0, err6 2087 } 2088 i -= n6 2089 i = encodeVarintTypes(dAtA, i, uint64(n6)) 2090 i-- 2091 dAtA[i] = 0x2a 2092 { 2093 size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i]) 2094 if err != nil { 2095 return 0, err 2096 } 2097 i -= size 2098 i = encodeVarintTypes(dAtA, i, uint64(size)) 2099 } 2100 i-- 2101 dAtA[i] = 0x22 2102 if m.Round != 0 { 2103 i = encodeVarintTypes(dAtA, i, uint64(m.Round)) 2104 i-- 2105 dAtA[i] = 0x18 2106 } 2107 if m.Height != 0 { 2108 i = encodeVarintTypes(dAtA, i, uint64(m.Height)) 2109 i-- 2110 dAtA[i] = 0x10 2111 } 2112 if m.Type != 0 { 2113 i = encodeVarintTypes(dAtA, i, uint64(m.Type)) 2114 i-- 2115 dAtA[i] = 0x8 2116 } 2117 return len(dAtA) - i, nil 2118 } 2119 2120 func (m *Commit) Marshal() (dAtA []byte, err error) { 2121 size := m.Size() 2122 dAtA = make([]byte, size) 2123 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2124 if err != nil { 2125 return nil, err 2126 } 2127 return dAtA[:n], nil 2128 } 2129 2130 func (m *Commit) MarshalTo(dAtA []byte) (int, error) { 2131 size := m.Size() 2132 return m.MarshalToSizedBuffer(dAtA[:size]) 2133 } 2134 2135 func (m *Commit) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2136 i := len(dAtA) 2137 _ = i 2138 var l int 2139 _ = l 2140 if len(m.Signatures) > 0 { 2141 for iNdEx := len(m.Signatures) - 1; iNdEx >= 0; iNdEx-- { 2142 { 2143 size, err := m.Signatures[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 2144 if err != nil { 2145 return 0, err 2146 } 2147 i -= size 2148 i = encodeVarintTypes(dAtA, i, uint64(size)) 2149 } 2150 i-- 2151 dAtA[i] = 0x22 2152 } 2153 } 2154 { 2155 size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i]) 2156 if err != nil { 2157 return 0, err 2158 } 2159 i -= size 2160 i = encodeVarintTypes(dAtA, i, uint64(size)) 2161 } 2162 i-- 2163 dAtA[i] = 0x1a 2164 if m.Round != 0 { 2165 i = encodeVarintTypes(dAtA, i, uint64(m.Round)) 2166 i-- 2167 dAtA[i] = 0x10 2168 } 2169 if m.Height != 0 { 2170 i = encodeVarintTypes(dAtA, i, uint64(m.Height)) 2171 i-- 2172 dAtA[i] = 0x8 2173 } 2174 return len(dAtA) - i, nil 2175 } 2176 2177 func (m *CommitSig) Marshal() (dAtA []byte, err error) { 2178 size := m.Size() 2179 dAtA = make([]byte, size) 2180 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2181 if err != nil { 2182 return nil, err 2183 } 2184 return dAtA[:n], nil 2185 } 2186 2187 func (m *CommitSig) MarshalTo(dAtA []byte) (int, error) { 2188 size := m.Size() 2189 return m.MarshalToSizedBuffer(dAtA[:size]) 2190 } 2191 2192 func (m *CommitSig) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2193 i := len(dAtA) 2194 _ = i 2195 var l int 2196 _ = l 2197 if len(m.Signature) > 0 { 2198 i -= len(m.Signature) 2199 copy(dAtA[i:], m.Signature) 2200 i = encodeVarintTypes(dAtA, i, uint64(len(m.Signature))) 2201 i-- 2202 dAtA[i] = 0x22 2203 } 2204 n9, err9 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) 2205 if err9 != nil { 2206 return 0, err9 2207 } 2208 i -= n9 2209 i = encodeVarintTypes(dAtA, i, uint64(n9)) 2210 i-- 2211 dAtA[i] = 0x1a 2212 if len(m.ValidatorAddress) > 0 { 2213 i -= len(m.ValidatorAddress) 2214 copy(dAtA[i:], m.ValidatorAddress) 2215 i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorAddress))) 2216 i-- 2217 dAtA[i] = 0x12 2218 } 2219 if m.BlockIdFlag != 0 { 2220 i = encodeVarintTypes(dAtA, i, uint64(m.BlockIdFlag)) 2221 i-- 2222 dAtA[i] = 0x8 2223 } 2224 return len(dAtA) - i, nil 2225 } 2226 2227 func (m *ExtendedCommit) Marshal() (dAtA []byte, err error) { 2228 size := m.Size() 2229 dAtA = make([]byte, size) 2230 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2231 if err != nil { 2232 return nil, err 2233 } 2234 return dAtA[:n], nil 2235 } 2236 2237 func (m *ExtendedCommit) MarshalTo(dAtA []byte) (int, error) { 2238 size := m.Size() 2239 return m.MarshalToSizedBuffer(dAtA[:size]) 2240 } 2241 2242 func (m *ExtendedCommit) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2243 i := len(dAtA) 2244 _ = i 2245 var l int 2246 _ = l 2247 if len(m.ExtendedSignatures) > 0 { 2248 for iNdEx := len(m.ExtendedSignatures) - 1; iNdEx >= 0; iNdEx-- { 2249 { 2250 size, err := m.ExtendedSignatures[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 2251 if err != nil { 2252 return 0, err 2253 } 2254 i -= size 2255 i = encodeVarintTypes(dAtA, i, uint64(size)) 2256 } 2257 i-- 2258 dAtA[i] = 0x22 2259 } 2260 } 2261 { 2262 size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i]) 2263 if err != nil { 2264 return 0, err 2265 } 2266 i -= size 2267 i = encodeVarintTypes(dAtA, i, uint64(size)) 2268 } 2269 i-- 2270 dAtA[i] = 0x1a 2271 if m.Round != 0 { 2272 i = encodeVarintTypes(dAtA, i, uint64(m.Round)) 2273 i-- 2274 dAtA[i] = 0x10 2275 } 2276 if m.Height != 0 { 2277 i = encodeVarintTypes(dAtA, i, uint64(m.Height)) 2278 i-- 2279 dAtA[i] = 0x8 2280 } 2281 return len(dAtA) - i, nil 2282 } 2283 2284 func (m *ExtendedCommitSig) Marshal() (dAtA []byte, err error) { 2285 size := m.Size() 2286 dAtA = make([]byte, size) 2287 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2288 if err != nil { 2289 return nil, err 2290 } 2291 return dAtA[:n], nil 2292 } 2293 2294 func (m *ExtendedCommitSig) MarshalTo(dAtA []byte) (int, error) { 2295 size := m.Size() 2296 return m.MarshalToSizedBuffer(dAtA[:size]) 2297 } 2298 2299 func (m *ExtendedCommitSig) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2300 i := len(dAtA) 2301 _ = i 2302 var l int 2303 _ = l 2304 if len(m.ExtensionSignature) > 0 { 2305 i -= len(m.ExtensionSignature) 2306 copy(dAtA[i:], m.ExtensionSignature) 2307 i = encodeVarintTypes(dAtA, i, uint64(len(m.ExtensionSignature))) 2308 i-- 2309 dAtA[i] = 0x32 2310 } 2311 if len(m.Extension) > 0 { 2312 i -= len(m.Extension) 2313 copy(dAtA[i:], m.Extension) 2314 i = encodeVarintTypes(dAtA, i, uint64(len(m.Extension))) 2315 i-- 2316 dAtA[i] = 0x2a 2317 } 2318 if len(m.Signature) > 0 { 2319 i -= len(m.Signature) 2320 copy(dAtA[i:], m.Signature) 2321 i = encodeVarintTypes(dAtA, i, uint64(len(m.Signature))) 2322 i-- 2323 dAtA[i] = 0x22 2324 } 2325 n11, err11 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) 2326 if err11 != nil { 2327 return 0, err11 2328 } 2329 i -= n11 2330 i = encodeVarintTypes(dAtA, i, uint64(n11)) 2331 i-- 2332 dAtA[i] = 0x1a 2333 if len(m.ValidatorAddress) > 0 { 2334 i -= len(m.ValidatorAddress) 2335 copy(dAtA[i:], m.ValidatorAddress) 2336 i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorAddress))) 2337 i-- 2338 dAtA[i] = 0x12 2339 } 2340 if m.BlockIdFlag != 0 { 2341 i = encodeVarintTypes(dAtA, i, uint64(m.BlockIdFlag)) 2342 i-- 2343 dAtA[i] = 0x8 2344 } 2345 return len(dAtA) - i, nil 2346 } 2347 2348 func (m *Proposal) Marshal() (dAtA []byte, err error) { 2349 size := m.Size() 2350 dAtA = make([]byte, size) 2351 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2352 if err != nil { 2353 return nil, err 2354 } 2355 return dAtA[:n], nil 2356 } 2357 2358 func (m *Proposal) MarshalTo(dAtA []byte) (int, error) { 2359 size := m.Size() 2360 return m.MarshalToSizedBuffer(dAtA[:size]) 2361 } 2362 2363 func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2364 i := len(dAtA) 2365 _ = i 2366 var l int 2367 _ = l 2368 if len(m.ProposerAddress) > 0 { 2369 i -= len(m.ProposerAddress) 2370 copy(dAtA[i:], m.ProposerAddress) 2371 i = encodeVarintTypes(dAtA, i, uint64(len(m.ProposerAddress))) 2372 i-- 2373 dAtA[i] = 0x62 2374 } 2375 { 2376 size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) 2377 if err != nil { 2378 return 0, err 2379 } 2380 i -= size 2381 i = encodeVarintTypes(dAtA, i, uint64(size)) 2382 } 2383 i-- 2384 dAtA[i] = 0x5a 2385 if m.LastCommit != nil { 2386 { 2387 size, err := m.LastCommit.MarshalToSizedBuffer(dAtA[:i]) 2388 if err != nil { 2389 return 0, err 2390 } 2391 i -= size 2392 i = encodeVarintTypes(dAtA, i, uint64(size)) 2393 } 2394 i-- 2395 dAtA[i] = 0x52 2396 } 2397 if m.Evidence != nil { 2398 { 2399 size, err := m.Evidence.MarshalToSizedBuffer(dAtA[:i]) 2400 if err != nil { 2401 return 0, err 2402 } 2403 i -= size 2404 i = encodeVarintTypes(dAtA, i, uint64(size)) 2405 } 2406 i-- 2407 dAtA[i] = 0x4a 2408 } 2409 if len(m.TxKeys) > 0 { 2410 for iNdEx := len(m.TxKeys) - 1; iNdEx >= 0; iNdEx-- { 2411 { 2412 size, err := m.TxKeys[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 2413 if err != nil { 2414 return 0, err 2415 } 2416 i -= size 2417 i = encodeVarintTypes(dAtA, i, uint64(size)) 2418 } 2419 i-- 2420 dAtA[i] = 0x42 2421 } 2422 } 2423 if len(m.Signature) > 0 { 2424 i -= len(m.Signature) 2425 copy(dAtA[i:], m.Signature) 2426 i = encodeVarintTypes(dAtA, i, uint64(len(m.Signature))) 2427 i-- 2428 dAtA[i] = 0x3a 2429 } 2430 n15, err15 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) 2431 if err15 != nil { 2432 return 0, err15 2433 } 2434 i -= n15 2435 i = encodeVarintTypes(dAtA, i, uint64(n15)) 2436 i-- 2437 dAtA[i] = 0x32 2438 { 2439 size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i]) 2440 if err != nil { 2441 return 0, err 2442 } 2443 i -= size 2444 i = encodeVarintTypes(dAtA, i, uint64(size)) 2445 } 2446 i-- 2447 dAtA[i] = 0x2a 2448 if m.PolRound != 0 { 2449 i = encodeVarintTypes(dAtA, i, uint64(m.PolRound)) 2450 i-- 2451 dAtA[i] = 0x20 2452 } 2453 if m.Round != 0 { 2454 i = encodeVarintTypes(dAtA, i, uint64(m.Round)) 2455 i-- 2456 dAtA[i] = 0x18 2457 } 2458 if m.Height != 0 { 2459 i = encodeVarintTypes(dAtA, i, uint64(m.Height)) 2460 i-- 2461 dAtA[i] = 0x10 2462 } 2463 if m.Type != 0 { 2464 i = encodeVarintTypes(dAtA, i, uint64(m.Type)) 2465 i-- 2466 dAtA[i] = 0x8 2467 } 2468 return len(dAtA) - i, nil 2469 } 2470 2471 func (m *SignedHeader) Marshal() (dAtA []byte, err error) { 2472 size := m.Size() 2473 dAtA = make([]byte, size) 2474 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2475 if err != nil { 2476 return nil, err 2477 } 2478 return dAtA[:n], nil 2479 } 2480 2481 func (m *SignedHeader) MarshalTo(dAtA []byte) (int, error) { 2482 size := m.Size() 2483 return m.MarshalToSizedBuffer(dAtA[:size]) 2484 } 2485 2486 func (m *SignedHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2487 i := len(dAtA) 2488 _ = i 2489 var l int 2490 _ = l 2491 if m.Commit != nil { 2492 { 2493 size, err := m.Commit.MarshalToSizedBuffer(dAtA[:i]) 2494 if err != nil { 2495 return 0, err 2496 } 2497 i -= size 2498 i = encodeVarintTypes(dAtA, i, uint64(size)) 2499 } 2500 i-- 2501 dAtA[i] = 0x12 2502 } 2503 if m.Header != nil { 2504 { 2505 size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) 2506 if err != nil { 2507 return 0, err 2508 } 2509 i -= size 2510 i = encodeVarintTypes(dAtA, i, uint64(size)) 2511 } 2512 i-- 2513 dAtA[i] = 0xa 2514 } 2515 return len(dAtA) - i, nil 2516 } 2517 2518 func (m *LightBlock) Marshal() (dAtA []byte, err error) { 2519 size := m.Size() 2520 dAtA = make([]byte, size) 2521 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2522 if err != nil { 2523 return nil, err 2524 } 2525 return dAtA[:n], nil 2526 } 2527 2528 func (m *LightBlock) MarshalTo(dAtA []byte) (int, error) { 2529 size := m.Size() 2530 return m.MarshalToSizedBuffer(dAtA[:size]) 2531 } 2532 2533 func (m *LightBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2534 i := len(dAtA) 2535 _ = i 2536 var l int 2537 _ = l 2538 if m.ValidatorSet != nil { 2539 { 2540 size, err := m.ValidatorSet.MarshalToSizedBuffer(dAtA[:i]) 2541 if err != nil { 2542 return 0, err 2543 } 2544 i -= size 2545 i = encodeVarintTypes(dAtA, i, uint64(size)) 2546 } 2547 i-- 2548 dAtA[i] = 0x12 2549 } 2550 if m.SignedHeader != nil { 2551 { 2552 size, err := m.SignedHeader.MarshalToSizedBuffer(dAtA[:i]) 2553 if err != nil { 2554 return 0, err 2555 } 2556 i -= size 2557 i = encodeVarintTypes(dAtA, i, uint64(size)) 2558 } 2559 i-- 2560 dAtA[i] = 0xa 2561 } 2562 return len(dAtA) - i, nil 2563 } 2564 2565 func (m *BlockMeta) Marshal() (dAtA []byte, err error) { 2566 size := m.Size() 2567 dAtA = make([]byte, size) 2568 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2569 if err != nil { 2570 return nil, err 2571 } 2572 return dAtA[:n], nil 2573 } 2574 2575 func (m *BlockMeta) MarshalTo(dAtA []byte) (int, error) { 2576 size := m.Size() 2577 return m.MarshalToSizedBuffer(dAtA[:size]) 2578 } 2579 2580 func (m *BlockMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2581 i := len(dAtA) 2582 _ = i 2583 var l int 2584 _ = l 2585 if m.NumTxs != 0 { 2586 i = encodeVarintTypes(dAtA, i, uint64(m.NumTxs)) 2587 i-- 2588 dAtA[i] = 0x20 2589 } 2590 { 2591 size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) 2592 if err != nil { 2593 return 0, err 2594 } 2595 i -= size 2596 i = encodeVarintTypes(dAtA, i, uint64(size)) 2597 } 2598 i-- 2599 dAtA[i] = 0x1a 2600 if m.BlockSize != 0 { 2601 i = encodeVarintTypes(dAtA, i, uint64(m.BlockSize)) 2602 i-- 2603 dAtA[i] = 0x10 2604 } 2605 { 2606 size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i]) 2607 if err != nil { 2608 return 0, err 2609 } 2610 i -= size 2611 i = encodeVarintTypes(dAtA, i, uint64(size)) 2612 } 2613 i-- 2614 dAtA[i] = 0xa 2615 return len(dAtA) - i, nil 2616 } 2617 2618 func (m *TxProof) Marshal() (dAtA []byte, err error) { 2619 size := m.Size() 2620 dAtA = make([]byte, size) 2621 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2622 if err != nil { 2623 return nil, err 2624 } 2625 return dAtA[:n], nil 2626 } 2627 2628 func (m *TxProof) MarshalTo(dAtA []byte) (int, error) { 2629 size := m.Size() 2630 return m.MarshalToSizedBuffer(dAtA[:size]) 2631 } 2632 2633 func (m *TxProof) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2634 i := len(dAtA) 2635 _ = i 2636 var l int 2637 _ = l 2638 if m.Proof != nil { 2639 { 2640 size, err := m.Proof.MarshalToSizedBuffer(dAtA[:i]) 2641 if err != nil { 2642 return 0, err 2643 } 2644 i -= size 2645 i = encodeVarintTypes(dAtA, i, uint64(size)) 2646 } 2647 i-- 2648 dAtA[i] = 0x1a 2649 } 2650 if len(m.Data) > 0 { 2651 i -= len(m.Data) 2652 copy(dAtA[i:], m.Data) 2653 i = encodeVarintTypes(dAtA, i, uint64(len(m.Data))) 2654 i-- 2655 dAtA[i] = 0x12 2656 } 2657 if len(m.RootHash) > 0 { 2658 i -= len(m.RootHash) 2659 copy(dAtA[i:], m.RootHash) 2660 i = encodeVarintTypes(dAtA, i, uint64(len(m.RootHash))) 2661 i-- 2662 dAtA[i] = 0xa 2663 } 2664 return len(dAtA) - i, nil 2665 } 2666 2667 func (m *Evidence) Marshal() (dAtA []byte, err error) { 2668 size := m.Size() 2669 dAtA = make([]byte, size) 2670 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2671 if err != nil { 2672 return nil, err 2673 } 2674 return dAtA[:n], nil 2675 } 2676 2677 func (m *Evidence) MarshalTo(dAtA []byte) (int, error) { 2678 size := m.Size() 2679 return m.MarshalToSizedBuffer(dAtA[:size]) 2680 } 2681 2682 func (m *Evidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2683 i := len(dAtA) 2684 _ = i 2685 var l int 2686 _ = l 2687 if m.Sum != nil { 2688 { 2689 size := m.Sum.Size() 2690 i -= size 2691 if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { 2692 return 0, err 2693 } 2694 } 2695 } 2696 return len(dAtA) - i, nil 2697 } 2698 2699 func (m *Evidence_DuplicateVoteEvidence) MarshalTo(dAtA []byte) (int, error) { 2700 size := m.Size() 2701 return m.MarshalToSizedBuffer(dAtA[:size]) 2702 } 2703 2704 func (m *Evidence_DuplicateVoteEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2705 i := len(dAtA) 2706 if m.DuplicateVoteEvidence != nil { 2707 { 2708 size, err := m.DuplicateVoteEvidence.MarshalToSizedBuffer(dAtA[:i]) 2709 if err != nil { 2710 return 0, err 2711 } 2712 i -= size 2713 i = encodeVarintTypes(dAtA, i, uint64(size)) 2714 } 2715 i-- 2716 dAtA[i] = 0xa 2717 } 2718 return len(dAtA) - i, nil 2719 } 2720 func (m *Evidence_LightClientAttackEvidence) MarshalTo(dAtA []byte) (int, error) { 2721 size := m.Size() 2722 return m.MarshalToSizedBuffer(dAtA[:size]) 2723 } 2724 2725 func (m *Evidence_LightClientAttackEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2726 i := len(dAtA) 2727 if m.LightClientAttackEvidence != nil { 2728 { 2729 size, err := m.LightClientAttackEvidence.MarshalToSizedBuffer(dAtA[:i]) 2730 if err != nil { 2731 return 0, err 2732 } 2733 i -= size 2734 i = encodeVarintTypes(dAtA, i, uint64(size)) 2735 } 2736 i-- 2737 dAtA[i] = 0x12 2738 } 2739 return len(dAtA) - i, nil 2740 } 2741 func (m *DuplicateVoteEvidence) Marshal() (dAtA []byte, err error) { 2742 size := m.Size() 2743 dAtA = make([]byte, size) 2744 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2745 if err != nil { 2746 return nil, err 2747 } 2748 return dAtA[:n], nil 2749 } 2750 2751 func (m *DuplicateVoteEvidence) MarshalTo(dAtA []byte) (int, error) { 2752 size := m.Size() 2753 return m.MarshalToSizedBuffer(dAtA[:size]) 2754 } 2755 2756 func (m *DuplicateVoteEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2757 i := len(dAtA) 2758 _ = i 2759 var l int 2760 _ = l 2761 n26, err26 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) 2762 if err26 != nil { 2763 return 0, err26 2764 } 2765 i -= n26 2766 i = encodeVarintTypes(dAtA, i, uint64(n26)) 2767 i-- 2768 dAtA[i] = 0x2a 2769 if m.ValidatorPower != 0 { 2770 i = encodeVarintTypes(dAtA, i, uint64(m.ValidatorPower)) 2771 i-- 2772 dAtA[i] = 0x20 2773 } 2774 if m.TotalVotingPower != 0 { 2775 i = encodeVarintTypes(dAtA, i, uint64(m.TotalVotingPower)) 2776 i-- 2777 dAtA[i] = 0x18 2778 } 2779 if m.VoteB != nil { 2780 { 2781 size, err := m.VoteB.MarshalToSizedBuffer(dAtA[:i]) 2782 if err != nil { 2783 return 0, err 2784 } 2785 i -= size 2786 i = encodeVarintTypes(dAtA, i, uint64(size)) 2787 } 2788 i-- 2789 dAtA[i] = 0x12 2790 } 2791 if m.VoteA != nil { 2792 { 2793 size, err := m.VoteA.MarshalToSizedBuffer(dAtA[:i]) 2794 if err != nil { 2795 return 0, err 2796 } 2797 i -= size 2798 i = encodeVarintTypes(dAtA, i, uint64(size)) 2799 } 2800 i-- 2801 dAtA[i] = 0xa 2802 } 2803 return len(dAtA) - i, nil 2804 } 2805 2806 func (m *LightClientAttackEvidence) Marshal() (dAtA []byte, err error) { 2807 size := m.Size() 2808 dAtA = make([]byte, size) 2809 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2810 if err != nil { 2811 return nil, err 2812 } 2813 return dAtA[:n], nil 2814 } 2815 2816 func (m *LightClientAttackEvidence) MarshalTo(dAtA []byte) (int, error) { 2817 size := m.Size() 2818 return m.MarshalToSizedBuffer(dAtA[:size]) 2819 } 2820 2821 func (m *LightClientAttackEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2822 i := len(dAtA) 2823 _ = i 2824 var l int 2825 _ = l 2826 n29, err29 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) 2827 if err29 != nil { 2828 return 0, err29 2829 } 2830 i -= n29 2831 i = encodeVarintTypes(dAtA, i, uint64(n29)) 2832 i-- 2833 dAtA[i] = 0x2a 2834 if m.TotalVotingPower != 0 { 2835 i = encodeVarintTypes(dAtA, i, uint64(m.TotalVotingPower)) 2836 i-- 2837 dAtA[i] = 0x20 2838 } 2839 if len(m.ByzantineValidators) > 0 { 2840 for iNdEx := len(m.ByzantineValidators) - 1; iNdEx >= 0; iNdEx-- { 2841 { 2842 size, err := m.ByzantineValidators[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 2843 if err != nil { 2844 return 0, err 2845 } 2846 i -= size 2847 i = encodeVarintTypes(dAtA, i, uint64(size)) 2848 } 2849 i-- 2850 dAtA[i] = 0x1a 2851 } 2852 } 2853 if m.CommonHeight != 0 { 2854 i = encodeVarintTypes(dAtA, i, uint64(m.CommonHeight)) 2855 i-- 2856 dAtA[i] = 0x10 2857 } 2858 if m.ConflictingBlock != nil { 2859 { 2860 size, err := m.ConflictingBlock.MarshalToSizedBuffer(dAtA[:i]) 2861 if err != nil { 2862 return 0, err 2863 } 2864 i -= size 2865 i = encodeVarintTypes(dAtA, i, uint64(size)) 2866 } 2867 i-- 2868 dAtA[i] = 0xa 2869 } 2870 return len(dAtA) - i, nil 2871 } 2872 2873 func (m *EvidenceList) Marshal() (dAtA []byte, err error) { 2874 size := m.Size() 2875 dAtA = make([]byte, size) 2876 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2877 if err != nil { 2878 return nil, err 2879 } 2880 return dAtA[:n], nil 2881 } 2882 2883 func (m *EvidenceList) MarshalTo(dAtA []byte) (int, error) { 2884 size := m.Size() 2885 return m.MarshalToSizedBuffer(dAtA[:size]) 2886 } 2887 2888 func (m *EvidenceList) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2889 i := len(dAtA) 2890 _ = i 2891 var l int 2892 _ = l 2893 if len(m.Evidence) > 0 { 2894 for iNdEx := len(m.Evidence) - 1; iNdEx >= 0; iNdEx-- { 2895 { 2896 size, err := m.Evidence[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 2897 if err != nil { 2898 return 0, err 2899 } 2900 i -= size 2901 i = encodeVarintTypes(dAtA, i, uint64(size)) 2902 } 2903 i-- 2904 dAtA[i] = 0xa 2905 } 2906 } 2907 return len(dAtA) - i, nil 2908 } 2909 2910 func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { 2911 offset -= sovTypes(v) 2912 base := offset 2913 for v >= 1<<7 { 2914 dAtA[offset] = uint8(v&0x7f | 0x80) 2915 v >>= 7 2916 offset++ 2917 } 2918 dAtA[offset] = uint8(v) 2919 return base 2920 } 2921 func (m *PartSetHeader) Size() (n int) { 2922 if m == nil { 2923 return 0 2924 } 2925 var l int 2926 _ = l 2927 if m.Total != 0 { 2928 n += 1 + sovTypes(uint64(m.Total)) 2929 } 2930 l = len(m.Hash) 2931 if l > 0 { 2932 n += 1 + l + sovTypes(uint64(l)) 2933 } 2934 return n 2935 } 2936 2937 func (m *Part) Size() (n int) { 2938 if m == nil { 2939 return 0 2940 } 2941 var l int 2942 _ = l 2943 if m.Index != 0 { 2944 n += 1 + sovTypes(uint64(m.Index)) 2945 } 2946 l = len(m.Bytes) 2947 if l > 0 { 2948 n += 1 + l + sovTypes(uint64(l)) 2949 } 2950 l = m.Proof.Size() 2951 n += 1 + l + sovTypes(uint64(l)) 2952 return n 2953 } 2954 2955 func (m *BlockID) Size() (n int) { 2956 if m == nil { 2957 return 0 2958 } 2959 var l int 2960 _ = l 2961 l = len(m.Hash) 2962 if l > 0 { 2963 n += 1 + l + sovTypes(uint64(l)) 2964 } 2965 l = m.PartSetHeader.Size() 2966 n += 1 + l + sovTypes(uint64(l)) 2967 return n 2968 } 2969 2970 func (m *Header) Size() (n int) { 2971 if m == nil { 2972 return 0 2973 } 2974 var l int 2975 _ = l 2976 l = m.Version.Size() 2977 n += 1 + l + sovTypes(uint64(l)) 2978 l = len(m.ChainID) 2979 if l > 0 { 2980 n += 1 + l + sovTypes(uint64(l)) 2981 } 2982 if m.Height != 0 { 2983 n += 1 + sovTypes(uint64(m.Height)) 2984 } 2985 l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) 2986 n += 1 + l + sovTypes(uint64(l)) 2987 l = m.LastBlockId.Size() 2988 n += 1 + l + sovTypes(uint64(l)) 2989 l = len(m.LastCommitHash) 2990 if l > 0 { 2991 n += 1 + l + sovTypes(uint64(l)) 2992 } 2993 l = len(m.DataHash) 2994 if l > 0 { 2995 n += 1 + l + sovTypes(uint64(l)) 2996 } 2997 l = len(m.ValidatorsHash) 2998 if l > 0 { 2999 n += 1 + l + sovTypes(uint64(l)) 3000 } 3001 l = len(m.NextValidatorsHash) 3002 if l > 0 { 3003 n += 1 + l + sovTypes(uint64(l)) 3004 } 3005 l = len(m.ConsensusHash) 3006 if l > 0 { 3007 n += 1 + l + sovTypes(uint64(l)) 3008 } 3009 l = len(m.AppHash) 3010 if l > 0 { 3011 n += 1 + l + sovTypes(uint64(l)) 3012 } 3013 l = len(m.LastResultsHash) 3014 if l > 0 { 3015 n += 1 + l + sovTypes(uint64(l)) 3016 } 3017 l = len(m.EvidenceHash) 3018 if l > 0 { 3019 n += 1 + l + sovTypes(uint64(l)) 3020 } 3021 l = len(m.ProposerAddress) 3022 if l > 0 { 3023 n += 1 + l + sovTypes(uint64(l)) 3024 } 3025 return n 3026 } 3027 3028 func (m *Data) Size() (n int) { 3029 if m == nil { 3030 return 0 3031 } 3032 var l int 3033 _ = l 3034 if len(m.Txs) > 0 { 3035 for _, b := range m.Txs { 3036 l = len(b) 3037 n += 1 + l + sovTypes(uint64(l)) 3038 } 3039 } 3040 return n 3041 } 3042 3043 func (m *TxKey) Size() (n int) { 3044 if m == nil { 3045 return 0 3046 } 3047 var l int 3048 _ = l 3049 l = len(m.TxKey) 3050 if l > 0 { 3051 n += 1 + l + sovTypes(uint64(l)) 3052 } 3053 return n 3054 } 3055 3056 func (m *Vote) Size() (n int) { 3057 if m == nil { 3058 return 0 3059 } 3060 var l int 3061 _ = l 3062 if m.Type != 0 { 3063 n += 1 + sovTypes(uint64(m.Type)) 3064 } 3065 if m.Height != 0 { 3066 n += 1 + sovTypes(uint64(m.Height)) 3067 } 3068 if m.Round != 0 { 3069 n += 1 + sovTypes(uint64(m.Round)) 3070 } 3071 l = m.BlockID.Size() 3072 n += 1 + l + sovTypes(uint64(l)) 3073 l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) 3074 n += 1 + l + sovTypes(uint64(l)) 3075 l = len(m.ValidatorAddress) 3076 if l > 0 { 3077 n += 1 + l + sovTypes(uint64(l)) 3078 } 3079 if m.ValidatorIndex != 0 { 3080 n += 1 + sovTypes(uint64(m.ValidatorIndex)) 3081 } 3082 l = len(m.Signature) 3083 if l > 0 { 3084 n += 1 + l + sovTypes(uint64(l)) 3085 } 3086 l = len(m.Extension) 3087 if l > 0 { 3088 n += 1 + l + sovTypes(uint64(l)) 3089 } 3090 l = len(m.ExtensionSignature) 3091 if l > 0 { 3092 n += 1 + l + sovTypes(uint64(l)) 3093 } 3094 return n 3095 } 3096 3097 func (m *Commit) Size() (n int) { 3098 if m == nil { 3099 return 0 3100 } 3101 var l int 3102 _ = l 3103 if m.Height != 0 { 3104 n += 1 + sovTypes(uint64(m.Height)) 3105 } 3106 if m.Round != 0 { 3107 n += 1 + sovTypes(uint64(m.Round)) 3108 } 3109 l = m.BlockID.Size() 3110 n += 1 + l + sovTypes(uint64(l)) 3111 if len(m.Signatures) > 0 { 3112 for _, e := range m.Signatures { 3113 l = e.Size() 3114 n += 1 + l + sovTypes(uint64(l)) 3115 } 3116 } 3117 return n 3118 } 3119 3120 func (m *CommitSig) Size() (n int) { 3121 if m == nil { 3122 return 0 3123 } 3124 var l int 3125 _ = l 3126 if m.BlockIdFlag != 0 { 3127 n += 1 + sovTypes(uint64(m.BlockIdFlag)) 3128 } 3129 l = len(m.ValidatorAddress) 3130 if l > 0 { 3131 n += 1 + l + sovTypes(uint64(l)) 3132 } 3133 l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) 3134 n += 1 + l + sovTypes(uint64(l)) 3135 l = len(m.Signature) 3136 if l > 0 { 3137 n += 1 + l + sovTypes(uint64(l)) 3138 } 3139 return n 3140 } 3141 3142 func (m *ExtendedCommit) Size() (n int) { 3143 if m == nil { 3144 return 0 3145 } 3146 var l int 3147 _ = l 3148 if m.Height != 0 { 3149 n += 1 + sovTypes(uint64(m.Height)) 3150 } 3151 if m.Round != 0 { 3152 n += 1 + sovTypes(uint64(m.Round)) 3153 } 3154 l = m.BlockID.Size() 3155 n += 1 + l + sovTypes(uint64(l)) 3156 if len(m.ExtendedSignatures) > 0 { 3157 for _, e := range m.ExtendedSignatures { 3158 l = e.Size() 3159 n += 1 + l + sovTypes(uint64(l)) 3160 } 3161 } 3162 return n 3163 } 3164 3165 func (m *ExtendedCommitSig) Size() (n int) { 3166 if m == nil { 3167 return 0 3168 } 3169 var l int 3170 _ = l 3171 if m.BlockIdFlag != 0 { 3172 n += 1 + sovTypes(uint64(m.BlockIdFlag)) 3173 } 3174 l = len(m.ValidatorAddress) 3175 if l > 0 { 3176 n += 1 + l + sovTypes(uint64(l)) 3177 } 3178 l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) 3179 n += 1 + l + sovTypes(uint64(l)) 3180 l = len(m.Signature) 3181 if l > 0 { 3182 n += 1 + l + sovTypes(uint64(l)) 3183 } 3184 l = len(m.Extension) 3185 if l > 0 { 3186 n += 1 + l + sovTypes(uint64(l)) 3187 } 3188 l = len(m.ExtensionSignature) 3189 if l > 0 { 3190 n += 1 + l + sovTypes(uint64(l)) 3191 } 3192 return n 3193 } 3194 3195 func (m *Proposal) Size() (n int) { 3196 if m == nil { 3197 return 0 3198 } 3199 var l int 3200 _ = l 3201 if m.Type != 0 { 3202 n += 1 + sovTypes(uint64(m.Type)) 3203 } 3204 if m.Height != 0 { 3205 n += 1 + sovTypes(uint64(m.Height)) 3206 } 3207 if m.Round != 0 { 3208 n += 1 + sovTypes(uint64(m.Round)) 3209 } 3210 if m.PolRound != 0 { 3211 n += 1 + sovTypes(uint64(m.PolRound)) 3212 } 3213 l = m.BlockID.Size() 3214 n += 1 + l + sovTypes(uint64(l)) 3215 l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) 3216 n += 1 + l + sovTypes(uint64(l)) 3217 l = len(m.Signature) 3218 if l > 0 { 3219 n += 1 + l + sovTypes(uint64(l)) 3220 } 3221 if len(m.TxKeys) > 0 { 3222 for _, e := range m.TxKeys { 3223 l = e.Size() 3224 n += 1 + l + sovTypes(uint64(l)) 3225 } 3226 } 3227 if m.Evidence != nil { 3228 l = m.Evidence.Size() 3229 n += 1 + l + sovTypes(uint64(l)) 3230 } 3231 if m.LastCommit != nil { 3232 l = m.LastCommit.Size() 3233 n += 1 + l + sovTypes(uint64(l)) 3234 } 3235 l = m.Header.Size() 3236 n += 1 + l + sovTypes(uint64(l)) 3237 l = len(m.ProposerAddress) 3238 if l > 0 { 3239 n += 1 + l + sovTypes(uint64(l)) 3240 } 3241 return n 3242 } 3243 3244 func (m *SignedHeader) Size() (n int) { 3245 if m == nil { 3246 return 0 3247 } 3248 var l int 3249 _ = l 3250 if m.Header != nil { 3251 l = m.Header.Size() 3252 n += 1 + l + sovTypes(uint64(l)) 3253 } 3254 if m.Commit != nil { 3255 l = m.Commit.Size() 3256 n += 1 + l + sovTypes(uint64(l)) 3257 } 3258 return n 3259 } 3260 3261 func (m *LightBlock) Size() (n int) { 3262 if m == nil { 3263 return 0 3264 } 3265 var l int 3266 _ = l 3267 if m.SignedHeader != nil { 3268 l = m.SignedHeader.Size() 3269 n += 1 + l + sovTypes(uint64(l)) 3270 } 3271 if m.ValidatorSet != nil { 3272 l = m.ValidatorSet.Size() 3273 n += 1 + l + sovTypes(uint64(l)) 3274 } 3275 return n 3276 } 3277 3278 func (m *BlockMeta) Size() (n int) { 3279 if m == nil { 3280 return 0 3281 } 3282 var l int 3283 _ = l 3284 l = m.BlockID.Size() 3285 n += 1 + l + sovTypes(uint64(l)) 3286 if m.BlockSize != 0 { 3287 n += 1 + sovTypes(uint64(m.BlockSize)) 3288 } 3289 l = m.Header.Size() 3290 n += 1 + l + sovTypes(uint64(l)) 3291 if m.NumTxs != 0 { 3292 n += 1 + sovTypes(uint64(m.NumTxs)) 3293 } 3294 return n 3295 } 3296 3297 func (m *TxProof) Size() (n int) { 3298 if m == nil { 3299 return 0 3300 } 3301 var l int 3302 _ = l 3303 l = len(m.RootHash) 3304 if l > 0 { 3305 n += 1 + l + sovTypes(uint64(l)) 3306 } 3307 l = len(m.Data) 3308 if l > 0 { 3309 n += 1 + l + sovTypes(uint64(l)) 3310 } 3311 if m.Proof != nil { 3312 l = m.Proof.Size() 3313 n += 1 + l + sovTypes(uint64(l)) 3314 } 3315 return n 3316 } 3317 3318 func (m *Evidence) Size() (n int) { 3319 if m == nil { 3320 return 0 3321 } 3322 var l int 3323 _ = l 3324 if m.Sum != nil { 3325 n += m.Sum.Size() 3326 } 3327 return n 3328 } 3329 3330 func (m *Evidence_DuplicateVoteEvidence) Size() (n int) { 3331 if m == nil { 3332 return 0 3333 } 3334 var l int 3335 _ = l 3336 if m.DuplicateVoteEvidence != nil { 3337 l = m.DuplicateVoteEvidence.Size() 3338 n += 1 + l + sovTypes(uint64(l)) 3339 } 3340 return n 3341 } 3342 func (m *Evidence_LightClientAttackEvidence) Size() (n int) { 3343 if m == nil { 3344 return 0 3345 } 3346 var l int 3347 _ = l 3348 if m.LightClientAttackEvidence != nil { 3349 l = m.LightClientAttackEvidence.Size() 3350 n += 1 + l + sovTypes(uint64(l)) 3351 } 3352 return n 3353 } 3354 func (m *DuplicateVoteEvidence) Size() (n int) { 3355 if m == nil { 3356 return 0 3357 } 3358 var l int 3359 _ = l 3360 if m.VoteA != nil { 3361 l = m.VoteA.Size() 3362 n += 1 + l + sovTypes(uint64(l)) 3363 } 3364 if m.VoteB != nil { 3365 l = m.VoteB.Size() 3366 n += 1 + l + sovTypes(uint64(l)) 3367 } 3368 if m.TotalVotingPower != 0 { 3369 n += 1 + sovTypes(uint64(m.TotalVotingPower)) 3370 } 3371 if m.ValidatorPower != 0 { 3372 n += 1 + sovTypes(uint64(m.ValidatorPower)) 3373 } 3374 l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) 3375 n += 1 + l + sovTypes(uint64(l)) 3376 return n 3377 } 3378 3379 func (m *LightClientAttackEvidence) Size() (n int) { 3380 if m == nil { 3381 return 0 3382 } 3383 var l int 3384 _ = l 3385 if m.ConflictingBlock != nil { 3386 l = m.ConflictingBlock.Size() 3387 n += 1 + l + sovTypes(uint64(l)) 3388 } 3389 if m.CommonHeight != 0 { 3390 n += 1 + sovTypes(uint64(m.CommonHeight)) 3391 } 3392 if len(m.ByzantineValidators) > 0 { 3393 for _, e := range m.ByzantineValidators { 3394 l = e.Size() 3395 n += 1 + l + sovTypes(uint64(l)) 3396 } 3397 } 3398 if m.TotalVotingPower != 0 { 3399 n += 1 + sovTypes(uint64(m.TotalVotingPower)) 3400 } 3401 l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) 3402 n += 1 + l + sovTypes(uint64(l)) 3403 return n 3404 } 3405 3406 func (m *EvidenceList) Size() (n int) { 3407 if m == nil { 3408 return 0 3409 } 3410 var l int 3411 _ = l 3412 if len(m.Evidence) > 0 { 3413 for _, e := range m.Evidence { 3414 l = e.Size() 3415 n += 1 + l + sovTypes(uint64(l)) 3416 } 3417 } 3418 return n 3419 } 3420 3421 func sovTypes(x uint64) (n int) { 3422 return (math_bits.Len64(x|1) + 6) / 7 3423 } 3424 func sozTypes(x uint64) (n int) { 3425 return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 3426 } 3427 func (m *PartSetHeader) Unmarshal(dAtA []byte) error { 3428 l := len(dAtA) 3429 iNdEx := 0 3430 for iNdEx < l { 3431 preIndex := iNdEx 3432 var wire uint64 3433 for shift := uint(0); ; shift += 7 { 3434 if shift >= 64 { 3435 return ErrIntOverflowTypes 3436 } 3437 if iNdEx >= l { 3438 return io.ErrUnexpectedEOF 3439 } 3440 b := dAtA[iNdEx] 3441 iNdEx++ 3442 wire |= uint64(b&0x7F) << shift 3443 if b < 0x80 { 3444 break 3445 } 3446 } 3447 fieldNum := int32(wire >> 3) 3448 wireType := int(wire & 0x7) 3449 if wireType == 4 { 3450 return fmt.Errorf("proto: PartSetHeader: wiretype end group for non-group") 3451 } 3452 if fieldNum <= 0 { 3453 return fmt.Errorf("proto: PartSetHeader: illegal tag %d (wire type %d)", fieldNum, wire) 3454 } 3455 switch fieldNum { 3456 case 1: 3457 if wireType != 0 { 3458 return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) 3459 } 3460 m.Total = 0 3461 for shift := uint(0); ; shift += 7 { 3462 if shift >= 64 { 3463 return ErrIntOverflowTypes 3464 } 3465 if iNdEx >= l { 3466 return io.ErrUnexpectedEOF 3467 } 3468 b := dAtA[iNdEx] 3469 iNdEx++ 3470 m.Total |= uint32(b&0x7F) << shift 3471 if b < 0x80 { 3472 break 3473 } 3474 } 3475 case 2: 3476 if wireType != 2 { 3477 return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) 3478 } 3479 var byteLen int 3480 for shift := uint(0); ; shift += 7 { 3481 if shift >= 64 { 3482 return ErrIntOverflowTypes 3483 } 3484 if iNdEx >= l { 3485 return io.ErrUnexpectedEOF 3486 } 3487 b := dAtA[iNdEx] 3488 iNdEx++ 3489 byteLen |= int(b&0x7F) << shift 3490 if b < 0x80 { 3491 break 3492 } 3493 } 3494 if byteLen < 0 { 3495 return ErrInvalidLengthTypes 3496 } 3497 postIndex := iNdEx + byteLen 3498 if postIndex < 0 { 3499 return ErrInvalidLengthTypes 3500 } 3501 if postIndex > l { 3502 return io.ErrUnexpectedEOF 3503 } 3504 m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) 3505 if m.Hash == nil { 3506 m.Hash = []byte{} 3507 } 3508 iNdEx = postIndex 3509 default: 3510 iNdEx = preIndex 3511 skippy, err := skipTypes(dAtA[iNdEx:]) 3512 if err != nil { 3513 return err 3514 } 3515 if (skippy < 0) || (iNdEx+skippy) < 0 { 3516 return ErrInvalidLengthTypes 3517 } 3518 if (iNdEx + skippy) > l { 3519 return io.ErrUnexpectedEOF 3520 } 3521 iNdEx += skippy 3522 } 3523 } 3524 3525 if iNdEx > l { 3526 return io.ErrUnexpectedEOF 3527 } 3528 return nil 3529 } 3530 func (m *Part) Unmarshal(dAtA []byte) error { 3531 l := len(dAtA) 3532 iNdEx := 0 3533 for iNdEx < l { 3534 preIndex := iNdEx 3535 var wire uint64 3536 for shift := uint(0); ; shift += 7 { 3537 if shift >= 64 { 3538 return ErrIntOverflowTypes 3539 } 3540 if iNdEx >= l { 3541 return io.ErrUnexpectedEOF 3542 } 3543 b := dAtA[iNdEx] 3544 iNdEx++ 3545 wire |= uint64(b&0x7F) << shift 3546 if b < 0x80 { 3547 break 3548 } 3549 } 3550 fieldNum := int32(wire >> 3) 3551 wireType := int(wire & 0x7) 3552 if wireType == 4 { 3553 return fmt.Errorf("proto: Part: wiretype end group for non-group") 3554 } 3555 if fieldNum <= 0 { 3556 return fmt.Errorf("proto: Part: illegal tag %d (wire type %d)", fieldNum, wire) 3557 } 3558 switch fieldNum { 3559 case 1: 3560 if wireType != 0 { 3561 return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) 3562 } 3563 m.Index = 0 3564 for shift := uint(0); ; shift += 7 { 3565 if shift >= 64 { 3566 return ErrIntOverflowTypes 3567 } 3568 if iNdEx >= l { 3569 return io.ErrUnexpectedEOF 3570 } 3571 b := dAtA[iNdEx] 3572 iNdEx++ 3573 m.Index |= uint32(b&0x7F) << shift 3574 if b < 0x80 { 3575 break 3576 } 3577 } 3578 case 2: 3579 if wireType != 2 { 3580 return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType) 3581 } 3582 var byteLen int 3583 for shift := uint(0); ; shift += 7 { 3584 if shift >= 64 { 3585 return ErrIntOverflowTypes 3586 } 3587 if iNdEx >= l { 3588 return io.ErrUnexpectedEOF 3589 } 3590 b := dAtA[iNdEx] 3591 iNdEx++ 3592 byteLen |= int(b&0x7F) << shift 3593 if b < 0x80 { 3594 break 3595 } 3596 } 3597 if byteLen < 0 { 3598 return ErrInvalidLengthTypes 3599 } 3600 postIndex := iNdEx + byteLen 3601 if postIndex < 0 { 3602 return ErrInvalidLengthTypes 3603 } 3604 if postIndex > l { 3605 return io.ErrUnexpectedEOF 3606 } 3607 m.Bytes = append(m.Bytes[:0], dAtA[iNdEx:postIndex]...) 3608 if m.Bytes == nil { 3609 m.Bytes = []byte{} 3610 } 3611 iNdEx = postIndex 3612 case 3: 3613 if wireType != 2 { 3614 return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) 3615 } 3616 var msglen int 3617 for shift := uint(0); ; shift += 7 { 3618 if shift >= 64 { 3619 return ErrIntOverflowTypes 3620 } 3621 if iNdEx >= l { 3622 return io.ErrUnexpectedEOF 3623 } 3624 b := dAtA[iNdEx] 3625 iNdEx++ 3626 msglen |= int(b&0x7F) << shift 3627 if b < 0x80 { 3628 break 3629 } 3630 } 3631 if msglen < 0 { 3632 return ErrInvalidLengthTypes 3633 } 3634 postIndex := iNdEx + msglen 3635 if postIndex < 0 { 3636 return ErrInvalidLengthTypes 3637 } 3638 if postIndex > l { 3639 return io.ErrUnexpectedEOF 3640 } 3641 if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3642 return err 3643 } 3644 iNdEx = postIndex 3645 default: 3646 iNdEx = preIndex 3647 skippy, err := skipTypes(dAtA[iNdEx:]) 3648 if err != nil { 3649 return err 3650 } 3651 if (skippy < 0) || (iNdEx+skippy) < 0 { 3652 return ErrInvalidLengthTypes 3653 } 3654 if (iNdEx + skippy) > l { 3655 return io.ErrUnexpectedEOF 3656 } 3657 iNdEx += skippy 3658 } 3659 } 3660 3661 if iNdEx > l { 3662 return io.ErrUnexpectedEOF 3663 } 3664 return nil 3665 } 3666 func (m *BlockID) Unmarshal(dAtA []byte) error { 3667 l := len(dAtA) 3668 iNdEx := 0 3669 for iNdEx < l { 3670 preIndex := iNdEx 3671 var wire uint64 3672 for shift := uint(0); ; shift += 7 { 3673 if shift >= 64 { 3674 return ErrIntOverflowTypes 3675 } 3676 if iNdEx >= l { 3677 return io.ErrUnexpectedEOF 3678 } 3679 b := dAtA[iNdEx] 3680 iNdEx++ 3681 wire |= uint64(b&0x7F) << shift 3682 if b < 0x80 { 3683 break 3684 } 3685 } 3686 fieldNum := int32(wire >> 3) 3687 wireType := int(wire & 0x7) 3688 if wireType == 4 { 3689 return fmt.Errorf("proto: BlockID: wiretype end group for non-group") 3690 } 3691 if fieldNum <= 0 { 3692 return fmt.Errorf("proto: BlockID: illegal tag %d (wire type %d)", fieldNum, wire) 3693 } 3694 switch fieldNum { 3695 case 1: 3696 if wireType != 2 { 3697 return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) 3698 } 3699 var byteLen int 3700 for shift := uint(0); ; shift += 7 { 3701 if shift >= 64 { 3702 return ErrIntOverflowTypes 3703 } 3704 if iNdEx >= l { 3705 return io.ErrUnexpectedEOF 3706 } 3707 b := dAtA[iNdEx] 3708 iNdEx++ 3709 byteLen |= int(b&0x7F) << shift 3710 if b < 0x80 { 3711 break 3712 } 3713 } 3714 if byteLen < 0 { 3715 return ErrInvalidLengthTypes 3716 } 3717 postIndex := iNdEx + byteLen 3718 if postIndex < 0 { 3719 return ErrInvalidLengthTypes 3720 } 3721 if postIndex > l { 3722 return io.ErrUnexpectedEOF 3723 } 3724 m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) 3725 if m.Hash == nil { 3726 m.Hash = []byte{} 3727 } 3728 iNdEx = postIndex 3729 case 2: 3730 if wireType != 2 { 3731 return fmt.Errorf("proto: wrong wireType = %d for field PartSetHeader", wireType) 3732 } 3733 var msglen int 3734 for shift := uint(0); ; shift += 7 { 3735 if shift >= 64 { 3736 return ErrIntOverflowTypes 3737 } 3738 if iNdEx >= l { 3739 return io.ErrUnexpectedEOF 3740 } 3741 b := dAtA[iNdEx] 3742 iNdEx++ 3743 msglen |= int(b&0x7F) << shift 3744 if b < 0x80 { 3745 break 3746 } 3747 } 3748 if msglen < 0 { 3749 return ErrInvalidLengthTypes 3750 } 3751 postIndex := iNdEx + msglen 3752 if postIndex < 0 { 3753 return ErrInvalidLengthTypes 3754 } 3755 if postIndex > l { 3756 return io.ErrUnexpectedEOF 3757 } 3758 if err := m.PartSetHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3759 return err 3760 } 3761 iNdEx = postIndex 3762 default: 3763 iNdEx = preIndex 3764 skippy, err := skipTypes(dAtA[iNdEx:]) 3765 if err != nil { 3766 return err 3767 } 3768 if (skippy < 0) || (iNdEx+skippy) < 0 { 3769 return ErrInvalidLengthTypes 3770 } 3771 if (iNdEx + skippy) > l { 3772 return io.ErrUnexpectedEOF 3773 } 3774 iNdEx += skippy 3775 } 3776 } 3777 3778 if iNdEx > l { 3779 return io.ErrUnexpectedEOF 3780 } 3781 return nil 3782 } 3783 func (m *Header) Unmarshal(dAtA []byte) error { 3784 l := len(dAtA) 3785 iNdEx := 0 3786 for iNdEx < l { 3787 preIndex := iNdEx 3788 var wire uint64 3789 for shift := uint(0); ; shift += 7 { 3790 if shift >= 64 { 3791 return ErrIntOverflowTypes 3792 } 3793 if iNdEx >= l { 3794 return io.ErrUnexpectedEOF 3795 } 3796 b := dAtA[iNdEx] 3797 iNdEx++ 3798 wire |= uint64(b&0x7F) << shift 3799 if b < 0x80 { 3800 break 3801 } 3802 } 3803 fieldNum := int32(wire >> 3) 3804 wireType := int(wire & 0x7) 3805 if wireType == 4 { 3806 return fmt.Errorf("proto: Header: wiretype end group for non-group") 3807 } 3808 if fieldNum <= 0 { 3809 return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire) 3810 } 3811 switch fieldNum { 3812 case 1: 3813 if wireType != 2 { 3814 return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) 3815 } 3816 var msglen int 3817 for shift := uint(0); ; shift += 7 { 3818 if shift >= 64 { 3819 return ErrIntOverflowTypes 3820 } 3821 if iNdEx >= l { 3822 return io.ErrUnexpectedEOF 3823 } 3824 b := dAtA[iNdEx] 3825 iNdEx++ 3826 msglen |= int(b&0x7F) << shift 3827 if b < 0x80 { 3828 break 3829 } 3830 } 3831 if msglen < 0 { 3832 return ErrInvalidLengthTypes 3833 } 3834 postIndex := iNdEx + msglen 3835 if postIndex < 0 { 3836 return ErrInvalidLengthTypes 3837 } 3838 if postIndex > l { 3839 return io.ErrUnexpectedEOF 3840 } 3841 if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3842 return err 3843 } 3844 iNdEx = postIndex 3845 case 2: 3846 if wireType != 2 { 3847 return fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType) 3848 } 3849 var stringLen uint64 3850 for shift := uint(0); ; shift += 7 { 3851 if shift >= 64 { 3852 return ErrIntOverflowTypes 3853 } 3854 if iNdEx >= l { 3855 return io.ErrUnexpectedEOF 3856 } 3857 b := dAtA[iNdEx] 3858 iNdEx++ 3859 stringLen |= uint64(b&0x7F) << shift 3860 if b < 0x80 { 3861 break 3862 } 3863 } 3864 intStringLen := int(stringLen) 3865 if intStringLen < 0 { 3866 return ErrInvalidLengthTypes 3867 } 3868 postIndex := iNdEx + intStringLen 3869 if postIndex < 0 { 3870 return ErrInvalidLengthTypes 3871 } 3872 if postIndex > l { 3873 return io.ErrUnexpectedEOF 3874 } 3875 m.ChainID = string(dAtA[iNdEx:postIndex]) 3876 iNdEx = postIndex 3877 case 3: 3878 if wireType != 0 { 3879 return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) 3880 } 3881 m.Height = 0 3882 for shift := uint(0); ; shift += 7 { 3883 if shift >= 64 { 3884 return ErrIntOverflowTypes 3885 } 3886 if iNdEx >= l { 3887 return io.ErrUnexpectedEOF 3888 } 3889 b := dAtA[iNdEx] 3890 iNdEx++ 3891 m.Height |= int64(b&0x7F) << shift 3892 if b < 0x80 { 3893 break 3894 } 3895 } 3896 case 4: 3897 if wireType != 2 { 3898 return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) 3899 } 3900 var msglen int 3901 for shift := uint(0); ; shift += 7 { 3902 if shift >= 64 { 3903 return ErrIntOverflowTypes 3904 } 3905 if iNdEx >= l { 3906 return io.ErrUnexpectedEOF 3907 } 3908 b := dAtA[iNdEx] 3909 iNdEx++ 3910 msglen |= int(b&0x7F) << shift 3911 if b < 0x80 { 3912 break 3913 } 3914 } 3915 if msglen < 0 { 3916 return ErrInvalidLengthTypes 3917 } 3918 postIndex := iNdEx + msglen 3919 if postIndex < 0 { 3920 return ErrInvalidLengthTypes 3921 } 3922 if postIndex > l { 3923 return io.ErrUnexpectedEOF 3924 } 3925 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { 3926 return err 3927 } 3928 iNdEx = postIndex 3929 case 5: 3930 if wireType != 2 { 3931 return fmt.Errorf("proto: wrong wireType = %d for field LastBlockId", wireType) 3932 } 3933 var msglen int 3934 for shift := uint(0); ; shift += 7 { 3935 if shift >= 64 { 3936 return ErrIntOverflowTypes 3937 } 3938 if iNdEx >= l { 3939 return io.ErrUnexpectedEOF 3940 } 3941 b := dAtA[iNdEx] 3942 iNdEx++ 3943 msglen |= int(b&0x7F) << shift 3944 if b < 0x80 { 3945 break 3946 } 3947 } 3948 if msglen < 0 { 3949 return ErrInvalidLengthTypes 3950 } 3951 postIndex := iNdEx + msglen 3952 if postIndex < 0 { 3953 return ErrInvalidLengthTypes 3954 } 3955 if postIndex > l { 3956 return io.ErrUnexpectedEOF 3957 } 3958 if err := m.LastBlockId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3959 return err 3960 } 3961 iNdEx = postIndex 3962 case 6: 3963 if wireType != 2 { 3964 return fmt.Errorf("proto: wrong wireType = %d for field LastCommitHash", wireType) 3965 } 3966 var byteLen int 3967 for shift := uint(0); ; shift += 7 { 3968 if shift >= 64 { 3969 return ErrIntOverflowTypes 3970 } 3971 if iNdEx >= l { 3972 return io.ErrUnexpectedEOF 3973 } 3974 b := dAtA[iNdEx] 3975 iNdEx++ 3976 byteLen |= int(b&0x7F) << shift 3977 if b < 0x80 { 3978 break 3979 } 3980 } 3981 if byteLen < 0 { 3982 return ErrInvalidLengthTypes 3983 } 3984 postIndex := iNdEx + byteLen 3985 if postIndex < 0 { 3986 return ErrInvalidLengthTypes 3987 } 3988 if postIndex > l { 3989 return io.ErrUnexpectedEOF 3990 } 3991 m.LastCommitHash = append(m.LastCommitHash[:0], dAtA[iNdEx:postIndex]...) 3992 if m.LastCommitHash == nil { 3993 m.LastCommitHash = []byte{} 3994 } 3995 iNdEx = postIndex 3996 case 7: 3997 if wireType != 2 { 3998 return fmt.Errorf("proto: wrong wireType = %d for field DataHash", wireType) 3999 } 4000 var byteLen int 4001 for shift := uint(0); ; shift += 7 { 4002 if shift >= 64 { 4003 return ErrIntOverflowTypes 4004 } 4005 if iNdEx >= l { 4006 return io.ErrUnexpectedEOF 4007 } 4008 b := dAtA[iNdEx] 4009 iNdEx++ 4010 byteLen |= int(b&0x7F) << shift 4011 if b < 0x80 { 4012 break 4013 } 4014 } 4015 if byteLen < 0 { 4016 return ErrInvalidLengthTypes 4017 } 4018 postIndex := iNdEx + byteLen 4019 if postIndex < 0 { 4020 return ErrInvalidLengthTypes 4021 } 4022 if postIndex > l { 4023 return io.ErrUnexpectedEOF 4024 } 4025 m.DataHash = append(m.DataHash[:0], dAtA[iNdEx:postIndex]...) 4026 if m.DataHash == nil { 4027 m.DataHash = []byte{} 4028 } 4029 iNdEx = postIndex 4030 case 8: 4031 if wireType != 2 { 4032 return fmt.Errorf("proto: wrong wireType = %d for field ValidatorsHash", wireType) 4033 } 4034 var byteLen int 4035 for shift := uint(0); ; shift += 7 { 4036 if shift >= 64 { 4037 return ErrIntOverflowTypes 4038 } 4039 if iNdEx >= l { 4040 return io.ErrUnexpectedEOF 4041 } 4042 b := dAtA[iNdEx] 4043 iNdEx++ 4044 byteLen |= int(b&0x7F) << shift 4045 if b < 0x80 { 4046 break 4047 } 4048 } 4049 if byteLen < 0 { 4050 return ErrInvalidLengthTypes 4051 } 4052 postIndex := iNdEx + byteLen 4053 if postIndex < 0 { 4054 return ErrInvalidLengthTypes 4055 } 4056 if postIndex > l { 4057 return io.ErrUnexpectedEOF 4058 } 4059 m.ValidatorsHash = append(m.ValidatorsHash[:0], dAtA[iNdEx:postIndex]...) 4060 if m.ValidatorsHash == nil { 4061 m.ValidatorsHash = []byte{} 4062 } 4063 iNdEx = postIndex 4064 case 9: 4065 if wireType != 2 { 4066 return fmt.Errorf("proto: wrong wireType = %d for field NextValidatorsHash", wireType) 4067 } 4068 var byteLen int 4069 for shift := uint(0); ; shift += 7 { 4070 if shift >= 64 { 4071 return ErrIntOverflowTypes 4072 } 4073 if iNdEx >= l { 4074 return io.ErrUnexpectedEOF 4075 } 4076 b := dAtA[iNdEx] 4077 iNdEx++ 4078 byteLen |= int(b&0x7F) << shift 4079 if b < 0x80 { 4080 break 4081 } 4082 } 4083 if byteLen < 0 { 4084 return ErrInvalidLengthTypes 4085 } 4086 postIndex := iNdEx + byteLen 4087 if postIndex < 0 { 4088 return ErrInvalidLengthTypes 4089 } 4090 if postIndex > l { 4091 return io.ErrUnexpectedEOF 4092 } 4093 m.NextValidatorsHash = append(m.NextValidatorsHash[:0], dAtA[iNdEx:postIndex]...) 4094 if m.NextValidatorsHash == nil { 4095 m.NextValidatorsHash = []byte{} 4096 } 4097 iNdEx = postIndex 4098 case 10: 4099 if wireType != 2 { 4100 return fmt.Errorf("proto: wrong wireType = %d for field ConsensusHash", wireType) 4101 } 4102 var byteLen int 4103 for shift := uint(0); ; shift += 7 { 4104 if shift >= 64 { 4105 return ErrIntOverflowTypes 4106 } 4107 if iNdEx >= l { 4108 return io.ErrUnexpectedEOF 4109 } 4110 b := dAtA[iNdEx] 4111 iNdEx++ 4112 byteLen |= int(b&0x7F) << shift 4113 if b < 0x80 { 4114 break 4115 } 4116 } 4117 if byteLen < 0 { 4118 return ErrInvalidLengthTypes 4119 } 4120 postIndex := iNdEx + byteLen 4121 if postIndex < 0 { 4122 return ErrInvalidLengthTypes 4123 } 4124 if postIndex > l { 4125 return io.ErrUnexpectedEOF 4126 } 4127 m.ConsensusHash = append(m.ConsensusHash[:0], dAtA[iNdEx:postIndex]...) 4128 if m.ConsensusHash == nil { 4129 m.ConsensusHash = []byte{} 4130 } 4131 iNdEx = postIndex 4132 case 11: 4133 if wireType != 2 { 4134 return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType) 4135 } 4136 var byteLen int 4137 for shift := uint(0); ; shift += 7 { 4138 if shift >= 64 { 4139 return ErrIntOverflowTypes 4140 } 4141 if iNdEx >= l { 4142 return io.ErrUnexpectedEOF 4143 } 4144 b := dAtA[iNdEx] 4145 iNdEx++ 4146 byteLen |= int(b&0x7F) << shift 4147 if b < 0x80 { 4148 break 4149 } 4150 } 4151 if byteLen < 0 { 4152 return ErrInvalidLengthTypes 4153 } 4154 postIndex := iNdEx + byteLen 4155 if postIndex < 0 { 4156 return ErrInvalidLengthTypes 4157 } 4158 if postIndex > l { 4159 return io.ErrUnexpectedEOF 4160 } 4161 m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...) 4162 if m.AppHash == nil { 4163 m.AppHash = []byte{} 4164 } 4165 iNdEx = postIndex 4166 case 12: 4167 if wireType != 2 { 4168 return fmt.Errorf("proto: wrong wireType = %d for field LastResultsHash", wireType) 4169 } 4170 var byteLen int 4171 for shift := uint(0); ; shift += 7 { 4172 if shift >= 64 { 4173 return ErrIntOverflowTypes 4174 } 4175 if iNdEx >= l { 4176 return io.ErrUnexpectedEOF 4177 } 4178 b := dAtA[iNdEx] 4179 iNdEx++ 4180 byteLen |= int(b&0x7F) << shift 4181 if b < 0x80 { 4182 break 4183 } 4184 } 4185 if byteLen < 0 { 4186 return ErrInvalidLengthTypes 4187 } 4188 postIndex := iNdEx + byteLen 4189 if postIndex < 0 { 4190 return ErrInvalidLengthTypes 4191 } 4192 if postIndex > l { 4193 return io.ErrUnexpectedEOF 4194 } 4195 m.LastResultsHash = append(m.LastResultsHash[:0], dAtA[iNdEx:postIndex]...) 4196 if m.LastResultsHash == nil { 4197 m.LastResultsHash = []byte{} 4198 } 4199 iNdEx = postIndex 4200 case 13: 4201 if wireType != 2 { 4202 return fmt.Errorf("proto: wrong wireType = %d for field EvidenceHash", wireType) 4203 } 4204 var byteLen int 4205 for shift := uint(0); ; shift += 7 { 4206 if shift >= 64 { 4207 return ErrIntOverflowTypes 4208 } 4209 if iNdEx >= l { 4210 return io.ErrUnexpectedEOF 4211 } 4212 b := dAtA[iNdEx] 4213 iNdEx++ 4214 byteLen |= int(b&0x7F) << shift 4215 if b < 0x80 { 4216 break 4217 } 4218 } 4219 if byteLen < 0 { 4220 return ErrInvalidLengthTypes 4221 } 4222 postIndex := iNdEx + byteLen 4223 if postIndex < 0 { 4224 return ErrInvalidLengthTypes 4225 } 4226 if postIndex > l { 4227 return io.ErrUnexpectedEOF 4228 } 4229 m.EvidenceHash = append(m.EvidenceHash[:0], dAtA[iNdEx:postIndex]...) 4230 if m.EvidenceHash == nil { 4231 m.EvidenceHash = []byte{} 4232 } 4233 iNdEx = postIndex 4234 case 14: 4235 if wireType != 2 { 4236 return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) 4237 } 4238 var byteLen int 4239 for shift := uint(0); ; shift += 7 { 4240 if shift >= 64 { 4241 return ErrIntOverflowTypes 4242 } 4243 if iNdEx >= l { 4244 return io.ErrUnexpectedEOF 4245 } 4246 b := dAtA[iNdEx] 4247 iNdEx++ 4248 byteLen |= int(b&0x7F) << shift 4249 if b < 0x80 { 4250 break 4251 } 4252 } 4253 if byteLen < 0 { 4254 return ErrInvalidLengthTypes 4255 } 4256 postIndex := iNdEx + byteLen 4257 if postIndex < 0 { 4258 return ErrInvalidLengthTypes 4259 } 4260 if postIndex > l { 4261 return io.ErrUnexpectedEOF 4262 } 4263 m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) 4264 if m.ProposerAddress == nil { 4265 m.ProposerAddress = []byte{} 4266 } 4267 iNdEx = postIndex 4268 default: 4269 iNdEx = preIndex 4270 skippy, err := skipTypes(dAtA[iNdEx:]) 4271 if err != nil { 4272 return err 4273 } 4274 if (skippy < 0) || (iNdEx+skippy) < 0 { 4275 return ErrInvalidLengthTypes 4276 } 4277 if (iNdEx + skippy) > l { 4278 return io.ErrUnexpectedEOF 4279 } 4280 iNdEx += skippy 4281 } 4282 } 4283 4284 if iNdEx > l { 4285 return io.ErrUnexpectedEOF 4286 } 4287 return nil 4288 } 4289 func (m *Data) Unmarshal(dAtA []byte) error { 4290 l := len(dAtA) 4291 iNdEx := 0 4292 for iNdEx < l { 4293 preIndex := iNdEx 4294 var wire uint64 4295 for shift := uint(0); ; shift += 7 { 4296 if shift >= 64 { 4297 return ErrIntOverflowTypes 4298 } 4299 if iNdEx >= l { 4300 return io.ErrUnexpectedEOF 4301 } 4302 b := dAtA[iNdEx] 4303 iNdEx++ 4304 wire |= uint64(b&0x7F) << shift 4305 if b < 0x80 { 4306 break 4307 } 4308 } 4309 fieldNum := int32(wire >> 3) 4310 wireType := int(wire & 0x7) 4311 if wireType == 4 { 4312 return fmt.Errorf("proto: Data: wiretype end group for non-group") 4313 } 4314 if fieldNum <= 0 { 4315 return fmt.Errorf("proto: Data: illegal tag %d (wire type %d)", fieldNum, wire) 4316 } 4317 switch fieldNum { 4318 case 1: 4319 if wireType != 2 { 4320 return fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) 4321 } 4322 var byteLen int 4323 for shift := uint(0); ; shift += 7 { 4324 if shift >= 64 { 4325 return ErrIntOverflowTypes 4326 } 4327 if iNdEx >= l { 4328 return io.ErrUnexpectedEOF 4329 } 4330 b := dAtA[iNdEx] 4331 iNdEx++ 4332 byteLen |= int(b&0x7F) << shift 4333 if b < 0x80 { 4334 break 4335 } 4336 } 4337 if byteLen < 0 { 4338 return ErrInvalidLengthTypes 4339 } 4340 postIndex := iNdEx + byteLen 4341 if postIndex < 0 { 4342 return ErrInvalidLengthTypes 4343 } 4344 if postIndex > l { 4345 return io.ErrUnexpectedEOF 4346 } 4347 m.Txs = append(m.Txs, make([]byte, postIndex-iNdEx)) 4348 copy(m.Txs[len(m.Txs)-1], dAtA[iNdEx:postIndex]) 4349 iNdEx = postIndex 4350 default: 4351 iNdEx = preIndex 4352 skippy, err := skipTypes(dAtA[iNdEx:]) 4353 if err != nil { 4354 return err 4355 } 4356 if (skippy < 0) || (iNdEx+skippy) < 0 { 4357 return ErrInvalidLengthTypes 4358 } 4359 if (iNdEx + skippy) > l { 4360 return io.ErrUnexpectedEOF 4361 } 4362 iNdEx += skippy 4363 } 4364 } 4365 4366 if iNdEx > l { 4367 return io.ErrUnexpectedEOF 4368 } 4369 return nil 4370 } 4371 func (m *TxKey) Unmarshal(dAtA []byte) error { 4372 l := len(dAtA) 4373 iNdEx := 0 4374 for iNdEx < l { 4375 preIndex := iNdEx 4376 var wire uint64 4377 for shift := uint(0); ; shift += 7 { 4378 if shift >= 64 { 4379 return ErrIntOverflowTypes 4380 } 4381 if iNdEx >= l { 4382 return io.ErrUnexpectedEOF 4383 } 4384 b := dAtA[iNdEx] 4385 iNdEx++ 4386 wire |= uint64(b&0x7F) << shift 4387 if b < 0x80 { 4388 break 4389 } 4390 } 4391 fieldNum := int32(wire >> 3) 4392 wireType := int(wire & 0x7) 4393 if wireType == 4 { 4394 return fmt.Errorf("proto: TxKey: wiretype end group for non-group") 4395 } 4396 if fieldNum <= 0 { 4397 return fmt.Errorf("proto: TxKey: illegal tag %d (wire type %d)", fieldNum, wire) 4398 } 4399 switch fieldNum { 4400 case 1: 4401 if wireType != 2 { 4402 return fmt.Errorf("proto: wrong wireType = %d for field TxKey", wireType) 4403 } 4404 var byteLen int 4405 for shift := uint(0); ; shift += 7 { 4406 if shift >= 64 { 4407 return ErrIntOverflowTypes 4408 } 4409 if iNdEx >= l { 4410 return io.ErrUnexpectedEOF 4411 } 4412 b := dAtA[iNdEx] 4413 iNdEx++ 4414 byteLen |= int(b&0x7F) << shift 4415 if b < 0x80 { 4416 break 4417 } 4418 } 4419 if byteLen < 0 { 4420 return ErrInvalidLengthTypes 4421 } 4422 postIndex := iNdEx + byteLen 4423 if postIndex < 0 { 4424 return ErrInvalidLengthTypes 4425 } 4426 if postIndex > l { 4427 return io.ErrUnexpectedEOF 4428 } 4429 m.TxKey = append(m.TxKey[:0], dAtA[iNdEx:postIndex]...) 4430 if m.TxKey == nil { 4431 m.TxKey = []byte{} 4432 } 4433 iNdEx = postIndex 4434 default: 4435 iNdEx = preIndex 4436 skippy, err := skipTypes(dAtA[iNdEx:]) 4437 if err != nil { 4438 return err 4439 } 4440 if (skippy < 0) || (iNdEx+skippy) < 0 { 4441 return ErrInvalidLengthTypes 4442 } 4443 if (iNdEx + skippy) > l { 4444 return io.ErrUnexpectedEOF 4445 } 4446 iNdEx += skippy 4447 } 4448 } 4449 4450 if iNdEx > l { 4451 return io.ErrUnexpectedEOF 4452 } 4453 return nil 4454 } 4455 func (m *Vote) Unmarshal(dAtA []byte) error { 4456 l := len(dAtA) 4457 iNdEx := 0 4458 for iNdEx < l { 4459 preIndex := iNdEx 4460 var wire uint64 4461 for shift := uint(0); ; shift += 7 { 4462 if shift >= 64 { 4463 return ErrIntOverflowTypes 4464 } 4465 if iNdEx >= l { 4466 return io.ErrUnexpectedEOF 4467 } 4468 b := dAtA[iNdEx] 4469 iNdEx++ 4470 wire |= uint64(b&0x7F) << shift 4471 if b < 0x80 { 4472 break 4473 } 4474 } 4475 fieldNum := int32(wire >> 3) 4476 wireType := int(wire & 0x7) 4477 if wireType == 4 { 4478 return fmt.Errorf("proto: Vote: wiretype end group for non-group") 4479 } 4480 if fieldNum <= 0 { 4481 return fmt.Errorf("proto: Vote: illegal tag %d (wire type %d)", fieldNum, wire) 4482 } 4483 switch fieldNum { 4484 case 1: 4485 if wireType != 0 { 4486 return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) 4487 } 4488 m.Type = 0 4489 for shift := uint(0); ; shift += 7 { 4490 if shift >= 64 { 4491 return ErrIntOverflowTypes 4492 } 4493 if iNdEx >= l { 4494 return io.ErrUnexpectedEOF 4495 } 4496 b := dAtA[iNdEx] 4497 iNdEx++ 4498 m.Type |= SignedMsgType(b&0x7F) << shift 4499 if b < 0x80 { 4500 break 4501 } 4502 } 4503 case 2: 4504 if wireType != 0 { 4505 return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) 4506 } 4507 m.Height = 0 4508 for shift := uint(0); ; shift += 7 { 4509 if shift >= 64 { 4510 return ErrIntOverflowTypes 4511 } 4512 if iNdEx >= l { 4513 return io.ErrUnexpectedEOF 4514 } 4515 b := dAtA[iNdEx] 4516 iNdEx++ 4517 m.Height |= int64(b&0x7F) << shift 4518 if b < 0x80 { 4519 break 4520 } 4521 } 4522 case 3: 4523 if wireType != 0 { 4524 return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) 4525 } 4526 m.Round = 0 4527 for shift := uint(0); ; shift += 7 { 4528 if shift >= 64 { 4529 return ErrIntOverflowTypes 4530 } 4531 if iNdEx >= l { 4532 return io.ErrUnexpectedEOF 4533 } 4534 b := dAtA[iNdEx] 4535 iNdEx++ 4536 m.Round |= int32(b&0x7F) << shift 4537 if b < 0x80 { 4538 break 4539 } 4540 } 4541 case 4: 4542 if wireType != 2 { 4543 return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) 4544 } 4545 var msglen int 4546 for shift := uint(0); ; shift += 7 { 4547 if shift >= 64 { 4548 return ErrIntOverflowTypes 4549 } 4550 if iNdEx >= l { 4551 return io.ErrUnexpectedEOF 4552 } 4553 b := dAtA[iNdEx] 4554 iNdEx++ 4555 msglen |= int(b&0x7F) << shift 4556 if b < 0x80 { 4557 break 4558 } 4559 } 4560 if msglen < 0 { 4561 return ErrInvalidLengthTypes 4562 } 4563 postIndex := iNdEx + msglen 4564 if postIndex < 0 { 4565 return ErrInvalidLengthTypes 4566 } 4567 if postIndex > l { 4568 return io.ErrUnexpectedEOF 4569 } 4570 if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4571 return err 4572 } 4573 iNdEx = postIndex 4574 case 5: 4575 if wireType != 2 { 4576 return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) 4577 } 4578 var msglen int 4579 for shift := uint(0); ; shift += 7 { 4580 if shift >= 64 { 4581 return ErrIntOverflowTypes 4582 } 4583 if iNdEx >= l { 4584 return io.ErrUnexpectedEOF 4585 } 4586 b := dAtA[iNdEx] 4587 iNdEx++ 4588 msglen |= int(b&0x7F) << shift 4589 if b < 0x80 { 4590 break 4591 } 4592 } 4593 if msglen < 0 { 4594 return ErrInvalidLengthTypes 4595 } 4596 postIndex := iNdEx + msglen 4597 if postIndex < 0 { 4598 return ErrInvalidLengthTypes 4599 } 4600 if postIndex > l { 4601 return io.ErrUnexpectedEOF 4602 } 4603 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { 4604 return err 4605 } 4606 iNdEx = postIndex 4607 case 6: 4608 if wireType != 2 { 4609 return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) 4610 } 4611 var byteLen int 4612 for shift := uint(0); ; shift += 7 { 4613 if shift >= 64 { 4614 return ErrIntOverflowTypes 4615 } 4616 if iNdEx >= l { 4617 return io.ErrUnexpectedEOF 4618 } 4619 b := dAtA[iNdEx] 4620 iNdEx++ 4621 byteLen |= int(b&0x7F) << shift 4622 if b < 0x80 { 4623 break 4624 } 4625 } 4626 if byteLen < 0 { 4627 return ErrInvalidLengthTypes 4628 } 4629 postIndex := iNdEx + byteLen 4630 if postIndex < 0 { 4631 return ErrInvalidLengthTypes 4632 } 4633 if postIndex > l { 4634 return io.ErrUnexpectedEOF 4635 } 4636 m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) 4637 if m.ValidatorAddress == nil { 4638 m.ValidatorAddress = []byte{} 4639 } 4640 iNdEx = postIndex 4641 case 7: 4642 if wireType != 0 { 4643 return fmt.Errorf("proto: wrong wireType = %d for field ValidatorIndex", wireType) 4644 } 4645 m.ValidatorIndex = 0 4646 for shift := uint(0); ; shift += 7 { 4647 if shift >= 64 { 4648 return ErrIntOverflowTypes 4649 } 4650 if iNdEx >= l { 4651 return io.ErrUnexpectedEOF 4652 } 4653 b := dAtA[iNdEx] 4654 iNdEx++ 4655 m.ValidatorIndex |= int32(b&0x7F) << shift 4656 if b < 0x80 { 4657 break 4658 } 4659 } 4660 case 8: 4661 if wireType != 2 { 4662 return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) 4663 } 4664 var byteLen int 4665 for shift := uint(0); ; shift += 7 { 4666 if shift >= 64 { 4667 return ErrIntOverflowTypes 4668 } 4669 if iNdEx >= l { 4670 return io.ErrUnexpectedEOF 4671 } 4672 b := dAtA[iNdEx] 4673 iNdEx++ 4674 byteLen |= int(b&0x7F) << shift 4675 if b < 0x80 { 4676 break 4677 } 4678 } 4679 if byteLen < 0 { 4680 return ErrInvalidLengthTypes 4681 } 4682 postIndex := iNdEx + byteLen 4683 if postIndex < 0 { 4684 return ErrInvalidLengthTypes 4685 } 4686 if postIndex > l { 4687 return io.ErrUnexpectedEOF 4688 } 4689 m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) 4690 if m.Signature == nil { 4691 m.Signature = []byte{} 4692 } 4693 iNdEx = postIndex 4694 case 9: 4695 if wireType != 2 { 4696 return fmt.Errorf("proto: wrong wireType = %d for field Extension", wireType) 4697 } 4698 var byteLen int 4699 for shift := uint(0); ; shift += 7 { 4700 if shift >= 64 { 4701 return ErrIntOverflowTypes 4702 } 4703 if iNdEx >= l { 4704 return io.ErrUnexpectedEOF 4705 } 4706 b := dAtA[iNdEx] 4707 iNdEx++ 4708 byteLen |= int(b&0x7F) << shift 4709 if b < 0x80 { 4710 break 4711 } 4712 } 4713 if byteLen < 0 { 4714 return ErrInvalidLengthTypes 4715 } 4716 postIndex := iNdEx + byteLen 4717 if postIndex < 0 { 4718 return ErrInvalidLengthTypes 4719 } 4720 if postIndex > l { 4721 return io.ErrUnexpectedEOF 4722 } 4723 m.Extension = append(m.Extension[:0], dAtA[iNdEx:postIndex]...) 4724 if m.Extension == nil { 4725 m.Extension = []byte{} 4726 } 4727 iNdEx = postIndex 4728 case 10: 4729 if wireType != 2 { 4730 return fmt.Errorf("proto: wrong wireType = %d for field ExtensionSignature", wireType) 4731 } 4732 var byteLen int 4733 for shift := uint(0); ; shift += 7 { 4734 if shift >= 64 { 4735 return ErrIntOverflowTypes 4736 } 4737 if iNdEx >= l { 4738 return io.ErrUnexpectedEOF 4739 } 4740 b := dAtA[iNdEx] 4741 iNdEx++ 4742 byteLen |= int(b&0x7F) << shift 4743 if b < 0x80 { 4744 break 4745 } 4746 } 4747 if byteLen < 0 { 4748 return ErrInvalidLengthTypes 4749 } 4750 postIndex := iNdEx + byteLen 4751 if postIndex < 0 { 4752 return ErrInvalidLengthTypes 4753 } 4754 if postIndex > l { 4755 return io.ErrUnexpectedEOF 4756 } 4757 m.ExtensionSignature = append(m.ExtensionSignature[:0], dAtA[iNdEx:postIndex]...) 4758 if m.ExtensionSignature == nil { 4759 m.ExtensionSignature = []byte{} 4760 } 4761 iNdEx = postIndex 4762 default: 4763 iNdEx = preIndex 4764 skippy, err := skipTypes(dAtA[iNdEx:]) 4765 if err != nil { 4766 return err 4767 } 4768 if (skippy < 0) || (iNdEx+skippy) < 0 { 4769 return ErrInvalidLengthTypes 4770 } 4771 if (iNdEx + skippy) > l { 4772 return io.ErrUnexpectedEOF 4773 } 4774 iNdEx += skippy 4775 } 4776 } 4777 4778 if iNdEx > l { 4779 return io.ErrUnexpectedEOF 4780 } 4781 return nil 4782 } 4783 func (m *Commit) Unmarshal(dAtA []byte) error { 4784 l := len(dAtA) 4785 iNdEx := 0 4786 for iNdEx < l { 4787 preIndex := iNdEx 4788 var wire uint64 4789 for shift := uint(0); ; shift += 7 { 4790 if shift >= 64 { 4791 return ErrIntOverflowTypes 4792 } 4793 if iNdEx >= l { 4794 return io.ErrUnexpectedEOF 4795 } 4796 b := dAtA[iNdEx] 4797 iNdEx++ 4798 wire |= uint64(b&0x7F) << shift 4799 if b < 0x80 { 4800 break 4801 } 4802 } 4803 fieldNum := int32(wire >> 3) 4804 wireType := int(wire & 0x7) 4805 if wireType == 4 { 4806 return fmt.Errorf("proto: Commit: wiretype end group for non-group") 4807 } 4808 if fieldNum <= 0 { 4809 return fmt.Errorf("proto: Commit: illegal tag %d (wire type %d)", fieldNum, wire) 4810 } 4811 switch fieldNum { 4812 case 1: 4813 if wireType != 0 { 4814 return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) 4815 } 4816 m.Height = 0 4817 for shift := uint(0); ; shift += 7 { 4818 if shift >= 64 { 4819 return ErrIntOverflowTypes 4820 } 4821 if iNdEx >= l { 4822 return io.ErrUnexpectedEOF 4823 } 4824 b := dAtA[iNdEx] 4825 iNdEx++ 4826 m.Height |= int64(b&0x7F) << shift 4827 if b < 0x80 { 4828 break 4829 } 4830 } 4831 case 2: 4832 if wireType != 0 { 4833 return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) 4834 } 4835 m.Round = 0 4836 for shift := uint(0); ; shift += 7 { 4837 if shift >= 64 { 4838 return ErrIntOverflowTypes 4839 } 4840 if iNdEx >= l { 4841 return io.ErrUnexpectedEOF 4842 } 4843 b := dAtA[iNdEx] 4844 iNdEx++ 4845 m.Round |= int32(b&0x7F) << shift 4846 if b < 0x80 { 4847 break 4848 } 4849 } 4850 case 3: 4851 if wireType != 2 { 4852 return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) 4853 } 4854 var msglen int 4855 for shift := uint(0); ; shift += 7 { 4856 if shift >= 64 { 4857 return ErrIntOverflowTypes 4858 } 4859 if iNdEx >= l { 4860 return io.ErrUnexpectedEOF 4861 } 4862 b := dAtA[iNdEx] 4863 iNdEx++ 4864 msglen |= int(b&0x7F) << shift 4865 if b < 0x80 { 4866 break 4867 } 4868 } 4869 if msglen < 0 { 4870 return ErrInvalidLengthTypes 4871 } 4872 postIndex := iNdEx + msglen 4873 if postIndex < 0 { 4874 return ErrInvalidLengthTypes 4875 } 4876 if postIndex > l { 4877 return io.ErrUnexpectedEOF 4878 } 4879 if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4880 return err 4881 } 4882 iNdEx = postIndex 4883 case 4: 4884 if wireType != 2 { 4885 return fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) 4886 } 4887 var msglen int 4888 for shift := uint(0); ; shift += 7 { 4889 if shift >= 64 { 4890 return ErrIntOverflowTypes 4891 } 4892 if iNdEx >= l { 4893 return io.ErrUnexpectedEOF 4894 } 4895 b := dAtA[iNdEx] 4896 iNdEx++ 4897 msglen |= int(b&0x7F) << shift 4898 if b < 0x80 { 4899 break 4900 } 4901 } 4902 if msglen < 0 { 4903 return ErrInvalidLengthTypes 4904 } 4905 postIndex := iNdEx + msglen 4906 if postIndex < 0 { 4907 return ErrInvalidLengthTypes 4908 } 4909 if postIndex > l { 4910 return io.ErrUnexpectedEOF 4911 } 4912 m.Signatures = append(m.Signatures, CommitSig{}) 4913 if err := m.Signatures[len(m.Signatures)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4914 return err 4915 } 4916 iNdEx = postIndex 4917 default: 4918 iNdEx = preIndex 4919 skippy, err := skipTypes(dAtA[iNdEx:]) 4920 if err != nil { 4921 return err 4922 } 4923 if (skippy < 0) || (iNdEx+skippy) < 0 { 4924 return ErrInvalidLengthTypes 4925 } 4926 if (iNdEx + skippy) > l { 4927 return io.ErrUnexpectedEOF 4928 } 4929 iNdEx += skippy 4930 } 4931 } 4932 4933 if iNdEx > l { 4934 return io.ErrUnexpectedEOF 4935 } 4936 return nil 4937 } 4938 func (m *CommitSig) Unmarshal(dAtA []byte) error { 4939 l := len(dAtA) 4940 iNdEx := 0 4941 for iNdEx < l { 4942 preIndex := iNdEx 4943 var wire uint64 4944 for shift := uint(0); ; shift += 7 { 4945 if shift >= 64 { 4946 return ErrIntOverflowTypes 4947 } 4948 if iNdEx >= l { 4949 return io.ErrUnexpectedEOF 4950 } 4951 b := dAtA[iNdEx] 4952 iNdEx++ 4953 wire |= uint64(b&0x7F) << shift 4954 if b < 0x80 { 4955 break 4956 } 4957 } 4958 fieldNum := int32(wire >> 3) 4959 wireType := int(wire & 0x7) 4960 if wireType == 4 { 4961 return fmt.Errorf("proto: CommitSig: wiretype end group for non-group") 4962 } 4963 if fieldNum <= 0 { 4964 return fmt.Errorf("proto: CommitSig: illegal tag %d (wire type %d)", fieldNum, wire) 4965 } 4966 switch fieldNum { 4967 case 1: 4968 if wireType != 0 { 4969 return fmt.Errorf("proto: wrong wireType = %d for field BlockIdFlag", wireType) 4970 } 4971 m.BlockIdFlag = 0 4972 for shift := uint(0); ; shift += 7 { 4973 if shift >= 64 { 4974 return ErrIntOverflowTypes 4975 } 4976 if iNdEx >= l { 4977 return io.ErrUnexpectedEOF 4978 } 4979 b := dAtA[iNdEx] 4980 iNdEx++ 4981 m.BlockIdFlag |= BlockIDFlag(b&0x7F) << shift 4982 if b < 0x80 { 4983 break 4984 } 4985 } 4986 case 2: 4987 if wireType != 2 { 4988 return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) 4989 } 4990 var byteLen int 4991 for shift := uint(0); ; shift += 7 { 4992 if shift >= 64 { 4993 return ErrIntOverflowTypes 4994 } 4995 if iNdEx >= l { 4996 return io.ErrUnexpectedEOF 4997 } 4998 b := dAtA[iNdEx] 4999 iNdEx++ 5000 byteLen |= int(b&0x7F) << shift 5001 if b < 0x80 { 5002 break 5003 } 5004 } 5005 if byteLen < 0 { 5006 return ErrInvalidLengthTypes 5007 } 5008 postIndex := iNdEx + byteLen 5009 if postIndex < 0 { 5010 return ErrInvalidLengthTypes 5011 } 5012 if postIndex > l { 5013 return io.ErrUnexpectedEOF 5014 } 5015 m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) 5016 if m.ValidatorAddress == nil { 5017 m.ValidatorAddress = []byte{} 5018 } 5019 iNdEx = postIndex 5020 case 3: 5021 if wireType != 2 { 5022 return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) 5023 } 5024 var msglen int 5025 for shift := uint(0); ; shift += 7 { 5026 if shift >= 64 { 5027 return ErrIntOverflowTypes 5028 } 5029 if iNdEx >= l { 5030 return io.ErrUnexpectedEOF 5031 } 5032 b := dAtA[iNdEx] 5033 iNdEx++ 5034 msglen |= int(b&0x7F) << shift 5035 if b < 0x80 { 5036 break 5037 } 5038 } 5039 if msglen < 0 { 5040 return ErrInvalidLengthTypes 5041 } 5042 postIndex := iNdEx + msglen 5043 if postIndex < 0 { 5044 return ErrInvalidLengthTypes 5045 } 5046 if postIndex > l { 5047 return io.ErrUnexpectedEOF 5048 } 5049 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { 5050 return err 5051 } 5052 iNdEx = postIndex 5053 case 4: 5054 if wireType != 2 { 5055 return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) 5056 } 5057 var byteLen int 5058 for shift := uint(0); ; shift += 7 { 5059 if shift >= 64 { 5060 return ErrIntOverflowTypes 5061 } 5062 if iNdEx >= l { 5063 return io.ErrUnexpectedEOF 5064 } 5065 b := dAtA[iNdEx] 5066 iNdEx++ 5067 byteLen |= int(b&0x7F) << shift 5068 if b < 0x80 { 5069 break 5070 } 5071 } 5072 if byteLen < 0 { 5073 return ErrInvalidLengthTypes 5074 } 5075 postIndex := iNdEx + byteLen 5076 if postIndex < 0 { 5077 return ErrInvalidLengthTypes 5078 } 5079 if postIndex > l { 5080 return io.ErrUnexpectedEOF 5081 } 5082 m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) 5083 if m.Signature == nil { 5084 m.Signature = []byte{} 5085 } 5086 iNdEx = postIndex 5087 default: 5088 iNdEx = preIndex 5089 skippy, err := skipTypes(dAtA[iNdEx:]) 5090 if err != nil { 5091 return err 5092 } 5093 if (skippy < 0) || (iNdEx+skippy) < 0 { 5094 return ErrInvalidLengthTypes 5095 } 5096 if (iNdEx + skippy) > l { 5097 return io.ErrUnexpectedEOF 5098 } 5099 iNdEx += skippy 5100 } 5101 } 5102 5103 if iNdEx > l { 5104 return io.ErrUnexpectedEOF 5105 } 5106 return nil 5107 } 5108 func (m *ExtendedCommit) Unmarshal(dAtA []byte) error { 5109 l := len(dAtA) 5110 iNdEx := 0 5111 for iNdEx < l { 5112 preIndex := iNdEx 5113 var wire uint64 5114 for shift := uint(0); ; shift += 7 { 5115 if shift >= 64 { 5116 return ErrIntOverflowTypes 5117 } 5118 if iNdEx >= l { 5119 return io.ErrUnexpectedEOF 5120 } 5121 b := dAtA[iNdEx] 5122 iNdEx++ 5123 wire |= uint64(b&0x7F) << shift 5124 if b < 0x80 { 5125 break 5126 } 5127 } 5128 fieldNum := int32(wire >> 3) 5129 wireType := int(wire & 0x7) 5130 if wireType == 4 { 5131 return fmt.Errorf("proto: ExtendedCommit: wiretype end group for non-group") 5132 } 5133 if fieldNum <= 0 { 5134 return fmt.Errorf("proto: ExtendedCommit: illegal tag %d (wire type %d)", fieldNum, wire) 5135 } 5136 switch fieldNum { 5137 case 1: 5138 if wireType != 0 { 5139 return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) 5140 } 5141 m.Height = 0 5142 for shift := uint(0); ; shift += 7 { 5143 if shift >= 64 { 5144 return ErrIntOverflowTypes 5145 } 5146 if iNdEx >= l { 5147 return io.ErrUnexpectedEOF 5148 } 5149 b := dAtA[iNdEx] 5150 iNdEx++ 5151 m.Height |= int64(b&0x7F) << shift 5152 if b < 0x80 { 5153 break 5154 } 5155 } 5156 case 2: 5157 if wireType != 0 { 5158 return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) 5159 } 5160 m.Round = 0 5161 for shift := uint(0); ; shift += 7 { 5162 if shift >= 64 { 5163 return ErrIntOverflowTypes 5164 } 5165 if iNdEx >= l { 5166 return io.ErrUnexpectedEOF 5167 } 5168 b := dAtA[iNdEx] 5169 iNdEx++ 5170 m.Round |= int32(b&0x7F) << shift 5171 if b < 0x80 { 5172 break 5173 } 5174 } 5175 case 3: 5176 if wireType != 2 { 5177 return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) 5178 } 5179 var msglen int 5180 for shift := uint(0); ; shift += 7 { 5181 if shift >= 64 { 5182 return ErrIntOverflowTypes 5183 } 5184 if iNdEx >= l { 5185 return io.ErrUnexpectedEOF 5186 } 5187 b := dAtA[iNdEx] 5188 iNdEx++ 5189 msglen |= int(b&0x7F) << shift 5190 if b < 0x80 { 5191 break 5192 } 5193 } 5194 if msglen < 0 { 5195 return ErrInvalidLengthTypes 5196 } 5197 postIndex := iNdEx + msglen 5198 if postIndex < 0 { 5199 return ErrInvalidLengthTypes 5200 } 5201 if postIndex > l { 5202 return io.ErrUnexpectedEOF 5203 } 5204 if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 5205 return err 5206 } 5207 iNdEx = postIndex 5208 case 4: 5209 if wireType != 2 { 5210 return fmt.Errorf("proto: wrong wireType = %d for field ExtendedSignatures", wireType) 5211 } 5212 var msglen int 5213 for shift := uint(0); ; shift += 7 { 5214 if shift >= 64 { 5215 return ErrIntOverflowTypes 5216 } 5217 if iNdEx >= l { 5218 return io.ErrUnexpectedEOF 5219 } 5220 b := dAtA[iNdEx] 5221 iNdEx++ 5222 msglen |= int(b&0x7F) << shift 5223 if b < 0x80 { 5224 break 5225 } 5226 } 5227 if msglen < 0 { 5228 return ErrInvalidLengthTypes 5229 } 5230 postIndex := iNdEx + msglen 5231 if postIndex < 0 { 5232 return ErrInvalidLengthTypes 5233 } 5234 if postIndex > l { 5235 return io.ErrUnexpectedEOF 5236 } 5237 m.ExtendedSignatures = append(m.ExtendedSignatures, ExtendedCommitSig{}) 5238 if err := m.ExtendedSignatures[len(m.ExtendedSignatures)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 5239 return err 5240 } 5241 iNdEx = postIndex 5242 default: 5243 iNdEx = preIndex 5244 skippy, err := skipTypes(dAtA[iNdEx:]) 5245 if err != nil { 5246 return err 5247 } 5248 if (skippy < 0) || (iNdEx+skippy) < 0 { 5249 return ErrInvalidLengthTypes 5250 } 5251 if (iNdEx + skippy) > l { 5252 return io.ErrUnexpectedEOF 5253 } 5254 iNdEx += skippy 5255 } 5256 } 5257 5258 if iNdEx > l { 5259 return io.ErrUnexpectedEOF 5260 } 5261 return nil 5262 } 5263 func (m *ExtendedCommitSig) Unmarshal(dAtA []byte) error { 5264 l := len(dAtA) 5265 iNdEx := 0 5266 for iNdEx < l { 5267 preIndex := iNdEx 5268 var wire uint64 5269 for shift := uint(0); ; shift += 7 { 5270 if shift >= 64 { 5271 return ErrIntOverflowTypes 5272 } 5273 if iNdEx >= l { 5274 return io.ErrUnexpectedEOF 5275 } 5276 b := dAtA[iNdEx] 5277 iNdEx++ 5278 wire |= uint64(b&0x7F) << shift 5279 if b < 0x80 { 5280 break 5281 } 5282 } 5283 fieldNum := int32(wire >> 3) 5284 wireType := int(wire & 0x7) 5285 if wireType == 4 { 5286 return fmt.Errorf("proto: ExtendedCommitSig: wiretype end group for non-group") 5287 } 5288 if fieldNum <= 0 { 5289 return fmt.Errorf("proto: ExtendedCommitSig: illegal tag %d (wire type %d)", fieldNum, wire) 5290 } 5291 switch fieldNum { 5292 case 1: 5293 if wireType != 0 { 5294 return fmt.Errorf("proto: wrong wireType = %d for field BlockIdFlag", wireType) 5295 } 5296 m.BlockIdFlag = 0 5297 for shift := uint(0); ; shift += 7 { 5298 if shift >= 64 { 5299 return ErrIntOverflowTypes 5300 } 5301 if iNdEx >= l { 5302 return io.ErrUnexpectedEOF 5303 } 5304 b := dAtA[iNdEx] 5305 iNdEx++ 5306 m.BlockIdFlag |= BlockIDFlag(b&0x7F) << shift 5307 if b < 0x80 { 5308 break 5309 } 5310 } 5311 case 2: 5312 if wireType != 2 { 5313 return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) 5314 } 5315 var byteLen int 5316 for shift := uint(0); ; shift += 7 { 5317 if shift >= 64 { 5318 return ErrIntOverflowTypes 5319 } 5320 if iNdEx >= l { 5321 return io.ErrUnexpectedEOF 5322 } 5323 b := dAtA[iNdEx] 5324 iNdEx++ 5325 byteLen |= int(b&0x7F) << shift 5326 if b < 0x80 { 5327 break 5328 } 5329 } 5330 if byteLen < 0 { 5331 return ErrInvalidLengthTypes 5332 } 5333 postIndex := iNdEx + byteLen 5334 if postIndex < 0 { 5335 return ErrInvalidLengthTypes 5336 } 5337 if postIndex > l { 5338 return io.ErrUnexpectedEOF 5339 } 5340 m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) 5341 if m.ValidatorAddress == nil { 5342 m.ValidatorAddress = []byte{} 5343 } 5344 iNdEx = postIndex 5345 case 3: 5346 if wireType != 2 { 5347 return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) 5348 } 5349 var msglen int 5350 for shift := uint(0); ; shift += 7 { 5351 if shift >= 64 { 5352 return ErrIntOverflowTypes 5353 } 5354 if iNdEx >= l { 5355 return io.ErrUnexpectedEOF 5356 } 5357 b := dAtA[iNdEx] 5358 iNdEx++ 5359 msglen |= int(b&0x7F) << shift 5360 if b < 0x80 { 5361 break 5362 } 5363 } 5364 if msglen < 0 { 5365 return ErrInvalidLengthTypes 5366 } 5367 postIndex := iNdEx + msglen 5368 if postIndex < 0 { 5369 return ErrInvalidLengthTypes 5370 } 5371 if postIndex > l { 5372 return io.ErrUnexpectedEOF 5373 } 5374 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { 5375 return err 5376 } 5377 iNdEx = postIndex 5378 case 4: 5379 if wireType != 2 { 5380 return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) 5381 } 5382 var byteLen int 5383 for shift := uint(0); ; shift += 7 { 5384 if shift >= 64 { 5385 return ErrIntOverflowTypes 5386 } 5387 if iNdEx >= l { 5388 return io.ErrUnexpectedEOF 5389 } 5390 b := dAtA[iNdEx] 5391 iNdEx++ 5392 byteLen |= int(b&0x7F) << shift 5393 if b < 0x80 { 5394 break 5395 } 5396 } 5397 if byteLen < 0 { 5398 return ErrInvalidLengthTypes 5399 } 5400 postIndex := iNdEx + byteLen 5401 if postIndex < 0 { 5402 return ErrInvalidLengthTypes 5403 } 5404 if postIndex > l { 5405 return io.ErrUnexpectedEOF 5406 } 5407 m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) 5408 if m.Signature == nil { 5409 m.Signature = []byte{} 5410 } 5411 iNdEx = postIndex 5412 case 5: 5413 if wireType != 2 { 5414 return fmt.Errorf("proto: wrong wireType = %d for field Extension", wireType) 5415 } 5416 var byteLen int 5417 for shift := uint(0); ; shift += 7 { 5418 if shift >= 64 { 5419 return ErrIntOverflowTypes 5420 } 5421 if iNdEx >= l { 5422 return io.ErrUnexpectedEOF 5423 } 5424 b := dAtA[iNdEx] 5425 iNdEx++ 5426 byteLen |= int(b&0x7F) << shift 5427 if b < 0x80 { 5428 break 5429 } 5430 } 5431 if byteLen < 0 { 5432 return ErrInvalidLengthTypes 5433 } 5434 postIndex := iNdEx + byteLen 5435 if postIndex < 0 { 5436 return ErrInvalidLengthTypes 5437 } 5438 if postIndex > l { 5439 return io.ErrUnexpectedEOF 5440 } 5441 m.Extension = append(m.Extension[:0], dAtA[iNdEx:postIndex]...) 5442 if m.Extension == nil { 5443 m.Extension = []byte{} 5444 } 5445 iNdEx = postIndex 5446 case 6: 5447 if wireType != 2 { 5448 return fmt.Errorf("proto: wrong wireType = %d for field ExtensionSignature", wireType) 5449 } 5450 var byteLen int 5451 for shift := uint(0); ; shift += 7 { 5452 if shift >= 64 { 5453 return ErrIntOverflowTypes 5454 } 5455 if iNdEx >= l { 5456 return io.ErrUnexpectedEOF 5457 } 5458 b := dAtA[iNdEx] 5459 iNdEx++ 5460 byteLen |= int(b&0x7F) << shift 5461 if b < 0x80 { 5462 break 5463 } 5464 } 5465 if byteLen < 0 { 5466 return ErrInvalidLengthTypes 5467 } 5468 postIndex := iNdEx + byteLen 5469 if postIndex < 0 { 5470 return ErrInvalidLengthTypes 5471 } 5472 if postIndex > l { 5473 return io.ErrUnexpectedEOF 5474 } 5475 m.ExtensionSignature = append(m.ExtensionSignature[:0], dAtA[iNdEx:postIndex]...) 5476 if m.ExtensionSignature == nil { 5477 m.ExtensionSignature = []byte{} 5478 } 5479 iNdEx = postIndex 5480 default: 5481 iNdEx = preIndex 5482 skippy, err := skipTypes(dAtA[iNdEx:]) 5483 if err != nil { 5484 return err 5485 } 5486 if (skippy < 0) || (iNdEx+skippy) < 0 { 5487 return ErrInvalidLengthTypes 5488 } 5489 if (iNdEx + skippy) > l { 5490 return io.ErrUnexpectedEOF 5491 } 5492 iNdEx += skippy 5493 } 5494 } 5495 5496 if iNdEx > l { 5497 return io.ErrUnexpectedEOF 5498 } 5499 return nil 5500 } 5501 func (m *Proposal) Unmarshal(dAtA []byte) error { 5502 l := len(dAtA) 5503 iNdEx := 0 5504 for iNdEx < l { 5505 preIndex := iNdEx 5506 var wire uint64 5507 for shift := uint(0); ; shift += 7 { 5508 if shift >= 64 { 5509 return ErrIntOverflowTypes 5510 } 5511 if iNdEx >= l { 5512 return io.ErrUnexpectedEOF 5513 } 5514 b := dAtA[iNdEx] 5515 iNdEx++ 5516 wire |= uint64(b&0x7F) << shift 5517 if b < 0x80 { 5518 break 5519 } 5520 } 5521 fieldNum := int32(wire >> 3) 5522 wireType := int(wire & 0x7) 5523 if wireType == 4 { 5524 return fmt.Errorf("proto: Proposal: wiretype end group for non-group") 5525 } 5526 if fieldNum <= 0 { 5527 return fmt.Errorf("proto: Proposal: illegal tag %d (wire type %d)", fieldNum, wire) 5528 } 5529 switch fieldNum { 5530 case 1: 5531 if wireType != 0 { 5532 return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) 5533 } 5534 m.Type = 0 5535 for shift := uint(0); ; shift += 7 { 5536 if shift >= 64 { 5537 return ErrIntOverflowTypes 5538 } 5539 if iNdEx >= l { 5540 return io.ErrUnexpectedEOF 5541 } 5542 b := dAtA[iNdEx] 5543 iNdEx++ 5544 m.Type |= SignedMsgType(b&0x7F) << shift 5545 if b < 0x80 { 5546 break 5547 } 5548 } 5549 case 2: 5550 if wireType != 0 { 5551 return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) 5552 } 5553 m.Height = 0 5554 for shift := uint(0); ; shift += 7 { 5555 if shift >= 64 { 5556 return ErrIntOverflowTypes 5557 } 5558 if iNdEx >= l { 5559 return io.ErrUnexpectedEOF 5560 } 5561 b := dAtA[iNdEx] 5562 iNdEx++ 5563 m.Height |= int64(b&0x7F) << shift 5564 if b < 0x80 { 5565 break 5566 } 5567 } 5568 case 3: 5569 if wireType != 0 { 5570 return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) 5571 } 5572 m.Round = 0 5573 for shift := uint(0); ; shift += 7 { 5574 if shift >= 64 { 5575 return ErrIntOverflowTypes 5576 } 5577 if iNdEx >= l { 5578 return io.ErrUnexpectedEOF 5579 } 5580 b := dAtA[iNdEx] 5581 iNdEx++ 5582 m.Round |= int32(b&0x7F) << shift 5583 if b < 0x80 { 5584 break 5585 } 5586 } 5587 case 4: 5588 if wireType != 0 { 5589 return fmt.Errorf("proto: wrong wireType = %d for field PolRound", wireType) 5590 } 5591 m.PolRound = 0 5592 for shift := uint(0); ; shift += 7 { 5593 if shift >= 64 { 5594 return ErrIntOverflowTypes 5595 } 5596 if iNdEx >= l { 5597 return io.ErrUnexpectedEOF 5598 } 5599 b := dAtA[iNdEx] 5600 iNdEx++ 5601 m.PolRound |= int32(b&0x7F) << shift 5602 if b < 0x80 { 5603 break 5604 } 5605 } 5606 case 5: 5607 if wireType != 2 { 5608 return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) 5609 } 5610 var msglen int 5611 for shift := uint(0); ; shift += 7 { 5612 if shift >= 64 { 5613 return ErrIntOverflowTypes 5614 } 5615 if iNdEx >= l { 5616 return io.ErrUnexpectedEOF 5617 } 5618 b := dAtA[iNdEx] 5619 iNdEx++ 5620 msglen |= int(b&0x7F) << shift 5621 if b < 0x80 { 5622 break 5623 } 5624 } 5625 if msglen < 0 { 5626 return ErrInvalidLengthTypes 5627 } 5628 postIndex := iNdEx + msglen 5629 if postIndex < 0 { 5630 return ErrInvalidLengthTypes 5631 } 5632 if postIndex > l { 5633 return io.ErrUnexpectedEOF 5634 } 5635 if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 5636 return err 5637 } 5638 iNdEx = postIndex 5639 case 6: 5640 if wireType != 2 { 5641 return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) 5642 } 5643 var msglen int 5644 for shift := uint(0); ; shift += 7 { 5645 if shift >= 64 { 5646 return ErrIntOverflowTypes 5647 } 5648 if iNdEx >= l { 5649 return io.ErrUnexpectedEOF 5650 } 5651 b := dAtA[iNdEx] 5652 iNdEx++ 5653 msglen |= int(b&0x7F) << shift 5654 if b < 0x80 { 5655 break 5656 } 5657 } 5658 if msglen < 0 { 5659 return ErrInvalidLengthTypes 5660 } 5661 postIndex := iNdEx + msglen 5662 if postIndex < 0 { 5663 return ErrInvalidLengthTypes 5664 } 5665 if postIndex > l { 5666 return io.ErrUnexpectedEOF 5667 } 5668 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { 5669 return err 5670 } 5671 iNdEx = postIndex 5672 case 7: 5673 if wireType != 2 { 5674 return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) 5675 } 5676 var byteLen int 5677 for shift := uint(0); ; shift += 7 { 5678 if shift >= 64 { 5679 return ErrIntOverflowTypes 5680 } 5681 if iNdEx >= l { 5682 return io.ErrUnexpectedEOF 5683 } 5684 b := dAtA[iNdEx] 5685 iNdEx++ 5686 byteLen |= int(b&0x7F) << shift 5687 if b < 0x80 { 5688 break 5689 } 5690 } 5691 if byteLen < 0 { 5692 return ErrInvalidLengthTypes 5693 } 5694 postIndex := iNdEx + byteLen 5695 if postIndex < 0 { 5696 return ErrInvalidLengthTypes 5697 } 5698 if postIndex > l { 5699 return io.ErrUnexpectedEOF 5700 } 5701 m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) 5702 if m.Signature == nil { 5703 m.Signature = []byte{} 5704 } 5705 iNdEx = postIndex 5706 case 8: 5707 if wireType != 2 { 5708 return fmt.Errorf("proto: wrong wireType = %d for field TxKeys", wireType) 5709 } 5710 var msglen int 5711 for shift := uint(0); ; shift += 7 { 5712 if shift >= 64 { 5713 return ErrIntOverflowTypes 5714 } 5715 if iNdEx >= l { 5716 return io.ErrUnexpectedEOF 5717 } 5718 b := dAtA[iNdEx] 5719 iNdEx++ 5720 msglen |= int(b&0x7F) << shift 5721 if b < 0x80 { 5722 break 5723 } 5724 } 5725 if msglen < 0 { 5726 return ErrInvalidLengthTypes 5727 } 5728 postIndex := iNdEx + msglen 5729 if postIndex < 0 { 5730 return ErrInvalidLengthTypes 5731 } 5732 if postIndex > l { 5733 return io.ErrUnexpectedEOF 5734 } 5735 m.TxKeys = append(m.TxKeys, &TxKey{}) 5736 if err := m.TxKeys[len(m.TxKeys)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 5737 return err 5738 } 5739 iNdEx = postIndex 5740 case 9: 5741 if wireType != 2 { 5742 return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType) 5743 } 5744 var msglen int 5745 for shift := uint(0); ; shift += 7 { 5746 if shift >= 64 { 5747 return ErrIntOverflowTypes 5748 } 5749 if iNdEx >= l { 5750 return io.ErrUnexpectedEOF 5751 } 5752 b := dAtA[iNdEx] 5753 iNdEx++ 5754 msglen |= int(b&0x7F) << shift 5755 if b < 0x80 { 5756 break 5757 } 5758 } 5759 if msglen < 0 { 5760 return ErrInvalidLengthTypes 5761 } 5762 postIndex := iNdEx + msglen 5763 if postIndex < 0 { 5764 return ErrInvalidLengthTypes 5765 } 5766 if postIndex > l { 5767 return io.ErrUnexpectedEOF 5768 } 5769 if m.Evidence == nil { 5770 m.Evidence = &EvidenceList{} 5771 } 5772 if err := m.Evidence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 5773 return err 5774 } 5775 iNdEx = postIndex 5776 case 10: 5777 if wireType != 2 { 5778 return fmt.Errorf("proto: wrong wireType = %d for field LastCommit", wireType) 5779 } 5780 var msglen int 5781 for shift := uint(0); ; shift += 7 { 5782 if shift >= 64 { 5783 return ErrIntOverflowTypes 5784 } 5785 if iNdEx >= l { 5786 return io.ErrUnexpectedEOF 5787 } 5788 b := dAtA[iNdEx] 5789 iNdEx++ 5790 msglen |= int(b&0x7F) << shift 5791 if b < 0x80 { 5792 break 5793 } 5794 } 5795 if msglen < 0 { 5796 return ErrInvalidLengthTypes 5797 } 5798 postIndex := iNdEx + msglen 5799 if postIndex < 0 { 5800 return ErrInvalidLengthTypes 5801 } 5802 if postIndex > l { 5803 return io.ErrUnexpectedEOF 5804 } 5805 if m.LastCommit == nil { 5806 m.LastCommit = &Commit{} 5807 } 5808 if err := m.LastCommit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 5809 return err 5810 } 5811 iNdEx = postIndex 5812 case 11: 5813 if wireType != 2 { 5814 return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) 5815 } 5816 var msglen int 5817 for shift := uint(0); ; shift += 7 { 5818 if shift >= 64 { 5819 return ErrIntOverflowTypes 5820 } 5821 if iNdEx >= l { 5822 return io.ErrUnexpectedEOF 5823 } 5824 b := dAtA[iNdEx] 5825 iNdEx++ 5826 msglen |= int(b&0x7F) << shift 5827 if b < 0x80 { 5828 break 5829 } 5830 } 5831 if msglen < 0 { 5832 return ErrInvalidLengthTypes 5833 } 5834 postIndex := iNdEx + msglen 5835 if postIndex < 0 { 5836 return ErrInvalidLengthTypes 5837 } 5838 if postIndex > l { 5839 return io.ErrUnexpectedEOF 5840 } 5841 if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 5842 return err 5843 } 5844 iNdEx = postIndex 5845 case 12: 5846 if wireType != 2 { 5847 return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) 5848 } 5849 var byteLen int 5850 for shift := uint(0); ; shift += 7 { 5851 if shift >= 64 { 5852 return ErrIntOverflowTypes 5853 } 5854 if iNdEx >= l { 5855 return io.ErrUnexpectedEOF 5856 } 5857 b := dAtA[iNdEx] 5858 iNdEx++ 5859 byteLen |= int(b&0x7F) << shift 5860 if b < 0x80 { 5861 break 5862 } 5863 } 5864 if byteLen < 0 { 5865 return ErrInvalidLengthTypes 5866 } 5867 postIndex := iNdEx + byteLen 5868 if postIndex < 0 { 5869 return ErrInvalidLengthTypes 5870 } 5871 if postIndex > l { 5872 return io.ErrUnexpectedEOF 5873 } 5874 m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) 5875 if m.ProposerAddress == nil { 5876 m.ProposerAddress = []byte{} 5877 } 5878 iNdEx = postIndex 5879 default: 5880 iNdEx = preIndex 5881 skippy, err := skipTypes(dAtA[iNdEx:]) 5882 if err != nil { 5883 return err 5884 } 5885 if (skippy < 0) || (iNdEx+skippy) < 0 { 5886 return ErrInvalidLengthTypes 5887 } 5888 if (iNdEx + skippy) > l { 5889 return io.ErrUnexpectedEOF 5890 } 5891 iNdEx += skippy 5892 } 5893 } 5894 5895 if iNdEx > l { 5896 return io.ErrUnexpectedEOF 5897 } 5898 return nil 5899 } 5900 func (m *SignedHeader) Unmarshal(dAtA []byte) error { 5901 l := len(dAtA) 5902 iNdEx := 0 5903 for iNdEx < l { 5904 preIndex := iNdEx 5905 var wire uint64 5906 for shift := uint(0); ; shift += 7 { 5907 if shift >= 64 { 5908 return ErrIntOverflowTypes 5909 } 5910 if iNdEx >= l { 5911 return io.ErrUnexpectedEOF 5912 } 5913 b := dAtA[iNdEx] 5914 iNdEx++ 5915 wire |= uint64(b&0x7F) << shift 5916 if b < 0x80 { 5917 break 5918 } 5919 } 5920 fieldNum := int32(wire >> 3) 5921 wireType := int(wire & 0x7) 5922 if wireType == 4 { 5923 return fmt.Errorf("proto: SignedHeader: wiretype end group for non-group") 5924 } 5925 if fieldNum <= 0 { 5926 return fmt.Errorf("proto: SignedHeader: illegal tag %d (wire type %d)", fieldNum, wire) 5927 } 5928 switch fieldNum { 5929 case 1: 5930 if wireType != 2 { 5931 return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) 5932 } 5933 var msglen int 5934 for shift := uint(0); ; shift += 7 { 5935 if shift >= 64 { 5936 return ErrIntOverflowTypes 5937 } 5938 if iNdEx >= l { 5939 return io.ErrUnexpectedEOF 5940 } 5941 b := dAtA[iNdEx] 5942 iNdEx++ 5943 msglen |= int(b&0x7F) << shift 5944 if b < 0x80 { 5945 break 5946 } 5947 } 5948 if msglen < 0 { 5949 return ErrInvalidLengthTypes 5950 } 5951 postIndex := iNdEx + msglen 5952 if postIndex < 0 { 5953 return ErrInvalidLengthTypes 5954 } 5955 if postIndex > l { 5956 return io.ErrUnexpectedEOF 5957 } 5958 if m.Header == nil { 5959 m.Header = &Header{} 5960 } 5961 if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 5962 return err 5963 } 5964 iNdEx = postIndex 5965 case 2: 5966 if wireType != 2 { 5967 return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType) 5968 } 5969 var msglen int 5970 for shift := uint(0); ; shift += 7 { 5971 if shift >= 64 { 5972 return ErrIntOverflowTypes 5973 } 5974 if iNdEx >= l { 5975 return io.ErrUnexpectedEOF 5976 } 5977 b := dAtA[iNdEx] 5978 iNdEx++ 5979 msglen |= int(b&0x7F) << shift 5980 if b < 0x80 { 5981 break 5982 } 5983 } 5984 if msglen < 0 { 5985 return ErrInvalidLengthTypes 5986 } 5987 postIndex := iNdEx + msglen 5988 if postIndex < 0 { 5989 return ErrInvalidLengthTypes 5990 } 5991 if postIndex > l { 5992 return io.ErrUnexpectedEOF 5993 } 5994 if m.Commit == nil { 5995 m.Commit = &Commit{} 5996 } 5997 if err := m.Commit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 5998 return err 5999 } 6000 iNdEx = postIndex 6001 default: 6002 iNdEx = preIndex 6003 skippy, err := skipTypes(dAtA[iNdEx:]) 6004 if err != nil { 6005 return err 6006 } 6007 if (skippy < 0) || (iNdEx+skippy) < 0 { 6008 return ErrInvalidLengthTypes 6009 } 6010 if (iNdEx + skippy) > l { 6011 return io.ErrUnexpectedEOF 6012 } 6013 iNdEx += skippy 6014 } 6015 } 6016 6017 if iNdEx > l { 6018 return io.ErrUnexpectedEOF 6019 } 6020 return nil 6021 } 6022 func (m *LightBlock) Unmarshal(dAtA []byte) error { 6023 l := len(dAtA) 6024 iNdEx := 0 6025 for iNdEx < l { 6026 preIndex := iNdEx 6027 var wire uint64 6028 for shift := uint(0); ; shift += 7 { 6029 if shift >= 64 { 6030 return ErrIntOverflowTypes 6031 } 6032 if iNdEx >= l { 6033 return io.ErrUnexpectedEOF 6034 } 6035 b := dAtA[iNdEx] 6036 iNdEx++ 6037 wire |= uint64(b&0x7F) << shift 6038 if b < 0x80 { 6039 break 6040 } 6041 } 6042 fieldNum := int32(wire >> 3) 6043 wireType := int(wire & 0x7) 6044 if wireType == 4 { 6045 return fmt.Errorf("proto: LightBlock: wiretype end group for non-group") 6046 } 6047 if fieldNum <= 0 { 6048 return fmt.Errorf("proto: LightBlock: illegal tag %d (wire type %d)", fieldNum, wire) 6049 } 6050 switch fieldNum { 6051 case 1: 6052 if wireType != 2 { 6053 return fmt.Errorf("proto: wrong wireType = %d for field SignedHeader", wireType) 6054 } 6055 var msglen int 6056 for shift := uint(0); ; shift += 7 { 6057 if shift >= 64 { 6058 return ErrIntOverflowTypes 6059 } 6060 if iNdEx >= l { 6061 return io.ErrUnexpectedEOF 6062 } 6063 b := dAtA[iNdEx] 6064 iNdEx++ 6065 msglen |= int(b&0x7F) << shift 6066 if b < 0x80 { 6067 break 6068 } 6069 } 6070 if msglen < 0 { 6071 return ErrInvalidLengthTypes 6072 } 6073 postIndex := iNdEx + msglen 6074 if postIndex < 0 { 6075 return ErrInvalidLengthTypes 6076 } 6077 if postIndex > l { 6078 return io.ErrUnexpectedEOF 6079 } 6080 if m.SignedHeader == nil { 6081 m.SignedHeader = &SignedHeader{} 6082 } 6083 if err := m.SignedHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 6084 return err 6085 } 6086 iNdEx = postIndex 6087 case 2: 6088 if wireType != 2 { 6089 return fmt.Errorf("proto: wrong wireType = %d for field ValidatorSet", wireType) 6090 } 6091 var msglen int 6092 for shift := uint(0); ; shift += 7 { 6093 if shift >= 64 { 6094 return ErrIntOverflowTypes 6095 } 6096 if iNdEx >= l { 6097 return io.ErrUnexpectedEOF 6098 } 6099 b := dAtA[iNdEx] 6100 iNdEx++ 6101 msglen |= int(b&0x7F) << shift 6102 if b < 0x80 { 6103 break 6104 } 6105 } 6106 if msglen < 0 { 6107 return ErrInvalidLengthTypes 6108 } 6109 postIndex := iNdEx + msglen 6110 if postIndex < 0 { 6111 return ErrInvalidLengthTypes 6112 } 6113 if postIndex > l { 6114 return io.ErrUnexpectedEOF 6115 } 6116 if m.ValidatorSet == nil { 6117 m.ValidatorSet = &ValidatorSet{} 6118 } 6119 if err := m.ValidatorSet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 6120 return err 6121 } 6122 iNdEx = postIndex 6123 default: 6124 iNdEx = preIndex 6125 skippy, err := skipTypes(dAtA[iNdEx:]) 6126 if err != nil { 6127 return err 6128 } 6129 if (skippy < 0) || (iNdEx+skippy) < 0 { 6130 return ErrInvalidLengthTypes 6131 } 6132 if (iNdEx + skippy) > l { 6133 return io.ErrUnexpectedEOF 6134 } 6135 iNdEx += skippy 6136 } 6137 } 6138 6139 if iNdEx > l { 6140 return io.ErrUnexpectedEOF 6141 } 6142 return nil 6143 } 6144 func (m *BlockMeta) Unmarshal(dAtA []byte) error { 6145 l := len(dAtA) 6146 iNdEx := 0 6147 for iNdEx < l { 6148 preIndex := iNdEx 6149 var wire uint64 6150 for shift := uint(0); ; shift += 7 { 6151 if shift >= 64 { 6152 return ErrIntOverflowTypes 6153 } 6154 if iNdEx >= l { 6155 return io.ErrUnexpectedEOF 6156 } 6157 b := dAtA[iNdEx] 6158 iNdEx++ 6159 wire |= uint64(b&0x7F) << shift 6160 if b < 0x80 { 6161 break 6162 } 6163 } 6164 fieldNum := int32(wire >> 3) 6165 wireType := int(wire & 0x7) 6166 if wireType == 4 { 6167 return fmt.Errorf("proto: BlockMeta: wiretype end group for non-group") 6168 } 6169 if fieldNum <= 0 { 6170 return fmt.Errorf("proto: BlockMeta: illegal tag %d (wire type %d)", fieldNum, wire) 6171 } 6172 switch fieldNum { 6173 case 1: 6174 if wireType != 2 { 6175 return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) 6176 } 6177 var msglen int 6178 for shift := uint(0); ; shift += 7 { 6179 if shift >= 64 { 6180 return ErrIntOverflowTypes 6181 } 6182 if iNdEx >= l { 6183 return io.ErrUnexpectedEOF 6184 } 6185 b := dAtA[iNdEx] 6186 iNdEx++ 6187 msglen |= int(b&0x7F) << shift 6188 if b < 0x80 { 6189 break 6190 } 6191 } 6192 if msglen < 0 { 6193 return ErrInvalidLengthTypes 6194 } 6195 postIndex := iNdEx + msglen 6196 if postIndex < 0 { 6197 return ErrInvalidLengthTypes 6198 } 6199 if postIndex > l { 6200 return io.ErrUnexpectedEOF 6201 } 6202 if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 6203 return err 6204 } 6205 iNdEx = postIndex 6206 case 2: 6207 if wireType != 0 { 6208 return fmt.Errorf("proto: wrong wireType = %d for field BlockSize", wireType) 6209 } 6210 m.BlockSize = 0 6211 for shift := uint(0); ; shift += 7 { 6212 if shift >= 64 { 6213 return ErrIntOverflowTypes 6214 } 6215 if iNdEx >= l { 6216 return io.ErrUnexpectedEOF 6217 } 6218 b := dAtA[iNdEx] 6219 iNdEx++ 6220 m.BlockSize |= int64(b&0x7F) << shift 6221 if b < 0x80 { 6222 break 6223 } 6224 } 6225 case 3: 6226 if wireType != 2 { 6227 return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) 6228 } 6229 var msglen int 6230 for shift := uint(0); ; shift += 7 { 6231 if shift >= 64 { 6232 return ErrIntOverflowTypes 6233 } 6234 if iNdEx >= l { 6235 return io.ErrUnexpectedEOF 6236 } 6237 b := dAtA[iNdEx] 6238 iNdEx++ 6239 msglen |= int(b&0x7F) << shift 6240 if b < 0x80 { 6241 break 6242 } 6243 } 6244 if msglen < 0 { 6245 return ErrInvalidLengthTypes 6246 } 6247 postIndex := iNdEx + msglen 6248 if postIndex < 0 { 6249 return ErrInvalidLengthTypes 6250 } 6251 if postIndex > l { 6252 return io.ErrUnexpectedEOF 6253 } 6254 if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 6255 return err 6256 } 6257 iNdEx = postIndex 6258 case 4: 6259 if wireType != 0 { 6260 return fmt.Errorf("proto: wrong wireType = %d for field NumTxs", wireType) 6261 } 6262 m.NumTxs = 0 6263 for shift := uint(0); ; shift += 7 { 6264 if shift >= 64 { 6265 return ErrIntOverflowTypes 6266 } 6267 if iNdEx >= l { 6268 return io.ErrUnexpectedEOF 6269 } 6270 b := dAtA[iNdEx] 6271 iNdEx++ 6272 m.NumTxs |= int64(b&0x7F) << shift 6273 if b < 0x80 { 6274 break 6275 } 6276 } 6277 default: 6278 iNdEx = preIndex 6279 skippy, err := skipTypes(dAtA[iNdEx:]) 6280 if err != nil { 6281 return err 6282 } 6283 if (skippy < 0) || (iNdEx+skippy) < 0 { 6284 return ErrInvalidLengthTypes 6285 } 6286 if (iNdEx + skippy) > l { 6287 return io.ErrUnexpectedEOF 6288 } 6289 iNdEx += skippy 6290 } 6291 } 6292 6293 if iNdEx > l { 6294 return io.ErrUnexpectedEOF 6295 } 6296 return nil 6297 } 6298 func (m *TxProof) Unmarshal(dAtA []byte) error { 6299 l := len(dAtA) 6300 iNdEx := 0 6301 for iNdEx < l { 6302 preIndex := iNdEx 6303 var wire uint64 6304 for shift := uint(0); ; shift += 7 { 6305 if shift >= 64 { 6306 return ErrIntOverflowTypes 6307 } 6308 if iNdEx >= l { 6309 return io.ErrUnexpectedEOF 6310 } 6311 b := dAtA[iNdEx] 6312 iNdEx++ 6313 wire |= uint64(b&0x7F) << shift 6314 if b < 0x80 { 6315 break 6316 } 6317 } 6318 fieldNum := int32(wire >> 3) 6319 wireType := int(wire & 0x7) 6320 if wireType == 4 { 6321 return fmt.Errorf("proto: TxProof: wiretype end group for non-group") 6322 } 6323 if fieldNum <= 0 { 6324 return fmt.Errorf("proto: TxProof: illegal tag %d (wire type %d)", fieldNum, wire) 6325 } 6326 switch fieldNum { 6327 case 1: 6328 if wireType != 2 { 6329 return fmt.Errorf("proto: wrong wireType = %d for field RootHash", wireType) 6330 } 6331 var byteLen int 6332 for shift := uint(0); ; shift += 7 { 6333 if shift >= 64 { 6334 return ErrIntOverflowTypes 6335 } 6336 if iNdEx >= l { 6337 return io.ErrUnexpectedEOF 6338 } 6339 b := dAtA[iNdEx] 6340 iNdEx++ 6341 byteLen |= int(b&0x7F) << shift 6342 if b < 0x80 { 6343 break 6344 } 6345 } 6346 if byteLen < 0 { 6347 return ErrInvalidLengthTypes 6348 } 6349 postIndex := iNdEx + byteLen 6350 if postIndex < 0 { 6351 return ErrInvalidLengthTypes 6352 } 6353 if postIndex > l { 6354 return io.ErrUnexpectedEOF 6355 } 6356 m.RootHash = append(m.RootHash[:0], dAtA[iNdEx:postIndex]...) 6357 if m.RootHash == nil { 6358 m.RootHash = []byte{} 6359 } 6360 iNdEx = postIndex 6361 case 2: 6362 if wireType != 2 { 6363 return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) 6364 } 6365 var byteLen int 6366 for shift := uint(0); ; shift += 7 { 6367 if shift >= 64 { 6368 return ErrIntOverflowTypes 6369 } 6370 if iNdEx >= l { 6371 return io.ErrUnexpectedEOF 6372 } 6373 b := dAtA[iNdEx] 6374 iNdEx++ 6375 byteLen |= int(b&0x7F) << shift 6376 if b < 0x80 { 6377 break 6378 } 6379 } 6380 if byteLen < 0 { 6381 return ErrInvalidLengthTypes 6382 } 6383 postIndex := iNdEx + byteLen 6384 if postIndex < 0 { 6385 return ErrInvalidLengthTypes 6386 } 6387 if postIndex > l { 6388 return io.ErrUnexpectedEOF 6389 } 6390 m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) 6391 if m.Data == nil { 6392 m.Data = []byte{} 6393 } 6394 iNdEx = postIndex 6395 case 3: 6396 if wireType != 2 { 6397 return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) 6398 } 6399 var msglen int 6400 for shift := uint(0); ; shift += 7 { 6401 if shift >= 64 { 6402 return ErrIntOverflowTypes 6403 } 6404 if iNdEx >= l { 6405 return io.ErrUnexpectedEOF 6406 } 6407 b := dAtA[iNdEx] 6408 iNdEx++ 6409 msglen |= int(b&0x7F) << shift 6410 if b < 0x80 { 6411 break 6412 } 6413 } 6414 if msglen < 0 { 6415 return ErrInvalidLengthTypes 6416 } 6417 postIndex := iNdEx + msglen 6418 if postIndex < 0 { 6419 return ErrInvalidLengthTypes 6420 } 6421 if postIndex > l { 6422 return io.ErrUnexpectedEOF 6423 } 6424 if m.Proof == nil { 6425 m.Proof = &crypto.Proof{} 6426 } 6427 if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 6428 return err 6429 } 6430 iNdEx = postIndex 6431 default: 6432 iNdEx = preIndex 6433 skippy, err := skipTypes(dAtA[iNdEx:]) 6434 if err != nil { 6435 return err 6436 } 6437 if (skippy < 0) || (iNdEx+skippy) < 0 { 6438 return ErrInvalidLengthTypes 6439 } 6440 if (iNdEx + skippy) > l { 6441 return io.ErrUnexpectedEOF 6442 } 6443 iNdEx += skippy 6444 } 6445 } 6446 6447 if iNdEx > l { 6448 return io.ErrUnexpectedEOF 6449 } 6450 return nil 6451 } 6452 func (m *Evidence) Unmarshal(dAtA []byte) error { 6453 l := len(dAtA) 6454 iNdEx := 0 6455 for iNdEx < l { 6456 preIndex := iNdEx 6457 var wire uint64 6458 for shift := uint(0); ; shift += 7 { 6459 if shift >= 64 { 6460 return ErrIntOverflowTypes 6461 } 6462 if iNdEx >= l { 6463 return io.ErrUnexpectedEOF 6464 } 6465 b := dAtA[iNdEx] 6466 iNdEx++ 6467 wire |= uint64(b&0x7F) << shift 6468 if b < 0x80 { 6469 break 6470 } 6471 } 6472 fieldNum := int32(wire >> 3) 6473 wireType := int(wire & 0x7) 6474 if wireType == 4 { 6475 return fmt.Errorf("proto: Evidence: wiretype end group for non-group") 6476 } 6477 if fieldNum <= 0 { 6478 return fmt.Errorf("proto: Evidence: illegal tag %d (wire type %d)", fieldNum, wire) 6479 } 6480 switch fieldNum { 6481 case 1: 6482 if wireType != 2 { 6483 return fmt.Errorf("proto: wrong wireType = %d for field DuplicateVoteEvidence", wireType) 6484 } 6485 var msglen int 6486 for shift := uint(0); ; shift += 7 { 6487 if shift >= 64 { 6488 return ErrIntOverflowTypes 6489 } 6490 if iNdEx >= l { 6491 return io.ErrUnexpectedEOF 6492 } 6493 b := dAtA[iNdEx] 6494 iNdEx++ 6495 msglen |= int(b&0x7F) << shift 6496 if b < 0x80 { 6497 break 6498 } 6499 } 6500 if msglen < 0 { 6501 return ErrInvalidLengthTypes 6502 } 6503 postIndex := iNdEx + msglen 6504 if postIndex < 0 { 6505 return ErrInvalidLengthTypes 6506 } 6507 if postIndex > l { 6508 return io.ErrUnexpectedEOF 6509 } 6510 v := &DuplicateVoteEvidence{} 6511 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 6512 return err 6513 } 6514 m.Sum = &Evidence_DuplicateVoteEvidence{v} 6515 iNdEx = postIndex 6516 case 2: 6517 if wireType != 2 { 6518 return fmt.Errorf("proto: wrong wireType = %d for field LightClientAttackEvidence", wireType) 6519 } 6520 var msglen int 6521 for shift := uint(0); ; shift += 7 { 6522 if shift >= 64 { 6523 return ErrIntOverflowTypes 6524 } 6525 if iNdEx >= l { 6526 return io.ErrUnexpectedEOF 6527 } 6528 b := dAtA[iNdEx] 6529 iNdEx++ 6530 msglen |= int(b&0x7F) << shift 6531 if b < 0x80 { 6532 break 6533 } 6534 } 6535 if msglen < 0 { 6536 return ErrInvalidLengthTypes 6537 } 6538 postIndex := iNdEx + msglen 6539 if postIndex < 0 { 6540 return ErrInvalidLengthTypes 6541 } 6542 if postIndex > l { 6543 return io.ErrUnexpectedEOF 6544 } 6545 v := &LightClientAttackEvidence{} 6546 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 6547 return err 6548 } 6549 m.Sum = &Evidence_LightClientAttackEvidence{v} 6550 iNdEx = postIndex 6551 default: 6552 iNdEx = preIndex 6553 skippy, err := skipTypes(dAtA[iNdEx:]) 6554 if err != nil { 6555 return err 6556 } 6557 if (skippy < 0) || (iNdEx+skippy) < 0 { 6558 return ErrInvalidLengthTypes 6559 } 6560 if (iNdEx + skippy) > l { 6561 return io.ErrUnexpectedEOF 6562 } 6563 iNdEx += skippy 6564 } 6565 } 6566 6567 if iNdEx > l { 6568 return io.ErrUnexpectedEOF 6569 } 6570 return nil 6571 } 6572 func (m *DuplicateVoteEvidence) Unmarshal(dAtA []byte) error { 6573 l := len(dAtA) 6574 iNdEx := 0 6575 for iNdEx < l { 6576 preIndex := iNdEx 6577 var wire uint64 6578 for shift := uint(0); ; shift += 7 { 6579 if shift >= 64 { 6580 return ErrIntOverflowTypes 6581 } 6582 if iNdEx >= l { 6583 return io.ErrUnexpectedEOF 6584 } 6585 b := dAtA[iNdEx] 6586 iNdEx++ 6587 wire |= uint64(b&0x7F) << shift 6588 if b < 0x80 { 6589 break 6590 } 6591 } 6592 fieldNum := int32(wire >> 3) 6593 wireType := int(wire & 0x7) 6594 if wireType == 4 { 6595 return fmt.Errorf("proto: DuplicateVoteEvidence: wiretype end group for non-group") 6596 } 6597 if fieldNum <= 0 { 6598 return fmt.Errorf("proto: DuplicateVoteEvidence: illegal tag %d (wire type %d)", fieldNum, wire) 6599 } 6600 switch fieldNum { 6601 case 1: 6602 if wireType != 2 { 6603 return fmt.Errorf("proto: wrong wireType = %d for field VoteA", wireType) 6604 } 6605 var msglen int 6606 for shift := uint(0); ; shift += 7 { 6607 if shift >= 64 { 6608 return ErrIntOverflowTypes 6609 } 6610 if iNdEx >= l { 6611 return io.ErrUnexpectedEOF 6612 } 6613 b := dAtA[iNdEx] 6614 iNdEx++ 6615 msglen |= int(b&0x7F) << shift 6616 if b < 0x80 { 6617 break 6618 } 6619 } 6620 if msglen < 0 { 6621 return ErrInvalidLengthTypes 6622 } 6623 postIndex := iNdEx + msglen 6624 if postIndex < 0 { 6625 return ErrInvalidLengthTypes 6626 } 6627 if postIndex > l { 6628 return io.ErrUnexpectedEOF 6629 } 6630 if m.VoteA == nil { 6631 m.VoteA = &Vote{} 6632 } 6633 if err := m.VoteA.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 6634 return err 6635 } 6636 iNdEx = postIndex 6637 case 2: 6638 if wireType != 2 { 6639 return fmt.Errorf("proto: wrong wireType = %d for field VoteB", wireType) 6640 } 6641 var msglen int 6642 for shift := uint(0); ; shift += 7 { 6643 if shift >= 64 { 6644 return ErrIntOverflowTypes 6645 } 6646 if iNdEx >= l { 6647 return io.ErrUnexpectedEOF 6648 } 6649 b := dAtA[iNdEx] 6650 iNdEx++ 6651 msglen |= int(b&0x7F) << shift 6652 if b < 0x80 { 6653 break 6654 } 6655 } 6656 if msglen < 0 { 6657 return ErrInvalidLengthTypes 6658 } 6659 postIndex := iNdEx + msglen 6660 if postIndex < 0 { 6661 return ErrInvalidLengthTypes 6662 } 6663 if postIndex > l { 6664 return io.ErrUnexpectedEOF 6665 } 6666 if m.VoteB == nil { 6667 m.VoteB = &Vote{} 6668 } 6669 if err := m.VoteB.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 6670 return err 6671 } 6672 iNdEx = postIndex 6673 case 3: 6674 if wireType != 0 { 6675 return fmt.Errorf("proto: wrong wireType = %d for field TotalVotingPower", wireType) 6676 } 6677 m.TotalVotingPower = 0 6678 for shift := uint(0); ; shift += 7 { 6679 if shift >= 64 { 6680 return ErrIntOverflowTypes 6681 } 6682 if iNdEx >= l { 6683 return io.ErrUnexpectedEOF 6684 } 6685 b := dAtA[iNdEx] 6686 iNdEx++ 6687 m.TotalVotingPower |= int64(b&0x7F) << shift 6688 if b < 0x80 { 6689 break 6690 } 6691 } 6692 case 4: 6693 if wireType != 0 { 6694 return fmt.Errorf("proto: wrong wireType = %d for field ValidatorPower", wireType) 6695 } 6696 m.ValidatorPower = 0 6697 for shift := uint(0); ; shift += 7 { 6698 if shift >= 64 { 6699 return ErrIntOverflowTypes 6700 } 6701 if iNdEx >= l { 6702 return io.ErrUnexpectedEOF 6703 } 6704 b := dAtA[iNdEx] 6705 iNdEx++ 6706 m.ValidatorPower |= int64(b&0x7F) << shift 6707 if b < 0x80 { 6708 break 6709 } 6710 } 6711 case 5: 6712 if wireType != 2 { 6713 return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) 6714 } 6715 var msglen int 6716 for shift := uint(0); ; shift += 7 { 6717 if shift >= 64 { 6718 return ErrIntOverflowTypes 6719 } 6720 if iNdEx >= l { 6721 return io.ErrUnexpectedEOF 6722 } 6723 b := dAtA[iNdEx] 6724 iNdEx++ 6725 msglen |= int(b&0x7F) << shift 6726 if b < 0x80 { 6727 break 6728 } 6729 } 6730 if msglen < 0 { 6731 return ErrInvalidLengthTypes 6732 } 6733 postIndex := iNdEx + msglen 6734 if postIndex < 0 { 6735 return ErrInvalidLengthTypes 6736 } 6737 if postIndex > l { 6738 return io.ErrUnexpectedEOF 6739 } 6740 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { 6741 return err 6742 } 6743 iNdEx = postIndex 6744 default: 6745 iNdEx = preIndex 6746 skippy, err := skipTypes(dAtA[iNdEx:]) 6747 if err != nil { 6748 return err 6749 } 6750 if (skippy < 0) || (iNdEx+skippy) < 0 { 6751 return ErrInvalidLengthTypes 6752 } 6753 if (iNdEx + skippy) > l { 6754 return io.ErrUnexpectedEOF 6755 } 6756 iNdEx += skippy 6757 } 6758 } 6759 6760 if iNdEx > l { 6761 return io.ErrUnexpectedEOF 6762 } 6763 return nil 6764 } 6765 func (m *LightClientAttackEvidence) Unmarshal(dAtA []byte) error { 6766 l := len(dAtA) 6767 iNdEx := 0 6768 for iNdEx < l { 6769 preIndex := iNdEx 6770 var wire uint64 6771 for shift := uint(0); ; shift += 7 { 6772 if shift >= 64 { 6773 return ErrIntOverflowTypes 6774 } 6775 if iNdEx >= l { 6776 return io.ErrUnexpectedEOF 6777 } 6778 b := dAtA[iNdEx] 6779 iNdEx++ 6780 wire |= uint64(b&0x7F) << shift 6781 if b < 0x80 { 6782 break 6783 } 6784 } 6785 fieldNum := int32(wire >> 3) 6786 wireType := int(wire & 0x7) 6787 if wireType == 4 { 6788 return fmt.Errorf("proto: LightClientAttackEvidence: wiretype end group for non-group") 6789 } 6790 if fieldNum <= 0 { 6791 return fmt.Errorf("proto: LightClientAttackEvidence: illegal tag %d (wire type %d)", fieldNum, wire) 6792 } 6793 switch fieldNum { 6794 case 1: 6795 if wireType != 2 { 6796 return fmt.Errorf("proto: wrong wireType = %d for field ConflictingBlock", wireType) 6797 } 6798 var msglen int 6799 for shift := uint(0); ; shift += 7 { 6800 if shift >= 64 { 6801 return ErrIntOverflowTypes 6802 } 6803 if iNdEx >= l { 6804 return io.ErrUnexpectedEOF 6805 } 6806 b := dAtA[iNdEx] 6807 iNdEx++ 6808 msglen |= int(b&0x7F) << shift 6809 if b < 0x80 { 6810 break 6811 } 6812 } 6813 if msglen < 0 { 6814 return ErrInvalidLengthTypes 6815 } 6816 postIndex := iNdEx + msglen 6817 if postIndex < 0 { 6818 return ErrInvalidLengthTypes 6819 } 6820 if postIndex > l { 6821 return io.ErrUnexpectedEOF 6822 } 6823 if m.ConflictingBlock == nil { 6824 m.ConflictingBlock = &LightBlock{} 6825 } 6826 if err := m.ConflictingBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 6827 return err 6828 } 6829 iNdEx = postIndex 6830 case 2: 6831 if wireType != 0 { 6832 return fmt.Errorf("proto: wrong wireType = %d for field CommonHeight", wireType) 6833 } 6834 m.CommonHeight = 0 6835 for shift := uint(0); ; shift += 7 { 6836 if shift >= 64 { 6837 return ErrIntOverflowTypes 6838 } 6839 if iNdEx >= l { 6840 return io.ErrUnexpectedEOF 6841 } 6842 b := dAtA[iNdEx] 6843 iNdEx++ 6844 m.CommonHeight |= int64(b&0x7F) << shift 6845 if b < 0x80 { 6846 break 6847 } 6848 } 6849 case 3: 6850 if wireType != 2 { 6851 return fmt.Errorf("proto: wrong wireType = %d for field ByzantineValidators", wireType) 6852 } 6853 var msglen int 6854 for shift := uint(0); ; shift += 7 { 6855 if shift >= 64 { 6856 return ErrIntOverflowTypes 6857 } 6858 if iNdEx >= l { 6859 return io.ErrUnexpectedEOF 6860 } 6861 b := dAtA[iNdEx] 6862 iNdEx++ 6863 msglen |= int(b&0x7F) << shift 6864 if b < 0x80 { 6865 break 6866 } 6867 } 6868 if msglen < 0 { 6869 return ErrInvalidLengthTypes 6870 } 6871 postIndex := iNdEx + msglen 6872 if postIndex < 0 { 6873 return ErrInvalidLengthTypes 6874 } 6875 if postIndex > l { 6876 return io.ErrUnexpectedEOF 6877 } 6878 m.ByzantineValidators = append(m.ByzantineValidators, &Validator{}) 6879 if err := m.ByzantineValidators[len(m.ByzantineValidators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 6880 return err 6881 } 6882 iNdEx = postIndex 6883 case 4: 6884 if wireType != 0 { 6885 return fmt.Errorf("proto: wrong wireType = %d for field TotalVotingPower", wireType) 6886 } 6887 m.TotalVotingPower = 0 6888 for shift := uint(0); ; shift += 7 { 6889 if shift >= 64 { 6890 return ErrIntOverflowTypes 6891 } 6892 if iNdEx >= l { 6893 return io.ErrUnexpectedEOF 6894 } 6895 b := dAtA[iNdEx] 6896 iNdEx++ 6897 m.TotalVotingPower |= int64(b&0x7F) << shift 6898 if b < 0x80 { 6899 break 6900 } 6901 } 6902 case 5: 6903 if wireType != 2 { 6904 return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) 6905 } 6906 var msglen int 6907 for shift := uint(0); ; shift += 7 { 6908 if shift >= 64 { 6909 return ErrIntOverflowTypes 6910 } 6911 if iNdEx >= l { 6912 return io.ErrUnexpectedEOF 6913 } 6914 b := dAtA[iNdEx] 6915 iNdEx++ 6916 msglen |= int(b&0x7F) << shift 6917 if b < 0x80 { 6918 break 6919 } 6920 } 6921 if msglen < 0 { 6922 return ErrInvalidLengthTypes 6923 } 6924 postIndex := iNdEx + msglen 6925 if postIndex < 0 { 6926 return ErrInvalidLengthTypes 6927 } 6928 if postIndex > l { 6929 return io.ErrUnexpectedEOF 6930 } 6931 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { 6932 return err 6933 } 6934 iNdEx = postIndex 6935 default: 6936 iNdEx = preIndex 6937 skippy, err := skipTypes(dAtA[iNdEx:]) 6938 if err != nil { 6939 return err 6940 } 6941 if (skippy < 0) || (iNdEx+skippy) < 0 { 6942 return ErrInvalidLengthTypes 6943 } 6944 if (iNdEx + skippy) > l { 6945 return io.ErrUnexpectedEOF 6946 } 6947 iNdEx += skippy 6948 } 6949 } 6950 6951 if iNdEx > l { 6952 return io.ErrUnexpectedEOF 6953 } 6954 return nil 6955 } 6956 func (m *EvidenceList) Unmarshal(dAtA []byte) error { 6957 l := len(dAtA) 6958 iNdEx := 0 6959 for iNdEx < l { 6960 preIndex := iNdEx 6961 var wire uint64 6962 for shift := uint(0); ; shift += 7 { 6963 if shift >= 64 { 6964 return ErrIntOverflowTypes 6965 } 6966 if iNdEx >= l { 6967 return io.ErrUnexpectedEOF 6968 } 6969 b := dAtA[iNdEx] 6970 iNdEx++ 6971 wire |= uint64(b&0x7F) << shift 6972 if b < 0x80 { 6973 break 6974 } 6975 } 6976 fieldNum := int32(wire >> 3) 6977 wireType := int(wire & 0x7) 6978 if wireType == 4 { 6979 return fmt.Errorf("proto: EvidenceList: wiretype end group for non-group") 6980 } 6981 if fieldNum <= 0 { 6982 return fmt.Errorf("proto: EvidenceList: illegal tag %d (wire type %d)", fieldNum, wire) 6983 } 6984 switch fieldNum { 6985 case 1: 6986 if wireType != 2 { 6987 return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType) 6988 } 6989 var msglen int 6990 for shift := uint(0); ; shift += 7 { 6991 if shift >= 64 { 6992 return ErrIntOverflowTypes 6993 } 6994 if iNdEx >= l { 6995 return io.ErrUnexpectedEOF 6996 } 6997 b := dAtA[iNdEx] 6998 iNdEx++ 6999 msglen |= int(b&0x7F) << shift 7000 if b < 0x80 { 7001 break 7002 } 7003 } 7004 if msglen < 0 { 7005 return ErrInvalidLengthTypes 7006 } 7007 postIndex := iNdEx + msglen 7008 if postIndex < 0 { 7009 return ErrInvalidLengthTypes 7010 } 7011 if postIndex > l { 7012 return io.ErrUnexpectedEOF 7013 } 7014 m.Evidence = append(m.Evidence, Evidence{}) 7015 if err := m.Evidence[len(m.Evidence)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 7016 return err 7017 } 7018 iNdEx = postIndex 7019 default: 7020 iNdEx = preIndex 7021 skippy, err := skipTypes(dAtA[iNdEx:]) 7022 if err != nil { 7023 return err 7024 } 7025 if (skippy < 0) || (iNdEx+skippy) < 0 { 7026 return ErrInvalidLengthTypes 7027 } 7028 if (iNdEx + skippy) > l { 7029 return io.ErrUnexpectedEOF 7030 } 7031 iNdEx += skippy 7032 } 7033 } 7034 7035 if iNdEx > l { 7036 return io.ErrUnexpectedEOF 7037 } 7038 return nil 7039 } 7040 func skipTypes(dAtA []byte) (n int, err error) { 7041 l := len(dAtA) 7042 iNdEx := 0 7043 depth := 0 7044 for iNdEx < l { 7045 var wire uint64 7046 for shift := uint(0); ; shift += 7 { 7047 if shift >= 64 { 7048 return 0, ErrIntOverflowTypes 7049 } 7050 if iNdEx >= l { 7051 return 0, io.ErrUnexpectedEOF 7052 } 7053 b := dAtA[iNdEx] 7054 iNdEx++ 7055 wire |= (uint64(b) & 0x7F) << shift 7056 if b < 0x80 { 7057 break 7058 } 7059 } 7060 wireType := int(wire & 0x7) 7061 switch wireType { 7062 case 0: 7063 for shift := uint(0); ; shift += 7 { 7064 if shift >= 64 { 7065 return 0, ErrIntOverflowTypes 7066 } 7067 if iNdEx >= l { 7068 return 0, io.ErrUnexpectedEOF 7069 } 7070 iNdEx++ 7071 if dAtA[iNdEx-1] < 0x80 { 7072 break 7073 } 7074 } 7075 case 1: 7076 iNdEx += 8 7077 case 2: 7078 var length int 7079 for shift := uint(0); ; shift += 7 { 7080 if shift >= 64 { 7081 return 0, ErrIntOverflowTypes 7082 } 7083 if iNdEx >= l { 7084 return 0, io.ErrUnexpectedEOF 7085 } 7086 b := dAtA[iNdEx] 7087 iNdEx++ 7088 length |= (int(b) & 0x7F) << shift 7089 if b < 0x80 { 7090 break 7091 } 7092 } 7093 if length < 0 { 7094 return 0, ErrInvalidLengthTypes 7095 } 7096 iNdEx += length 7097 case 3: 7098 depth++ 7099 case 4: 7100 if depth == 0 { 7101 return 0, ErrUnexpectedEndOfGroupTypes 7102 } 7103 depth-- 7104 case 5: 7105 iNdEx += 4 7106 default: 7107 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 7108 } 7109 if iNdEx < 0 { 7110 return 0, ErrInvalidLengthTypes 7111 } 7112 if depth == 0 { 7113 return iNdEx, nil 7114 } 7115 } 7116 return 0, io.ErrUnexpectedEOF 7117 } 7118 7119 var ( 7120 ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") 7121 ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") 7122 ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") 7123 )