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.4 KiB

  1. syntax = "proto3";
  2. package tendermint.consensus;
  3. option go_package = "github.com/tendermint/tendermint/proto/tendermint/consensus";
  4. import "gogoproto/gogo.proto";
  5. import "tendermint/types/types.proto";
  6. import "tendermint/libs/bits/types.proto";
  7. // NewRoundStep is sent for every step taken in the ConsensusState.
  8. // For every height/round/step transition
  9. message NewRoundStep {
  10. uint64 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. // NewValidBlock 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. uint64 height = 1;
  21. int32 round = 2;
  22. tendermint.types.PartSetHeader block_part_set_header = 3 [(gogoproto.nullable) = false];
  23. tendermint.libs.bits.BitArray block_parts = 4;
  24. bool is_commit = 5;
  25. }
  26. // Proposal is sent when a new block is proposed.
  27. message Proposal {
  28. tendermint.types.Proposal proposal = 1 [(gogoproto.nullable) = false];
  29. }
  30. // ProposalPOL is sent when a previous proposal is re-proposed.
  31. message ProposalPOL {
  32. uint64 height = 1;
  33. int32 proposal_pol_round = 2;
  34. tendermint.libs.bits.BitArray proposal_pol = 3 [(gogoproto.nullable) = false];
  35. }
  36. // BlockPart is sent when gossipping a piece of the proposed block.
  37. message BlockPart {
  38. uint64 height = 1;
  39. int32 round = 2;
  40. tendermint.types.Part part = 3 [(gogoproto.nullable) = false];
  41. }
  42. // Vote is sent when voting for a proposal (or lack thereof).
  43. message Vote {
  44. tendermint.types.Vote vote = 1;
  45. }
  46. // ReceivedVote is sent to indicate that a particular vote has been received.
  47. message ReceivedVote {
  48. uint64 height = 1;
  49. int32 round = 2;
  50. tendermint.types.SignedMsgType type = 3;
  51. int32 index = 4;
  52. }
  53. // VoteSetMaj23 is sent to indicate that a given BlockID has seen +2/3 votes.
  54. message VoteSetMaj23 {
  55. uint64 height = 1;
  56. int32 round = 2;
  57. tendermint.types.SignedMsgType type = 3;
  58. tendermint.types.BlockID block_id = 4 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false];
  59. }
  60. // VoteSetBits is sent to communicate the bit-array of votes seen for the BlockID.
  61. message VoteSetBits {
  62. uint64 height = 1;
  63. int32 round = 2;
  64. tendermint.types.SignedMsgType type = 3;
  65. tendermint.types.BlockID block_id = 4 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false];
  66. tendermint.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. ReceivedVote received_vote = 7;
  77. VoteSetMaj23 vote_set_maj23 = 8;
  78. VoteSetBits vote_set_bits = 9;
  79. }
  80. }