ElementsProject / ElementsProject/lightning

Unintuitive treatment of `min-capacity-sat` config

Open
#7,966 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
3.1k
Forks
1k
Avg merge
4d 10h
Merged PRs (30d)
13

Description

### Issue and Steps to Reproduce
This is not exactly a bug since `min-capacity-sat` does appear to be functioning as described in the documentation. Rather, this is more of a complaint about a quality-of-life issue. Feel free to close this report unceremoniously if you disagree.

I was trying to participate in a triangle liquidity swap on LightningNetwork+. The swap contract was for 1 Msat of liquidity. My node's `min-capacity-sat` is set to 1000000, so I thought I would be fine. However, my peer was unable to open a channel to me because `min-capacity-sat` is actually defined as the minimal _effective_ channel capacity to accept.

Options for resolving this issue:

- Add a complementary config option that bounds the _nominal_ channel capacity. Default: unbounded. An incoming proposed channel would need to satisfy _both_ bounds in order to be accepted.
- Change the interpretation of `min-capacity-sat` so that it bounds the _nominal_ channel capacity rather than the _effective_ channel capacity. This would be a breaking change and would eliminate a potentially useful safeguard, so I am not advocating for it, but I am mentioning it for the sake of completeness.
- Do nothing, and dismiss my complaint as ravings of an idiot user.

I am willing to author a PR to implement the first option if that's agreeable.

### `getinfo` output
This is with CLN 24.08.2.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.