cometbft_proto/prost/
cometbft.p2p.v1.rs

1/// PacketPing is a request to confirm that the connection is alive.
2#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct PacketPing {}
5/// PacketPong is a response to confirm that the connection is alive.
6#[allow(clippy::derive_partial_eq_without_eq)]
7#[derive(Clone, PartialEq, ::prost::Message)]
8pub struct PacketPong {}
9/// PacketMsg contains data for the specified channel ID. EOF means the message
10/// is fully received.
11#[allow(clippy::derive_partial_eq_without_eq)]
12#[derive(Clone, PartialEq, ::prost::Message)]
13pub struct PacketMsg {
14    #[prost(int32, tag = "1")]
15    pub channel_id: i32,
16    #[prost(bool, tag = "2")]
17    pub eof: bool,
18    #[prost(bytes = "vec", tag = "3")]
19    pub data: ::prost::alloc::vec::Vec<u8>,
20}
21/// Packet is an abstract p2p message.
22#[allow(clippy::derive_partial_eq_without_eq)]
23#[derive(Clone, PartialEq, ::prost::Message)]
24pub struct Packet {
25    /// Sum of all possible messages.
26    #[prost(oneof = "packet::Sum", tags = "1, 2, 3")]
27    pub sum: ::core::option::Option<packet::Sum>,
28}
29/// Nested message and enum types in `Packet`.
30pub mod packet {
31    /// Sum of all possible messages.
32    #[allow(clippy::derive_partial_eq_without_eq)]
33    #[derive(Clone, PartialEq, ::prost::Oneof)]
34    pub enum Sum {
35        #[prost(message, tag = "1")]
36        PacketPing(super::PacketPing),
37        #[prost(message, tag = "2")]
38        PacketPong(super::PacketPong),
39        #[prost(message, tag = "3")]
40        PacketMsg(super::PacketMsg),
41    }
42}
43/// AuthSigMessage is sent during the authentication and contains our/remote's
44/// signature along with the public key.
45#[allow(clippy::derive_partial_eq_without_eq)]
46#[derive(Clone, PartialEq, ::prost::Message)]
47pub struct AuthSigMessage {
48    #[prost(message, optional, tag = "1")]
49    pub pub_key: ::core::option::Option<super::super::crypto::v1::PublicKey>,
50    #[prost(bytes = "vec", tag = "2")]
51    pub sig: ::prost::alloc::vec::Vec<u8>,
52}
53/// NetAddress represents a peer's network address.
54#[allow(clippy::derive_partial_eq_without_eq)]
55#[derive(Clone, PartialEq, ::prost::Message)]
56pub struct NetAddress {
57    #[prost(string, tag = "1")]
58    pub id: ::prost::alloc::string::String,
59    #[prost(string, tag = "2")]
60    pub ip: ::prost::alloc::string::String,
61    #[prost(uint32, tag = "3")]
62    pub port: u32,
63}
64/// ProtocolVersion represents the current p2p protocol version.
65#[allow(clippy::derive_partial_eq_without_eq)]
66#[derive(Clone, PartialEq, ::prost::Message)]
67pub struct ProtocolVersion {
68    #[prost(uint64, tag = "1")]
69    pub p2p: u64,
70    #[prost(uint64, tag = "2")]
71    pub block: u64,
72    #[prost(uint64, tag = "3")]
73    pub app: u64,
74}
75/// DefaultNodeInfo is a basic node's information sent to other peers during the
76/// p2p handshake.
77#[allow(clippy::derive_partial_eq_without_eq)]
78#[derive(Clone, PartialEq, ::prost::Message)]
79pub struct DefaultNodeInfo {
80    #[prost(message, optional, tag = "1")]
81    pub protocol_version: ::core::option::Option<ProtocolVersion>,
82    #[prost(string, tag = "2")]
83    pub default_node_id: ::prost::alloc::string::String,
84    #[prost(string, tag = "3")]
85    pub listen_addr: ::prost::alloc::string::String,
86    #[prost(string, tag = "4")]
87    pub network: ::prost::alloc::string::String,
88    #[prost(string, tag = "5")]
89    pub version: ::prost::alloc::string::String,
90    #[prost(bytes = "vec", tag = "6")]
91    pub channels: ::prost::alloc::vec::Vec<u8>,
92    #[prost(string, tag = "7")]
93    pub moniker: ::prost::alloc::string::String,
94    #[prost(message, optional, tag = "8")]
95    pub other: ::core::option::Option<DefaultNodeInfoOther>,
96}
97/// DefaultNodeInfoOther is the misc. application specific data.
98#[allow(clippy::derive_partial_eq_without_eq)]
99#[derive(Clone, PartialEq, ::prost::Message)]
100pub struct DefaultNodeInfoOther {
101    #[prost(string, tag = "1")]
102    pub tx_index: ::prost::alloc::string::String,
103    #[prost(string, tag = "2")]
104    pub rpc_address: ::prost::alloc::string::String,
105}
106/// PexRequest is a request for peer addresses.
107#[allow(clippy::derive_partial_eq_without_eq)]
108#[derive(Clone, PartialEq, ::prost::Message)]
109pub struct PexRequest {}
110/// PexAddrs is a response with peer addresses.
111#[allow(clippy::derive_partial_eq_without_eq)]
112#[derive(Clone, PartialEq, ::prost::Message)]
113pub struct PexAddrs {
114    #[prost(message, repeated, tag = "1")]
115    pub addrs: ::prost::alloc::vec::Vec<NetAddress>,
116}
117/// Message is an abstract PEX message.
118#[allow(clippy::derive_partial_eq_without_eq)]
119#[derive(Clone, PartialEq, ::prost::Message)]
120pub struct Message {
121    /// Sum of all possible messages.
122    #[prost(oneof = "message::Sum", tags = "1, 2")]
123    pub sum: ::core::option::Option<message::Sum>,
124}
125/// Nested message and enum types in `Message`.
126pub mod message {
127    /// Sum of all possible messages.
128    #[allow(clippy::derive_partial_eq_without_eq)]
129    #[derive(Clone, PartialEq, ::prost::Oneof)]
130    pub enum Sum {
131        #[prost(message, tag = "1")]
132        PexRequest(super::PexRequest),
133        #[prost(message, tag = "2")]
134        PexAddrs(super::PexAddrs),
135    }
136}