-
Notifications
You must be signed in to change notification settings - Fork 31
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
Configure min|max channel size #74
Conversation
Fixed in: Boss/Msg/ManifestHook.hpp Boss/Msg/ManifestNotification.hpp
This implementation is not yet complete, you'd ideally like to guarantee that your counterparty also has some large-capacity channels so that your liquidity is not locked up wastefully. As we already check for nodes with "too little capacity to be worth channeling with", this would want to be extended to consider increased capacities of potential wumbo peers. |
6f7fa6e
to
33e7cea
Compare
Boss/Mod/ChannelCreator/Manager.cpp
Outdated
>([this, &custom_max_amount](Msg::Option const& o) { | ||
if (o.name != "clboss-max-channel-size") | ||
return Ev::lift(); | ||
custom_max_amount = Ln::Amount::sat((double) o.value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just:
max_amount = Ln::Amount::sat((double) o.value);
and remove the custom_
* variiables completely?
Also I prefer the casting style double(o.value)
over (double) o.value
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes a lot more sense. Now updated (and fixed indentation inside the lambdas to match your style, I think!)
dc4957f
to
521e38f
Compare
* Permit modification of ChannelCreator {min|max}_amount * Change the minimum and maximum channel sizes CLBOSS will try to create using `clboss-{min|max}-channel-size` flags with lightningd Signed-off-by: willcl-ark <[email protected]>
521e38f
to
8eb5418
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code itself looks fairly good; what are your further plans?
Re: indent: I use tabstop=8
and actual tab chars, not spaces.
, Json::Out::direct(min_amount.to_sat()) | ||
, "Minimum channel size CLBOSS will create. " | ||
"Set to an integer number of satoshis. " | ||
"default=500000" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ManifestOption
accepts a std::string
in this position, so it should be possible to get this from the default_max_amount
value with some amount of +
and std::string
concatenation.
Just want to state that I'd like to open larger channels. So this would be useful. |
OK I got #reckless and ran this patch on mainnet where it successfully opened channels only between the sizes specified in the config file 👍🏼 @ZmnSCPxj I wonder if we want to as part of this PR bump the default max size of a channel to somewhere in the range 1,000,000 - 2,000,000 satoshis, as this is what certain services (e.g. LNRouter, maybe also lightning.terminal -- not sure) are "expecting" for a "good" routing channel? |
You want to lower the MAX size from 16,777,215sats to just 2,000,000 sats? That seems restrictive --- I would expect such secondary tools to actually prefer larger channels? |
Youre right I have it backwards-- I would not like to do that! But in perhaps default Opening channels of a lesser size than that does not seem optimal nowadays. |
1,000,000sats for now please. An issue is that triggering of channel creation may also need rethinking as well due to this minimum channel size --- It might be better to move those settings to |
We probably also want to impose 500000sat <= |
Closing since similar behavior already exists |
This PR aims to allow users to configure {min|max} channel sizes that CLBOSS should open. Motivation is wanting to permit CLBOSS to open larger channels.
This is presented as an advanced configuration option passed to
lighthingd
and if unset the current defaults remain.Currently untested (CLBOSS doesn't seem to like my tiny regtest network of 2 nodes!) and no tests written. These may be added to this PR shortly if there is interest.
@ZmnSCPxj interested in your feedback on whether you want to see advanced config options like this in CLBOSS at all? The other alternative is to add some interior logic which opens larger channels if there is a large wallet balance in
lightningd
, or perhaps even uses a target "number of channels" to open e.g. ~5 channels. If you drop 0.1 BTC in, there won't be any wumbo channels, but if you drop 1 BTC in it might open one or two wumbo channels?The final alternative is to do nothing at all, and CLBOSS will simply keep making many channels under the previous soft channel limit of 0.16...btc.