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