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.

84 lines
2.4 KiB

  1. syntax = "proto3";
  2. package tendermint.types;
  3. option go_package = "github.com/tendermint/tendermint/proto/types";
  4. import "third_party/proto/gogoproto/gogo.proto";
  5. import "proto/types/types.proto";
  6. import "google/protobuf/timestamp.proto";
  7. import "proto/crypto/keys/types.proto";
  8. // DuplicateVoteEvidence contains evidence a validator signed two conflicting
  9. // votes.
  10. message DuplicateVoteEvidence {
  11. Vote vote_a = 1;
  12. Vote vote_b = 2;
  13. }
  14. message PotentialAmnesiaEvidence {
  15. Vote vote_a = 1;
  16. Vote vote_b = 2;
  17. int64 height_stamp = 3;
  18. }
  19. message AmnesiaEvidence {
  20. PotentialAmnesiaEvidence potential_amnesia_evidence = 1;
  21. ProofOfLockChange polc = 2;
  22. }
  23. // MockEvidence is used for testing pruposes
  24. message MockEvidence {
  25. int64 evidence_height = 1;
  26. google.protobuf.Timestamp evidence_time = 2
  27. [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
  28. bytes evidence_address = 3;
  29. }
  30. message MockRandomEvidence {
  31. int64 evidence_height = 1;
  32. google.protobuf.Timestamp evidence_time = 2
  33. [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
  34. bytes evidence_address = 3;
  35. bytes rand_bytes = 4;
  36. }
  37. message ConflictingHeadersEvidence {
  38. SignedHeader h1 = 1;
  39. SignedHeader h2 = 2;
  40. }
  41. message LunaticValidatorEvidence {
  42. Header header = 1;
  43. Vote vote = 2;
  44. string invalid_header_field = 3;
  45. }
  46. message PhantomValidatorEvidence {
  47. Vote vote = 1;
  48. int64 last_height_validator_was_in_set = 2;
  49. }
  50. message Evidence {
  51. oneof sum {
  52. DuplicateVoteEvidence duplicate_vote_evidence = 1;
  53. ConflictingHeadersEvidence conflicting_headers_evidence = 2;
  54. LunaticValidatorEvidence lunatic_validator_evidence = 3;
  55. PotentialAmnesiaEvidence potential_amnesia_evidence = 4;
  56. AmnesiaEvidence amnesia_evidence = 5;
  57. PhantomValidatorEvidence phantom_validator_evidence = 6;
  58. MockEvidence mock_evidence = 7;
  59. MockRandomEvidence mock_random_evidence = 8;
  60. }
  61. }
  62. // EvidenceData contains any evidence of malicious wrong-doing by validators
  63. message EvidenceData {
  64. repeated Evidence evidence = 1 [(gogoproto.nullable) = false];
  65. bytes hash = 2;
  66. }
  67. message ProofOfLockChange {
  68. repeated Vote votes = 1;
  69. tendermint.crypto.keys.PublicKey pub_key = 2;
  70. }