Skip to content

Count unknown channel types in anchor reserve - #1152

Merged
tnull merged 1 commit into
lightningdevkit:mainfrom
tankyleo:2026-10-06-unknown-channel-type-anchor-reserve
Oct 12, 2026
Merged

tnull merged 1 commit into
lightningdevkit:mainfrom
tankyleo:2026-10-06-unknown-channel-type-anchor-reserve

Conversation

@tankyleo

Copy link
Copy Markdown
Contributor
    Count unknown channel types in anchor reserve

    Conservatively include channels whose type is not yet known when
    calculating the anchor reserve. Otherwise, opening or accepting new
    channels, or splicing funds into existing channels, can leave too little
    reserved for channels still being negotiated.

    Do not count channels with unknown channel types when assessing whether
    0FC support is required from the chain source. This part is all
    user-controlled, and we do not want to require the chain source to support
    0FC if startup happens with an in-flight channel open, and no other 0FC
    chain source support predicates are true.

    Reported by Project Loupe

Fixes https://github.com/project-loupe/audit-ldk-node/issues/120

Conservatively include channels whose type is not yet known when
calculating the anchor reserve. Otherwise, opening or accepting new
channels, or splicing funds into existing channels, can leave too little
reserved for channels still being negotiated.

Do not count channels with unknown channel types when assessing whether
0FC support is required from the chain source. This part is all
user-controlled, and we do not want to require the chain source to support
0FC if startup happens with an in-flight channel open, and no other 0FC
chain source support predicates are true.

Reported by Project Loupe
@ldk-reviews-bot

ldk-reviews-bot commented Oct 12, 2026 •

Copy link
Copy Markdown

👋 Thanks for assigning @tnull 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 tnull October 12, 2026 05:31
@tnull
tnull merged commit d12ff17 into lightningdevkit:main Oct 12, 2026
11 of 25 checks passed
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.

3 participants