cometbft_proto/prost/
cometbft.statesync.v1.rs

1/// Message is the top-level message type for the statesync service.
2#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct Message {
5    /// The message type.
6    #[prost(oneof = "message::Sum", tags = "1, 2, 3, 4")]
7    pub sum: ::core::option::Option<message::Sum>,
8}
9/// Nested message and enum types in `Message`.
10pub mod message {
11    /// The message type.
12    #[allow(clippy::derive_partial_eq_without_eq)]
13    #[derive(Clone, PartialEq, ::prost::Oneof)]
14    pub enum Sum {
15        #[prost(message, tag = "1")]
16        SnapshotsRequest(super::SnapshotsRequest),
17        #[prost(message, tag = "2")]
18        SnapshotsResponse(super::SnapshotsResponse),
19        #[prost(message, tag = "3")]
20        ChunkRequest(super::ChunkRequest),
21        #[prost(message, tag = "4")]
22        ChunkResponse(super::ChunkResponse),
23    }
24}
25/// SnapshotsRequest is sent to request a snapshot.
26#[allow(clippy::derive_partial_eq_without_eq)]
27#[derive(Clone, PartialEq, ::prost::Message)]
28pub struct SnapshotsRequest {}
29/// SnapshotsResponse contains the snapshot metadata.
30#[allow(clippy::derive_partial_eq_without_eq)]
31#[derive(Clone, PartialEq, ::prost::Message)]
32pub struct SnapshotsResponse {
33    #[prost(uint64, tag = "1")]
34    pub height: u64,
35    #[prost(uint32, tag = "2")]
36    pub format: u32,
37    #[prost(uint32, tag = "3")]
38    pub chunks: u32,
39    #[prost(bytes = "vec", tag = "4")]
40    pub hash: ::prost::alloc::vec::Vec<u8>,
41    #[prost(bytes = "vec", tag = "5")]
42    pub metadata: ::prost::alloc::vec::Vec<u8>,
43}
44/// ChunkRequest is sent to request a chunk.
45#[allow(clippy::derive_partial_eq_without_eq)]
46#[derive(Clone, PartialEq, ::prost::Message)]
47pub struct ChunkRequest {
48    #[prost(uint64, tag = "1")]
49    pub height: u64,
50    #[prost(uint32, tag = "2")]
51    pub format: u32,
52    #[prost(uint32, tag = "3")]
53    pub index: u32,
54}
55/// ChunkResponse contains a chunk of the snapshot.
56#[allow(clippy::derive_partial_eq_without_eq)]
57#[derive(Clone, PartialEq, ::prost::Message)]
58pub struct ChunkResponse {
59    #[prost(uint64, tag = "1")]
60    pub height: u64,
61    #[prost(uint32, tag = "2")]
62    pub format: u32,
63    #[prost(uint32, tag = "3")]
64    pub index: u32,
65    #[prost(bytes = "vec", tag = "4")]
66    pub chunk: ::prost::alloc::vec::Vec<u8>,
67    #[prost(bool, tag = "5")]
68    pub missing: bool,
69}