QDNF Protocol Cells · Wire Framing & Cell Supervision · 0.0.41

Deterministic protocol cells from QFrame wire bytes to QSync replication.

In the Qualia Decentralized Network Fabric (QDNF), networking is decomposed into composable protocol cells executed inside supervised runtime containers (Network Cells). Every packet parser, routing lookup, policy gate, and session key derivation runs in caller-supplied stack or arena buffers with zero heap allocation in hot loops.

Cell Supervision & Memory Boundaries: An ordinary Network Cell operates under a bounded 512 MiB ceiling (MAX_ORDINARY_CELL), while core Webizen logic passes remain governed by the separate 42 MiB Prolog Sentinel contract (SENTINEL_PASS_TOTAL). A Network Cell is a memory and scheduling ownership boundary — never automatic filesystem or payment authority, and revoking a network handle never wipes a local .q42 volume.

Handle ≠ human. Every QFrame header, DNI locator, and QRoute forwarding entry operates exclusively on the Handle and Instrument planes — never exposing the human (NaturalAgent) on the Entity plane.

Layer 3 · Routing & Resolution Mechanics (NET-19)

384-Bit Radix-16 QSR, Bellman–Ford Dual Witness & QResolve

QDNF replaces global BGP prefix hijacking and ICANN DNS root dependencies with constraint-first intra-realm routing (QRoute), 384-bit Qualia Semantic Routing (QSR), and capability-gated resolution (QResolve).

NET-19 · QSR Exact Match qsr/exact.rs

384-Bit (48-Byte / 96-Nibble) Radix-16 Lookup

Routes semantic coordinates using a full 384-bit (48-byte / 96-nibble) radix-16 trie in qsr/exact.rs. Unlike truncated hash tables that suffer collision ambiguity, the 96-nibble walk resolves exact StrongDigest coordinates in deterministic bounded steps.

Every forwarding entry is bound to a cryptographic RarPermit (Resource Authorization Permit), ensuring unauthorized callers cannot probe or traverse restricted semantic routes.

NET-19 · Primal-Dual SPF qdnf::route::{validate,index,plan,spf}

Bellman–Ford Dual Shortest-Path Witness

Production route admission runs a strict constraint-first pipeline: validate_record → AdjacencyIndex (MAX_ADMITTED_EDGES) → plan_routes → pareto_select, followed by HopHoldDown hysteresis to suppress flapping hops.

verify_spf_dual_optimality certifies shortest-path trees by verifying the Bellman–Ford primal-dual optimality condition (d[v] <= d[u] + w(u,v) for every admitted directed edge (u,v)) alongside an explicit predecessor tree witness.

QResolve · Identifier & Content Resolution qdnf::resolve

Zero-DNS-Root Resolution with RarPermit Binding

QResolve maps did:qi instrument DIDs, did:webizen agreements, and did:q42 resource coordinates to verified DNI locators or content manifests using signed resolution records and RarPermit checks. Legacy DNS domain names remain optional attach-later handles on the Handle plane — never the root of authority.

Layer 4 · Egress Governance & Cryptographic Sessions (NET-18, NET-20, NET-21)

QPolicy 40-Scenario Lattice & QSession / QSync

NET-21 · QPolicy Egress Matrix qdnf::policy_labels

40-Scenario policy_labels Egress Admission

Every outbound cell is checked against VerifiedLabel join rules across four confidentiality levels (C0Public, C1Private, C2Sensitive, C3Restricted; Unknown fails closed with QdnfError::Conflict) and restriction flags (NO_TRAINING, NO_EXTERNAL_AI, NO_PUBLIC_INDEX, NO_REDISTRIBUTE, NO_BIOMETRIC_REUSE).

EgressAuditReceipt and enumerate_egress_audit_quin evaluate all 40 canonical egress scenarios across the four EgressCaller classes (Vibe, Poet, BackgroundWorker, DelegatedTool), emitting 5-field XOR-parity-verified NQuin audit records.

NET-18 & NET-20 · QSession / QSync qdnf::session · peer::replication

Transcript-Bound Sessions & SuperBlock Sync

QSession binds ClientHello || ServerHello || NegotiatedParams into a SHA-384 HandshakeTranscriptDigest, derives directional keys via HKDF-SHA384, enforces LocatorBinding (no_proxy_launder), and rotates keys via monotonic rekey_session transitions.

Over established sessions, QSync transfers SHA-384 chunks and commits them into SHA-256 .q42 v4 SuperBlocks via ChunkToSuperBlockManifest after verifying 5-field NQuin XOR parity.

Cell / Module Budget / Constant In-Tree Verification Qualification Boundary
Ordinary Network Cell (admit.rs) MAX_ORDINARY_CELL = 512 MiB 1..=16 cells (MAX_CELLS = 16) admitted with equal-share fairness and LLM starvation protection. In-process accounting ledger; not an OS kernel process sandbox.
Sentinel Pass Accounting (pass_budget.rs) SENTINEL_PASS_TOTAL = 42 MiB charge_pass and RAII PassGuard enforce the 42 MiB per-pass Webizen contract. pass_maps_process_rss() == false (logical pass budget, distinct from total process RSS).
AF_XDP Zero-Copy NIC (cells/af_xdp.rs) PlatformUnsupported open_af_xdp() fails closed without silent fallback (silent_zero_copy_fallback() == false). umem_registered() == false until privileged NIC hardware qualification.

Related QDNF Architecture & Runtime Guides

Explore the Qualia Peer Runtime (`QPR`) execution kernel, the side-by-side DID reference, or the full release 0.0.41 implementation status matrix.