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 client::hex_node_id_to_encoded_peer_id;pub use config::BootstrapCacheConfig;pub use config::NodeConfig;pub use config::StorageConfig;pub use devnet::Devnet;pub use devnet::DevnetConfig;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 replication::config::ReplicationConfig;pub use replication::ReplicationEngine;pub use storage::AntProtocol;pub use storage::LmdbStorage;pub use storage::LmdbStorageConfig;
Modules§
- ant_
protocol - Wire protocol re-exports from the
ant_protocolcrate. - 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.
- logging
- Logging facade that compiles to no-ops when the
loggingfeature is disabled. - node
- Node implementation - thin wrapper around saorsa-core’s
P2PNode. - payment
- Payment verification system for ant-node.
- replication
- Replication subsystem for the Autonomi network.
- storage
- Storage subsystem for chunk persistence.
- upgrade
- Auto-upgrade system with ML-DSA signature verification.
Structs§
- Chunk
GetRequest - Request to retrieve a chunk.
- Chunk
Message - Wire-format wrapper that pairs a sender-assigned
request_idwith aChunkMessageBody. - Chunk
PutRequest - Request to store a chunk.
- Chunk
Quote Request - Request a storage quote for a chunk.
- Data
Chunk - A chunk of data with its content-addressed identifier.
- Devnet
EvmInfo - EVM configuration info included in the devnet manifest.
- Devnet
Manifest - Devnet manifest for client discovery.
Enums§
- Chunk
GetResponse - Response to a GET request.
- Chunk
Message Body - Enum of all chunk protocol message types.
- Chunk
PutResponse - Response to a PUT request.
- Chunk
Quote Response - Response with a storage quote.
Constants§
- CHUNK_
PROTOCOL_ ID - Protocol identifier for chunk operations.
- CLOSE_
GROUP_ MAJORITY - Minimum number of close group members that must agree for a decision to be valid.
- CLOSE_
GROUP_ SIZE - Number of nodes in a Kademlia close group.
- MAX_
CHUNK_ SIZE - Maximum chunk size in bytes (4MB).
Functions§
- compute_
address - Compute the content address (BLAKE3 hash) for the given data.
- peer_
id_ to_ xor_ name - Convert a hex-encoded peer ID string to an
XorName. - xor_
distance - Compute the XOR distance between two 32-byte addresses.
Type Aliases§
- XorName
- Content-addressed identifier (32 bytes).