1#![forbid(unsafe_code)]
17#![allow(clippy::too_many_arguments)]
18#![recursion_limit = "256"]
19
20#[macro_use]
21extern crate async_trait;
22#[macro_use]
23extern crate tracing;
24
25pub use snarkos_node_bft as bft;
26pub use snarkos_node_cdn as cdn;
27pub use snarkos_node_consensus as consensus;
28pub use snarkos_node_rest as rest;
29pub use snarkos_node_router as router;
30pub use snarkos_node_sync as sync;
31pub use snarkos_node_tcp as tcp;
32pub use snarkvm;
33
34mod bootstrap_client;
35pub use bootstrap_client::*;
36
37mod client;
38pub use client::*;
39
40mod prover;
41pub use prover::*;
42
43mod validator;
44pub use validator::*;
45
46mod node;
47pub use node::*;
48
49mod traits;
50pub use traits::*;
51
52use aleo_std::StorageMode;
53
54pub fn log_clean_error(storage_mode: &StorageMode) {
56 match storage_mode {
57 StorageMode::Production => error!("Storage corruption detected! Run `snarkos clean` to reset storage"),
58 StorageMode::Development(id) => {
59 error!("Storage corruption detected! Run `snarkos clean --dev {id}` to reset storage")
60 }
61 StorageMode::Custom(path) => {
62 error!("Storage corruption detected! Run `snarkos clean --path {}` to reset storage", path.display())
63 }
64 StorageMode::Test(_) => {
65 }
67 }
68}
69
70pub fn start_notification_message_loop() -> tokio::task::JoinHandle<()> {
72 tokio::spawn(async move {
74 })
80}
81
82pub fn notification_message() -> String {
84 use colored::Colorize;
85
86 let mut output = String::new();
87 output += &r#"
88
89 ==================================================================================================
90
91 🚧 Welcome to Aleo - Calibration Period 🚧
92
93 ==================================================================================================
94
95 During the calibration period, the network will be running in limited capacity.
96
97 This calibration period is to ensure validators are stable and ready for mainnet launch.
98 During this period, the objective is to assess, adjust, and align validators' performance,
99 stability, and interoperability under varying network conditions.
100
101 Please expect several network resets. With each network reset, software updates will
102 be performed to address potential bottlenecks, vulnerabilities, and/or inefficiencies, which
103 will ensure optimal performance for the ecosystem of validators, provers, and developers.
104
105 ==================================================================================================
106
107 Duration:
108 - Start Date: September 27, 2023
109 - End Date: October 18, 2023 (subject to change)
110
111 Participation:
112 - Node operators are NOT REQUIRED to participate during this calibration period.
113
114 Network Resets:
115 - IMPORTANT: EXPECT MULTIPLE NETWORK RESETS.
116 - If participating, BE PREPARED TO RESET YOUR NODE AT ANY TIME.
117 - When a reset occurs, RUN THE FOLLOWING TO RESET YOUR NODE:
118 - git checkout mainnet && git pull
119 - cargo install --locked --path .
120 - snarkos clean
121 - snarkos start --nodisplay --client
122
123 Communication:
124 - Stay ONLINE and MONITOR our Discord and Twitter for community updates.
125
126 Purpose:
127 - This period is STRICTLY FOR NETWORK CALIBRATION.
128 - This period is NOT INTENDED for general-purpose usage by developers and provers.
129
130 Incentives:
131 - There are NO INCENTIVES during this calibration period.
132
133 ==================================================================================================
134"#
135 .white()
136 .bold();
137
138 output
139}