tendermint_proto/prost/v0_34/
tendermint.consensus.rs

1// This file is @generated by prost-build.
2/// NewRoundStep is sent for every step taken in the ConsensusState.
3/// For every height/round/step transition
4#[allow(clippy::derive_partial_eq_without_eq)]
5#[derive(Clone, Copy, PartialEq, ::prost::Message)]
6pub struct NewRoundStep {
7    #[prost(int64, tag = "1")]
8    pub height: i64,
9    #[prost(int32, tag = "2")]
10    pub round: i32,
11    #[prost(uint32, tag = "3")]
12    pub step: u32,
13    #[prost(int64, tag = "4")]
14    pub seconds_since_start_time: i64,
15    #[prost(int32, tag = "5")]
16    pub last_commit_round: i32,
17}
18/// NewValidBlock is sent when a validator observes a valid block B in some round r,
19/// i.e., there is a Proposal for block B and 2/3+ prevotes for the block B in the round r.
20/// In case the block is also committed, then IsCommit flag is set to true.
21#[allow(clippy::derive_partial_eq_without_eq)]
22#[derive(Clone, PartialEq, ::prost::Message)]
23pub struct NewValidBlock {
24    #[prost(int64, tag = "1")]
25    pub height: i64,
26    #[prost(int32, tag = "2")]
27    pub round: i32,
28    #[prost(message, optional, tag = "3")]
29    pub block_part_set_header: ::core::option::Option<super::types::PartSetHeader>,
30    #[prost(message, optional, tag = "4")]
31    pub block_parts: ::core::option::Option<super::libs::bits::BitArray>,
32    #[prost(bool, tag = "5")]
33    pub is_commit: bool,
34}
35/// Proposal is sent when a new block is proposed.
36#[allow(clippy::derive_partial_eq_without_eq)]
37#[derive(Clone, PartialEq, ::prost::Message)]
38pub struct Proposal {
39    #[prost(message, optional, tag = "1")]
40    pub proposal: ::core::option::Option<super::types::Proposal>,
41}
42/// ProposalPOL is sent when a previous proposal is re-proposed.
43#[allow(clippy::derive_partial_eq_without_eq)]
44#[derive(Clone, PartialEq, ::prost::Message)]
45pub struct ProposalPol {
46    #[prost(int64, tag = "1")]
47    pub height: i64,
48    #[prost(int32, tag = "2")]
49    pub proposal_pol_round: i32,
50    #[prost(message, optional, tag = "3")]
51    pub proposal_pol: ::core::option::Option<super::libs::bits::BitArray>,
52}
53/// BlockPart is sent when gossipping a piece of the proposed block.
54#[allow(clippy::derive_partial_eq_without_eq)]
55#[derive(Clone, PartialEq, ::prost::Message)]
56pub struct BlockPart {
57    #[prost(int64, tag = "1")]
58    pub height: i64,
59    #[prost(int32, tag = "2")]
60    pub round: i32,
61    #[prost(message, optional, tag = "3")]
62    pub part: ::core::option::Option<super::types::Part>,
63}
64/// Vote is sent when voting for a proposal (or lack thereof).
65#[allow(clippy::derive_partial_eq_without_eq)]
66#[derive(Clone, PartialEq, ::prost::Message)]
67pub struct Vote {
68    #[prost(message, optional, tag = "1")]
69    pub vote: ::core::option::Option<super::types::Vote>,
70}
71/// HasVote is sent to indicate that a particular vote has been received.
72#[allow(clippy::derive_partial_eq_without_eq)]
73#[derive(Clone, Copy, PartialEq, ::prost::Message)]
74pub struct HasVote {
75    #[prost(int64, tag = "1")]
76    pub height: i64,
77    #[prost(int32, tag = "2")]
78    pub round: i32,
79    #[prost(enumeration = "super::types::SignedMsgType", tag = "3")]
80    pub r#type: i32,
81    #[prost(int32, tag = "4")]
82    pub index: i32,
83}
84/// VoteSetMaj23 is sent to indicate that a given BlockID has seen +2/3 votes.
85#[allow(clippy::derive_partial_eq_without_eq)]
86#[derive(Clone, PartialEq, ::prost::Message)]
87pub struct VoteSetMaj23 {
88    #[prost(int64, tag = "1")]
89    pub height: i64,
90    #[prost(int32, tag = "2")]
91    pub round: i32,
92    #[prost(enumeration = "super::types::SignedMsgType", tag = "3")]
93    pub r#type: i32,
94    #[prost(message, optional, tag = "4")]
95    pub block_id: ::core::option::Option<super::types::BlockId>,
96}
97/// VoteSetBits is sent to communicate the bit-array of votes seen for the BlockID.
98#[allow(clippy::derive_partial_eq_without_eq)]
99#[derive(Clone, PartialEq, ::prost::Message)]
100pub struct VoteSetBits {
101    #[prost(int64, tag = "1")]
102    pub height: i64,
103    #[prost(int32, tag = "2")]
104    pub round: i32,
105    #[prost(enumeration = "super::types::SignedMsgType", tag = "3")]
106    pub r#type: i32,
107    #[prost(message, optional, tag = "4")]
108    pub block_id: ::core::option::Option<super::types::BlockId>,
109    #[prost(message, optional, tag = "5")]
110    pub votes: ::core::option::Option<super::libs::bits::BitArray>,
111}
112#[allow(clippy::derive_partial_eq_without_eq)]
113#[derive(Clone, PartialEq, ::prost::Message)]
114pub struct Message {
115    #[prost(oneof = "message::Sum", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9")]
116    pub sum: ::core::option::Option<message::Sum>,
117}
118/// Nested message and enum types in `Message`.
119pub mod message {
120    #[allow(clippy::derive_partial_eq_without_eq)]
121    #[derive(Clone, PartialEq, ::prost::Oneof)]
122    pub enum Sum {
123        #[prost(message, tag = "1")]
124        NewRoundStep(super::NewRoundStep),
125        #[prost(message, tag = "2")]
126        NewValidBlock(super::NewValidBlock),
127        #[prost(message, tag = "3")]
128        Proposal(super::Proposal),
129        #[prost(message, tag = "4")]
130        ProposalPol(super::ProposalPol),
131        #[prost(message, tag = "5")]
132        BlockPart(super::BlockPart),
133        #[prost(message, tag = "6")]
134        Vote(super::Vote),
135        #[prost(message, tag = "7")]
136        HasVote(super::HasVote),
137        #[prost(message, tag = "8")]
138        VoteSetMaj23(super::VoteSetMaj23),
139        #[prost(message, tag = "9")]
140        VoteSetBits(super::VoteSetBits),
141    }
142}
143/// MsgInfo are msgs from the reactor which may update the state
144#[allow(clippy::derive_partial_eq_without_eq)]
145#[derive(Clone, PartialEq, ::prost::Message)]
146pub struct MsgInfo {
147    #[prost(message, optional, tag = "1")]
148    pub msg: ::core::option::Option<Message>,
149    #[prost(string, tag = "2")]
150    pub peer_id: ::prost::alloc::string::String,
151}
152/// TimeoutInfo internally generated messages which may update the state
153#[allow(clippy::derive_partial_eq_without_eq)]
154#[derive(Clone, Copy, PartialEq, ::prost::Message)]
155pub struct TimeoutInfo {
156    #[prost(message, optional, tag = "1")]
157    pub duration: ::core::option::Option<crate::google::protobuf::Duration>,
158    #[prost(int64, tag = "2")]
159    pub height: i64,
160    #[prost(int32, tag = "3")]
161    pub round: i32,
162    #[prost(uint32, tag = "4")]
163    pub step: u32,
164}
165/// EndHeight marks the end of the given height inside WAL.
166/// @internal used by scripts/wal2json util.
167#[allow(clippy::derive_partial_eq_without_eq)]
168#[derive(Clone, Copy, PartialEq, ::prost::Message)]
169pub struct EndHeight {
170    #[prost(int64, tag = "1")]
171    pub height: i64,
172}
173#[allow(clippy::derive_partial_eq_without_eq)]
174#[derive(Clone, PartialEq, ::prost::Message)]
175pub struct WalMessage {
176    #[prost(oneof = "wal_message::Sum", tags = "1, 2, 3, 4")]
177    pub sum: ::core::option::Option<wal_message::Sum>,
178}
179/// Nested message and enum types in `WALMessage`.
180pub mod wal_message {
181    #[allow(clippy::derive_partial_eq_without_eq)]
182    #[derive(Clone, PartialEq, ::prost::Oneof)]
183    pub enum Sum {
184        #[prost(message, tag = "1")]
185        EventDataRoundState(super::super::types::EventDataRoundState),
186        #[prost(message, tag = "2")]
187        MsgInfo(super::MsgInfo),
188        #[prost(message, tag = "3")]
189        TimeoutInfo(super::TimeoutInfo),
190        #[prost(message, tag = "4")]
191        EndHeight(super::EndHeight),
192    }
193}
194/// TimedWALMessage wraps WALMessage and adds Time for debugging purposes.
195#[allow(clippy::derive_partial_eq_without_eq)]
196#[derive(Clone, PartialEq, ::prost::Message)]
197pub struct TimedWalMessage {
198    #[prost(message, optional, tag = "1")]
199    pub time: ::core::option::Option<crate::google::protobuf::Timestamp>,
200    #[prost(message, optional, tag = "2")]
201    pub msg: ::core::option::Option<WalMessage>,
202}