Expand description
§ant-node
A pure quantum-proof network node for the Autonomi decentralized network.
This crate provides a thin wrapper around saorsa-core that adds:
- Auto-upgrade system with ML-DSA signature verification
- CLI interface and configuration
- Content-addressed chunk storage with EVM payment
§Architecture
ant-node delegates all core functionality to saorsa-core:
- Networking via
P2PNode - DHT via
AdaptiveDHT - Trust via
TrustEngine - Security via
IPDiversityConfig
§Data Types
Currently supports a single data type:
- Chunk: Immutable content-addressed data (hash(value) == key)
§Example
use ant_node::{NodeBuilder, NodeConfig};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let config = NodeConfig::default();
let mut node = NodeBuilder::new(config).build().await?;
node.run().await?;
Ok(())
}Re-exports§
pub use ant_protocol::ChunkGetRequest;pub use ant_protocol::ChunkGetResponse;pub use ant_protocol::ChunkMessage;pub use ant_protocol::ChunkMessageBody;pub use ant_protocol::ChunkPutRequest;pub use ant_protocol::ChunkPutResponse;pub use ant_protocol::ChunkQuoteRequest;pub use ant_protocol::ChunkQuoteResponse;pub use ant_protocol::CHUNK_PROTOCOL_ID;pub use ant_protocol::MAX_CHUNK_SIZE;pub use client::compute_address;pub use client::hex_node_id_to_encoded_peer_id;pub use client::peer_id_to_xor_name;pub use client::xor_distance;pub use client::DataChunk;pub use client::XorName;pub use config::BootstrapCacheConfig;pub use config::NodeConfig;pub use config::StorageConfig;pub use devnet::Devnet;pub use devnet::DevnetConfig;pub use devnet::DevnetEvmInfo;pub use devnet::DevnetManifest;pub use error::Error;pub use error::Result;pub use event::NodeEvent;pub use event::NodeEventsChannel;pub use node::NodeBuilder;pub use node::RunningNode;pub use payment::PaymentStatus;pub use payment::PaymentVerifier;pub use payment::PaymentVerifierConfig;pub use storage::AntProtocol;pub use storage::LmdbStorage;pub use storage::LmdbStorageConfig;
Modules§
- ant_
protocol - ANT protocol implementation for the Autonomi network.
- client
- Protocol helpers for ant-node client operations.
- config
- Configuration for ant-node.
- core
- Re-exports from
saorsa-coreso downstream crates (e.g.ant-client) can depend onant-nodealone without a directsaorsa-coredependency. - devnet
- Local devnet infrastructure for spawning and managing multiple nodes.
- error
- Error types for ant-node.
- event
- Node event system.
- node
- Node implementation - thin wrapper around saorsa-core’s
P2PNode. - payment
- Payment verification system for ant-node.
- storage
- Storage subsystem for chunk persistence.
- upgrade
- Auto-upgrade system with ML-DSA signature verification.