Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unintuitive treatment of min-capacity-sat config #7966

Open
whitslack opened this issue Dec 21, 2024 · 2 comments
Open

Unintuitive treatment of min-capacity-sat config #7966

whitslack opened this issue Dec 21, 2024 · 2 comments

Comments

@whitslack
Copy link
Collaborator

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.

@rustyrussell
Copy link
Contributor

First: I want to thank you for this issue! Not enough people file "I tripped on this" bug reports, but they're incredibly valuable for QoL issues! ❤️❤️❤️

The existence of this option is a compromise, itself. You can totally have a plug-in make calls on what channels to allow, based on arbitrary criteria. I would love to see a plug-in which allowed these kind of fine-grained controls, in the plugins repo.

Also, this config option should be dynamic.

@whitslack
Copy link
Collaborator Author

Also, this config option should be dynamic.

I believe it is dynamic, as my trying to change it via setconfig crashed CLN due to #7964.

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

No branches or pull requests

3 participants
@rustyrussell @whitslack and others