| Crates.io | saorsa-node |
| lib.rs | saorsa-node |
| version | 0.3.1 |
| created_at | 2026-01-14 18:16:32.156097+00 |
| updated_at | 2026-01-22 21:50:26.189294+00 |
| description | Pure quantum-proof network node for the Saorsa decentralized network |
| homepage | |
| repository | https://github.com/dirvine/saorsa-node |
| max_upload_size | |
| id | 2043394 |
| size | 1,204,422 |
The quantum-proof evolution of Autonomi network nodes.
saorsa-node is the next-generation node software for the Autonomi decentralized network, replacing ant-node with future-proof cryptography and advanced network security.
Why Upgrade? Current ant-node uses Ed25519/X25519 cryptography that will be broken by quantum computers. Data encrypted today can be harvested and decrypted later. saorsa-node uses FIPS-approved post-quantum algorithms to protect your data forever.
Nation-state actors and sophisticated adversaries are already collecting encrypted network traffic today. When cryptographically relevant quantum computers (CRQCs) become available, they will decrypt this harvested data. This is known as the Harvest Now, Decrypt Later (HNDL) attack.
Timeline:
| Algorithm | Type | Quantum Attack | Time to Break |
|---|---|---|---|
| RSA-2048 | Asymmetric | Shor's Algorithm | Hours |
| ECDSA/Ed25519 | Signatures | Shor's Algorithm | Hours |
| X25519/ECDH | Key Exchange | Shor's Algorithm | Hours |
| AES-256 | Symmetric | Grover's Algorithm | Still secure* |
*Symmetric algorithms remain secure with sufficient key sizes (256-bit), but key exchange and signatures are completely broken.
ant-node uses:
Even though the Autonomi nettwork self encrypted data is secure, he Autonomi network has metadata (signatures, encrypted keys) that will be compromised by quantum computers. The time to act is now.
| Feature | ant-node | saorsa-node |
|---|---|---|
| Digital Signatures | BLS/Ed25519 (quantum-vulnerable) | ML-DSA-65 (FIPS 204, quantum-proof) |
| Key Exchange | X25519 (quantum-vulnerable) | ML-KEM-768 (FIPS 203, quantum-proof) |
| NAT Traversal | None (requires port forwarding) | Native QUIC traversal (100% success, no STUN/ICE) |
| DHT Architecture | IPv4-only | Dual IPv4/IPv6 with separate close groups |
| Sybil Resistance | Basic per-IP limits | Multi-layer: subnet, ASN, geographic, node age |
| Node Limiting | None | Prevents large actors spinning up millions of nodes |
| Trust System | Manual metrics | EigenTrust++ with data integrity & replica health |
| Geographic Routing | None | 7-region distribution (no entity holds multiple copies) |
| Eclipse Protection | Limited | Diversity scoring, ASN limits, detection algorithms |
| Auto-Upgrade | Manual | Cross-platform staged rollout with network protection |
| Rate Limiting | Basic | 100 req/min per node, 500/min per IP |
| Node Identity | Ed25519 pubkey (unused, never signs data) | ML-DSA-65 pubkey (actively signs all operations) |
| Legacy Data | N/A | Full support for classical encrypted data |
saorsa-node implements pure post-quantum cryptography with no hybrid fallbacks. All algorithms are NIST FIPS-approved standards.
ML-DSA (Module-Lattice Digital Signature Algorithm), formerly known as CRYSTALS-Dilithium, is based on the hardness of lattice problems that remain intractable for quantum computers.
ML-KEM (Module-Lattice Key Encapsulation Mechanism), formerly CRYSTALS-Kyber, provides secure key exchange resistant to both classical and quantum attacks.
Symmetric algorithms remain quantum-resistant at sufficient key sizes. ChaCha20-Poly1305 provides high-performance authenticated encryption.
Unlike some transitional implementations, saorsa-node uses pure post-quantum cryptography:
This ensures maximum security and eliminates the complexity of dual-algorithm systems.
saorsa-core fully supports legacy classical encrypted data:
This allows seamless migration without data loss while ensuring all new data is quantum-secure.
One of the most significant advantages of saorsa-node is full native QUIC NAT traversal. Unlike ant-node, which requires manual port forwarding, saorsa-core implements NAT traversal directly within the QUIC protocol itself - no ICE, no STUN, no external protocols.
100% Success Rate: In our testing, we have successfully traversed 100% of network connections using native QUIC NAT traversal.
ant-node has no native NAT traversal:
Based on draft-seemann-quic-nat-traversal-02 (Marten Seemann & Eric Kinnear, Apple Inc.), saorsa-core implements NAT traversal as a pure QUIC protocol extension.
Why Not ICE/STUN?
| Aspect | ICE/STUN | Native QUIC (saorsa) |
|---|---|---|
| External Dependencies | Requires STUN/TURN servers | None - 100% within QUIC |
| Protocol Complexity | Separate signaling (SDP) | QUIC frames only |
| Path Validation | ICE connectivity checks | Native QUIC PATH_CHALLENGE |
| Connection Migration | Separate step after ICE | Automatic QUIC feature |
| Amplification Protection | STUN fingerprints | QUIC rate limits |
Three Custom QUIC Frames:
1. Node starts → enumerates local interfaces and addresses
2. Peers exchange addresses via ADD_ADDRESS frames
3. Client sends PUNCH_ME_NOW to coordinate timing
4. Both peers simultaneously send QUIC PATH_CHALLENGE packets
5. NAT bindings created → PATH_RESPONSE packets received
6. QUIC connection migrates to direct path automatically
7. Application data flows directly (no relay needed)
Key Innovation: Uses QUIC's existing path validation mechanism (RFC 9000 Section 8.2) as the actual NAT traversal technique, eliminating external protocol dependencies entirely.
This ensures that everyone can contribute to the network, democratizing participation beyond those with favorable network configurations or technical expertise.
Sybil attacks involve creating many fake identities to gain disproportionate influence. saorsa-node implements defense-in-depth:
NodeID = SHA256(IPv6_Address || PublicKey || Salt)
Each node's identity is cryptographically bound to its IPv6 address, making identity spoofing detectable.
Prevents concentration of nodes in single networks:
| Scope | Maximum Nodes |
|---|---|
| Per /64 subnet | 1 |
| Per /48 subnet | 3 |
| Per /32 subnet | 10 |
| Per ASN | 20 |
VPN and hosting providers have halved limits to prevent abuse.
The network actively prefers older, more proven nodes. This creates a natural barrier against attackers who would need to maintain nodes for extended periods before gaining significant influence.
| Status | Age Requirement | Trust Weight | Capabilities |
|---|---|---|---|
| New | 0-24 hours | 0.25x | Limited routing, no close group membership |
| Young | 1-7 days | 0.5x | Standard routing, limited replication |
| Established | 7-30 days | 1.0x | Full participation, all operations |
| Veteran | 30+ days | 1.5x | Trusted bootstrap, priority in close groups |
Why Node Age Matters:
Prevents large actors from spinning up millions of nodes at once:
This makes hostile takeover economically infeasible - an attacker would need to:
Ensures close groups aren't dominated by nodes in single datacenters or regions.
Automated reputation scoring based on observable behavior. This is a foundational system that we continue to build upon with additional integrity checks.
Core Scoring Factors:
Advanced Integrity Checks (Building on EigenTrust):
Key Features:
Trust Score Impact:
| Trust Level | Multiplier | Effect |
|---|---|---|
| Very Low | 0.1x | Excluded from routing, data migrated away |
| Low | 0.5x | Reduced routing priority, monitored |
| Normal | 1.0x | Standard participation |
| High | 1.5x | Preferred for routing and storage |
| Very High | 2.0x | Priority close group membership, bootstrap eligible |
The EigenTrust++ system provides the foundation for continuous network health monitoring, ensuring that bad actors are detected and isolated before they can cause harm.
7-region latency-aware distribution ensures no single entity can hold more than one copy of any piece of data:
Data Distribution Rules:
Why This Matters:
Benefits:
saorsa-node implements a novel dual-stack DHT architecture that maximizes network connectivity.
Each XorName has two close groups:
Data is replicated to both close groups:
For connections, saorsa-node implements Happy Eyeballs:
saorsa-node provides seamless migration from existing ant-node installations.
# Auto-detect ant-node data directories
saorsa-node --migrate-ant-data auto
Searches common locations:
~/.local/share/safe/node/~/.safe/node/record_store/Migration can be interrupted and resumed:
# Migration continues from last checkpoint
saorsa-node --migrate-ant-data ~/.local/share/safe/node
| Data Type | Payment |
|---|---|
| Legacy Autonomi data | FREE (already paid) |
| New data | EVM payment (Arbitrum One) |
The three-layer verification:
Mutable data types (Scratchpad, Pointer, GraphEntry) present a fundamental challenge for migration because they are owner-indexed and require valid signatures.
saorsa-nodes are pure post-quantum - they only understand ML-DSA-65 signatures:
User: "Here's my Scratchpad update, signed with Ed25519"
saorsa-node: "Invalid signature - rejected" ❌
This is by design. Adding classical crypto verification would:
┌─────────────────────────────────────────────────────────────────────┐
│ TWO SEPARATE NETWORKS │
├────────────────────────────────┬────────────────────────────────────┤
│ AUTONOMI NETWORK │ SAORSA NETWORK │
│ (Classical Crypto) │ (Quantum Crypto) │
├────────────────────────────────┼────────────────────────────────────┤
│ Nodes: ant-node │ Nodes: saorsa-node │
│ Signatures: Ed25519/BLS │ Signatures: ML-DSA-65 ONLY │
│ Key Exchange: X25519 │ Key Exchange: ML-KEM-768 │
│ │ │
│ Scratchpad address: │ Scratchpad address: │
│ hash("scratchpad:" || │ hash("scratchpad:" || │
│ Ed25519_pubkey) │ ML-DSA-65_pubkey) │
│ ↓ │ ↓ │
│ 0x7a3f... │ 0xb2c8... │
│ │ │
│ DIFFERENT ADDRESSES - SAME USER, DIFFERENT IDENTITY │
└────────────────────────────────┴────────────────────────────────────┘
| Data Type | Autonomi → Saorsa | Notes |
|---|---|---|
| Chunk | ✅ Migratable | Content-addressed, no signature needed |
| Scratchpad | ❌ New identity | Different address on Saorsa |
| Pointer | ❌ New identity | Different address on Saorsa |
| GraphEntry | ❌ New identity | Different address on Saorsa |
Users don't "migrate" their CRDT data - they establish a new quantum-safe identity on Saorsa.
The HybridClient connects to both networks simultaneously:
// HybridClient talks to TWO different networks
let hybrid = HybridClient::new(config)?;
// Read from Autonomi network (via ant-node peers)
let legacy_data = hybrid.legacy().get_scratchpad(&ed25519_owner).await?;
// Write to Saorsa network (via saorsa-node peers)
let new_scratchpad = hybrid.quantum().put_scratchpad(
&mldsa_keypair,
content_type,
legacy_data.payload().to_vec(),
).await?;
// Note: These have DIFFERENT addresses!
// legacy_data.address() != new_scratchpad.address()
Strategy 1: Data Snapshot + New Identity
1. Read final state from Autonomi (LegacyClient)
2. Generate new ML-DSA-65 keypair (new identity)
3. Create equivalent Scratchpad on Saorsa (QuantumClient)
4. Update applications to use new address
5. Old Autonomi data becomes read-only archive
Strategy 2: Identity Registry
1. Create a public "migration registry" on Saorsa
2. Users register: Ed25519_pubkey_hash → ML-DSA_pubkey_hash
3. Applications can resolve old addresses to new ones
4. Provides continuity for social/reputation systems
Strategy 3: Parallel Operation (Transition Period)
1. Autonomi network continues running for existing CRDT data
2. Users gradually create new identities on Saorsa
3. Applications support both networks during transition
4. Eventually deprecate Autonomi access
Chunks are content-addressed and immutable - they can be directly migrated:
// Chunks have the SAME address on both networks
let chunk = hybrid.legacy().get_chunk(&xorname).await?;
hybrid.quantum().store_chunk(chunk.data()).await?;
// Address is hash(content) - identical on both networks ✅
| Aspect | Autonomi (Legacy) | Saorsa (New) |
|---|---|---|
| Signatures | Ed25519 | ML-DSA-65 |
| Quantum Safe | ❌ Vulnerable | ✅ Protected |
| CRDT Updates | Via Autonomi only | Via Saorsa only |
| Identity | Ed25519 pubkey | ML-DSA-65 pubkey |
Critical: Users cannot update their Autonomi CRDT data through saorsa-nodes. To update legacy data, they must connect to the Autonomi network directly (which continues to run ant-nodes).
Phase 1 (Now): Both networks operate, HybridClient bridges them
Phase 2 (Transition): Users migrate to Saorsa identities, Autonomi read-only
Phase 3 (Future): Autonomi deprecated, Saorsa is the primary network
The goal is not to maintain classical crypto forever, but to provide a clean migration path where users can:
| Component | Status | Description |
|---|---|---|
| Core Library | ✅ Complete | Full node implementation with client APIs |
| Data Types | ✅ Complete | Chunk, Scratchpad, Pointer, GraphEntry |
| Payment Verification | ✅ Complete | Autonomi lookup + EVM verification + LRU cache |
| Migration Decryption | ✅ Complete | AES-256-GCM-SIV decryption for ant-node data |
| Auto-Upgrade | ✅ Complete | Cross-platform with ML-DSA-65 signature verification |
| E2E Test Infrastructure | ✅ Complete | Real P2P testnet with 25+ nodes |
Library Unit Tests: 104 passing
E2E Unit Tests: 35 passing
E2E Integration Tests: 49 passing (real P2P testnet)
────────────────────────────────────
Total: 188 tests
| Type | Size Limit | Addressing | Mutability | Use Cases |
|---|---|---|---|---|
| Chunk | 4 MB | Content-addressed (SHA256) | Immutable | Files, documents, media |
| Scratchpad | 4 MB | Owner public key | Mutable (CRDT counter) | User profiles, settings |
| Pointer | 32 bytes | Owner public key | Mutable (counter) | Mutable references, DNS-like |
| GraphEntry | 100 KB | Content + owner + parents | Immutable | Version control, social feeds |
The migration system is fully implemented and ready for use:
Decryption Module (src/migration/decrypt.rs)
Scanner Module (src/migration/scanner.rs)
Client APIs (src/client/)
QuantumClient: Pure saorsa-network operationsLegacyClient: Read-only access to Autonomi networkHybridClient: Seamless access to both networksPayment Verification (src/payment/)
The test infrastructure spawns real P2P networks for integration testing:
// Spawn a 25-node testnet
let harness = TestHarness::setup().await?;
// Store and retrieve data across nodes
let chunk_addr = harness.node(5).store_chunk(&data).await?;
let retrieved = harness.node(20).get_chunk(&chunk_addr).await?;
// With EVM payment verification
let harness = TestHarness::setup_with_evm().await?;
assert!(harness.anvil().is_healthy().await);
| Phase | Target | Status |
|---|---|---|
| Phase 1 | Core implementation | ✅ Complete |
| Phase 2 | E2E test infrastructure | ✅ Complete |
| Phase 3 | Testnet deployment | 🔄 In Progress |
| Phase 4 | Migration tooling CLI | 📋 Planned |
| Phase 5 | Mainnet preparation | 📋 Planned |
saorsa-node automatically stays up-to-date with secure, verified upgrades across all platforms - Windows, macOS, and Linux.
| Platform | Architecture | Binary |
|---|---|---|
| Linux | x86_64, aarch64 | saorsa-node-linux-* |
| macOS | x86_64, aarch64 (Apple Silicon) | saorsa-node-darwin-* |
| Windows | x86_64 | saorsa-node-windows-*.exe |
The auto-upgrade system automatically detects the current platform and downloads the correct binary.
To prevent network collapse from simultaneous upgrades, saorsa-node implements randomized staged rollout:
How Staged Rollout Works:
Why This Matters:
Upgrade Timeline (example):
Hour 0: Release published
Hour 1: ~4% of nodes upgrade (random delay 0-1h)
Hour 6: ~25% of nodes upgraded
Hour 12: ~50% of nodes upgraded
Hour 24: ~100% of nodes upgraded
Embedded Public Key: The ML-DSA-65 verification key is compiled into the binary at build time. It cannot be changed by:
The only way to change the signing key is a manual upgrade with a new binary.
Signature Verification:
saorsa-node is designed for true unattended operation:
This enables node operators to deploy and forget, knowing their nodes will stay current and secure.
| Channel | Description | Rollout Speed |
|---|---|---|
| stable | Production releases, thoroughly tested | 24-hour staged |
| beta | Pre-release versions for early testing | 6-hour staged |
# Use stable channel (default)
saorsa-node --auto-upgrade --upgrade-channel stable
# Use beta channel for testing
saorsa-node --auto-upgrade --upgrade-channel beta
[upgrade]
enabled = true
channel = "stable"
check_interval_hours = 1
github_repo = "dirvine/saorsa-node"
# max_random_delay_hours = 24 # For staged rollout
saorsa-node follows a thin wrapper design philosophy, adding minimal code on top of saorsa-core.
| Component | Provider | Description |
|---|---|---|
| P2P Networking | saorsa-core | QUIC transport, connection management |
| DHT Routing | saorsa-core | Trust-weighted Kademlia |
| Reputation | saorsa-core | EigenTrust++ engine |
| Security | saorsa-core | Rate limiting, blacklisting, diversity scoring |
| Content Storage | saorsa-core | Local chunk storage |
| Replication | saorsa-core | Data redundancy management |
| Auto-Upgrade | saorsa-node | Binary update system |
| Migration | saorsa-node | ant-node data import |
| CLI | saorsa-node | User interface |
saorsa-node adds approximately 1,000 lines of new code:
saorsa-node
└── saorsa-core
└── saorsa-pqc (ML-DSA, ML-KEM)
# Clone the repository
git clone https://github.com/dirvine/saorsa-node
cd saorsa-node
# Build release binary
cargo build --release
# Binary location
./target/release/saorsa-node --version
# Start node with default settings
./target/release/saorsa-node
# Connect to testnet bootstrap nodes
./target/release/saorsa-node --testnet
# Or specify bootstrap peers manually
./target/release/saorsa-node \
--bootstrap "165.22.4.178:12000" \
--bootstrap "164.92.111.156:12000"
Testnet Bootstrap Nodes:
| Node | Location | Address |
|---|---|---|
| saorsa-bootstrap-1 | NYC (DigitalOcean) | 165.22.4.178:12000 |
| saorsa-bootstrap-2 | SFO (DigitalOcean) | 164.92.111.156:12000 |
./target/release/saorsa-node \
--root-dir ~/.saorsa \
--port 12000 \
--ip-version dual \
--auto-upgrade \
--upgrade-channel stable \
--migrate-ant-data auto \
--log-level info
saorsa-node [OPTIONS]
Options:
--root-dir <PATH>
Node data directory
[default: ~/.saorsa]
--port <PORT>
Listening port (0 for automatic selection)
[default: 0]
--ip-version <VERSION>
IP version to use: ipv4, ipv6, or dual
[default: dual]
--bootstrap <ADDR>
Bootstrap peer multiaddresses (can be specified multiple times)
Example: /ip4/1.2.3.4/udp/12000/quic-v1
--migrate-ant-data <PATH>
Path to ant-node data directory to migrate
Use 'auto' for automatic detection
--auto-upgrade
Enable automatic upgrades from GitHub releases
--upgrade-channel <CHANNEL>
Release channel: stable, beta
[default: stable]
--log-level <LEVEL>
Log verbosity: trace, debug, info, warn, error
[default: info]
-h, --help
Print help information
-V, --version
Print version information
Configuration sources (highest to lowest priority):
SAORSA_*)~/.saorsa/config.toml)export SAORSA_ROOT_DIR=~/.saorsa
export SAORSA_PORT=12000
export SAORSA_IP_VERSION=dual
export SAORSA_LOG_LEVEL=info
export SAORSA_AUTO_UPGRADE=true
export SAORSA_UPGRADE_CHANNEL=stable
~/.saorsa/config.toml:
[node]
root_dir = "~/.saorsa"
port = 0 # Auto-select
[network]
ip_version = "dual"
bootstrap = [
"/ip4/165.22.4.178/udp/12000/quic-v1",
"/ip4/164.92.111.156/udp/12000/quic-v1"
]
[upgrade]
enabled = true
channel = "stable"
check_interval_hours = 1
github_repo = "dirvine/saorsa-node"
[migration]
auto_detect = true
# ant_data_path = "~/.local/share/safe/node" # Explicit path
[payment]
# Autonomi verification for legacy data
autonomi_enabled = true
autonomi_timeout_secs = 30
# EVM verification for new data
evm_enabled = true
evm_network = "arbitrum-one"
# Cache configuration
cache_capacity = 100000
saorsa-node supports software attestation via saorsa-core's Entangled Attestation system. This cryptographically binds a node's identity to its running software, preventing attackers from maintaining reputation while running modified code.
| Feature Flag | Verification | Security Level |
|---|---|---|
zkvm-prover |
STARK proofs | Post-quantum secure |
zkvm-verifier-groth16 |
Groth16 proofs | Not post-quantum secure |
| None | Mock verification | NO CRYPTOGRAPHIC SECURITY |
[attestation]
# Enable attestation verification
enabled = true
# Enforcement mode: "off", "soft", "hard"
# - off: disabled completely
# - soft: log warnings but allow connections
# - hard: reject peers with invalid attestations
mode = "hard"
# Require post-quantum secure verification (STARK)
# If false, Groth16 is also accepted
require_pq_secure = true
# Allowed binary hashes (hex-encoded, 64 chars each)
# Empty = allow all binaries (permissive mode)
allowed_binary_hashes = [
"a1b2c3d4e5f6789012345678901234567890123456789012345678901234abcd"
]
# Grace period after sunset (days)
sunset_grace_days = 30
For production deployments, enable cryptographic verification:
# Recommended: Post-quantum secure STARK verification
cargo build --release --features zkvm-prover
# Alternative: Groth16 verification (NOT post-quantum secure)
cargo build --release --features zkvm-verifier-groth16
Without a verification feature, the build will emit warnings:
warning: SECURITY WARNING: No attestation verification feature enabled!
warning: If you enable attestation, proofs will use mock verification with NO CRYPTOGRAPHIC SECURITY.
If attestation is enabled without verification features, the node will block startup with a clear error message.
| Config | Feature | Result |
|---|---|---|
enabled = false |
Any | Starts normally, attestation disabled |
enabled = true |
zkvm-prover |
Starts with STARK verification |
enabled = true |
zkvm-verifier-groth16 |
Starts with Groth16 verification |
enabled = true |
None | BLOCKS STARTUP - error message |
mode = "hard", require_pq_secure = true |
zkvm-verifier-groth16 only |
BLOCKS STARTUP - PQ required |
Protects against denial-of-service attacks:
| Limit | Value |
|---|---|
| Requests per node per minute | 100 |
| Requests per IP per minute | 500 |
| Concurrent connections per IP | 10 |
Automatically blacklists nodes that:
Monitors for attempts to isolate nodes:
All security-relevant events are logged:
Enable detailed logging:
RUST_LOG=saorsa_node=debug,saorsa_core=debug ./saorsa-node
| Project | Description | Repository |
|---|---|---|
| saorsa-core | Core networking and security library | github.com/dirvine/saorsa-core |
| saorsa-pqc | Post-quantum cryptography primitives | github.com/dirvine/saorsa-pqc |
| saorsa-client | Client library for applications | github.com/dirvine/saorsa-client |
This project is dual-licensed under MIT and Apache-2.0.
Contributions are welcome! Please follow these guidelines:
# Run tests
cargo test
# Run with debug logging
RUST_LOG=debug cargo run
# Check for issues
cargo clippy -- -D warnings
# Format code
cargo fmt
saorsa-node: Securing the future of decentralized data, one quantum-proof node at a time.