Skip to content

Switch 0FC to production feature bit#4515

Open
tankyleo wants to merge 1 commit intolightningdevkit:mainfrom
tankyleo:2026-03-switch-0fc-to-prod-feature-bit
Open

Switch 0FC to production feature bit#4515
tankyleo wants to merge 1 commit intolightningdevkit:mainfrom
tankyleo:2026-03-switch-0fc-to-prod-feature-bit

Conversation

@tankyleo
Copy link
Copy Markdown
Contributor

Fixes #4230

I cannot remember if we reached any conclusions at the spec meeting, so I push the PR in case we want to land this in the 0.3 release.

cc @TheBlueMatt @carlaKC

@ldk-reviews-bot
Copy link
Copy Markdown

ldk-reviews-bot commented Mar 26, 2026

👋 Thanks for assigning @TheBlueMatt as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@tankyleo tankyleo requested a review from TheBlueMatt March 26, 2026 23:13
@tankyleo tankyleo self-assigned this Mar 26, 2026
@tankyleo tankyleo added this to the 0.3 milestone Mar 26, 2026
@ldk-claude-review-bot
Copy link
Copy Markdown
Collaborator

I've thoroughly reviewed every hunk in this diff. The feature bit migration from staging (141) to production (41) is mechanically correct:

  • Feature bit 41 correctly maps to byte 5 (40/8 = 5), matching the placement in all three context arrays (InitContext, NodeContext, ChannelTypeContext).
  • The empty-byte comma counts are correct: 11 commas for bytes 8-18 in Init/NodeContext, replacing the old 9 commas + staging entry + 1 comma.
  • ChannelTypeContext correctly stops at byte 6 since there are no features beyond it after the move.
  • All method names (supports_anchor_zero_fee_commitments, requires_anchor_zero_fee_commitments, etc.) are unchanged, so all call sites continue to work without modification.
  • No stale AnchorZeroFeeCommitmentsStaging references remain in the codebase.
  • Feature definition ordering is correct: OnionMessages (39), AnchorZeroFeeCommitments (41), ProvideStorage (43).

No issues found.

Note (not a bug): Channels opened with the old staging bit 141 (by users who enabled negotiate_anchor_zero_fee_commitments on pre-release builds) will fail to deserialize after this change — FundedChannel deserialization at channel.rs:16293 will return UnknownRequiredFeature since bit 141 becomes unknown. The CHANGELOG already documents this as expected ("feature signaling may change in a future version of LDK, breaking compatibility"), and the feature defaults to off, so this is a known/accepted trade-off rather than a bug.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.20%. Comparing base (688544d) to head (5ab28b1).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4515      +/-   ##
==========================================
+ Coverage   86.14%   86.20%   +0.06%     
==========================================
  Files         160      160              
  Lines      108046   108410     +364     
  Branches   108046   108410     +364     
==========================================
+ Hits        93080    93459     +379     
+ Misses      12346    12321      -25     
- Partials     2620     2630      +10     
Flag Coverage Δ
tests 86.20% <100.00%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't recall either. ACKing this but let's double check with t-bast IIRC the conclusion was "yea, probably just merge spec PR" so we should do this but we should check in at the spec meeting.

@ldk-reviews-bot
Copy link
Copy Markdown

👋 The first review has been submitted!

Do you think this PR is ready for a second reviewer? If so, click here to assign a second reviewer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switch 0FC to prod feature bit

4 participants