-
Notifications
You must be signed in to change notification settings - Fork 491
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
[WIP] BOLT14: Sharing x bit of Liquidity Information in the Friend of a Friend Network of Sender and Receiver #780
base: master
Are you sure you want to change the base?
Conversation
… Review from Christian Decker
Just realizing that the results from the foaf_query could also be used in BOLT11 routing hints. assuming that many paths are only 4 hops long we have good chances to find an intersection. |
When finding optimal pamemt flows (C.f.: https://arxiv.org/abs/2107.05322 ) the uncertainty of channel balances seems to be the main reason for many retries which produce overall load to the network. Given the fact that local balances are known there is no uncertainty and cost (for the uncertainty) to transport sats to the peers of a sender (of course other costs like fees, cltv risks, htlcs,... Might not be 0). Thus we effectively study a multi source min cost flow problem by starting to probe the channels of our neighbors. As probing and htlcs are generally expensive and slow to set up I think this proposal would reduce the overall traffic and improve reliability. (I have not simulated / quantified this yet) Also from a recipient end they could query their neibors for liquidity and Include blinded route hints similar to what @rustyrussell included to the offers PR #798. Only difference the blinded routes up to two hops would certainly work after liquidity was announced. This would transform the liquidity finding problem into a multisource multi sink min cost flow problem where sources are in the friend of a friend network of the sender and sinks are in the friend of a friend network of the recipient. And we'd have no uncertainty of the transportability of sats in those networks. Again haven't studied the effects yet but I would assume that this should produce a significant
|
If anything we probably should be thinking of going the other direction - failing payments which are near the channel balance to make balance probing more difficult.
… On Jul 28, 2021, at 04:31, Rene Pickhardt ***@***.***> wrote:
When finding optimal pamemt flows (C.f.: https://arxiv.org/abs/2107.05322 ) the uncertainty of channel balances seems to be the main reason for many retries which produce overall load to the network. Given the fact that local balances are known there is no uncertainty and cost (for the uncertainty) to transport sats to the peers of a sender (of course other costs like fees, cltv risks, htlcs,... Might not be 0). Thus we effectively study a multi source min cost flow problem by starting to probe the channels of our neighbors. As probing and htlcs are generally expensive and slow to set up I think this proposal would reduce the overall traffic and improve reliability. (I have not simulated / quantified this yet)
Also from a recipient end they could query their neibors for liquidity and Include blinded route hints similar to what @rustyrussell included to the offers PR #798. Only difference the blinded routes up to two hops would certainly work after liquidity was announced.
This would transform the liquidity finding problem into a multisource multi sink min cost flow problem where sources are in the friend of a friend network of the sender and sinks are in the friend of a friend network of the recipient. And we'd have no uncertainty of the transportability of sats in those networks.
Again haven't studied the effects yet but I would assume that this should produce a significant
gain in payment reliability
reduction of network traffic
reduction in locked liquidity (in htlcs) over time
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Are you suggesting to make lightning less reliable than it already is? If yes I disagree (c.f: @rustyrussell 's 27 tries to deliver 10k sats (effectively revealing the full balance of 26 failed channels) https://twitter.com/rusty_twit/status/1420565586552057862?s=19 ) Probing is a regular part of the trial and error loop of the payment process. We can only deliver a payment if we find sufficient liquidity (which as it is unannounced needs to be probed for). Latest when a payment is successfull we will have learnt something about the liquidity of the involved channels. Sharing some information voluntarily might potentially on average reveal less information overall (needs to be tested though) Also note that the proposal allows nodes to not reveal their liquidity upon request |
I recently created a simulation that shows the effects of the ideas of this proposal with respect to reliability of payment delivery when
I have not ported the code back to the python simulation package but there is an old commit where I demonstrated the consequences of such strategies When using optimization for reliability and fees we could deliver a
When using optimization only for reliablity we could deliver a
When using optimization mainly for fees we could deliver a
When using FOAF liquidity sharing and optimizing mainly for fees we could deliver a
Also probably surprisingly using FOAF liquidity sharing is for reliablity more practical than globally reducing the uncertainty (either by probing or sharing some hints via gossip) where we optimized mainly for fees we could deliver a
TL;DR: Here is a table of all experiments
From such results it seems the the Disclaimer: While this example is based on a very small sample / size statistic I can report that anytime I was running the code it seemed to have confirmed this picture so it shouldn't be cherry picking of a nice run. I just didn't have the time yet to conduct a proper evaluation ps: As I think the term |
This is likely related, although they seem to only look at the global case. https://arxiv.org/pdf/1909.02717.pdf |
Is there something that prevents the node receiving the query from lying in response? |
concept ack the privacy vs reliability tradeoff is stark (as always). I can see privacy-first nodes closing channels with reliability-first peers if they find out they are advertising channel balance to others... but i think this proposal might have enough optionality to allay the privacy concerns?
the spec might need a more details/examples of how a node might do this so it is easier to understand what the exact information leak risks are... it is worrying if this proposal increases the chances of a bifurcated LN where payments from non-FOAF nodes fail so much more than payments through FOAF nodes could also be interesting to explore other versions of this same idea that can improve reliability (maybe less so) but with more obfuscated information-sharing... like instead of channel balance data, you can share average amounts/PPM routed across all channels in the past X days/weeks/months? is that any useful at all? or if you stick with channel-balance data but group them and say I have 100M sats across these 5 channels? or does that totally not help solve the problem? |
As mentioned in December 2019 on the Mailinglist I propose to work on a new BOLT 14 which should be a collection of recommendations that help nodes to improve their abilities to discover payment paths with sufficient liquidity.
This proposal is a Work in progress and tries to spec out the foundation for nodes to be able to share balance information with their friends. It is important that the query can only ask for balance information of channels from its own channel partners. The learnt / shared information is not gossiped to other peers.
The design is currently in a way that a node can send a
query_foaf_balances
message which includes an amount and a flow direction to signal that it wishes to initiate a rebalance operation of the amount in a certain direction. The receiving node of this query has the option to respond with a list of short channel id's that it is connected to along which it would support a circular rebalancing operation with the given amount.Having these two messages would lay the basis for
a few words to the privacy advocates who might oppose the idea of sharing information about funds:
Regarding Numbering and Naming:
437
and439
are currently used in my proof of concept implementation and throughout the BOLT. Of course if we find consensus for those kind of BOLT we would have to assign the respective even types.437
was chosen as it is the first prime number in the correct semantic range whose checksum is14
.20/21
BOLT14-routing-pathfinding.md
but as this is currently not par of it I gave it the name that reflecs what it currently does.Background:
There is a reference implementation as a proof of concept as a clightning plugin. The implementation and this PR weere mainly created on the Lightning Hacksprint in May 2020. While my research at NTNU is the main driver for this work I want to give a shoutout to @qrest for help with the reference implementation and @cdecker for helpful discussions and reviews of earlier versions of this proposed BOLT.