bolt1

Base Lightning protocol, per BOLT #1 (docs.ppad.tech/bolt1).
git clone git://git.ppad.tech/bolt1.git
Log | Files | Refs | README | LICENSE

IMPL3.md (1292B)


      1 # IMPL3 - BOLT #1 Stabilization Pass
      2 
      3 ## Phase 1: Fundamental Types + Tests
      4 
      5 - Implement signed integers (s16/s32/s64) and truncated unsigned
      6   integers (tu16/tu32/tu64) per BOLT #1.
      7 - Add test vectors from Appendix D (signed integers).
      8 - Add negative tests for minimality/length rules.
      9 
     10 ## Phase 2: Validation Hardening
     11 
     12 - Enforce `init` feature bitset padding/byte alignment.
     13 - Enforce message size limits (type + payload + extension <= 65535).
     14 - Maintain length overflow checks for all u16 length fields.
     15 
     16 ## Phase 3: Extension TLV Policy
     17 
     18 - Ensure unknown even TLVs in extensions cause decode failure.
     19 - Expose clear decode API surface for extensions (raw vs. validated).
     20 - Add tests for unknown even TLV rejection and extension handling.
     21 
     22 ## Phase 4: Module Split
     23 
     24 - Split `Lightning.Protocol.BOLT1` into:
     25   - `Lightning.Protocol.BOLT1.Prim`
     26   - `Lightning.Protocol.BOLT1.TLV`
     27   - `Lightning.Protocol.BOLT1.Message`
     28   - `Lightning.Protocol.BOLT1.Codec`
     29 - Preserve the existing public API via re-exports.
     30 - Update cabal + test imports accordingly.
     31 
     32 ## Independent Work Chunks
     33 
     34 1) Fundamental type encoding/decoding + vectors/tests.
     35 2) Validation hardening for init features + message size limits.
     36 3) Extension TLV policy changes + test additions.
     37 4) Module split and cabal/test updates.
     38