Skip to content

Commit 1e22a30

Browse files
committed
chore(release): bump version to v0.4.0
- Update workspace version to 0.4.0 - Update README.md version badge and status - Update CHANGELOG.md with v0.4.0 release notes and date - Phase 4 Part I complete: Optimization & Hardening
1 parent 47829dc commit 1e22a30

File tree

3 files changed

+164
-5
lines changed

3 files changed

+164
-5
lines changed

CHANGELOG.md

Lines changed: 160 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,164 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
---
1111

12+
## [0.4.0] - 2025-11-30
13+
14+
### Added
15+
16+
**Phase 4 Part I - Optimization & Hardening - COMPLETE ✅ (2025-11-30):**
17+
18+
This release completes Phase 4 Part I, delivering high-performance kernel bypass features and comprehensive security hardening across the entire protocol stack.
19+
20+
#### AF_XDP Zero-Copy Socket Implementation (Sprints 4.1-4.2, PERF-001)
21+
22+
Complete Linux AF_XDP integration for kernel bypass networking with zero-copy packet I/O:
23+
24+
- **UMEM Management**: User-space memory allocation with configurable frame sizes (2048/4096 bytes)
25+
- **Four-Ring Architecture**:
26+
- Fill Ring: Kernel → User packet delivery
27+
- RX Ring: Received packet descriptors
28+
- TX Ring: Transmit packet descriptors
29+
- Completion Ring: TX completion notifications
30+
- **Producer/Consumer Synchronization**: Lock-free ring operations with atomic indices
31+
- **Batch Processing APIs**:
32+
- `rx_batch()` - Receive multiple packets in a single call
33+
- `tx_batch()` - Submit multiple packets for transmission
34+
- `complete_tx()` - Collect transmission completions
35+
- `fill_rx_buffers()` - Replenish receive buffers
36+
- **Zero-Copy Packet Access**: Direct buffer access via `get_packet_data()` and `get_packet_data_mut_unsafe()`
37+
- **16 comprehensive tests** covering all ring operations and edge cases
38+
39+
**Performance Target:** 10-40 Gbps with compatible NICs
40+
41+
#### BBR Pacing Enforcement (Sprint 4.3, PERF-002)
42+
43+
Timer-based pacing rate enforcement integrated with BBR congestion control:
44+
45+
- **Credit Accumulation System**: Smooth packet transmission without bursts
46+
- **Phase-Specific Pacing Gains**:
47+
- Startup: 2.77x (aggressive bandwidth probing)
48+
- Drain: 2.0x (queue draining after startup)
49+
- ProbeBw: 8-phase cycle [1.25, 0.75, 1, 1, 1, 1, 1, 1]
50+
- ProbeRtt: 1.0x (RTT measurement mode)
51+
- **Pacing APIs**:
52+
- `can_send_paced()` - Check if sending is allowed
53+
- `on_packet_sent_paced()` - Update pacing state after send
54+
- `pacing_delay()` - Get delay until next send allowed
55+
- **Dynamic Rate Updates**: Pacing rate adjusts based on BBR bandwidth estimate and phase
56+
- **Burst Prevention**: Credit system prevents packet bursts that could trigger congestion
57+
- **3 comprehensive tests** for pacing behavior validation
58+
59+
**Performance Target:** <5% transmission jitter
60+
61+
#### io_uring Async File I/O (Sprint 4.4, PERF-003)
62+
63+
Linux io_uring integration for high-performance async file operations:
64+
65+
- **Async Operations**: Non-blocking read, write, and fsync
66+
- **Registered Buffers**: Zero-copy I/O with pre-registered memory regions
67+
- **Batch Submission**: Multiple operations submitted per syscall
68+
- **Configurable Queue Depth**: 128-4096 for batched operations
69+
- **High-Level APIs**:
70+
- `AsyncFileReader` - Streaming file reads with automatic batching
71+
- `AsyncFileWriter` - Buffered file writes with configurable flush
72+
- **Completion Tracking**: Request ID mapping for async operation completion
73+
- **Platform Fallback**: Synchronous I/O implementation for non-Linux systems
74+
- **15 comprehensive tests** covering all I/O operations and edge cases
75+
76+
**Performance Target:** >100K IOPS
77+
78+
#### Frame Validation Hardening (Sprint 4.5, SEC-001)
79+
80+
Comprehensive input validation for protocol frames to prevent attacks:
81+
82+
- **Reserved Stream ID Validation**: Stream IDs 1-15 reserved for protocol control use
83+
- Prevents application usage of reserved stream IDs
84+
- Ensures protocol integrity for control streams
85+
- **Offset Bounds Checking**: Maximum file offset 256 TB (2^48 bytes)
86+
- Prevents integer overflow attacks
87+
- Validates offset + length combinations
88+
- **Payload Size Limits**: Maximum 8,944 bytes (9000 MTU - 28 header - 16 auth tag)
89+
- Enforces MTU constraints
90+
- Prevents memory exhaustion attacks
91+
- **New Error Types**:
92+
- `ReservedStreamId(u32)` - Application attempted to use reserved stream ID
93+
- `InvalidOffset { offset, max }` - Offset exceeds protocol maximum
94+
- `PayloadTooLarge { size, max }` - Payload exceeds MTU limit
95+
- **Validation Constants**:
96+
- `MAX_PAYLOAD_SIZE = 8944` (9000 - 28 - 16)
97+
- `MAX_FILE_OFFSET = 281474976710656` (2^48)
98+
- `MAX_SEQUENCE_DELTA = 4294967295` (2^32 - 1)
99+
- **Property-Based Testing**: Using proptest for fuzzing validation logic
100+
- **13 comprehensive tests** including edge cases and manual frame corruption
101+
102+
#### Buffer Pool & Documentation (Sprint 4.6, PERF-004, DOC-001)
103+
104+
- **Global Buffer Pool** (already implemented in wraith-crypto):
105+
- Thread-safe buffer reuse for encryption hot path
106+
- Lock-free allocation with `BufferPool` type
107+
- Integration via `encrypt_with_pool()` and `decrypt_with_pool()`
108+
- Reduces allocation overhead in packet processing
109+
- **Complete Frame Type Documentation**:
110+
- Documented all 15 frame types in `ref-docs/protocol_technical_details.md`
111+
- Added missing frame type specifications:
112+
- STREAM_CLOSE (0x0A) - Stream termination with optional error code
113+
- STREAM_RESET (0x0B) - Abrupt stream abort with error code
114+
- WINDOW_UPDATE (0x0C) - Flow control window increment
115+
- GO_AWAY (0x0D) - Connection migration to new path
116+
- PATH_CHALLENGE (0x0E) - Path validation request with nonce
117+
- PATH_RESPONSE (0x0F) - Path validation response with echoed nonce
118+
- Complete payload layouts with field descriptions
119+
- Behavior specifications for each frame type
120+
- Integration examples with session and stream layers
121+
122+
### Changed
123+
124+
- **Test Updates**:
125+
- Updated all tests to use stream ID 16+ (avoiding newly reserved range 1-15)
126+
- Fixed integration tests to comply with new validation rules
127+
- Updated property-based tests to generate only valid parameters
128+
- Total tests increased to **487 passing tests** (Phase 4 added 49 new tests)
129+
- **Test Breakdown**:
130+
- wraith-core: 197 tests (frame, session, stream, BBR, path, migration)
131+
- wraith-crypto: 123 tests (AEAD, signatures, hashing, Noise, ratchet, constant-time)
132+
- wraith-transport: 54 tests (AF_XDP, io_uring, UDP, MTU, worker pools)
133+
- wraith-obfuscation: 47 tests (padding, timing, cover traffic)
134+
- wraith-files: 12 tests (chunking, hashing, async I/O)
135+
- Integration vectors: 24 tests (cryptographic correctness)
136+
- Integration tests: 15 tests (session crypto, frame encryption)
137+
- Doctests: 15 tests (API examples)
138+
- **Quality Improvements**:
139+
- All code passes `cargo clippy --workspace -- -D warnings` (zero warnings)
140+
- All code formatted with `cargo fmt --all`
141+
- Documentation builds successfully without warnings
142+
- Zero test failures across all workspace crates
143+
144+
### Performance
145+
146+
- **Frame Parsing**: 172M frames/sec (5.8ns/frame, 232 GiB/s theoretical throughput)
147+
- **AEAD Encryption**: 3.2 GB/s (single core)
148+
- **BLAKE3 Hashing**: 8.5 GB/s (parallel)
149+
- **Session Creation**: 45μs average
150+
- **AF_XDP Zero-Copy**: 10-40 Gbps target with compatible NICs
151+
- **io_uring Async I/O**: >100K IOPS target
152+
153+
### Security
154+
155+
- **Input Validation**: Reserved stream IDs, offset bounds, payload size limits
156+
- **Zero Unsafe Code**: All cryptographic paths remain free of unsafe blocks
157+
- **Constant-Time Operations**: All critical comparisons use constant-time functions
158+
- **Memory Zeroization**: Automatic cleanup of sensitive key material
159+
- **Test Coverage**: 487 tests covering security-critical paths
160+
161+
### Documentation
162+
163+
- **Frame Type Specifications**: All 15 frame types fully documented
164+
- **Protocol Reference**: Complete wire format documentation
165+
- **API Examples**: Comprehensive usage examples in doctests
166+
- **Performance Benchmarks**: Updated with Phase 4 optimizations
167+
168+
---
169+
12170
## [0.3.2] - 2025-11-30
13171

14172
### Added
@@ -1235,7 +1393,8 @@ Fixes applied:
12351393

12361394
---
12371395

1238-
[Unreleased]: https://github.com/doublegate/WRAITH-Protocol/compare/v0.3.2...HEAD
1396+
[Unreleased]: https://github.com/doublegate/WRAITH-Protocol/compare/v0.4.0...HEAD
1397+
[0.4.0]: https://github.com/doublegate/WRAITH-Protocol/compare/v0.3.2...v0.4.0
12391398
[0.3.2]: https://github.com/doublegate/WRAITH-Protocol/compare/v0.3.1...v0.3.2
12401399
[0.3.1]: https://github.com/doublegate/WRAITH-Protocol/compare/v0.3.0...v0.3.1
12411400
[0.3.0]: https://github.com/doublegate/WRAITH-Protocol/compare/v0.2.0...v0.3.0

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ members = [
2222
exclude = ["crates/wraith-xdp"]
2323

2424
[workspace.package]
25-
version = "0.3.1"
25+
version = "0.4.0"
2626
edition = "2024"
2727
rust-version = "1.85"
2828
license = "MIT"

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ A decentralized secure file transfer protocol optimized for high-throughput, low
99
[![CI Status](https://github.com/doublegate/WRAITH-Protocol/actions/workflows/ci.yml/badge.svg)](https://github.com/doublegate/WRAITH-Protocol/actions/workflows/ci.yml)
1010
[![CodeQL](https://github.com/doublegate/WRAITH-Protocol/actions/workflows/codeql.yml/badge.svg)](https://github.com/doublegate/WRAITH-Protocol/actions/workflows/codeql.yml)
1111
[![Release](https://github.com/doublegate/WRAITH-Protocol/actions/workflows/release.yml/badge.svg)](https://github.com/doublegate/WRAITH-Protocol/actions/workflows/release.yml)
12-
[![Version](https://img.shields.io/badge/version-0.3.2-blue.svg)](https://github.com/doublegate/WRAITH-Protocol/releases)
12+
[![Version](https://img.shields.io/badge/version-0.4.0-blue.svg)](https://github.com/doublegate/WRAITH-Protocol/releases)
1313
[![Rust](https://img.shields.io/badge/rust-1.85%2B-orange.svg)](https://www.rust-lang.org/)
1414
[![Edition](https://img.shields.io/badge/edition-2024-orange.svg)](https://doc.rust-lang.org/edition-guide/rust-2024/index.html)
1515
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
1616

1717
## Current Status
1818

19-
**Version:** 0.3.2 (Phases 1-4 Complete - Optimization & Hardening)
19+
**Version:** 0.4.0 (Phase 4 Part I Complete - Optimization & Hardening)
2020

2121
WRAITH Protocol has completed Phases 1-4, delivering a fully functional core protocol, cryptographic layer, high-performance transport implementation, and comprehensive optimization and hardening. The latest release includes AF_XDP kernel bypass with zero-copy I/O, BBR pacing enforcement, io_uring async file I/O, and extensive frame validation hardening.
2222

@@ -589,4 +589,4 @@ WRAITH Protocol builds on the work of many excellent projects and technologies:
589589

590590
**WRAITH Protocol** - *Secure. Fast. Invisible.*
591591

592-
**Status:** Phase 1-4 Complete (v0.3.2) | **License:** MIT | **Language:** Rust 2024 | **Tests:** 487 | **Quality:** Zero clippy errors, zero unsafe code
592+
**Status:** Phase 4 Part I Complete (v0.4.0) | **License:** MIT | **Language:** Rust 2024 | **Tests:** 487 | **Quality:** Zero clippy errors, zero unsafe code

0 commit comments

Comments
 (0)