bolt4

Onion routing protocol, per BOLT #4 (docs.ppad.tech/bolt4).
git clone git://git.ppad.tech/bolt4.git
Log | Files | Refs | README | LICENSE

README.md (2402B)


      1 # Implementation Plans
      2 
      3 ## Documents
      4 
      5 - `ARCH1.md` - High-level architecture and module structure
      6 - `IMPL1.md` - Cryptographic primitives (Prim module)
      7 - `IMPL2.md` - Types and codec (Types, Codec modules)
      8 - `IMPL3.md` - Packet construction (Construct module)
      9 - `IMPL4.md` - Packet processing (Process module)
     10 - `IMPL5.md` - Error handling (Error module)
     11 - `IMPL6.md` - Route blinding (Blinding module) [optional]
     12 
     13 ## Dependency Graph
     14 
     15 ```
     16             ┌──────────┐
     17             │  IMPL1   │──────────────────┐
     18             │  Prim    │                  │
     19             └────┬─────┘                  │
     20                  │                        │
     21             ┌────┴─────┐                  │
     22             │  IMPL2   │                  │
     23             │  Types   │                  │
     24             │  Codec   │                  │
     25             └────┬─────┘                  │
     26                  │                        │
     27      ┌───────────┼───────────┬───────────┤
     28      │           │           │           │
     29 ┌────▼────┐ ┌────▼────┐ ┌────▼────┐ ┌────▼────┐
     30 │  IMPL3  │ │  IMPL4  │ │  IMPL5  │ │  IMPL6  │
     31 │Construct│ │ Process │ │  Error  │ │Blinding │
     32 └─────────┘ └─────────┘ └─────────┘ └─────────┘
     33 ```
     34 
     35 ## Parallelism Opportunities
     36 
     37 **Phase 1** (can run in parallel):
     38 - IMPL1: Cryptographic primitives
     39 - IMPL2: Types and codec
     40 
     41 **Phase 2** (after Phase 1, can run in parallel):
     42 - IMPL3: Packet construction
     43 - IMPL4: Packet processing
     44 - IMPL5: Error handling
     45 - IMPL6: Route blinding
     46 
     47 ## Suggested Execution
     48 
     49 1. Start IMPL1 and IMPL2 concurrently
     50 2. Once both complete, start IMPL3, IMPL4, IMPL5 concurrently
     51 3. IMPL6 is optional and lower priority; can be deferred
     52 
     53 ## Testing Strategy
     54 
     55 Each module should have:
     56 - Unit tests against BOLT4 spec test vectors
     57 - Property tests for round-trip serialization
     58 - Integration tests combining modules
     59 
     60 Final integration test: construct packet, process at each hop,
     61 verify intermediate values match spec vectors.