Skip to content

Conversation

@amackillop
Copy link

@amackillop amackillop commented Dec 11, 2025

Add configurable min_their_channel_reserve_satoshis field to ChannelHandshakeConfig, allowing users to set the minimum channel reserve value.

Special case: When set to 0, the dust limit check is bypassed. This enables LSP use cases where clients are able to fully withdraw their funds from the channel without closing it. For non-zero values below the dust limit, validation still enforces the dust limit.

Replaces hardcoded MIN_THEIR_CHAN_RESERVE_SATOSHIS constant with configurable value while maintaining backward compatibility. Default remains 1000 sats to preserve existing behavior.

Discussion

I went with a configurable amount here but in the end I am left wondering if just a boolean to remove the reserve is better especially given the special handling of the zero case. Is the flexibility to set whatever one wants really needed? For us we just want it to be zero.

Also just found this related issue which notes some specs for this

Add configurable min_their_channel_reserve_satoshis field to
ChannelHandshakeConfig, allowing users to set the minimum channel
reserve value.

Special case: When set to 0, the dust limit check is bypassed.
This enables LSP use cases where clients are able to fully withdraw
their funds from the channel without closing it. For non-zero values
below the dust limit, validation still enforces the dust limit.

Replaces hardcoded MIN_THEIR_CHAN_RESERVE_SATOSHIS constant with
configurable value while maintaining backward compatibility. Default
remains 1000 sats to preserve existing behavior.
announce_for_forwarding: false,
commit_upfront_shutdown_pubkey: true,
their_channel_reserve_proportional_millionths: 10_000,
min_their_channel_reserve_satoshis: 1_000,

Choose a reason for hiding this comment

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

probably use MIN_THEIR_CHAN_RESERVE_SATOSHIS?

Copy link
Author

@amackillop amackillop Dec 11, 2025

Choose a reason for hiding this comment

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

This change basically deprecates that constant as it's no longer a real constant. Although I should double check if that constant is actually exposed publicly and remove it if not.

@martinsaposnic
Copy link

min_their_channel_reserve_satoshis should only be set to 0 on channels between lsp-client, so I guess this will need to be set not as a general config but as a ChannelHandshakeConfig, so min_their_channel_reserve_satoshis needs to be added to ChannelHandshakeConfigUpdate and then to the ChannelHandshakeConfig::apply

@amackillop amackillop force-pushed the austin/mdk-189/configurable-min-channel-reserve branch from a8f686d to 52603a9 Compare December 18, 2025 19:18
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