You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2353 lines
57 KiB

  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: tendermint/types/evidence.proto
  3. package types
  4. import (
  5. fmt "fmt"
  6. _ "github.com/gogo/protobuf/gogoproto"
  7. proto "github.com/gogo/protobuf/proto"
  8. _ "github.com/gogo/protobuf/types"
  9. github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
  10. crypto "github.com/tendermint/tendermint/proto/tendermint/crypto"
  11. io "io"
  12. math "math"
  13. math_bits "math/bits"
  14. time "time"
  15. )
  16. // Reference imports to suppress errors if they are not otherwise used.
  17. var _ = proto.Marshal
  18. var _ = fmt.Errorf
  19. var _ = math.Inf
  20. var _ = time.Kitchen
  21. // This is a compile-time assertion to ensure that this generated file
  22. // is compatible with the proto package it is being compiled against.
  23. // A compilation error at this line likely means your copy of the
  24. // proto package needs to be updated.
  25. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  26. // DuplicateVoteEvidence contains evidence a validator signed two conflicting
  27. // votes.
  28. type DuplicateVoteEvidence struct {
  29. VoteA *Vote `protobuf:"bytes,1,opt,name=vote_a,json=voteA,proto3" json:"vote_a,omitempty"`
  30. VoteB *Vote `protobuf:"bytes,2,opt,name=vote_b,json=voteB,proto3" json:"vote_b,omitempty"`
  31. Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,proto3,stdtime" json:"timestamp"`
  32. }
  33. func (m *DuplicateVoteEvidence) Reset() { *m = DuplicateVoteEvidence{} }
  34. func (m *DuplicateVoteEvidence) String() string { return proto.CompactTextString(m) }
  35. func (*DuplicateVoteEvidence) ProtoMessage() {}
  36. func (*DuplicateVoteEvidence) Descriptor() ([]byte, []int) {
  37. return fileDescriptor_6825fabc78e0a168, []int{0}
  38. }
  39. func (m *DuplicateVoteEvidence) XXX_Unmarshal(b []byte) error {
  40. return m.Unmarshal(b)
  41. }
  42. func (m *DuplicateVoteEvidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  43. if deterministic {
  44. return xxx_messageInfo_DuplicateVoteEvidence.Marshal(b, m, deterministic)
  45. } else {
  46. b = b[:cap(b)]
  47. n, err := m.MarshalToSizedBuffer(b)
  48. if err != nil {
  49. return nil, err
  50. }
  51. return b[:n], nil
  52. }
  53. }
  54. func (m *DuplicateVoteEvidence) XXX_Merge(src proto.Message) {
  55. xxx_messageInfo_DuplicateVoteEvidence.Merge(m, src)
  56. }
  57. func (m *DuplicateVoteEvidence) XXX_Size() int {
  58. return m.Size()
  59. }
  60. func (m *DuplicateVoteEvidence) XXX_DiscardUnknown() {
  61. xxx_messageInfo_DuplicateVoteEvidence.DiscardUnknown(m)
  62. }
  63. var xxx_messageInfo_DuplicateVoteEvidence proto.InternalMessageInfo
  64. func (m *DuplicateVoteEvidence) GetVoteA() *Vote {
  65. if m != nil {
  66. return m.VoteA
  67. }
  68. return nil
  69. }
  70. func (m *DuplicateVoteEvidence) GetVoteB() *Vote {
  71. if m != nil {
  72. return m.VoteB
  73. }
  74. return nil
  75. }
  76. func (m *DuplicateVoteEvidence) GetTimestamp() time.Time {
  77. if m != nil {
  78. return m.Timestamp
  79. }
  80. return time.Time{}
  81. }
  82. type PotentialAmnesiaEvidence struct {
  83. VoteA *Vote `protobuf:"bytes,1,opt,name=vote_a,json=voteA,proto3" json:"vote_a,omitempty"`
  84. VoteB *Vote `protobuf:"bytes,2,opt,name=vote_b,json=voteB,proto3" json:"vote_b,omitempty"`
  85. HeightStamp int64 `protobuf:"varint,3,opt,name=height_stamp,json=heightStamp,proto3" json:"height_stamp,omitempty"`
  86. Timestamp time.Time `protobuf:"bytes,4,opt,name=timestamp,proto3,stdtime" json:"timestamp"`
  87. }
  88. func (m *PotentialAmnesiaEvidence) Reset() { *m = PotentialAmnesiaEvidence{} }
  89. func (m *PotentialAmnesiaEvidence) String() string { return proto.CompactTextString(m) }
  90. func (*PotentialAmnesiaEvidence) ProtoMessage() {}
  91. func (*PotentialAmnesiaEvidence) Descriptor() ([]byte, []int) {
  92. return fileDescriptor_6825fabc78e0a168, []int{1}
  93. }
  94. func (m *PotentialAmnesiaEvidence) XXX_Unmarshal(b []byte) error {
  95. return m.Unmarshal(b)
  96. }
  97. func (m *PotentialAmnesiaEvidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  98. if deterministic {
  99. return xxx_messageInfo_PotentialAmnesiaEvidence.Marshal(b, m, deterministic)
  100. } else {
  101. b = b[:cap(b)]
  102. n, err := m.MarshalToSizedBuffer(b)
  103. if err != nil {
  104. return nil, err
  105. }
  106. return b[:n], nil
  107. }
  108. }
  109. func (m *PotentialAmnesiaEvidence) XXX_Merge(src proto.Message) {
  110. xxx_messageInfo_PotentialAmnesiaEvidence.Merge(m, src)
  111. }
  112. func (m *PotentialAmnesiaEvidence) XXX_Size() int {
  113. return m.Size()
  114. }
  115. func (m *PotentialAmnesiaEvidence) XXX_DiscardUnknown() {
  116. xxx_messageInfo_PotentialAmnesiaEvidence.DiscardUnknown(m)
  117. }
  118. var xxx_messageInfo_PotentialAmnesiaEvidence proto.InternalMessageInfo
  119. func (m *PotentialAmnesiaEvidence) GetVoteA() *Vote {
  120. if m != nil {
  121. return m.VoteA
  122. }
  123. return nil
  124. }
  125. func (m *PotentialAmnesiaEvidence) GetVoteB() *Vote {
  126. if m != nil {
  127. return m.VoteB
  128. }
  129. return nil
  130. }
  131. func (m *PotentialAmnesiaEvidence) GetHeightStamp() int64 {
  132. if m != nil {
  133. return m.HeightStamp
  134. }
  135. return 0
  136. }
  137. func (m *PotentialAmnesiaEvidence) GetTimestamp() time.Time {
  138. if m != nil {
  139. return m.Timestamp
  140. }
  141. return time.Time{}
  142. }
  143. type AmnesiaEvidence struct {
  144. PotentialAmnesiaEvidence *PotentialAmnesiaEvidence `protobuf:"bytes,1,opt,name=potential_amnesia_evidence,json=potentialAmnesiaEvidence,proto3" json:"potential_amnesia_evidence,omitempty"`
  145. Polc *ProofOfLockChange `protobuf:"bytes,2,opt,name=polc,proto3" json:"polc,omitempty"`
  146. }
  147. func (m *AmnesiaEvidence) Reset() { *m = AmnesiaEvidence{} }
  148. func (m *AmnesiaEvidence) String() string { return proto.CompactTextString(m) }
  149. func (*AmnesiaEvidence) ProtoMessage() {}
  150. func (*AmnesiaEvidence) Descriptor() ([]byte, []int) {
  151. return fileDescriptor_6825fabc78e0a168, []int{2}
  152. }
  153. func (m *AmnesiaEvidence) XXX_Unmarshal(b []byte) error {
  154. return m.Unmarshal(b)
  155. }
  156. func (m *AmnesiaEvidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  157. if deterministic {
  158. return xxx_messageInfo_AmnesiaEvidence.Marshal(b, m, deterministic)
  159. } else {
  160. b = b[:cap(b)]
  161. n, err := m.MarshalToSizedBuffer(b)
  162. if err != nil {
  163. return nil, err
  164. }
  165. return b[:n], nil
  166. }
  167. }
  168. func (m *AmnesiaEvidence) XXX_Merge(src proto.Message) {
  169. xxx_messageInfo_AmnesiaEvidence.Merge(m, src)
  170. }
  171. func (m *AmnesiaEvidence) XXX_Size() int {
  172. return m.Size()
  173. }
  174. func (m *AmnesiaEvidence) XXX_DiscardUnknown() {
  175. xxx_messageInfo_AmnesiaEvidence.DiscardUnknown(m)
  176. }
  177. var xxx_messageInfo_AmnesiaEvidence proto.InternalMessageInfo
  178. func (m *AmnesiaEvidence) GetPotentialAmnesiaEvidence() *PotentialAmnesiaEvidence {
  179. if m != nil {
  180. return m.PotentialAmnesiaEvidence
  181. }
  182. return nil
  183. }
  184. func (m *AmnesiaEvidence) GetPolc() *ProofOfLockChange {
  185. if m != nil {
  186. return m.Polc
  187. }
  188. return nil
  189. }
  190. type LunaticValidatorEvidence struct {
  191. Header *Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
  192. Vote *Vote `protobuf:"bytes,2,opt,name=vote,proto3" json:"vote,omitempty"`
  193. InvalidHeaderField string `protobuf:"bytes,3,opt,name=invalid_header_field,json=invalidHeaderField,proto3" json:"invalid_header_field,omitempty"`
  194. Timestamp time.Time `protobuf:"bytes,4,opt,name=timestamp,proto3,stdtime" json:"timestamp"`
  195. }
  196. func (m *LunaticValidatorEvidence) Reset() { *m = LunaticValidatorEvidence{} }
  197. func (m *LunaticValidatorEvidence) String() string { return proto.CompactTextString(m) }
  198. func (*LunaticValidatorEvidence) ProtoMessage() {}
  199. func (*LunaticValidatorEvidence) Descriptor() ([]byte, []int) {
  200. return fileDescriptor_6825fabc78e0a168, []int{3}
  201. }
  202. func (m *LunaticValidatorEvidence) XXX_Unmarshal(b []byte) error {
  203. return m.Unmarshal(b)
  204. }
  205. func (m *LunaticValidatorEvidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  206. if deterministic {
  207. return xxx_messageInfo_LunaticValidatorEvidence.Marshal(b, m, deterministic)
  208. } else {
  209. b = b[:cap(b)]
  210. n, err := m.MarshalToSizedBuffer(b)
  211. if err != nil {
  212. return nil, err
  213. }
  214. return b[:n], nil
  215. }
  216. }
  217. func (m *LunaticValidatorEvidence) XXX_Merge(src proto.Message) {
  218. xxx_messageInfo_LunaticValidatorEvidence.Merge(m, src)
  219. }
  220. func (m *LunaticValidatorEvidence) XXX_Size() int {
  221. return m.Size()
  222. }
  223. func (m *LunaticValidatorEvidence) XXX_DiscardUnknown() {
  224. xxx_messageInfo_LunaticValidatorEvidence.DiscardUnknown(m)
  225. }
  226. var xxx_messageInfo_LunaticValidatorEvidence proto.InternalMessageInfo
  227. func (m *LunaticValidatorEvidence) GetHeader() *Header {
  228. if m != nil {
  229. return m.Header
  230. }
  231. return nil
  232. }
  233. func (m *LunaticValidatorEvidence) GetVote() *Vote {
  234. if m != nil {
  235. return m.Vote
  236. }
  237. return nil
  238. }
  239. func (m *LunaticValidatorEvidence) GetInvalidHeaderField() string {
  240. if m != nil {
  241. return m.InvalidHeaderField
  242. }
  243. return ""
  244. }
  245. func (m *LunaticValidatorEvidence) GetTimestamp() time.Time {
  246. if m != nil {
  247. return m.Timestamp
  248. }
  249. return time.Time{}
  250. }
  251. type Evidence struct {
  252. // Types that are valid to be assigned to Sum:
  253. // *Evidence_DuplicateVoteEvidence
  254. // *Evidence_LunaticValidatorEvidence
  255. // *Evidence_PotentialAmnesiaEvidence
  256. // *Evidence_AmnesiaEvidence
  257. Sum isEvidence_Sum `protobuf_oneof:"sum"`
  258. }
  259. func (m *Evidence) Reset() { *m = Evidence{} }
  260. func (m *Evidence) String() string { return proto.CompactTextString(m) }
  261. func (*Evidence) ProtoMessage() {}
  262. func (*Evidence) Descriptor() ([]byte, []int) {
  263. return fileDescriptor_6825fabc78e0a168, []int{4}
  264. }
  265. func (m *Evidence) XXX_Unmarshal(b []byte) error {
  266. return m.Unmarshal(b)
  267. }
  268. func (m *Evidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  269. if deterministic {
  270. return xxx_messageInfo_Evidence.Marshal(b, m, deterministic)
  271. } else {
  272. b = b[:cap(b)]
  273. n, err := m.MarshalToSizedBuffer(b)
  274. if err != nil {
  275. return nil, err
  276. }
  277. return b[:n], nil
  278. }
  279. }
  280. func (m *Evidence) XXX_Merge(src proto.Message) {
  281. xxx_messageInfo_Evidence.Merge(m, src)
  282. }
  283. func (m *Evidence) XXX_Size() int {
  284. return m.Size()
  285. }
  286. func (m *Evidence) XXX_DiscardUnknown() {
  287. xxx_messageInfo_Evidence.DiscardUnknown(m)
  288. }
  289. var xxx_messageInfo_Evidence proto.InternalMessageInfo
  290. type isEvidence_Sum interface {
  291. isEvidence_Sum()
  292. MarshalTo([]byte) (int, error)
  293. Size() int
  294. }
  295. type Evidence_DuplicateVoteEvidence struct {
  296. DuplicateVoteEvidence *DuplicateVoteEvidence `protobuf:"bytes,1,opt,name=duplicate_vote_evidence,json=duplicateVoteEvidence,proto3,oneof" json:"duplicate_vote_evidence,omitempty"`
  297. }
  298. type Evidence_LunaticValidatorEvidence struct {
  299. LunaticValidatorEvidence *LunaticValidatorEvidence `protobuf:"bytes,3,opt,name=lunatic_validator_evidence,json=lunaticValidatorEvidence,proto3,oneof" json:"lunatic_validator_evidence,omitempty"`
  300. }
  301. type Evidence_PotentialAmnesiaEvidence struct {
  302. PotentialAmnesiaEvidence *PotentialAmnesiaEvidence `protobuf:"bytes,4,opt,name=potential_amnesia_evidence,json=potentialAmnesiaEvidence,proto3,oneof" json:"potential_amnesia_evidence,omitempty"`
  303. }
  304. type Evidence_AmnesiaEvidence struct {
  305. AmnesiaEvidence *AmnesiaEvidence `protobuf:"bytes,5,opt,name=amnesia_evidence,json=amnesiaEvidence,proto3,oneof" json:"amnesia_evidence,omitempty"`
  306. }
  307. func (*Evidence_DuplicateVoteEvidence) isEvidence_Sum() {}
  308. func (*Evidence_LunaticValidatorEvidence) isEvidence_Sum() {}
  309. func (*Evidence_PotentialAmnesiaEvidence) isEvidence_Sum() {}
  310. func (*Evidence_AmnesiaEvidence) isEvidence_Sum() {}
  311. func (m *Evidence) GetSum() isEvidence_Sum {
  312. if m != nil {
  313. return m.Sum
  314. }
  315. return nil
  316. }
  317. func (m *Evidence) GetDuplicateVoteEvidence() *DuplicateVoteEvidence {
  318. if x, ok := m.GetSum().(*Evidence_DuplicateVoteEvidence); ok {
  319. return x.DuplicateVoteEvidence
  320. }
  321. return nil
  322. }
  323. func (m *Evidence) GetLunaticValidatorEvidence() *LunaticValidatorEvidence {
  324. if x, ok := m.GetSum().(*Evidence_LunaticValidatorEvidence); ok {
  325. return x.LunaticValidatorEvidence
  326. }
  327. return nil
  328. }
  329. func (m *Evidence) GetPotentialAmnesiaEvidence() *PotentialAmnesiaEvidence {
  330. if x, ok := m.GetSum().(*Evidence_PotentialAmnesiaEvidence); ok {
  331. return x.PotentialAmnesiaEvidence
  332. }
  333. return nil
  334. }
  335. func (m *Evidence) GetAmnesiaEvidence() *AmnesiaEvidence {
  336. if x, ok := m.GetSum().(*Evidence_AmnesiaEvidence); ok {
  337. return x.AmnesiaEvidence
  338. }
  339. return nil
  340. }
  341. // XXX_OneofWrappers is for the internal use of the proto package.
  342. func (*Evidence) XXX_OneofWrappers() []interface{} {
  343. return []interface{}{
  344. (*Evidence_DuplicateVoteEvidence)(nil),
  345. (*Evidence_LunaticValidatorEvidence)(nil),
  346. (*Evidence_PotentialAmnesiaEvidence)(nil),
  347. (*Evidence_AmnesiaEvidence)(nil),
  348. }
  349. }
  350. // EvidenceData contains any evidence of malicious wrong-doing by validators
  351. type EvidenceData struct {
  352. Evidence []Evidence `protobuf:"bytes,1,rep,name=evidence,proto3" json:"evidence"`
  353. Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
  354. }
  355. func (m *EvidenceData) Reset() { *m = EvidenceData{} }
  356. func (m *EvidenceData) String() string { return proto.CompactTextString(m) }
  357. func (*EvidenceData) ProtoMessage() {}
  358. func (*EvidenceData) Descriptor() ([]byte, []int) {
  359. return fileDescriptor_6825fabc78e0a168, []int{5}
  360. }
  361. func (m *EvidenceData) XXX_Unmarshal(b []byte) error {
  362. return m.Unmarshal(b)
  363. }
  364. func (m *EvidenceData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  365. if deterministic {
  366. return xxx_messageInfo_EvidenceData.Marshal(b, m, deterministic)
  367. } else {
  368. b = b[:cap(b)]
  369. n, err := m.MarshalToSizedBuffer(b)
  370. if err != nil {
  371. return nil, err
  372. }
  373. return b[:n], nil
  374. }
  375. }
  376. func (m *EvidenceData) XXX_Merge(src proto.Message) {
  377. xxx_messageInfo_EvidenceData.Merge(m, src)
  378. }
  379. func (m *EvidenceData) XXX_Size() int {
  380. return m.Size()
  381. }
  382. func (m *EvidenceData) XXX_DiscardUnknown() {
  383. xxx_messageInfo_EvidenceData.DiscardUnknown(m)
  384. }
  385. var xxx_messageInfo_EvidenceData proto.InternalMessageInfo
  386. func (m *EvidenceData) GetEvidence() []Evidence {
  387. if m != nil {
  388. return m.Evidence
  389. }
  390. return nil
  391. }
  392. func (m *EvidenceData) GetHash() []byte {
  393. if m != nil {
  394. return m.Hash
  395. }
  396. return nil
  397. }
  398. type ProofOfLockChange struct {
  399. Votes []*Vote `protobuf:"bytes,1,rep,name=votes,proto3" json:"votes,omitempty"`
  400. PubKey *crypto.PublicKey `protobuf:"bytes,2,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"`
  401. }
  402. func (m *ProofOfLockChange) Reset() { *m = ProofOfLockChange{} }
  403. func (m *ProofOfLockChange) String() string { return proto.CompactTextString(m) }
  404. func (*ProofOfLockChange) ProtoMessage() {}
  405. func (*ProofOfLockChange) Descriptor() ([]byte, []int) {
  406. return fileDescriptor_6825fabc78e0a168, []int{6}
  407. }
  408. func (m *ProofOfLockChange) XXX_Unmarshal(b []byte) error {
  409. return m.Unmarshal(b)
  410. }
  411. func (m *ProofOfLockChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  412. if deterministic {
  413. return xxx_messageInfo_ProofOfLockChange.Marshal(b, m, deterministic)
  414. } else {
  415. b = b[:cap(b)]
  416. n, err := m.MarshalToSizedBuffer(b)
  417. if err != nil {
  418. return nil, err
  419. }
  420. return b[:n], nil
  421. }
  422. }
  423. func (m *ProofOfLockChange) XXX_Merge(src proto.Message) {
  424. xxx_messageInfo_ProofOfLockChange.Merge(m, src)
  425. }
  426. func (m *ProofOfLockChange) XXX_Size() int {
  427. return m.Size()
  428. }
  429. func (m *ProofOfLockChange) XXX_DiscardUnknown() {
  430. xxx_messageInfo_ProofOfLockChange.DiscardUnknown(m)
  431. }
  432. var xxx_messageInfo_ProofOfLockChange proto.InternalMessageInfo
  433. func (m *ProofOfLockChange) GetVotes() []*Vote {
  434. if m != nil {
  435. return m.Votes
  436. }
  437. return nil
  438. }
  439. func (m *ProofOfLockChange) GetPubKey() *crypto.PublicKey {
  440. if m != nil {
  441. return m.PubKey
  442. }
  443. return nil
  444. }
  445. func init() {
  446. proto.RegisterType((*DuplicateVoteEvidence)(nil), "tendermint.types.DuplicateVoteEvidence")
  447. proto.RegisterType((*PotentialAmnesiaEvidence)(nil), "tendermint.types.PotentialAmnesiaEvidence")
  448. proto.RegisterType((*AmnesiaEvidence)(nil), "tendermint.types.AmnesiaEvidence")
  449. proto.RegisterType((*LunaticValidatorEvidence)(nil), "tendermint.types.LunaticValidatorEvidence")
  450. proto.RegisterType((*Evidence)(nil), "tendermint.types.Evidence")
  451. proto.RegisterType((*EvidenceData)(nil), "tendermint.types.EvidenceData")
  452. proto.RegisterType((*ProofOfLockChange)(nil), "tendermint.types.ProofOfLockChange")
  453. }
  454. func init() { proto.RegisterFile("tendermint/types/evidence.proto", fileDescriptor_6825fabc78e0a168) }
  455. var fileDescriptor_6825fabc78e0a168 = []byte{
  456. // 641 bytes of a gzipped FileDescriptorProto
  457. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0x4f, 0x4f, 0xd4, 0x40,
  458. 0x14, 0xdf, 0xba, 0xcb, 0x0a, 0x0f, 0x12, 0xb0, 0x01, 0x6d, 0x36, 0x64, 0x57, 0xd6, 0x83, 0x86,
  459. 0x68, 0x4b, 0x34, 0x86, 0x8b, 0x17, 0x56, 0x34, 0x24, 0x10, 0xc5, 0xd1, 0x70, 0xf0, 0x52, 0xa7,
  460. 0xed, 0x6c, 0x3b, 0xd0, 0x76, 0x9a, 0x76, 0xba, 0xb1, 0xdf, 0x82, 0x0f, 0xe0, 0xc7, 0xf0, 0xe2,
  461. 0x37, 0xe0, 0xc8, 0xd1, 0x93, 0x18, 0xb8, 0xfb, 0x19, 0x4c, 0xa7, 0x7f, 0x16, 0xb6, 0x5b, 0x88,
  462. 0xc6, 0x78, 0xd9, 0x74, 0xdf, 0xfb, 0xbd, 0x3f, 0xbf, 0xf7, 0x7b, 0x33, 0x03, 0x3d, 0x4e, 0x7c,
  463. 0x8b, 0x84, 0x1e, 0xf5, 0xb9, 0xc6, 0x93, 0x80, 0x44, 0x1a, 0x19, 0x51, 0x8b, 0xf8, 0x26, 0x51,
  464. 0x83, 0x90, 0x71, 0x26, 0x2f, 0x8d, 0x01, 0xaa, 0x00, 0x74, 0x96, 0x6d, 0x66, 0x33, 0xe1, 0xd4,
  465. 0xd2, 0xaf, 0x0c, 0xd7, 0xe9, 0xd9, 0x8c, 0xd9, 0x2e, 0xd1, 0xc4, 0x3f, 0x23, 0x1e, 0x6a, 0x9c,
  466. 0x7a, 0x24, 0xe2, 0xd8, 0x0b, 0x72, 0xc0, 0x6a, 0xa5, 0x92, 0xf8, 0x9d, 0xe2, 0x35, 0xc3, 0x24,
  467. 0xe0, 0x4c, 0x3b, 0x22, 0x49, 0xee, 0xed, 0x7f, 0x93, 0x60, 0x65, 0x3b, 0x0e, 0x5c, 0x6a, 0x62,
  468. 0x4e, 0x0e, 0x18, 0x27, 0xaf, 0xf2, 0x26, 0xe5, 0x27, 0xd0, 0x1e, 0x31, 0x4e, 0x74, 0xac, 0x48,
  469. 0xf7, 0xa5, 0x47, 0xf3, 0x4f, 0xef, 0xaa, 0x93, 0xfd, 0xaa, 0x29, 0x1e, 0xcd, 0xa4, 0xa8, 0xad,
  470. 0x12, 0x6e, 0x28, 0xb7, 0x6e, 0x86, 0x0f, 0xe4, 0x01, 0xcc, 0x95, 0x34, 0x94, 0xa6, 0x88, 0xe8,
  471. 0xa8, 0x19, 0x51, 0xb5, 0x20, 0xaa, 0x7e, 0x28, 0x10, 0x83, 0xd9, 0x93, 0x1f, 0xbd, 0xc6, 0xf1,
  472. 0x59, 0x4f, 0x42, 0xe3, 0xb0, 0xfe, 0x99, 0x04, 0xca, 0x3e, 0xe3, 0xc4, 0xe7, 0x14, 0xbb, 0x5b,
  473. 0x9e, 0x4f, 0x22, 0x8a, 0xff, 0x53, 0xfb, 0x6b, 0xb0, 0xe0, 0x10, 0x6a, 0x3b, 0x5c, 0x1f, 0x33,
  474. 0x68, 0xa2, 0xf9, 0xcc, 0xf6, 0x3e, 0x35, 0x5d, 0x65, 0xd8, 0xfa, 0x3b, 0x86, 0x5f, 0x25, 0x58,
  475. 0x9c, 0x24, 0xe6, 0x40, 0x27, 0x28, 0x48, 0xeb, 0x38, 0x73, 0xea, 0xc5, 0x6a, 0xe5, 0x64, 0xd7,
  476. 0xab, 0xdd, 0xd7, 0x0d, 0x0a, 0x29, 0x41, 0xdd, 0x08, 0x37, 0xa1, 0x15, 0x30, 0xd7, 0xcc, 0x27,
  477. 0xf2, 0x60, 0x4a, 0xce, 0x90, 0xb1, 0xe1, 0xdb, 0xe1, 0x1e, 0x33, 0x8f, 0x5e, 0x3a, 0xd8, 0xb7,
  478. 0x09, 0x12, 0x01, 0xfd, 0x5f, 0x12, 0x28, 0x7b, 0xb1, 0x8f, 0x39, 0x35, 0x0f, 0xb0, 0x4b, 0x2d,
  479. 0xcc, 0x59, 0x58, 0x66, 0xdd, 0x80, 0xb6, 0x43, 0xb0, 0x45, 0xc2, 0xbc, 0x57, 0xa5, 0x9a, 0x77,
  480. 0x47, 0xf8, 0x51, 0x8e, 0x93, 0xd7, 0xa1, 0x95, 0x4e, 0xfd, 0x06, 0x65, 0x04, 0x46, 0xde, 0x80,
  481. 0x65, 0xea, 0x8f, 0xd2, 0xa2, 0x7a, 0x16, 0xad, 0x0f, 0x29, 0x71, 0x2d, 0x21, 0xd0, 0x1c, 0x92,
  482. 0x73, 0x5f, 0x56, 0xe0, 0x75, 0xea, 0xf9, 0x27, 0x3a, 0x7d, 0x69, 0xc2, 0x6c, 0x49, 0x10, 0xc3,
  483. 0x3d, 0xab, 0x38, 0x51, 0xba, 0x58, 0xaa, 0x09, 0x75, 0x1e, 0x56, 0x19, 0x4c, 0x3d, 0x82, 0x3b,
  484. 0x0d, 0xb4, 0x62, 0x4d, 0x3d, 0x9b, 0x87, 0xd0, 0x71, 0xb3, 0xf9, 0xea, 0xa3, 0x62, 0xc0, 0xe3,
  485. 0x2a, 0xcd, 0xba, 0x1d, 0xa8, 0xd3, 0x64, 0xa7, 0x81, 0x14, 0xb7, 0x4e, 0xaf, 0xc3, 0x6b, 0xf7,
  486. 0xad, 0xf5, 0xa7, 0xfb, 0x96, 0xd6, 0xaa, 0xdd, 0xb8, 0x37, 0xb0, 0x54, 0xa9, 0x30, 0x23, 0x2a,
  487. 0xac, 0x55, 0x2b, 0x54, 0x13, 0x2f, 0xe2, 0xab, 0xa6, 0xc1, 0x0c, 0x34, 0xa3, 0xd8, 0xeb, 0x7f,
  488. 0x82, 0x85, 0xc2, 0xb4, 0x8d, 0x39, 0x96, 0x5f, 0xc0, 0xec, 0x25, 0x49, 0x9a, 0x42, 0xf1, 0x4a,
  489. 0xfa, 0x32, 0x49, 0x2b, 0x55, 0x1c, 0x95, 0x11, 0xb2, 0x0c, 0x2d, 0x07, 0x47, 0x8e, 0x58, 0xc7,
  490. 0x05, 0x24, 0xbe, 0xfb, 0x9f, 0xe1, 0x4e, 0xe5, 0x30, 0xc8, 0x8f, 0x41, 0xdc, 0x16, 0x51, 0x5e,
  491. 0xe3, 0xda, 0x2b, 0x25, 0x92, 0x9f, 0xc3, 0xed, 0x20, 0x36, 0xf4, 0x23, 0x92, 0xe4, 0x8b, 0xbe,
  492. 0x7a, 0x19, 0x9f, 0xdd, 0xdc, 0xea, 0x7e, 0x6c, 0xb8, 0xd4, 0xdc, 0x25, 0x09, 0x6a, 0x07, 0xb1,
  493. 0xb1, 0x4b, 0x92, 0xc1, 0xbb, 0x93, 0xf3, 0xae, 0x74, 0x7a, 0xde, 0x95, 0x7e, 0x9e, 0x77, 0xa5,
  494. 0xe3, 0x8b, 0x6e, 0xe3, 0xf4, 0xa2, 0xdb, 0xf8, 0x7e, 0xd1, 0x6d, 0x7c, 0xdc, 0xb4, 0x29, 0x77,
  495. 0x62, 0x43, 0x35, 0x99, 0xa7, 0x5d, 0x7e, 0x21, 0xc6, 0x9f, 0xd9, 0x53, 0x33, 0xf9, 0x7a, 0x18,
  496. 0x6d, 0x61, 0x7f, 0xf6, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xc0, 0x2a, 0xcf, 0x0c, 0xc2, 0x06, 0x00,
  497. 0x00,
  498. }
  499. func (m *DuplicateVoteEvidence) Marshal() (dAtA []byte, err error) {
  500. size := m.Size()
  501. dAtA = make([]byte, size)
  502. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  503. if err != nil {
  504. return nil, err
  505. }
  506. return dAtA[:n], nil
  507. }
  508. func (m *DuplicateVoteEvidence) MarshalTo(dAtA []byte) (int, error) {
  509. size := m.Size()
  510. return m.MarshalToSizedBuffer(dAtA[:size])
  511. }
  512. func (m *DuplicateVoteEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  513. i := len(dAtA)
  514. _ = i
  515. var l int
  516. _ = l
  517. n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):])
  518. if err1 != nil {
  519. return 0, err1
  520. }
  521. i -= n1
  522. i = encodeVarintEvidence(dAtA, i, uint64(n1))
  523. i--
  524. dAtA[i] = 0x1a
  525. if m.VoteB != nil {
  526. {
  527. size, err := m.VoteB.MarshalToSizedBuffer(dAtA[:i])
  528. if err != nil {
  529. return 0, err
  530. }
  531. i -= size
  532. i = encodeVarintEvidence(dAtA, i, uint64(size))
  533. }
  534. i--
  535. dAtA[i] = 0x12
  536. }
  537. if m.VoteA != nil {
  538. {
  539. size, err := m.VoteA.MarshalToSizedBuffer(dAtA[:i])
  540. if err != nil {
  541. return 0, err
  542. }
  543. i -= size
  544. i = encodeVarintEvidence(dAtA, i, uint64(size))
  545. }
  546. i--
  547. dAtA[i] = 0xa
  548. }
  549. return len(dAtA) - i, nil
  550. }
  551. func (m *PotentialAmnesiaEvidence) Marshal() (dAtA []byte, err error) {
  552. size := m.Size()
  553. dAtA = make([]byte, size)
  554. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  555. if err != nil {
  556. return nil, err
  557. }
  558. return dAtA[:n], nil
  559. }
  560. func (m *PotentialAmnesiaEvidence) MarshalTo(dAtA []byte) (int, error) {
  561. size := m.Size()
  562. return m.MarshalToSizedBuffer(dAtA[:size])
  563. }
  564. func (m *PotentialAmnesiaEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  565. i := len(dAtA)
  566. _ = i
  567. var l int
  568. _ = l
  569. n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):])
  570. if err4 != nil {
  571. return 0, err4
  572. }
  573. i -= n4
  574. i = encodeVarintEvidence(dAtA, i, uint64(n4))
  575. i--
  576. dAtA[i] = 0x22
  577. if m.HeightStamp != 0 {
  578. i = encodeVarintEvidence(dAtA, i, uint64(m.HeightStamp))
  579. i--
  580. dAtA[i] = 0x18
  581. }
  582. if m.VoteB != nil {
  583. {
  584. size, err := m.VoteB.MarshalToSizedBuffer(dAtA[:i])
  585. if err != nil {
  586. return 0, err
  587. }
  588. i -= size
  589. i = encodeVarintEvidence(dAtA, i, uint64(size))
  590. }
  591. i--
  592. dAtA[i] = 0x12
  593. }
  594. if m.VoteA != nil {
  595. {
  596. size, err := m.VoteA.MarshalToSizedBuffer(dAtA[:i])
  597. if err != nil {
  598. return 0, err
  599. }
  600. i -= size
  601. i = encodeVarintEvidence(dAtA, i, uint64(size))
  602. }
  603. i--
  604. dAtA[i] = 0xa
  605. }
  606. return len(dAtA) - i, nil
  607. }
  608. func (m *AmnesiaEvidence) Marshal() (dAtA []byte, err error) {
  609. size := m.Size()
  610. dAtA = make([]byte, size)
  611. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  612. if err != nil {
  613. return nil, err
  614. }
  615. return dAtA[:n], nil
  616. }
  617. func (m *AmnesiaEvidence) MarshalTo(dAtA []byte) (int, error) {
  618. size := m.Size()
  619. return m.MarshalToSizedBuffer(dAtA[:size])
  620. }
  621. func (m *AmnesiaEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  622. i := len(dAtA)
  623. _ = i
  624. var l int
  625. _ = l
  626. if m.Polc != nil {
  627. {
  628. size, err := m.Polc.MarshalToSizedBuffer(dAtA[:i])
  629. if err != nil {
  630. return 0, err
  631. }
  632. i -= size
  633. i = encodeVarintEvidence(dAtA, i, uint64(size))
  634. }
  635. i--
  636. dAtA[i] = 0x12
  637. }
  638. if m.PotentialAmnesiaEvidence != nil {
  639. {
  640. size, err := m.PotentialAmnesiaEvidence.MarshalToSizedBuffer(dAtA[:i])
  641. if err != nil {
  642. return 0, err
  643. }
  644. i -= size
  645. i = encodeVarintEvidence(dAtA, i, uint64(size))
  646. }
  647. i--
  648. dAtA[i] = 0xa
  649. }
  650. return len(dAtA) - i, nil
  651. }
  652. func (m *LunaticValidatorEvidence) Marshal() (dAtA []byte, err error) {
  653. size := m.Size()
  654. dAtA = make([]byte, size)
  655. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  656. if err != nil {
  657. return nil, err
  658. }
  659. return dAtA[:n], nil
  660. }
  661. func (m *LunaticValidatorEvidence) MarshalTo(dAtA []byte) (int, error) {
  662. size := m.Size()
  663. return m.MarshalToSizedBuffer(dAtA[:size])
  664. }
  665. func (m *LunaticValidatorEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  666. i := len(dAtA)
  667. _ = i
  668. var l int
  669. _ = l
  670. n9, err9 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):])
  671. if err9 != nil {
  672. return 0, err9
  673. }
  674. i -= n9
  675. i = encodeVarintEvidence(dAtA, i, uint64(n9))
  676. i--
  677. dAtA[i] = 0x22
  678. if len(m.InvalidHeaderField) > 0 {
  679. i -= len(m.InvalidHeaderField)
  680. copy(dAtA[i:], m.InvalidHeaderField)
  681. i = encodeVarintEvidence(dAtA, i, uint64(len(m.InvalidHeaderField)))
  682. i--
  683. dAtA[i] = 0x1a
  684. }
  685. if m.Vote != nil {
  686. {
  687. size, err := m.Vote.MarshalToSizedBuffer(dAtA[:i])
  688. if err != nil {
  689. return 0, err
  690. }
  691. i -= size
  692. i = encodeVarintEvidence(dAtA, i, uint64(size))
  693. }
  694. i--
  695. dAtA[i] = 0x12
  696. }
  697. if m.Header != nil {
  698. {
  699. size, err := m.Header.MarshalToSizedBuffer(dAtA[:i])
  700. if err != nil {
  701. return 0, err
  702. }
  703. i -= size
  704. i = encodeVarintEvidence(dAtA, i, uint64(size))
  705. }
  706. i--
  707. dAtA[i] = 0xa
  708. }
  709. return len(dAtA) - i, nil
  710. }
  711. func (m *Evidence) Marshal() (dAtA []byte, err error) {
  712. size := m.Size()
  713. dAtA = make([]byte, size)
  714. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  715. if err != nil {
  716. return nil, err
  717. }
  718. return dAtA[:n], nil
  719. }
  720. func (m *Evidence) MarshalTo(dAtA []byte) (int, error) {
  721. size := m.Size()
  722. return m.MarshalToSizedBuffer(dAtA[:size])
  723. }
  724. func (m *Evidence) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  725. i := len(dAtA)
  726. _ = i
  727. var l int
  728. _ = l
  729. if m.Sum != nil {
  730. {
  731. size := m.Sum.Size()
  732. i -= size
  733. if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil {
  734. return 0, err
  735. }
  736. }
  737. }
  738. return len(dAtA) - i, nil
  739. }
  740. func (m *Evidence_DuplicateVoteEvidence) MarshalTo(dAtA []byte) (int, error) {
  741. size := m.Size()
  742. return m.MarshalToSizedBuffer(dAtA[:size])
  743. }
  744. func (m *Evidence_DuplicateVoteEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  745. i := len(dAtA)
  746. if m.DuplicateVoteEvidence != nil {
  747. {
  748. size, err := m.DuplicateVoteEvidence.MarshalToSizedBuffer(dAtA[:i])
  749. if err != nil {
  750. return 0, err
  751. }
  752. i -= size
  753. i = encodeVarintEvidence(dAtA, i, uint64(size))
  754. }
  755. i--
  756. dAtA[i] = 0xa
  757. }
  758. return len(dAtA) - i, nil
  759. }
  760. func (m *Evidence_LunaticValidatorEvidence) MarshalTo(dAtA []byte) (int, error) {
  761. size := m.Size()
  762. return m.MarshalToSizedBuffer(dAtA[:size])
  763. }
  764. func (m *Evidence_LunaticValidatorEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  765. i := len(dAtA)
  766. if m.LunaticValidatorEvidence != nil {
  767. {
  768. size, err := m.LunaticValidatorEvidence.MarshalToSizedBuffer(dAtA[:i])
  769. if err != nil {
  770. return 0, err
  771. }
  772. i -= size
  773. i = encodeVarintEvidence(dAtA, i, uint64(size))
  774. }
  775. i--
  776. dAtA[i] = 0x1a
  777. }
  778. return len(dAtA) - i, nil
  779. }
  780. func (m *Evidence_PotentialAmnesiaEvidence) MarshalTo(dAtA []byte) (int, error) {
  781. size := m.Size()
  782. return m.MarshalToSizedBuffer(dAtA[:size])
  783. }
  784. func (m *Evidence_PotentialAmnesiaEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  785. i := len(dAtA)
  786. if m.PotentialAmnesiaEvidence != nil {
  787. {
  788. size, err := m.PotentialAmnesiaEvidence.MarshalToSizedBuffer(dAtA[:i])
  789. if err != nil {
  790. return 0, err
  791. }
  792. i -= size
  793. i = encodeVarintEvidence(dAtA, i, uint64(size))
  794. }
  795. i--
  796. dAtA[i] = 0x22
  797. }
  798. return len(dAtA) - i, nil
  799. }
  800. func (m *Evidence_AmnesiaEvidence) MarshalTo(dAtA []byte) (int, error) {
  801. size := m.Size()
  802. return m.MarshalToSizedBuffer(dAtA[:size])
  803. }
  804. func (m *Evidence_AmnesiaEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  805. i := len(dAtA)
  806. if m.AmnesiaEvidence != nil {
  807. {
  808. size, err := m.AmnesiaEvidence.MarshalToSizedBuffer(dAtA[:i])
  809. if err != nil {
  810. return 0, err
  811. }
  812. i -= size
  813. i = encodeVarintEvidence(dAtA, i, uint64(size))
  814. }
  815. i--
  816. dAtA[i] = 0x2a
  817. }
  818. return len(dAtA) - i, nil
  819. }
  820. func (m *EvidenceData) Marshal() (dAtA []byte, err error) {
  821. size := m.Size()
  822. dAtA = make([]byte, size)
  823. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  824. if err != nil {
  825. return nil, err
  826. }
  827. return dAtA[:n], nil
  828. }
  829. func (m *EvidenceData) MarshalTo(dAtA []byte) (int, error) {
  830. size := m.Size()
  831. return m.MarshalToSizedBuffer(dAtA[:size])
  832. }
  833. func (m *EvidenceData) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  834. i := len(dAtA)
  835. _ = i
  836. var l int
  837. _ = l
  838. if len(m.Hash) > 0 {
  839. i -= len(m.Hash)
  840. copy(dAtA[i:], m.Hash)
  841. i = encodeVarintEvidence(dAtA, i, uint64(len(m.Hash)))
  842. i--
  843. dAtA[i] = 0x12
  844. }
  845. if len(m.Evidence) > 0 {
  846. for iNdEx := len(m.Evidence) - 1; iNdEx >= 0; iNdEx-- {
  847. {
  848. size, err := m.Evidence[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  849. if err != nil {
  850. return 0, err
  851. }
  852. i -= size
  853. i = encodeVarintEvidence(dAtA, i, uint64(size))
  854. }
  855. i--
  856. dAtA[i] = 0xa
  857. }
  858. }
  859. return len(dAtA) - i, nil
  860. }
  861. func (m *ProofOfLockChange) Marshal() (dAtA []byte, err error) {
  862. size := m.Size()
  863. dAtA = make([]byte, size)
  864. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  865. if err != nil {
  866. return nil, err
  867. }
  868. return dAtA[:n], nil
  869. }
  870. func (m *ProofOfLockChange) MarshalTo(dAtA []byte) (int, error) {
  871. size := m.Size()
  872. return m.MarshalToSizedBuffer(dAtA[:size])
  873. }
  874. func (m *ProofOfLockChange) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  875. i := len(dAtA)
  876. _ = i
  877. var l int
  878. _ = l
  879. if m.PubKey != nil {
  880. {
  881. size, err := m.PubKey.MarshalToSizedBuffer(dAtA[:i])
  882. if err != nil {
  883. return 0, err
  884. }
  885. i -= size
  886. i = encodeVarintEvidence(dAtA, i, uint64(size))
  887. }
  888. i--
  889. dAtA[i] = 0x12
  890. }
  891. if len(m.Votes) > 0 {
  892. for iNdEx := len(m.Votes) - 1; iNdEx >= 0; iNdEx-- {
  893. {
  894. size, err := m.Votes[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  895. if err != nil {
  896. return 0, err
  897. }
  898. i -= size
  899. i = encodeVarintEvidence(dAtA, i, uint64(size))
  900. }
  901. i--
  902. dAtA[i] = 0xa
  903. }
  904. }
  905. return len(dAtA) - i, nil
  906. }
  907. func encodeVarintEvidence(dAtA []byte, offset int, v uint64) int {
  908. offset -= sovEvidence(v)
  909. base := offset
  910. for v >= 1<<7 {
  911. dAtA[offset] = uint8(v&0x7f | 0x80)
  912. v >>= 7
  913. offset++
  914. }
  915. dAtA[offset] = uint8(v)
  916. return base
  917. }
  918. func (m *DuplicateVoteEvidence) Size() (n int) {
  919. if m == nil {
  920. return 0
  921. }
  922. var l int
  923. _ = l
  924. if m.VoteA != nil {
  925. l = m.VoteA.Size()
  926. n += 1 + l + sovEvidence(uint64(l))
  927. }
  928. if m.VoteB != nil {
  929. l = m.VoteB.Size()
  930. n += 1 + l + sovEvidence(uint64(l))
  931. }
  932. l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp)
  933. n += 1 + l + sovEvidence(uint64(l))
  934. return n
  935. }
  936. func (m *PotentialAmnesiaEvidence) Size() (n int) {
  937. if m == nil {
  938. return 0
  939. }
  940. var l int
  941. _ = l
  942. if m.VoteA != nil {
  943. l = m.VoteA.Size()
  944. n += 1 + l + sovEvidence(uint64(l))
  945. }
  946. if m.VoteB != nil {
  947. l = m.VoteB.Size()
  948. n += 1 + l + sovEvidence(uint64(l))
  949. }
  950. if m.HeightStamp != 0 {
  951. n += 1 + sovEvidence(uint64(m.HeightStamp))
  952. }
  953. l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp)
  954. n += 1 + l + sovEvidence(uint64(l))
  955. return n
  956. }
  957. func (m *AmnesiaEvidence) Size() (n int) {
  958. if m == nil {
  959. return 0
  960. }
  961. var l int
  962. _ = l
  963. if m.PotentialAmnesiaEvidence != nil {
  964. l = m.PotentialAmnesiaEvidence.Size()
  965. n += 1 + l + sovEvidence(uint64(l))
  966. }
  967. if m.Polc != nil {
  968. l = m.Polc.Size()
  969. n += 1 + l + sovEvidence(uint64(l))
  970. }
  971. return n
  972. }
  973. func (m *LunaticValidatorEvidence) Size() (n int) {
  974. if m == nil {
  975. return 0
  976. }
  977. var l int
  978. _ = l
  979. if m.Header != nil {
  980. l = m.Header.Size()
  981. n += 1 + l + sovEvidence(uint64(l))
  982. }
  983. if m.Vote != nil {
  984. l = m.Vote.Size()
  985. n += 1 + l + sovEvidence(uint64(l))
  986. }
  987. l = len(m.InvalidHeaderField)
  988. if l > 0 {
  989. n += 1 + l + sovEvidence(uint64(l))
  990. }
  991. l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp)
  992. n += 1 + l + sovEvidence(uint64(l))
  993. return n
  994. }
  995. func (m *Evidence) Size() (n int) {
  996. if m == nil {
  997. return 0
  998. }
  999. var l int
  1000. _ = l
  1001. if m.Sum != nil {
  1002. n += m.Sum.Size()
  1003. }
  1004. return n
  1005. }
  1006. func (m *Evidence_DuplicateVoteEvidence) Size() (n int) {
  1007. if m == nil {
  1008. return 0
  1009. }
  1010. var l int
  1011. _ = l
  1012. if m.DuplicateVoteEvidence != nil {
  1013. l = m.DuplicateVoteEvidence.Size()
  1014. n += 1 + l + sovEvidence(uint64(l))
  1015. }
  1016. return n
  1017. }
  1018. func (m *Evidence_LunaticValidatorEvidence) Size() (n int) {
  1019. if m == nil {
  1020. return 0
  1021. }
  1022. var l int
  1023. _ = l
  1024. if m.LunaticValidatorEvidence != nil {
  1025. l = m.LunaticValidatorEvidence.Size()
  1026. n += 1 + l + sovEvidence(uint64(l))
  1027. }
  1028. return n
  1029. }
  1030. func (m *Evidence_PotentialAmnesiaEvidence) Size() (n int) {
  1031. if m == nil {
  1032. return 0
  1033. }
  1034. var l int
  1035. _ = l
  1036. if m.PotentialAmnesiaEvidence != nil {
  1037. l = m.PotentialAmnesiaEvidence.Size()
  1038. n += 1 + l + sovEvidence(uint64(l))
  1039. }
  1040. return n
  1041. }
  1042. func (m *Evidence_AmnesiaEvidence) Size() (n int) {
  1043. if m == nil {
  1044. return 0
  1045. }
  1046. var l int
  1047. _ = l
  1048. if m.AmnesiaEvidence != nil {
  1049. l = m.AmnesiaEvidence.Size()
  1050. n += 1 + l + sovEvidence(uint64(l))
  1051. }
  1052. return n
  1053. }
  1054. func (m *EvidenceData) Size() (n int) {
  1055. if m == nil {
  1056. return 0
  1057. }
  1058. var l int
  1059. _ = l
  1060. if len(m.Evidence) > 0 {
  1061. for _, e := range m.Evidence {
  1062. l = e.Size()
  1063. n += 1 + l + sovEvidence(uint64(l))
  1064. }
  1065. }
  1066. l = len(m.Hash)
  1067. if l > 0 {
  1068. n += 1 + l + sovEvidence(uint64(l))
  1069. }
  1070. return n
  1071. }
  1072. func (m *ProofOfLockChange) Size() (n int) {
  1073. if m == nil {
  1074. return 0
  1075. }
  1076. var l int
  1077. _ = l
  1078. if len(m.Votes) > 0 {
  1079. for _, e := range m.Votes {
  1080. l = e.Size()
  1081. n += 1 + l + sovEvidence(uint64(l))
  1082. }
  1083. }
  1084. if m.PubKey != nil {
  1085. l = m.PubKey.Size()
  1086. n += 1 + l + sovEvidence(uint64(l))
  1087. }
  1088. return n
  1089. }
  1090. func sovEvidence(x uint64) (n int) {
  1091. return (math_bits.Len64(x|1) + 6) / 7
  1092. }
  1093. func sozEvidence(x uint64) (n int) {
  1094. return sovEvidence(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  1095. }
  1096. func (m *DuplicateVoteEvidence) Unmarshal(dAtA []byte) error {
  1097. l := len(dAtA)
  1098. iNdEx := 0
  1099. for iNdEx < l {
  1100. preIndex := iNdEx
  1101. var wire uint64
  1102. for shift := uint(0); ; shift += 7 {
  1103. if shift >= 64 {
  1104. return ErrIntOverflowEvidence
  1105. }
  1106. if iNdEx >= l {
  1107. return io.ErrUnexpectedEOF
  1108. }
  1109. b := dAtA[iNdEx]
  1110. iNdEx++
  1111. wire |= uint64(b&0x7F) << shift
  1112. if b < 0x80 {
  1113. break
  1114. }
  1115. }
  1116. fieldNum := int32(wire >> 3)
  1117. wireType := int(wire & 0x7)
  1118. if wireType == 4 {
  1119. return fmt.Errorf("proto: DuplicateVoteEvidence: wiretype end group for non-group")
  1120. }
  1121. if fieldNum <= 0 {
  1122. return fmt.Errorf("proto: DuplicateVoteEvidence: illegal tag %d (wire type %d)", fieldNum, wire)
  1123. }
  1124. switch fieldNum {
  1125. case 1:
  1126. if wireType != 2 {
  1127. return fmt.Errorf("proto: wrong wireType = %d for field VoteA", wireType)
  1128. }
  1129. var msglen int
  1130. for shift := uint(0); ; shift += 7 {
  1131. if shift >= 64 {
  1132. return ErrIntOverflowEvidence
  1133. }
  1134. if iNdEx >= l {
  1135. return io.ErrUnexpectedEOF
  1136. }
  1137. b := dAtA[iNdEx]
  1138. iNdEx++
  1139. msglen |= int(b&0x7F) << shift
  1140. if b < 0x80 {
  1141. break
  1142. }
  1143. }
  1144. if msglen < 0 {
  1145. return ErrInvalidLengthEvidence
  1146. }
  1147. postIndex := iNdEx + msglen
  1148. if postIndex < 0 {
  1149. return ErrInvalidLengthEvidence
  1150. }
  1151. if postIndex > l {
  1152. return io.ErrUnexpectedEOF
  1153. }
  1154. if m.VoteA == nil {
  1155. m.VoteA = &Vote{}
  1156. }
  1157. if err := m.VoteA.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1158. return err
  1159. }
  1160. iNdEx = postIndex
  1161. case 2:
  1162. if wireType != 2 {
  1163. return fmt.Errorf("proto: wrong wireType = %d for field VoteB", wireType)
  1164. }
  1165. var msglen int
  1166. for shift := uint(0); ; shift += 7 {
  1167. if shift >= 64 {
  1168. return ErrIntOverflowEvidence
  1169. }
  1170. if iNdEx >= l {
  1171. return io.ErrUnexpectedEOF
  1172. }
  1173. b := dAtA[iNdEx]
  1174. iNdEx++
  1175. msglen |= int(b&0x7F) << shift
  1176. if b < 0x80 {
  1177. break
  1178. }
  1179. }
  1180. if msglen < 0 {
  1181. return ErrInvalidLengthEvidence
  1182. }
  1183. postIndex := iNdEx + msglen
  1184. if postIndex < 0 {
  1185. return ErrInvalidLengthEvidence
  1186. }
  1187. if postIndex > l {
  1188. return io.ErrUnexpectedEOF
  1189. }
  1190. if m.VoteB == nil {
  1191. m.VoteB = &Vote{}
  1192. }
  1193. if err := m.VoteB.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1194. return err
  1195. }
  1196. iNdEx = postIndex
  1197. case 3:
  1198. if wireType != 2 {
  1199. return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
  1200. }
  1201. var msglen int
  1202. for shift := uint(0); ; shift += 7 {
  1203. if shift >= 64 {
  1204. return ErrIntOverflowEvidence
  1205. }
  1206. if iNdEx >= l {
  1207. return io.ErrUnexpectedEOF
  1208. }
  1209. b := dAtA[iNdEx]
  1210. iNdEx++
  1211. msglen |= int(b&0x7F) << shift
  1212. if b < 0x80 {
  1213. break
  1214. }
  1215. }
  1216. if msglen < 0 {
  1217. return ErrInvalidLengthEvidence
  1218. }
  1219. postIndex := iNdEx + msglen
  1220. if postIndex < 0 {
  1221. return ErrInvalidLengthEvidence
  1222. }
  1223. if postIndex > l {
  1224. return io.ErrUnexpectedEOF
  1225. }
  1226. if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil {
  1227. return err
  1228. }
  1229. iNdEx = postIndex
  1230. default:
  1231. iNdEx = preIndex
  1232. skippy, err := skipEvidence(dAtA[iNdEx:])
  1233. if err != nil {
  1234. return err
  1235. }
  1236. if skippy < 0 {
  1237. return ErrInvalidLengthEvidence
  1238. }
  1239. if (iNdEx + skippy) < 0 {
  1240. return ErrInvalidLengthEvidence
  1241. }
  1242. if (iNdEx + skippy) > l {
  1243. return io.ErrUnexpectedEOF
  1244. }
  1245. iNdEx += skippy
  1246. }
  1247. }
  1248. if iNdEx > l {
  1249. return io.ErrUnexpectedEOF
  1250. }
  1251. return nil
  1252. }
  1253. func (m *PotentialAmnesiaEvidence) Unmarshal(dAtA []byte) error {
  1254. l := len(dAtA)
  1255. iNdEx := 0
  1256. for iNdEx < l {
  1257. preIndex := iNdEx
  1258. var wire uint64
  1259. for shift := uint(0); ; shift += 7 {
  1260. if shift >= 64 {
  1261. return ErrIntOverflowEvidence
  1262. }
  1263. if iNdEx >= l {
  1264. return io.ErrUnexpectedEOF
  1265. }
  1266. b := dAtA[iNdEx]
  1267. iNdEx++
  1268. wire |= uint64(b&0x7F) << shift
  1269. if b < 0x80 {
  1270. break
  1271. }
  1272. }
  1273. fieldNum := int32(wire >> 3)
  1274. wireType := int(wire & 0x7)
  1275. if wireType == 4 {
  1276. return fmt.Errorf("proto: PotentialAmnesiaEvidence: wiretype end group for non-group")
  1277. }
  1278. if fieldNum <= 0 {
  1279. return fmt.Errorf("proto: PotentialAmnesiaEvidence: illegal tag %d (wire type %d)", fieldNum, wire)
  1280. }
  1281. switch fieldNum {
  1282. case 1:
  1283. if wireType != 2 {
  1284. return fmt.Errorf("proto: wrong wireType = %d for field VoteA", wireType)
  1285. }
  1286. var msglen int
  1287. for shift := uint(0); ; shift += 7 {
  1288. if shift >= 64 {
  1289. return ErrIntOverflowEvidence
  1290. }
  1291. if iNdEx >= l {
  1292. return io.ErrUnexpectedEOF
  1293. }
  1294. b := dAtA[iNdEx]
  1295. iNdEx++
  1296. msglen |= int(b&0x7F) << shift
  1297. if b < 0x80 {
  1298. break
  1299. }
  1300. }
  1301. if msglen < 0 {
  1302. return ErrInvalidLengthEvidence
  1303. }
  1304. postIndex := iNdEx + msglen
  1305. if postIndex < 0 {
  1306. return ErrInvalidLengthEvidence
  1307. }
  1308. if postIndex > l {
  1309. return io.ErrUnexpectedEOF
  1310. }
  1311. if m.VoteA == nil {
  1312. m.VoteA = &Vote{}
  1313. }
  1314. if err := m.VoteA.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1315. return err
  1316. }
  1317. iNdEx = postIndex
  1318. case 2:
  1319. if wireType != 2 {
  1320. return fmt.Errorf("proto: wrong wireType = %d for field VoteB", wireType)
  1321. }
  1322. var msglen int
  1323. for shift := uint(0); ; shift += 7 {
  1324. if shift >= 64 {
  1325. return ErrIntOverflowEvidence
  1326. }
  1327. if iNdEx >= l {
  1328. return io.ErrUnexpectedEOF
  1329. }
  1330. b := dAtA[iNdEx]
  1331. iNdEx++
  1332. msglen |= int(b&0x7F) << shift
  1333. if b < 0x80 {
  1334. break
  1335. }
  1336. }
  1337. if msglen < 0 {
  1338. return ErrInvalidLengthEvidence
  1339. }
  1340. postIndex := iNdEx + msglen
  1341. if postIndex < 0 {
  1342. return ErrInvalidLengthEvidence
  1343. }
  1344. if postIndex > l {
  1345. return io.ErrUnexpectedEOF
  1346. }
  1347. if m.VoteB == nil {
  1348. m.VoteB = &Vote{}
  1349. }
  1350. if err := m.VoteB.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1351. return err
  1352. }
  1353. iNdEx = postIndex
  1354. case 3:
  1355. if wireType != 0 {
  1356. return fmt.Errorf("proto: wrong wireType = %d for field HeightStamp", wireType)
  1357. }
  1358. m.HeightStamp = 0
  1359. for shift := uint(0); ; shift += 7 {
  1360. if shift >= 64 {
  1361. return ErrIntOverflowEvidence
  1362. }
  1363. if iNdEx >= l {
  1364. return io.ErrUnexpectedEOF
  1365. }
  1366. b := dAtA[iNdEx]
  1367. iNdEx++
  1368. m.HeightStamp |= int64(b&0x7F) << shift
  1369. if b < 0x80 {
  1370. break
  1371. }
  1372. }
  1373. case 4:
  1374. if wireType != 2 {
  1375. return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
  1376. }
  1377. var msglen int
  1378. for shift := uint(0); ; shift += 7 {
  1379. if shift >= 64 {
  1380. return ErrIntOverflowEvidence
  1381. }
  1382. if iNdEx >= l {
  1383. return io.ErrUnexpectedEOF
  1384. }
  1385. b := dAtA[iNdEx]
  1386. iNdEx++
  1387. msglen |= int(b&0x7F) << shift
  1388. if b < 0x80 {
  1389. break
  1390. }
  1391. }
  1392. if msglen < 0 {
  1393. return ErrInvalidLengthEvidence
  1394. }
  1395. postIndex := iNdEx + msglen
  1396. if postIndex < 0 {
  1397. return ErrInvalidLengthEvidence
  1398. }
  1399. if postIndex > l {
  1400. return io.ErrUnexpectedEOF
  1401. }
  1402. if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil {
  1403. return err
  1404. }
  1405. iNdEx = postIndex
  1406. default:
  1407. iNdEx = preIndex
  1408. skippy, err := skipEvidence(dAtA[iNdEx:])
  1409. if err != nil {
  1410. return err
  1411. }
  1412. if skippy < 0 {
  1413. return ErrInvalidLengthEvidence
  1414. }
  1415. if (iNdEx + skippy) < 0 {
  1416. return ErrInvalidLengthEvidence
  1417. }
  1418. if (iNdEx + skippy) > l {
  1419. return io.ErrUnexpectedEOF
  1420. }
  1421. iNdEx += skippy
  1422. }
  1423. }
  1424. if iNdEx > l {
  1425. return io.ErrUnexpectedEOF
  1426. }
  1427. return nil
  1428. }
  1429. func (m *AmnesiaEvidence) Unmarshal(dAtA []byte) error {
  1430. l := len(dAtA)
  1431. iNdEx := 0
  1432. for iNdEx < l {
  1433. preIndex := iNdEx
  1434. var wire uint64
  1435. for shift := uint(0); ; shift += 7 {
  1436. if shift >= 64 {
  1437. return ErrIntOverflowEvidence
  1438. }
  1439. if iNdEx >= l {
  1440. return io.ErrUnexpectedEOF
  1441. }
  1442. b := dAtA[iNdEx]
  1443. iNdEx++
  1444. wire |= uint64(b&0x7F) << shift
  1445. if b < 0x80 {
  1446. break
  1447. }
  1448. }
  1449. fieldNum := int32(wire >> 3)
  1450. wireType := int(wire & 0x7)
  1451. if wireType == 4 {
  1452. return fmt.Errorf("proto: AmnesiaEvidence: wiretype end group for non-group")
  1453. }
  1454. if fieldNum <= 0 {
  1455. return fmt.Errorf("proto: AmnesiaEvidence: illegal tag %d (wire type %d)", fieldNum, wire)
  1456. }
  1457. switch fieldNum {
  1458. case 1:
  1459. if wireType != 2 {
  1460. return fmt.Errorf("proto: wrong wireType = %d for field PotentialAmnesiaEvidence", wireType)
  1461. }
  1462. var msglen int
  1463. for shift := uint(0); ; shift += 7 {
  1464. if shift >= 64 {
  1465. return ErrIntOverflowEvidence
  1466. }
  1467. if iNdEx >= l {
  1468. return io.ErrUnexpectedEOF
  1469. }
  1470. b := dAtA[iNdEx]
  1471. iNdEx++
  1472. msglen |= int(b&0x7F) << shift
  1473. if b < 0x80 {
  1474. break
  1475. }
  1476. }
  1477. if msglen < 0 {
  1478. return ErrInvalidLengthEvidence
  1479. }
  1480. postIndex := iNdEx + msglen
  1481. if postIndex < 0 {
  1482. return ErrInvalidLengthEvidence
  1483. }
  1484. if postIndex > l {
  1485. return io.ErrUnexpectedEOF
  1486. }
  1487. if m.PotentialAmnesiaEvidence == nil {
  1488. m.PotentialAmnesiaEvidence = &PotentialAmnesiaEvidence{}
  1489. }
  1490. if err := m.PotentialAmnesiaEvidence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1491. return err
  1492. }
  1493. iNdEx = postIndex
  1494. case 2:
  1495. if wireType != 2 {
  1496. return fmt.Errorf("proto: wrong wireType = %d for field Polc", wireType)
  1497. }
  1498. var msglen int
  1499. for shift := uint(0); ; shift += 7 {
  1500. if shift >= 64 {
  1501. return ErrIntOverflowEvidence
  1502. }
  1503. if iNdEx >= l {
  1504. return io.ErrUnexpectedEOF
  1505. }
  1506. b := dAtA[iNdEx]
  1507. iNdEx++
  1508. msglen |= int(b&0x7F) << shift
  1509. if b < 0x80 {
  1510. break
  1511. }
  1512. }
  1513. if msglen < 0 {
  1514. return ErrInvalidLengthEvidence
  1515. }
  1516. postIndex := iNdEx + msglen
  1517. if postIndex < 0 {
  1518. return ErrInvalidLengthEvidence
  1519. }
  1520. if postIndex > l {
  1521. return io.ErrUnexpectedEOF
  1522. }
  1523. if m.Polc == nil {
  1524. m.Polc = &ProofOfLockChange{}
  1525. }
  1526. if err := m.Polc.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1527. return err
  1528. }
  1529. iNdEx = postIndex
  1530. default:
  1531. iNdEx = preIndex
  1532. skippy, err := skipEvidence(dAtA[iNdEx:])
  1533. if err != nil {
  1534. return err
  1535. }
  1536. if skippy < 0 {
  1537. return ErrInvalidLengthEvidence
  1538. }
  1539. if (iNdEx + skippy) < 0 {
  1540. return ErrInvalidLengthEvidence
  1541. }
  1542. if (iNdEx + skippy) > l {
  1543. return io.ErrUnexpectedEOF
  1544. }
  1545. iNdEx += skippy
  1546. }
  1547. }
  1548. if iNdEx > l {
  1549. return io.ErrUnexpectedEOF
  1550. }
  1551. return nil
  1552. }
  1553. func (m *LunaticValidatorEvidence) Unmarshal(dAtA []byte) error {
  1554. l := len(dAtA)
  1555. iNdEx := 0
  1556. for iNdEx < l {
  1557. preIndex := iNdEx
  1558. var wire uint64
  1559. for shift := uint(0); ; shift += 7 {
  1560. if shift >= 64 {
  1561. return ErrIntOverflowEvidence
  1562. }
  1563. if iNdEx >= l {
  1564. return io.ErrUnexpectedEOF
  1565. }
  1566. b := dAtA[iNdEx]
  1567. iNdEx++
  1568. wire |= uint64(b&0x7F) << shift
  1569. if b < 0x80 {
  1570. break
  1571. }
  1572. }
  1573. fieldNum := int32(wire >> 3)
  1574. wireType := int(wire & 0x7)
  1575. if wireType == 4 {
  1576. return fmt.Errorf("proto: LunaticValidatorEvidence: wiretype end group for non-group")
  1577. }
  1578. if fieldNum <= 0 {
  1579. return fmt.Errorf("proto: LunaticValidatorEvidence: illegal tag %d (wire type %d)", fieldNum, wire)
  1580. }
  1581. switch fieldNum {
  1582. case 1:
  1583. if wireType != 2 {
  1584. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  1585. }
  1586. var msglen int
  1587. for shift := uint(0); ; shift += 7 {
  1588. if shift >= 64 {
  1589. return ErrIntOverflowEvidence
  1590. }
  1591. if iNdEx >= l {
  1592. return io.ErrUnexpectedEOF
  1593. }
  1594. b := dAtA[iNdEx]
  1595. iNdEx++
  1596. msglen |= int(b&0x7F) << shift
  1597. if b < 0x80 {
  1598. break
  1599. }
  1600. }
  1601. if msglen < 0 {
  1602. return ErrInvalidLengthEvidence
  1603. }
  1604. postIndex := iNdEx + msglen
  1605. if postIndex < 0 {
  1606. return ErrInvalidLengthEvidence
  1607. }
  1608. if postIndex > l {
  1609. return io.ErrUnexpectedEOF
  1610. }
  1611. if m.Header == nil {
  1612. m.Header = &Header{}
  1613. }
  1614. if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1615. return err
  1616. }
  1617. iNdEx = postIndex
  1618. case 2:
  1619. if wireType != 2 {
  1620. return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType)
  1621. }
  1622. var msglen int
  1623. for shift := uint(0); ; shift += 7 {
  1624. if shift >= 64 {
  1625. return ErrIntOverflowEvidence
  1626. }
  1627. if iNdEx >= l {
  1628. return io.ErrUnexpectedEOF
  1629. }
  1630. b := dAtA[iNdEx]
  1631. iNdEx++
  1632. msglen |= int(b&0x7F) << shift
  1633. if b < 0x80 {
  1634. break
  1635. }
  1636. }
  1637. if msglen < 0 {
  1638. return ErrInvalidLengthEvidence
  1639. }
  1640. postIndex := iNdEx + msglen
  1641. if postIndex < 0 {
  1642. return ErrInvalidLengthEvidence
  1643. }
  1644. if postIndex > l {
  1645. return io.ErrUnexpectedEOF
  1646. }
  1647. if m.Vote == nil {
  1648. m.Vote = &Vote{}
  1649. }
  1650. if err := m.Vote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1651. return err
  1652. }
  1653. iNdEx = postIndex
  1654. case 3:
  1655. if wireType != 2 {
  1656. return fmt.Errorf("proto: wrong wireType = %d for field InvalidHeaderField", wireType)
  1657. }
  1658. var stringLen uint64
  1659. for shift := uint(0); ; shift += 7 {
  1660. if shift >= 64 {
  1661. return ErrIntOverflowEvidence
  1662. }
  1663. if iNdEx >= l {
  1664. return io.ErrUnexpectedEOF
  1665. }
  1666. b := dAtA[iNdEx]
  1667. iNdEx++
  1668. stringLen |= uint64(b&0x7F) << shift
  1669. if b < 0x80 {
  1670. break
  1671. }
  1672. }
  1673. intStringLen := int(stringLen)
  1674. if intStringLen < 0 {
  1675. return ErrInvalidLengthEvidence
  1676. }
  1677. postIndex := iNdEx + intStringLen
  1678. if postIndex < 0 {
  1679. return ErrInvalidLengthEvidence
  1680. }
  1681. if postIndex > l {
  1682. return io.ErrUnexpectedEOF
  1683. }
  1684. m.InvalidHeaderField = string(dAtA[iNdEx:postIndex])
  1685. iNdEx = postIndex
  1686. case 4:
  1687. if wireType != 2 {
  1688. return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
  1689. }
  1690. var msglen int
  1691. for shift := uint(0); ; shift += 7 {
  1692. if shift >= 64 {
  1693. return ErrIntOverflowEvidence
  1694. }
  1695. if iNdEx >= l {
  1696. return io.ErrUnexpectedEOF
  1697. }
  1698. b := dAtA[iNdEx]
  1699. iNdEx++
  1700. msglen |= int(b&0x7F) << shift
  1701. if b < 0x80 {
  1702. break
  1703. }
  1704. }
  1705. if msglen < 0 {
  1706. return ErrInvalidLengthEvidence
  1707. }
  1708. postIndex := iNdEx + msglen
  1709. if postIndex < 0 {
  1710. return ErrInvalidLengthEvidence
  1711. }
  1712. if postIndex > l {
  1713. return io.ErrUnexpectedEOF
  1714. }
  1715. if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil {
  1716. return err
  1717. }
  1718. iNdEx = postIndex
  1719. default:
  1720. iNdEx = preIndex
  1721. skippy, err := skipEvidence(dAtA[iNdEx:])
  1722. if err != nil {
  1723. return err
  1724. }
  1725. if skippy < 0 {
  1726. return ErrInvalidLengthEvidence
  1727. }
  1728. if (iNdEx + skippy) < 0 {
  1729. return ErrInvalidLengthEvidence
  1730. }
  1731. if (iNdEx + skippy) > l {
  1732. return io.ErrUnexpectedEOF
  1733. }
  1734. iNdEx += skippy
  1735. }
  1736. }
  1737. if iNdEx > l {
  1738. return io.ErrUnexpectedEOF
  1739. }
  1740. return nil
  1741. }
  1742. func (m *Evidence) Unmarshal(dAtA []byte) error {
  1743. l := len(dAtA)
  1744. iNdEx := 0
  1745. for iNdEx < l {
  1746. preIndex := iNdEx
  1747. var wire uint64
  1748. for shift := uint(0); ; shift += 7 {
  1749. if shift >= 64 {
  1750. return ErrIntOverflowEvidence
  1751. }
  1752. if iNdEx >= l {
  1753. return io.ErrUnexpectedEOF
  1754. }
  1755. b := dAtA[iNdEx]
  1756. iNdEx++
  1757. wire |= uint64(b&0x7F) << shift
  1758. if b < 0x80 {
  1759. break
  1760. }
  1761. }
  1762. fieldNum := int32(wire >> 3)
  1763. wireType := int(wire & 0x7)
  1764. if wireType == 4 {
  1765. return fmt.Errorf("proto: Evidence: wiretype end group for non-group")
  1766. }
  1767. if fieldNum <= 0 {
  1768. return fmt.Errorf("proto: Evidence: illegal tag %d (wire type %d)", fieldNum, wire)
  1769. }
  1770. switch fieldNum {
  1771. case 1:
  1772. if wireType != 2 {
  1773. return fmt.Errorf("proto: wrong wireType = %d for field DuplicateVoteEvidence", wireType)
  1774. }
  1775. var msglen int
  1776. for shift := uint(0); ; shift += 7 {
  1777. if shift >= 64 {
  1778. return ErrIntOverflowEvidence
  1779. }
  1780. if iNdEx >= l {
  1781. return io.ErrUnexpectedEOF
  1782. }
  1783. b := dAtA[iNdEx]
  1784. iNdEx++
  1785. msglen |= int(b&0x7F) << shift
  1786. if b < 0x80 {
  1787. break
  1788. }
  1789. }
  1790. if msglen < 0 {
  1791. return ErrInvalidLengthEvidence
  1792. }
  1793. postIndex := iNdEx + msglen
  1794. if postIndex < 0 {
  1795. return ErrInvalidLengthEvidence
  1796. }
  1797. if postIndex > l {
  1798. return io.ErrUnexpectedEOF
  1799. }
  1800. v := &DuplicateVoteEvidence{}
  1801. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1802. return err
  1803. }
  1804. m.Sum = &Evidence_DuplicateVoteEvidence{v}
  1805. iNdEx = postIndex
  1806. case 3:
  1807. if wireType != 2 {
  1808. return fmt.Errorf("proto: wrong wireType = %d for field LunaticValidatorEvidence", wireType)
  1809. }
  1810. var msglen int
  1811. for shift := uint(0); ; shift += 7 {
  1812. if shift >= 64 {
  1813. return ErrIntOverflowEvidence
  1814. }
  1815. if iNdEx >= l {
  1816. return io.ErrUnexpectedEOF
  1817. }
  1818. b := dAtA[iNdEx]
  1819. iNdEx++
  1820. msglen |= int(b&0x7F) << shift
  1821. if b < 0x80 {
  1822. break
  1823. }
  1824. }
  1825. if msglen < 0 {
  1826. return ErrInvalidLengthEvidence
  1827. }
  1828. postIndex := iNdEx + msglen
  1829. if postIndex < 0 {
  1830. return ErrInvalidLengthEvidence
  1831. }
  1832. if postIndex > l {
  1833. return io.ErrUnexpectedEOF
  1834. }
  1835. v := &LunaticValidatorEvidence{}
  1836. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1837. return err
  1838. }
  1839. m.Sum = &Evidence_LunaticValidatorEvidence{v}
  1840. iNdEx = postIndex
  1841. case 4:
  1842. if wireType != 2 {
  1843. return fmt.Errorf("proto: wrong wireType = %d for field PotentialAmnesiaEvidence", wireType)
  1844. }
  1845. var msglen int
  1846. for shift := uint(0); ; shift += 7 {
  1847. if shift >= 64 {
  1848. return ErrIntOverflowEvidence
  1849. }
  1850. if iNdEx >= l {
  1851. return io.ErrUnexpectedEOF
  1852. }
  1853. b := dAtA[iNdEx]
  1854. iNdEx++
  1855. msglen |= int(b&0x7F) << shift
  1856. if b < 0x80 {
  1857. break
  1858. }
  1859. }
  1860. if msglen < 0 {
  1861. return ErrInvalidLengthEvidence
  1862. }
  1863. postIndex := iNdEx + msglen
  1864. if postIndex < 0 {
  1865. return ErrInvalidLengthEvidence
  1866. }
  1867. if postIndex > l {
  1868. return io.ErrUnexpectedEOF
  1869. }
  1870. v := &PotentialAmnesiaEvidence{}
  1871. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1872. return err
  1873. }
  1874. m.Sum = &Evidence_PotentialAmnesiaEvidence{v}
  1875. iNdEx = postIndex
  1876. case 5:
  1877. if wireType != 2 {
  1878. return fmt.Errorf("proto: wrong wireType = %d for field AmnesiaEvidence", wireType)
  1879. }
  1880. var msglen int
  1881. for shift := uint(0); ; shift += 7 {
  1882. if shift >= 64 {
  1883. return ErrIntOverflowEvidence
  1884. }
  1885. if iNdEx >= l {
  1886. return io.ErrUnexpectedEOF
  1887. }
  1888. b := dAtA[iNdEx]
  1889. iNdEx++
  1890. msglen |= int(b&0x7F) << shift
  1891. if b < 0x80 {
  1892. break
  1893. }
  1894. }
  1895. if msglen < 0 {
  1896. return ErrInvalidLengthEvidence
  1897. }
  1898. postIndex := iNdEx + msglen
  1899. if postIndex < 0 {
  1900. return ErrInvalidLengthEvidence
  1901. }
  1902. if postIndex > l {
  1903. return io.ErrUnexpectedEOF
  1904. }
  1905. v := &AmnesiaEvidence{}
  1906. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1907. return err
  1908. }
  1909. m.Sum = &Evidence_AmnesiaEvidence{v}
  1910. iNdEx = postIndex
  1911. default:
  1912. iNdEx = preIndex
  1913. skippy, err := skipEvidence(dAtA[iNdEx:])
  1914. if err != nil {
  1915. return err
  1916. }
  1917. if skippy < 0 {
  1918. return ErrInvalidLengthEvidence
  1919. }
  1920. if (iNdEx + skippy) < 0 {
  1921. return ErrInvalidLengthEvidence
  1922. }
  1923. if (iNdEx + skippy) > l {
  1924. return io.ErrUnexpectedEOF
  1925. }
  1926. iNdEx += skippy
  1927. }
  1928. }
  1929. if iNdEx > l {
  1930. return io.ErrUnexpectedEOF
  1931. }
  1932. return nil
  1933. }
  1934. func (m *EvidenceData) Unmarshal(dAtA []byte) error {
  1935. l := len(dAtA)
  1936. iNdEx := 0
  1937. for iNdEx < l {
  1938. preIndex := iNdEx
  1939. var wire uint64
  1940. for shift := uint(0); ; shift += 7 {
  1941. if shift >= 64 {
  1942. return ErrIntOverflowEvidence
  1943. }
  1944. if iNdEx >= l {
  1945. return io.ErrUnexpectedEOF
  1946. }
  1947. b := dAtA[iNdEx]
  1948. iNdEx++
  1949. wire |= uint64(b&0x7F) << shift
  1950. if b < 0x80 {
  1951. break
  1952. }
  1953. }
  1954. fieldNum := int32(wire >> 3)
  1955. wireType := int(wire & 0x7)
  1956. if wireType == 4 {
  1957. return fmt.Errorf("proto: EvidenceData: wiretype end group for non-group")
  1958. }
  1959. if fieldNum <= 0 {
  1960. return fmt.Errorf("proto: EvidenceData: illegal tag %d (wire type %d)", fieldNum, wire)
  1961. }
  1962. switch fieldNum {
  1963. case 1:
  1964. if wireType != 2 {
  1965. return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType)
  1966. }
  1967. var msglen int
  1968. for shift := uint(0); ; shift += 7 {
  1969. if shift >= 64 {
  1970. return ErrIntOverflowEvidence
  1971. }
  1972. if iNdEx >= l {
  1973. return io.ErrUnexpectedEOF
  1974. }
  1975. b := dAtA[iNdEx]
  1976. iNdEx++
  1977. msglen |= int(b&0x7F) << shift
  1978. if b < 0x80 {
  1979. break
  1980. }
  1981. }
  1982. if msglen < 0 {
  1983. return ErrInvalidLengthEvidence
  1984. }
  1985. postIndex := iNdEx + msglen
  1986. if postIndex < 0 {
  1987. return ErrInvalidLengthEvidence
  1988. }
  1989. if postIndex > l {
  1990. return io.ErrUnexpectedEOF
  1991. }
  1992. m.Evidence = append(m.Evidence, Evidence{})
  1993. if err := m.Evidence[len(m.Evidence)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1994. return err
  1995. }
  1996. iNdEx = postIndex
  1997. case 2:
  1998. if wireType != 2 {
  1999. return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
  2000. }
  2001. var byteLen int
  2002. for shift := uint(0); ; shift += 7 {
  2003. if shift >= 64 {
  2004. return ErrIntOverflowEvidence
  2005. }
  2006. if iNdEx >= l {
  2007. return io.ErrUnexpectedEOF
  2008. }
  2009. b := dAtA[iNdEx]
  2010. iNdEx++
  2011. byteLen |= int(b&0x7F) << shift
  2012. if b < 0x80 {
  2013. break
  2014. }
  2015. }
  2016. if byteLen < 0 {
  2017. return ErrInvalidLengthEvidence
  2018. }
  2019. postIndex := iNdEx + byteLen
  2020. if postIndex < 0 {
  2021. return ErrInvalidLengthEvidence
  2022. }
  2023. if postIndex > l {
  2024. return io.ErrUnexpectedEOF
  2025. }
  2026. m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...)
  2027. if m.Hash == nil {
  2028. m.Hash = []byte{}
  2029. }
  2030. iNdEx = postIndex
  2031. default:
  2032. iNdEx = preIndex
  2033. skippy, err := skipEvidence(dAtA[iNdEx:])
  2034. if err != nil {
  2035. return err
  2036. }
  2037. if skippy < 0 {
  2038. return ErrInvalidLengthEvidence
  2039. }
  2040. if (iNdEx + skippy) < 0 {
  2041. return ErrInvalidLengthEvidence
  2042. }
  2043. if (iNdEx + skippy) > l {
  2044. return io.ErrUnexpectedEOF
  2045. }
  2046. iNdEx += skippy
  2047. }
  2048. }
  2049. if iNdEx > l {
  2050. return io.ErrUnexpectedEOF
  2051. }
  2052. return nil
  2053. }
  2054. func (m *ProofOfLockChange) Unmarshal(dAtA []byte) error {
  2055. l := len(dAtA)
  2056. iNdEx := 0
  2057. for iNdEx < l {
  2058. preIndex := iNdEx
  2059. var wire uint64
  2060. for shift := uint(0); ; shift += 7 {
  2061. if shift >= 64 {
  2062. return ErrIntOverflowEvidence
  2063. }
  2064. if iNdEx >= l {
  2065. return io.ErrUnexpectedEOF
  2066. }
  2067. b := dAtA[iNdEx]
  2068. iNdEx++
  2069. wire |= uint64(b&0x7F) << shift
  2070. if b < 0x80 {
  2071. break
  2072. }
  2073. }
  2074. fieldNum := int32(wire >> 3)
  2075. wireType := int(wire & 0x7)
  2076. if wireType == 4 {
  2077. return fmt.Errorf("proto: ProofOfLockChange: wiretype end group for non-group")
  2078. }
  2079. if fieldNum <= 0 {
  2080. return fmt.Errorf("proto: ProofOfLockChange: illegal tag %d (wire type %d)", fieldNum, wire)
  2081. }
  2082. switch fieldNum {
  2083. case 1:
  2084. if wireType != 2 {
  2085. return fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType)
  2086. }
  2087. var msglen int
  2088. for shift := uint(0); ; shift += 7 {
  2089. if shift >= 64 {
  2090. return ErrIntOverflowEvidence
  2091. }
  2092. if iNdEx >= l {
  2093. return io.ErrUnexpectedEOF
  2094. }
  2095. b := dAtA[iNdEx]
  2096. iNdEx++
  2097. msglen |= int(b&0x7F) << shift
  2098. if b < 0x80 {
  2099. break
  2100. }
  2101. }
  2102. if msglen < 0 {
  2103. return ErrInvalidLengthEvidence
  2104. }
  2105. postIndex := iNdEx + msglen
  2106. if postIndex < 0 {
  2107. return ErrInvalidLengthEvidence
  2108. }
  2109. if postIndex > l {
  2110. return io.ErrUnexpectedEOF
  2111. }
  2112. m.Votes = append(m.Votes, &Vote{})
  2113. if err := m.Votes[len(m.Votes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2114. return err
  2115. }
  2116. iNdEx = postIndex
  2117. case 2:
  2118. if wireType != 2 {
  2119. return fmt.Errorf("proto: wrong wireType = %d for field PubKey", wireType)
  2120. }
  2121. var msglen int
  2122. for shift := uint(0); ; shift += 7 {
  2123. if shift >= 64 {
  2124. return ErrIntOverflowEvidence
  2125. }
  2126. if iNdEx >= l {
  2127. return io.ErrUnexpectedEOF
  2128. }
  2129. b := dAtA[iNdEx]
  2130. iNdEx++
  2131. msglen |= int(b&0x7F) << shift
  2132. if b < 0x80 {
  2133. break
  2134. }
  2135. }
  2136. if msglen < 0 {
  2137. return ErrInvalidLengthEvidence
  2138. }
  2139. postIndex := iNdEx + msglen
  2140. if postIndex < 0 {
  2141. return ErrInvalidLengthEvidence
  2142. }
  2143. if postIndex > l {
  2144. return io.ErrUnexpectedEOF
  2145. }
  2146. if m.PubKey == nil {
  2147. m.PubKey = &crypto.PublicKey{}
  2148. }
  2149. if err := m.PubKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2150. return err
  2151. }
  2152. iNdEx = postIndex
  2153. default:
  2154. iNdEx = preIndex
  2155. skippy, err := skipEvidence(dAtA[iNdEx:])
  2156. if err != nil {
  2157. return err
  2158. }
  2159. if skippy < 0 {
  2160. return ErrInvalidLengthEvidence
  2161. }
  2162. if (iNdEx + skippy) < 0 {
  2163. return ErrInvalidLengthEvidence
  2164. }
  2165. if (iNdEx + skippy) > l {
  2166. return io.ErrUnexpectedEOF
  2167. }
  2168. iNdEx += skippy
  2169. }
  2170. }
  2171. if iNdEx > l {
  2172. return io.ErrUnexpectedEOF
  2173. }
  2174. return nil
  2175. }
  2176. func skipEvidence(dAtA []byte) (n int, err error) {
  2177. l := len(dAtA)
  2178. iNdEx := 0
  2179. depth := 0
  2180. for iNdEx < l {
  2181. var wire uint64
  2182. for shift := uint(0); ; shift += 7 {
  2183. if shift >= 64 {
  2184. return 0, ErrIntOverflowEvidence
  2185. }
  2186. if iNdEx >= l {
  2187. return 0, io.ErrUnexpectedEOF
  2188. }
  2189. b := dAtA[iNdEx]
  2190. iNdEx++
  2191. wire |= (uint64(b) & 0x7F) << shift
  2192. if b < 0x80 {
  2193. break
  2194. }
  2195. }
  2196. wireType := int(wire & 0x7)
  2197. switch wireType {
  2198. case 0:
  2199. for shift := uint(0); ; shift += 7 {
  2200. if shift >= 64 {
  2201. return 0, ErrIntOverflowEvidence
  2202. }
  2203. if iNdEx >= l {
  2204. return 0, io.ErrUnexpectedEOF
  2205. }
  2206. iNdEx++
  2207. if dAtA[iNdEx-1] < 0x80 {
  2208. break
  2209. }
  2210. }
  2211. case 1:
  2212. iNdEx += 8
  2213. case 2:
  2214. var length int
  2215. for shift := uint(0); ; shift += 7 {
  2216. if shift >= 64 {
  2217. return 0, ErrIntOverflowEvidence
  2218. }
  2219. if iNdEx >= l {
  2220. return 0, io.ErrUnexpectedEOF
  2221. }
  2222. b := dAtA[iNdEx]
  2223. iNdEx++
  2224. length |= (int(b) & 0x7F) << shift
  2225. if b < 0x80 {
  2226. break
  2227. }
  2228. }
  2229. if length < 0 {
  2230. return 0, ErrInvalidLengthEvidence
  2231. }
  2232. iNdEx += length
  2233. case 3:
  2234. depth++
  2235. case 4:
  2236. if depth == 0 {
  2237. return 0, ErrUnexpectedEndOfGroupEvidence
  2238. }
  2239. depth--
  2240. case 5:
  2241. iNdEx += 4
  2242. default:
  2243. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  2244. }
  2245. if iNdEx < 0 {
  2246. return 0, ErrInvalidLengthEvidence
  2247. }
  2248. if depth == 0 {
  2249. return iNdEx, nil
  2250. }
  2251. }
  2252. return 0, io.ErrUnexpectedEOF
  2253. }
  2254. var (
  2255. ErrInvalidLengthEvidence = fmt.Errorf("proto: negative length found during unmarshaling")
  2256. ErrIntOverflowEvidence = fmt.Errorf("proto: integer overflow")
  2257. ErrUnexpectedEndOfGroupEvidence = fmt.Errorf("proto: unexpected end of group")
  2258. )