BREAKING CHANGE: Repository restructured from flat layout to tiered: FOLDER REORGANIZATION: - core/ - L0-L3 layers (Commonwealth LCL-1.0) - l0-transport/ - Transport with MIMIC, Noise, PNG - l1-identity/ - Identity, QVL, Crypto - l2_session/ - Session management - l2-federation/ - Cross-chain bridging - l2-membrane/ - Policy enforcement - sdk/ - L4+ and bindings (Sovereign LSL-1.0) - janus-sdk/ - l4-feed/ - apps/ - Examples (Unbound LUL-1.0) - examples/ - legal/ - All license texts - LICENSE_COMMONWEALTH.md - LICENSE_SOVEREIGN.md - LICENSE_UNBOUND.md IMPORT FIXES (All Layers): - L0: 13 files fixed - all relative imports corrected - L1: 14 files fixed - module imports for cross-layer dependencies - L2: 6 files fixed - session, membrane, federation - Capsule: 9 files fixed - TUI, node, main, control - Examples: 2 files fixed - lwf, crypto LICENSES ADDED: - LCL-1.0: Viral reciprocity for Core (SaaS-proof) - LSL-1.0: Business-friendly for SDK - LUL-1.0: Maximum freedom for docs/apps NO CLA REQUIRED - contributors keep copyright README.md REWRITTEN: - Documents new folder structure - Explains tiered licensing strategy - Clear SPDX identifiers per component TODO: - Fix remaining test module configuration issues - Full green build in follow-up Refs: 4 sub-agents parallel execution |
||
|---|---|---|
| .. | ||
| ipc | ||
| opq | ||
| utcp | ||
| README.md | ||
| dht.zig | ||
| gateway.zig | ||
| lwf.zig | ||
| mimic_dns.zig | ||
| mimic_https.zig | ||
| mimic_quic.zig | ||
| mod.zig | ||
| noise.zig | ||
| opq.zig | ||
| png.zig | ||
| quarantine.zig | ||
| relay.zig | ||
| service.zig | ||
| time.zig | ||
| transport_skins.zig | ||
| utcp.zig | ||
README.md
L0 Transport Layer
Layer: L0 (Transport)
Purpose: Wire protocols, frame encoding, time primitives
RFCs: RFC-0000 (LWF), RFC-0105 (Time L0 component)
Overview
The L0 Transport layer provides low-level wire protocol implementations for the Libertaria network. It handles packet framing, serialization, and transport-layer timestamps.
Components
LWF (Libertaria Wire Frame) - lwf.zig
RFC: RFC-0000
Wire protocol implementation for fixed-size headers and variable payloads. Supports CRC32-C and Ed25519.
Time - time.zig
RFC: RFC-0105
Nanosecond precision transport-layer time primitives.
UTCP (Unreliable Transport Protocol) - utcp/socket.zig
RFC: RFC-0010
Fast-path UDP wrapper for LWF frames. Features rapid entropy validation (DoS defense) before deep parsing.
OPQ (Offline Packet Queue) - opq/
RFC: RFC-0020
High-resilience store-and-forward mechanism using a Segmented WAL (Write-Ahead Log) for 72-96 hour packet retention.
L0 Service - service.zig
The integrated engine that orchestrates Network -> UTCP -> OPQ -> Ingestion. Handles automated maintenance and persona-based policies.
Usage
const l0 = @import("l0_transport.zig");
// Create LWF frame
var frame = try l0.lwf.LWFFrame.init(allocator, 1024);
defer frame.deinit(allocator);
// Set header fields
frame.header.service_type = 0x0700; // Vector message
frame.header.timestamp = l0.time.nowNanoseconds();
// Encode for transport
const encoded = try frame.encode(allocator);
defer allocator.free(encoded);
Testing
Run L0 tests:
zig test l0-transport/lwf.zig
zig test l0-transport/time.zig
Dependencies
std.mem- Memory managementstd.crypto- CRC32, hashingstd.time- System time access