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.

92 lines
3.5 KiB

  1. syntax = "proto3";
  2. package tendermint.proto.consensus;
  3. option go_package = "github.com/tendermint/tendermint/proto/consensus";
  4. import "third_party/proto/gogoproto/gogo.proto";
  5. import "proto/types/types.proto";
  6. import "proto/libs/bits/types.proto";
  7. // NewRoundStepMessage is sent for every step taken in the ConsensusState.
  8. // For every height/round/step transition
  9. message NewRoundStep {
  10. int64 height = 1;
  11. int32 round = 2;
  12. uint32 step = 3;
  13. int64 seconds_since_start_time = 4;
  14. int32 last_commit_round = 5;
  15. }
  16. // NewValidBlockMessage is sent when a validator observes a valid block B in some round r,
  17. //i.e., there is a Proposal for block B and 2/3+ prevotes for the block B in the round r.
  18. // In case the block is also committed, then IsCommit flag is set to true.
  19. message NewValidBlock {
  20. int64 height = 1;
  21. int32 round = 2;
  22. tendermint.proto.types.PartSetHeader block_parts_header = 3 [(gogoproto.nullable) = false];
  23. tendermint.proto.libs.bits.BitArray block_parts = 4;
  24. bool is_commit = 5;
  25. }
  26. // ProposalMessage is sent when a new block is proposed.
  27. message Proposal {
  28. tendermint.proto.types.Proposal proposal = 1 [(gogoproto.nullable) = false];
  29. }
  30. // ProposalPOLMessage is sent when a previous proposal is re-proposed.
  31. message ProposalPOL {
  32. int64 height = 1;
  33. int32 proposal_pol_round = 2;
  34. tendermint.proto.libs.bits.BitArray proposal_pol = 3 [(gogoproto.nullable) = false];
  35. }
  36. // BlockPartMessage is sent when gossipping a piece of the proposed block.
  37. message BlockPart {
  38. int64 height = 1;
  39. int32 round = 2;
  40. tendermint.proto.types.Part part = 3 [(gogoproto.nullable) = false];
  41. }
  42. // VoteMessage is sent when voting for a proposal (or lack thereof).
  43. message Vote {
  44. tendermint.proto.types.Vote vote = 1;
  45. }
  46. // HasVoteMessage is sent to indicate that a particular vote has been received.
  47. message HasVote {
  48. int64 height = 1;
  49. int32 round = 2;
  50. tendermint.proto.types.SignedMsgType type = 3;
  51. int32 index = 4;
  52. }
  53. // VoteSetMaj23Message is sent to indicate that a given BlockID has seen +2/3 votes.
  54. message VoteSetMaj23 {
  55. int64 height = 1;
  56. int32 round = 2;
  57. tendermint.proto.types.SignedMsgType type = 3;
  58. tendermint.proto.types.BlockID block_id = 4 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false];
  59. }
  60. // VoteSetBitsMessage is sent to communicate the bit-array of votes seen for the BlockID.
  61. message VoteSetBits {
  62. int64 height = 1;
  63. int32 round = 2;
  64. tendermint.proto.types.SignedMsgType type = 3;
  65. tendermint.proto.types.BlockID block_id = 4 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false];
  66. tendermint.proto.libs.bits.BitArray votes = 5 [(gogoproto.nullable) = false];
  67. }
  68. message Message {
  69. oneof sum {
  70. NewRoundStep new_round_step = 1;
  71. NewValidBlock new_valid_block = 2;
  72. Proposal proposal = 3;
  73. ProposalPOL proposal_pol = 4;
  74. BlockPart block_part = 5;
  75. Vote vote = 6;
  76. HasVote has_vote = 7;
  77. VoteSetMaj23 vote_set_maj23 = 8;
  78. VoteSetBits vote_set_bits = 9;
  79. }
  80. }