<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>bolt9, branch HEAD</title>
<subtitle>Lightning feature flags, per BOLT #9 (docs.ppad.tech/bolt9).
</subtitle>
<entry>
<id>39bd0dcf9fe8bd5afba7a873e6f450245a69fe2d</id>
<published>2026-04-18T05:30:01Z</published>
<updated>2026-04-18T05:30:01Z</updated>
<title type="text">readme: badges</title>
<link rel="alternate" type="text/html" href="commit/39bd0dcf9fe8bd5afba7a873e6f450245a69fe2d.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 39bd0dcf9fe8bd5afba7a873e6f450245a69fe2d
parent f9a9fa2f403dbe60e9f7002d166bd3e3f906c171
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sat, 18 Apr 2026 13:30:01 +0800

readme: badges

</content>
</entry>
<entry>
<id>f9a9fa2f403dbe60e9f7002d166bd3e3f906c171</id>
<published>2026-01-25T12:20:17Z</published>
<updated>2026-01-25T12:20:17Z</updated>
<title type="text">Refactor: improve type safety and reduce duplication</title>
<link rel="alternate" type="text/html" href="commit/f9a9fa2f403dbe60e9f7002d166bd3e3f906c171.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit f9a9fa2f403dbe60e9f7002d166bd3e3f906c171
parent cecfa8c7a01795ebd39916a4c0b3e03e33b00c6c
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 16:20:17 +0400

Refactor: improve type safety and reduce duplication

- Add FeatureLevel type (Required | Optional) to replace Bool in
  setFeature, hasFeature, and listFeatures APIs
- Add isFeatureSet helper to abstract common &quot;either bit set&quot; pattern,
  used in 3 places in Validate.hs
- Use Map/IntMap for O(log n) feature lookups instead of linear search
- Replace custom countLeadingZeros with Data.Bits.countLeadingZeros
- Add containers dependency (GHC boot library)

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>cecfa8c7a01795ebd39916a4c0b3e03e33b00c6c</id>
<published>2026-01-25T12:08:21Z</published>
<updated>2026-01-25T12:08:21Z</updated>
<title type="text">Flesh out README with overview and usage examples</title>
<link rel="alternate" type="text/html" href="commit/cecfa8c7a01795ebd39916a4c0b3e03e33b00c6c.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit cecfa8c7a01795ebd39916a4c0b3e03e33b00c6c
parent 5931fdd136928ba8eb85af4a5a71579dc0a62189
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 16:08:21 +0400

Flesh out README with overview and usage examples

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>5931fdd136928ba8eb85af4a5a71579dc0a62189</id>
<published>2026-01-25T12:06:44Z</published>
<updated>2026-01-25T12:06:44Z</updated>
<title type="text">Merge impl/bench: criterion and weigh benchmarks</title>
<link rel="alternate" type="text/html" href="commit/5931fdd136928ba8eb85af4a5a71579dc0a62189.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 5931fdd136928ba8eb85af4a5a71579dc0a62189
parent 34f0b8ed00992cbad48bf244d0cc1a799feeb3cf
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 16:06:44 +0400

Merge impl/bench: criterion and weigh benchmarks

Adds benchmarks for:
- Parsing (typical, empty, large vectors)
- Rendering
- Bit operations (setBit, testBit, hasFeature)
- Validation (local and remote)
- Feature lookups

Plus allocation tracking via weigh.

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>34f0b8ed00992cbad48bf244d0cc1a799feeb3cf</id>
<published>2026-01-25T12:06:36Z</published>
<updated>2026-01-25T12:06:36Z</updated>
<title type="text">Merge impl/tests: comprehensive test suite</title>
<link rel="alternate" type="text/html" href="commit/34f0b8ed00992cbad48bf244d0cc1a799feeb3cf.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 34f0b8ed00992cbad48bf244d0cc1a799feeb3cf
parent ca374d4816e6f65baf08012e438e318ad102da42
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 16:06:36 +0400

Merge impl/tests: comprehensive test suite

Adds 39 tests covering:
- Feature table correctness and lookups
- Bit parity smart constructors
- FeatureVector operations
- Local and remote validation
- Property tests for roundtrips and invariants

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>ca374d4816e6f65baf08012e438e318ad102da42</id>
<published>2026-01-25T12:06:30Z</published>
<updated>2026-01-25T12:06:30Z</updated>
<title type="text">Merge impl/api: public API documentation</title>
<link rel="alternate" type="text/html" href="commit/ca374d4816e6f65baf08012e438e318ad102da42.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit ca374d4816e6f65baf08012e438e318ad102da42
parent 78c23f1935dceff739ae99086e579b6bfe1afd00
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 16:06:30 +0400

Merge impl/api: public API documentation

Adds comprehensive Haddock documentation:
- Module overview with quick start guide
- Section headers for all export groups
- Doctest examples for key functions

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>ddf38d32321ca83afb7a3d0767982a036ced100c</id>
<published>2026-01-25T12:05:53Z</published>
<updated>2026-01-25T12:05:53Z</updated>
<title type="text">Add comprehensive test suite for BOLT #9 feature flags</title>
<link rel="alternate" type="text/html" href="commit/ddf38d32321ca83afb7a3d0767982a036ced100c.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit ddf38d32321ca83afb7a3d0767982a036ced100c
parent 78c23f1935dceff739ae99086e579b6bfe1afd00
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 16:05:53 +0400

Add comprehensive test suite for BOLT #9 feature flags

Unit tests for:
- Feature table: baseBit parity, featureByBit/featureByName lookups,
  assumed features
- Bit parity: requiredBit/optionalBit smart constructors
- FeatureVector: empty, set, clear, member, render operations
- Validation: BothBitsSet, MissingDependency, ContextNotAllowed errors,
  remote validation of unknown bits

Property tests for:
- render . parse roundtrip identity
- set/clear/member consistency
- setBits returns unique bits
- requiredBit/optionalBit parity invariants

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>fdb0dd501abf29b75c0a93526c4a531f5f125dba</id>
<published>2026-01-25T12:05:17Z</published>
<updated>2026-01-25T12:05:17Z</updated>
<title type="text">Add Haddock documentation and examples to public API</title>
<link rel="alternate" type="text/html" href="commit/fdb0dd501abf29b75c0a93526c4a531f5f125dba.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit fdb0dd501abf29b75c0a93526c4a531f5f125dba
parent 78c23f1935dceff739ae99086e579b6bfe1afd00
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 16:05:17 +0400

Add Haddock documentation and examples to public API

Enhance the main BOLT9 module with comprehensive documentation:
- Add module overview explaining the library&#39;s purpose
- Include Quick Start section with working code examples
- Document bit numbering conventions
- Add section descriptions for all export groups

Add doctest examples throughout:
- Types: empty, set, member, requiredBit, optionalBit
- Features: featureByBit, featureByName
- Codec: setBit, clearBit, testBit, setFeature, hasFeature, listFeatures
- Validate: validateLocal, validateRemote

All submodules already have OPTIONS_HADDOCK prune.

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>f1117eb44c3d2ceaeb1a19e2bb8444d161b7e607</id>
<published>2026-01-25T12:04:26Z</published>
<updated>2026-01-25T12:04:26Z</updated>
<title type="text">Add Criterion and Weigh benchmarks</title>
<link rel="alternate" type="text/html" href="commit/f1117eb44c3d2ceaeb1a19e2bb8444d161b7e607.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit f1117eb44c3d2ceaeb1a19e2bb8444d161b7e607
parent 78c23f1935dceff739ae99086e579b6bfe1afd00
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 16:04:26 +0400

Add Criterion and Weigh benchmarks

Criterion benchmarks for parse, render, bit operations, validation,
and feature lookups. Weigh benchmarks for allocation profiling.

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>78c23f1935dceff739ae99086e579b6bfe1afd00</id>
<published>2026-01-25T12:02:11Z</published>
<updated>2026-01-25T12:02:11Z</updated>
<title type="text">Merge impl/validate: validation engine</title>
<link rel="alternate" type="text/html" href="commit/78c23f1935dceff739ae99086e579b6bfe1afd00.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 78c23f1935dceff739ae99086e579b6bfe1afd00
parent 4d4573133f9c4804c728b55773fa9ce4a04ae1dd
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 16:02:11 +0400

Merge impl/validate: validation engine

Adds lib/Lightning/Protocol/BOLT9/Validate.hs with:
- ValidationError ADT with structured error reasons
- validateLocal: checks we create valid feature vectors
  (no both bits, context restrictions, dependency closure)
- validateRemote: checks received vectors
  (unknown optional ok, unknown required rejected)
- highestSetBit, setBits helpers

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>15e41fddf47addb81341acbc2e0f63cd217d42c0</id>
<published>2026-01-25T12:01:45Z</published>
<updated>2026-01-25T12:01:45Z</updated>
<title type="text">Add Validate module with local and remote validation</title>
<link rel="alternate" type="text/html" href="commit/15e41fddf47addb81341acbc2e0f63cd217d42c0.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 15e41fddf47addb81341acbc2e0f63cd217d42c0
parent 4d4573133f9c4804c728b55773fa9ce4a04ae1dd
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 16:01:45 +0400

Add Validate module with local and remote validation

Implements validation for BOLT #9 feature vectors:

- Local validation: checks for both-bits-set, context restrictions,
  dependency closure, and C-/C+ parity constraints
- Remote validation: accepts unknown optional bits, rejects unknown
  required bits, applies context restrictions for known features
- ValidationError ADT with structured error reasons
- Helper functions: highestSetBit, setBits

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>4d4573133f9c4804c728b55773fa9ce4a04ae1dd</id>
<published>2026-01-25T11:59:56Z</published>
<updated>2026-01-25T11:59:56Z</updated>
<title type="text">Merge impl/codec: parsing and rendering</title>
<link rel="alternate" type="text/html" href="commit/4d4573133f9c4804c728b55773fa9ce4a04ae1dd.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 4d4573133f9c4804c728b55773fa9ce4a04ae1dd
parent e64ee423c47e5cf259b4f80d8e9124e39f16f190
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 15:59:56 +0400

Merge impl/codec: parsing and rendering

Adds lib/Lightning/Protocol/BOLT9/Codec.hs with:
- parse/render for FeatureVector ByteString conversion
- setBit/clearBit/testBit convenience wrappers
- setFeature/hasFeature for feature-level operations
- listFeatures to enumerate set features

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>3015ef3b552216039dc9056f38be86ee500816c6</id>
<published>2026-01-25T11:59:35Z</published>
<updated>2026-01-25T11:59:35Z</updated>
<title type="text">Add Codec module with parsing, rendering, and feature operations</title>
<link rel="alternate" type="text/html" href="commit/3015ef3b552216039dc9056f38be86ee500816c6.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 3015ef3b552216039dc9056f38be86ee500816c6
parent e64ee423c47e5cf259b4f80d8e9124e39f16f190
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 15:59:35 +0400

Add Codec module with parsing, rendering, and feature operations

Provides convenient aliases (parse, render, setBit, clearBit, testBit)
and feature-level operations (setFeature, hasFeature, listFeatures)
for working with BOLT #9 feature vectors.

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>e64ee423c47e5cf259b4f80d8e9124e39f16f190</id>
<published>2026-01-25T11:55:31Z</published>
<updated>2026-01-25T11:56:33Z</updated>
<title type="text">Reconcile Context type between Types and Features modules</title>
<link rel="alternate" type="text/html" href="commit/e64ee423c47e5cf259b4f80d8e9124e39f16f190.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit e64ee423c47e5cf259b4f80d8e9124e39f16f190
parent cbdf43150a9671a42cb301fd9741b76f93f27762
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 15:55:31 +0400

Reconcile Context type between Types and Features modules

Features.hs now imports Context from Types.hs instead of defining its
own version. This ensures a single source of truth for context handling.

Also add .gitignore for build artifacts and worktrees.

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>cbdf43150a9671a42cb301fd9741b76f93f27762</id>
<published>2026-01-25T11:54:32Z</published>
<updated>2026-01-25T11:54:32Z</updated>
<title type="text">Merge impl/table: known features table</title>
<link rel="alternate" type="text/html" href="commit/cbdf43150a9671a42cb301fd9741b76f93f27762.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit cbdf43150a9671a42cb301fd9741b76f93f27762
parent b27c6d22774529f6ef56fa2e311ee4df76968562
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 15:54:32 +0400

Merge impl/table: known features table

Adds lib/Lightning/Protocol/BOLT9/Features.hs with:
- Feature record type (name, baseBit, contexts, dependencies, assumed)
- Complete table of 22 features from BOLT #9 spec
- featureByBit and featureByName lookup functions
- knownFeatures list

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>b27c6d22774529f6ef56fa2e311ee4df76968562</id>
<published>2026-01-25T11:53:52Z</published>
<updated>2026-01-25T11:53:52Z</updated>
<title type="text">Merge impl/types: baseline types and context model</title>
<link rel="alternate" type="text/html" href="commit/b27c6d22774529f6ef56fa2e311ee4df76968562.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit b27c6d22774529f6ef56fa2e311ee4df76968562
parent 564b7b53f6dfc7830c389793758fae9118c78b9f
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 15:53:52 +0400

Merge impl/types: baseline types and context model

Adds lib/Lightning/Protocol/BOLT9/Types.hs with:
- Context ADT (Init, NodeAnn, ChanAnn, ChanAnnOdd, ChanAnnEven, Invoice,
  Blinded, ChanType) and helpers for C-/C+ parity rules
- BitIndex, RequiredBit, OptionalBit newtypes with smart constructors
  enforcing even/odd parity
- FeatureVector wrapper over strict ByteString with set/clear/member ops

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>94b8f712d025440cb5cf1c6e71db5ecb026b07c9</id>
<published>2026-01-25T11:52:59Z</published>
<updated>2026-01-25T11:52:59Z</updated>
<title type="text">Add known features table with lookup functions</title>
<link rel="alternate" type="text/html" href="commit/94b8f712d025440cb5cf1c6e71db5ecb026b07c9.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 94b8f712d025440cb5cf1c6e71db5ecb026b07c9
parent 564b7b53f6dfc7830c389793758fae9118c78b9f
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 15:52:59 +0400

Add known features table with lookup functions

Implements Step 2 of IMPL1.md: encode all known features from BOLT #9
specification in a structured table. Provides Feature record type with
name, base bit, contexts, dependencies, and assumed fields. Includes
featureByBit and featureByName lookup functions.

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>e0e8c5e5244b6c00162f5739b5a314248415fc3c</id>
<published>2026-01-25T11:52:59Z</published>
<updated>2026-01-25T11:52:59Z</updated>
<title type="text">Add baseline types for BOLT #9 feature flags</title>
<link rel="alternate" type="text/html" href="commit/e0e8c5e5244b6c00162f5739b5a314248415fc3c.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit e0e8c5e5244b6c00162f5739b5a314248415fc3c
parent 564b7b53f6dfc7830c389793758fae9118c78b9f
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 15:52:59 +0400

Add baseline types for BOLT #9 feature flags

Introduces the Types module with:
- Context ADT for message presentation contexts (I, N, C, C-, C+, 9, B, T)
- BitIndex newtype for bit positions in feature vectors
- RequiredBit/OptionalBit newtypes with parity-enforcing smart constructors
- FeatureVector wrapper over strict ByteString with set/clear/member ops

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>564b7b53f6dfc7830c389793758fae9118c78b9f</id>
<published>2026-01-25T11:42:49Z</published>
<updated>2026-01-25T11:42:49Z</updated>
<title type="text">Initial project skeleton for ppad-bolt9</title>
<link rel="alternate" type="text/html" href="commit/564b7b53f6dfc7830c389793758fae9118c78b9f.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 564b7b53f6dfc7830c389793758fae9118c78b9f
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 15:42:49 +0400

Initial project skeleton for ppad-bolt9

Feature flags library per BOLT #9 specification.

Project structure:
- lib/Lightning/Protocol/BOLT9.hs - main library module
- test/Main.hs - tasty test skeleton
- bench/Main.hs, bench/Weight.hs - criterion/weigh benchmarks
- etc/09-features.md - cached BOLT9 specification
- flake.nix - nix flake for dependency/build management
- ppad-bolt9.cabal - cabal package definition

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
</feed>
