Skip to main content

exocore_protos/generated/
exocore.core.rs

1#[allow(clippy::derive_partial_eq_without_eq)]
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct AuthToken {
4    #[prost(bytes = "vec", tag = "1")]
5    pub data: ::prost::alloc::vec::Vec<u8>,
6    #[prost(bytes = "vec", tag = "2")]
7    pub signature: ::prost::alloc::vec::Vec<u8>,
8}
9#[allow(clippy::derive_partial_eq_without_eq)]
10#[derive(Clone, PartialEq, ::prost::Message)]
11pub struct AuthTokenData {
12    #[prost(bytes = "vec", tag = "1")]
13    pub cell_id: ::prost::alloc::vec::Vec<u8>,
14    #[prost(bytes = "vec", tag = "2")]
15    pub node_id: ::prost::alloc::vec::Vec<u8>,
16    #[prost(message, optional, tag = "3")]
17    pub signature_date: ::core::option::Option<::prost_types::Timestamp>,
18    #[prost(message, optional, tag = "4")]
19    pub expiration_date: ::core::option::Option<::prost_types::Timestamp>,
20}
21#[derive(Serialize, Deserialize)]
22#[allow(clippy::derive_partial_eq_without_eq)]
23#[derive(Clone, PartialEq, ::prost::Message)]
24pub struct LocalNodeConfig {
25    #[prost(string, tag = "1")]
26    pub keypair: ::prost::alloc::string::String,
27    #[prost(string, tag = "2")]
28    pub public_key: ::prost::alloc::string::String,
29    #[prost(string, tag = "3")]
30    #[serde(default)]
31    pub name: ::prost::alloc::string::String,
32    #[prost(string, tag = "4")]
33    #[serde(default)]
34    pub id: ::prost::alloc::string::String,
35    #[prost(message, optional, tag = "10")]
36    #[serde(default)]
37    pub listen_addresses: ::core::option::Option<NodeAddresses>,
38    #[prost(message, optional, tag = "6")]
39    pub addresses: ::core::option::Option<NodeAddresses>,
40    #[prost(message, repeated, tag = "7")]
41    pub cells: ::prost::alloc::vec::Vec<NodeCellConfig>,
42    #[prost(message, optional, tag = "8")]
43    #[serde(default)]
44    pub store: ::core::option::Option<NodeStoreConfig>,
45    #[prost(message, optional, tag = "9")]
46    pub chain: ::core::option::Option<ChainConfig>,
47}
48#[derive(Serialize, Deserialize)]
49#[allow(clippy::derive_partial_eq_without_eq)]
50#[derive(Clone, PartialEq, ::prost::Message)]
51pub struct NodeAddresses {
52    #[prost(string, repeated, tag = "1")]
53    #[serde(default)]
54    pub p2p: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
55    #[prost(string, repeated, tag = "2")]
56    #[serde(default)]
57    pub http: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
58}
59#[derive(Serialize, Deserialize)]
60#[allow(clippy::derive_partial_eq_without_eq)]
61#[derive(Clone, PartialEq, ::prost::Message)]
62pub struct NodeCellConfig {
63    #[prost(string, tag = "3")]
64    #[serde(default)]
65    pub id: ::prost::alloc::string::String,
66    #[prost(oneof = "node_cell_config::Location", tags = "1")]
67    #[serde(flatten)]
68    pub location: ::core::option::Option<node_cell_config::Location>,
69}
70/// Nested message and enum types in `NodeCellConfig`.
71pub mod node_cell_config {
72    #[derive(Serialize, Deserialize)]
73    #[serde(rename_all = "lowercase")]
74    #[allow(clippy::derive_partial_eq_without_eq)]
75    #[derive(Clone, PartialEq, ::prost::Oneof)]
76    pub enum Location {
77        #[prost(message, tag = "1")]
78        Inline(super::CellConfig),
79    }
80}
81/// Entity store configuration for the node (i.e. not global)
82#[derive(Serialize, Deserialize)]
83#[allow(clippy::derive_partial_eq_without_eq)]
84#[derive(Clone, PartialEq, ::prost::Message)]
85pub struct NodeStoreConfig {
86    /// Entity index config.
87    #[prost(message, optional, tag = "1")]
88    #[serde(default)]
89    pub index: ::core::option::Option<EntityIndexConfig>,
90    /// Maximum number of queries to execute in parallel.
91    #[prost(message, optional, tag = "2")]
92    #[serde(default)]
93    pub query_parallelism: ::core::option::Option<u32>,
94}
95#[derive(Serialize, Deserialize)]
96#[allow(clippy::derive_partial_eq_without_eq)]
97#[derive(Clone, PartialEq, ::prost::Message)]
98pub struct ChainConfig {
99    /// Maximum size in bytes per segment. This is a soft limit since the last
100    /// block could overflow that maximum. This should be small enough so
101    /// that a few segments can fit in allocable virtual space on 32b
102    /// systems. See `segment_max_open` for maximum concurrently opened
103    /// segments.
104    #[prost(message, optional, tag = "1")]
105    pub segment_max_size: ::core::option::Option<u64>,
106    /// Maximum number of segments concurrently mmap. On 64b systems, where
107    /// virtual memory isn't a problem, this can be high. But on 32b
108    /// systems, one should aim to have maximum ~1-2gb of concurrently mmap
109    /// segments. See `segment_max_size` for maximum size per segment.
110    #[prost(message, optional, tag = "2")]
111    pub segment_max_open_mmap: ::core::option::Option<u32>,
112}
113/// Configuration of the entity index
114#[derive(Serialize, Deserialize)]
115#[allow(clippy::derive_partial_eq_without_eq)]
116#[derive(Clone, PartialEq, ::prost::Message)]
117pub struct EntityIndexConfig {
118    /// What is the minimum depth that a block needs to be the chain to be
119    /// indexed. This is required to lower the odds that we are going to
120    /// revert the block if our local chain forked.
121    ///
122    /// `CommitManagerConfig`.`operations_cleanup_after_block_depth`
123    #[prost(message, optional, tag = "1")]
124    #[serde(default)]
125    pub chain_index_min_depth: ::core::option::Option<u64>,
126    /// If specified, prevent indexing every new block on each commit.
127    /// Operations will be kept in pending index for a bit longer and
128    /// preventing the costly chain index modification.
129    #[prost(message, optional, tag = "2")]
130    #[serde(default)]
131    pub chain_index_depth_leeway: ::core::option::Option<u64>,
132    /// Specifies the interval at which new blocks in the chain get indexed.
133    /// New blocks may not necessarily get immediately indexed if they don't
134    /// fall in the interval of `chain_index_min_depth` and
135    /// `chain_index_depth_leeway`.
136    ///
137    /// Indexation can also be prevented if user queries were recently executed
138    /// (see `chain_index_deferred_query_secs`)
139    ///
140    /// If '0' is specified, deferred indexation is disabled and blocks are
141    /// indexed when the chain layer emits events.
142    #[prost(message, optional, tag = "6")]
143    #[serde(default)]
144    pub chain_index_deferred_interval_secs: ::core::option::Option<u64>,
145    /// Specifies the minimum interval to wait before indexing chain blocks
146    /// after receiving a user query. It prevents potential slow downs caused
147    /// by chain indexation if a user query get executed frequently.
148    #[prost(message, optional, tag = "7")]
149    #[serde(default)]
150    pub chain_index_deferred_query_secs: ::core::option::Option<u64>,
151    /// Specifies the maximum interval for which indexation may be blocked by
152    /// incoming user queries.
153    #[prost(message, optional, tag = "8")]
154    #[serde(default)]
155    pub chain_index_deferred_max_secs: ::core::option::Option<u64>,
156    /// Configuration for the in-memory traits index that are in the pending
157    /// store
158    #[prost(message, optional, tag = "3")]
159    #[serde(default)]
160    pub pending_index: ::core::option::Option<MutationIndexConfig>,
161    /// Configuration for the persisted traits index that are in the chain
162    #[prost(message, optional, tag = "4")]
163    #[serde(default)]
164    pub chain_index: ::core::option::Option<MutationIndexConfig>,
165    /// Configuration for the entity garbage collector.
166    #[prost(message, optional, tag = "5")]
167    #[serde(default)]
168    pub garbage_collector: ::core::option::Option<EntityGarbageCollectorConfig>,
169}
170/// Trait index configuration
171#[derive(Serialize, Deserialize)]
172#[allow(clippy::derive_partial_eq_without_eq)]
173#[derive(Clone, PartialEq, ::prost::Message)]
174pub struct MutationIndexConfig {
175    /// Number of indexing threads.
176    #[prost(message, optional, tag = "1")]
177    #[serde(default)]
178    pub indexer_num_threads: ::core::option::Option<u32>,
179    /// Maximum heap size of each indexing thread.
180    #[prost(message, optional, tag = "2")]
181    #[serde(default)]
182    pub indexer_heap_size_bytes: ::core::option::Option<u32>,
183    /// Page size of results iterator.
184    #[prost(message, optional, tag = "3")]
185    #[serde(default)]
186    pub entity_mutations_cache_size: ::core::option::Option<u32>,
187}
188/// Configuration for entity garbage collector.
189#[derive(Serialize, Deserialize)]
190#[allow(clippy::derive_partial_eq_without_eq)]
191#[derive(Clone, PartialEq, ::prost::Message)]
192pub struct EntityGarbageCollectorConfig {
193    /// How often the garbage collection process will run in seconds.
194    ///
195    /// Since garbage collection doesn't happen on the whole index, but only on
196    /// entities that got flagged during search, it is better to run more
197    /// often than less. `GarbageCollectorConfig::queue_size` can be tweaked
198    /// to control rate of collection.
199    #[prost(message, optional, tag = "1")]
200    #[serde(default)]
201    pub run_interval_secs: ::core::option::Option<u32>,
202    /// Size of the queue of entities to be collected.
203    #[prost(message, optional, tag = "2")]
204    #[serde(default)]
205    pub queue_size: ::core::option::Option<u32>,
206}
207#[derive(Serialize, Deserialize)]
208#[allow(clippy::derive_partial_eq_without_eq)]
209#[derive(Clone, PartialEq, ::prost::Message)]
210pub struct CellConfig {
211    #[prost(string, tag = "1")]
212    pub public_key: ::prost::alloc::string::String,
213    #[prost(string, tag = "2")]
214    #[serde(default)]
215    pub keypair: ::prost::alloc::string::String,
216    #[prost(string, tag = "3")]
217    #[serde(default)]
218    pub name: ::prost::alloc::string::String,
219    #[prost(string, tag = "4")]
220    #[serde(default)]
221    pub id: ::prost::alloc::string::String,
222    #[prost(message, repeated, tag = "6")]
223    pub nodes: ::prost::alloc::vec::Vec<CellNodeConfig>,
224    #[prost(message, repeated, tag = "7")]
225    #[serde(default)]
226    pub apps: ::prost::alloc::vec::Vec<CellApplicationConfig>,
227}
228#[derive(Serialize, Deserialize)]
229#[allow(clippy::derive_partial_eq_without_eq)]
230#[derive(Clone, PartialEq, ::prost::Message)]
231pub struct CellNodeConfig {
232    #[prost(message, optional, tag = "1")]
233    pub node: ::core::option::Option<NodeConfig>,
234    #[prost(enumeration = "cell_node_config::Role", repeated, tag = "2")]
235    #[serde(default)]
236    pub roles: ::prost::alloc::vec::Vec<i32>,
237}
238/// Nested message and enum types in `CellNodeConfig`.
239pub mod cell_node_config {
240    #[derive(
241        Serialize,
242        Deserialize,
243        Clone,
244        Copy,
245        Debug,
246        PartialEq,
247        Eq,
248        Hash,
249        PartialOrd,
250        Ord,
251        ::prost::Enumeration,
252    )]
253    #[repr(i32)]
254    pub enum Role {
255        InvalidRole = 0,
256        ChainRole = 1,
257        StoreRole = 2,
258        AppHostRole = 3,
259    }
260    impl Role {
261        /// String value of the enum field names used in the ProtoBuf
262        /// definition.
263        ///
264        /// The values are not transformed in any way and thus are considered
265        /// stable (if the ProtoBuf definition does not change) and safe
266        /// for programmatic use.
267        pub fn as_str_name(&self) -> &'static str {
268            match self {
269                Role::InvalidRole => "INVALID_ROLE",
270                Role::ChainRole => "CHAIN_ROLE",
271                Role::StoreRole => "STORE_ROLE",
272                Role::AppHostRole => "APP_HOST_ROLE",
273            }
274        }
275        /// Creates an enum from field names used in the ProtoBuf definition.
276        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
277            match value {
278                "INVALID_ROLE" => Some(Self::InvalidRole),
279                "CHAIN_ROLE" => Some(Self::ChainRole),
280                "STORE_ROLE" => Some(Self::StoreRole),
281                "APP_HOST_ROLE" => Some(Self::AppHostRole),
282                _ => None,
283            }
284        }
285    }
286}
287#[derive(Serialize, Deserialize)]
288#[allow(clippy::derive_partial_eq_without_eq)]
289#[derive(Clone, PartialEq, ::prost::Message)]
290pub struct NodeConfig {
291    #[prost(string, tag = "1")]
292    pub public_key: ::prost::alloc::string::String,
293    #[prost(string, tag = "2")]
294    #[serde(default)]
295    pub name: ::prost::alloc::string::String,
296    #[prost(string, tag = "3")]
297    #[serde(default)]
298    pub id: ::prost::alloc::string::String,
299    #[prost(message, optional, tag = "4")]
300    pub addresses: ::core::option::Option<NodeAddresses>,
301}
302#[derive(Serialize, Deserialize)]
303#[allow(clippy::derive_partial_eq_without_eq)]
304#[derive(Clone, PartialEq, ::prost::Message)]
305pub struct CellApplicationConfig {
306    #[prost(string, tag = "1")]
307    pub name: ::prost::alloc::string::String,
308    #[prost(string, tag = "2")]
309    pub version: ::prost::alloc::string::String,
310    #[prost(string, tag = "3")]
311    pub public_key: ::prost::alloc::string::String,
312    #[prost(string, tag = "4")]
313    pub package_url: ::prost::alloc::string::String,
314    #[prost(oneof = "cell_application_config::Location", tags = "5")]
315    #[serde(flatten)]
316    pub location: ::core::option::Option<cell_application_config::Location>,
317}
318/// Nested message and enum types in `CellApplicationConfig`.
319pub mod cell_application_config {
320    #[derive(Serialize, Deserialize)]
321    #[serde(rename_all = "lowercase")]
322    #[allow(clippy::derive_partial_eq_without_eq)]
323    #[derive(Clone, PartialEq, ::prost::Oneof)]
324    pub enum Location {
325        /// Manifest is inline within the config.
326        #[prost(message, tag = "5")]
327        Inline(super::super::apps::Manifest),
328    }
329}
330#[allow(clippy::derive_partial_eq_without_eq)]
331#[derive(Clone, PartialEq, ::prost::Message)]
332pub struct BuildInfo {
333    #[prost(string, tag = "1")]
334    pub version: ::prost::alloc::string::String,
335    #[prost(message, optional, tag = "2")]
336    pub build_time: ::core::option::Option<::prost_types::Timestamp>,
337    #[prost(bool, tag = "3")]
338    pub debug: bool,
339    #[prost(string, tag = "4")]
340    pub rust_version: ::prost::alloc::string::String,
341}