-
Notifications
You must be signed in to change notification settings - Fork 44
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
Caching Channel Balance Thresholds #680
Comments
Since both parties of a channel will reach the threshold at the same time (assuming both use the default), there needs to be a negotiation who takes over re-balancing/splicing. |
Assigned to you since you were dealing with similar checks in #675 @erkarl Again, this issue is just to cache the value. Please give feedback so that we can move to implementation on this soon. |
Oh I think this would actually be closed by #850, can you confirm @erkarl ? |
Oh actually I think I overlooked that this is supposed to be dealing with rebalancing. That's a complicated issue as far as I know, could you provide more details of what you have in mind @kilrau ? |
Sry for the super-late reply.
Great - I see #850 via channelBalance is already aggregating outbound (local) balances of all channels for one currency! Now we'd need the same for the inbound (remote) balances, to do a sanity check there too - added a comment.
This issue is about defining thresholds to throw alerts (not in scope of this issue, I just opened #864 for this) when one side of the channel falls below a certain percentage of the channels total (inbound+outbound) capacity. But thanks for questioning this, all channels aggregated, how I originally wrote it doesn't make sense just yet. I believe we are going for a "direct channel" approach, hence we should throw alerts if one particular channels is unbalanced. These are the proposed cached values which should be updated regularly: This is what this issue is about: caching (& updating) these 2 values. General "direct channels" discussion here.
It's just about caching the channelBalance value, not dealing with any rebalancing. That's indeed complicated and for a later stage. For now we just want to alert the exchange. |
Does it make sense to you to cache these two values as preparation for #864 ? Or would you prefer to do it all at once - also fine! @erkarl |
Let's keep this issue for caching these values and deal with the alerts separately. |
Agree to skip inbound balance, because no direct lnd api call available, plus dependent on other nodes to open channels to my node anyways. So this issue is about implementing a configurable threshold on aggregated channel outbound balance. @erkarl |
Hi @kilrau is this still valid, should we cache only outbound balance's configured percentage ? |
LND |
We want to cache the following values:
<coin>_channel_min_in
(default 15% of total channel capacity, all channels aggregated)<coin>_channel_min_out
(default 15% of total channel capacity, all channels aggregated)This issue is just about caching the value, we'll take care of rebalancing & other actions like sending alerts in follow-up PRs. The % should be configurable either via
xud.conf
/cli paramter requiring a restart, better even with a separate cli call not requiring to restart xud. The cached values should be updated every 60s and immediately after each trade.The text was updated successfully, but these errors were encountered: