1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//! Networking layer for Moloch audit chain.
//!
//! This crate provides peer-to-peer communication for the Moloch chain:
//! - Transport layer with TLS 1.3
//! - Protocol messages for gossip and sync
//! - Peer discovery and management
//! - Chain synchronization protocols
//!
//! # Architecture
//!
//! The networking layer is organized into four main components:
//!
//! 1. **Transport** (`transport.rs`) - TCP connections with TLS, connection pooling
//! 2. **Protocol** (`protocol.rs`) - Message types and serialization
//! 3. **Discovery** (`discovery.rs`) - Peer discovery and scoring
//! 4. **Sync** (`sync.rs`) - Chain synchronization protocols
//!
//! # Example
//!
//! ```ignore
//! use moloch_net::{NetworkConfig, NetworkNode};
//!
//! // Create node configuration
//! let config = NetworkConfig::builder()
//! .listen_addr("0.0.0.0:9000")
//! .chain_id("moloch-testnet")
//! .build();
//!
//! // Start the network node
//! let node = NetworkNode::new(config, storage).await?;
//! node.connect_to_peers(&["peer1:9000", "peer2:9000"]).await?;
//! ```
pub use ;
pub use ;
pub use ;
pub use ;