Spaces:
Build error
Build error
Download Protocol_Core/qanto-node/src/lib.rs from trvorth/qanto-testnet: direct link, hf CLI and curl.
- Browser
- Download file 3.52 kB
-
https://huggingface.co/spaces/trvorth/qanto-testnet/resolve/main/Protocol_Core/qanto-node/src/lib.rs
- Command line
-
hf download hf://spaces/trvorth/qanto-testnet/Protocol_Core/qanto-node/src/lib.rs
-
curl -L -o lib.rs https://huggingface.co/spaces/trvorth/qanto-testnet/resolve/main/Protocol_Core/qanto-node/src/lib.rs
3.52 kB
| // The primary modules that define the Qanto node and its behavior. | |
| pub mod adaptive_mining; | |
| pub mod analytics_dashboard; | |
| pub mod block_producer; | |
| pub mod config; | |
| pub mod config_validator; | |
| pub mod consensus; | |
| pub mod decentralization; | |
| pub mod decoupled_producer; | |
| pub mod deterministic_mining; | |
| pub mod diagnostics; | |
| pub mod elite_mempool; | |
| pub mod emission; | |
| pub mod gas_fee_model; | |
| pub mod graphql_server; | |
| pub mod hame; | |
| pub mod interoperability; | |
| pub mod keygen; | |
| pub mod mempool; | |
| pub mod metrics; | |
| pub mod miner; | |
| pub mod mining_celebration; | |
| pub mod mining_metrics; | |
| pub mod node; | |
| pub mod omega; | |
| pub mod omega_enhanced; | |
| pub mod optimized_decoupled_producer; | |
| pub mod optimized_qdag; | |
| pub mod p2p; | |
| pub mod password_utils; | |
| pub mod performance_monitoring; | |
| pub mod performance_optimizations; | |
| pub mod performance_validation; | |
| pub mod persistence; | |
| pub mod post_quantum_crypto; | |
| pub mod pq_suite; | |
| pub mod privacy; | |
| pub mod resource_cleanup; | |
| pub mod safe_interval; | |
| pub mod shutdown; | |
| pub mod telemetry; | |
| pub mod timing; | |
| pub mod interplanetary; | |
| pub mod kernel_boot; | |
| pub mod heritage_archive; | |
| pub mod storage_mesh; | |
| pub mod formal_verifier; | |
| pub mod derive_genesis_key; | |
| pub mod generate_wallet; | |
| pub mod get_address; | |
| pub mod import_wallet; | |
| pub mod metrics_server; | |
| pub mod mock_traits; | |
| pub mod monitor; | |
| pub mod qanto; | |
| pub mod qanto_ai_metrics; | |
| // Re-export core modules from the `qanto-core` crate instead of duplicating them. | |
| pub use qanto_core::{ | |
| qanto_compat, qanto_native_crypto, qanto_net, qanto_p2p, qanto_serde, qanto_storage, | |
| storage_adapter, storage_traits, | |
| }; | |
| pub mod qantodag; | |
| pub mod rpc_backend; | |
| pub mod saga; | |
| pub mod transaction; | |
| pub mod types; | |
| pub mod wallet; | |
| pub mod websocket_server; | |
| pub mod x_phyrus; | |
| // Conditionally compiled modules for extended features. | |
| pub mod infinite_strata_node; | |
| // Use the full zkp module when the `zk` feature is enabled | |
| pub mod zkp; | |
| // Provide a lightweight stub for the `zkp` module when the `zk` feature is disabled, | |
| // so dependent modules can compile without pulling in heavy Arkworks dependencies. | |
| pub mod zkp; | |
| pub mod memory_optimization; | |
| pub use my_blockchain::qanhash; | |
| pub mod qantowallet; | |
| pub mod qds; | |
| pub mod start_node; | |
| // Test-safe tracing initialization to avoid double-init panics in tests | |
| use std::sync::Once; | |
| static INIT_TRACING: Once = Once::new(); | |
| /// Initialize tracing subscriber once for tests. | |
| /// Uses `RUST_LOG` via `EnvFilter` when set; otherwise defaults to `info`. | |
| pub fn init_test_tracing() { | |
| use tracing_subscriber::{fmt, layer::SubscriberExt, util::SubscriberInitExt, EnvFilter}; | |
| INIT_TRACING.call_once(|| { | |
| let filter = EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("info")); | |
| // Try init; ignore error if already initialized by other harness | |
| let _ = tracing_subscriber::registry() | |
| .with(filter) | |
| .with(fmt::layer()) | |
| .try_init(); | |
| }); | |
| } | |
| pub mod ipc_server; | |
| pub const Q_SCALE: u128 = 1_000_000_000; | |
| pub const QANTO_SCALE: u128 = Q_SCALE; | |
| pub const SCORE_SCALE: i128 = 1_000_000_000; | |
| /// QAmount: Fixed-point u128 representing a decimal quantity (scale 1e9). | |
| /// Used for balances, rewards, fees, and stakes. | |
| pub type QAmount = u128; | |
| /// QScore: Fixed-point i128 representing a signed score (scale 1e9). | |
| /// Used for Saga scoring and reputation. | |
| pub type QScore = i128; | |
| /// QDifficulty: Mining difficulty ONLY. | |
| pub type QDifficulty = u64; | |
| pub mod math; | |