<oembed><type>rich</type><version>1.0</version><author_name>npub13fccestrh5xf26m53n73xn5yly9z040a4n9vq30mernkj0cqszuq9tgaqs</author_name><author_url>https://nostr.ae/npub13fccestrh5xf26m53n73xn5yly9z040a4n9vq30mernkj0cqszuq9tgaqs</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2022-03-13&#xA;📝 Original message:&#xA;Hi Rene,&#xA;&#xA;thanks a lot for your contribution! This is exactly what I needed to&#xA;start coding again :) I intend to release a somewhat usable version of&#xA;your approach in lnd-manageJ [1] soon. Preliminary results indicate that&#xA;results (i.e. MPPs to try) can be computed in less than a second, which&#xA;is great!&#xA;&#xA;Important remark: my code can only be used for real MPPs once a usable&#xA;MPP gRPC call is made available, see lnd issue #5746 [2].&#xA;&#xA;While working on my implementation, a few questions came to mind:&#xA;&#xA;1) What&#39;s the reasoning behind combining parallel channels?&#xA;&#xA;I agree that parallel channels make things a lot more complicated, but I&#xA;also see the benefit from a node operator&#39;s point of view. That being&#xA;said, wouldn&#39;t it suffice to treat parallel channels individually?&#xA;&#xA;1.1) A payment of size 2 needs to be split into 1+1 to fit through&#xA;parallel channels of size 1+1. Combining the 1+1 channels into a virtual&#xA;channel of size 2 only complicates the code that has to do come up with&#xA;a MPP that doesn&#39;t over-saturate the actual channels. On the other hand,&#xA;I don&#39;t think the probability for the virtual channel of size 2 is more&#xA;realistic than reasoning about two individual channels and their&#xA;probabilities - but I didn&#39;t even try to see the math behind that.&#xA;Please prove me wrong? :)&#xA;&#xA;1.2) The Mission Control information provided by lnd can be used to&#xA;place a minimum available balance on each of the parallel channels. If&#xA;we know that node A isn&#39;t able to forward N sats to node B, we can treat&#xA;all parallel channels between A and B (in that direction) to have a&#xA;capacity of at most N-1 sats. How would this look like if we combined&#xA;the parallel channels into a virtual one? Note that it may still be&#xA;possible to route two individual payments/onions of size N-1 sats from A&#xA;to B, given two parallel channels with that many sats on A&#39;s side.&#xA;&#xA;2) Optimal Piecewise Linearization&#xA;&#xA;See Twitter [3].&#xA;&#xA;Is it worth it cutting a channel into pieces of different sizes, instead&#xA;of just having (as per your example) 5 pieces of the same size? If it&#xA;makes a noticeable difference, adding some complexity to the code might&#xA;be worth it.&#xA;&#xA;3) Size of Piecewise Linearization&#xA;&#xA;My gut feeling is that cutting a 1 BTC channel into 5 pieces is&#xA;different from cutting a 0.01 BTC channel into 5 pieces. Would it make&#xA;sense to use different values of N depending on the channel size?&#xA;&#xA;4) Leftovers after Piecewise Linearization&#xA;&#xA;If I cut some channel into N pieces, I might end up with up to N-1 sats&#xA;that don&#39;t end up in any of the N pieces, effectively making the channel&#xA;look smaller than it is. For smaller values of N that&#39;s obviously not an&#xA;issue (given the uncertainty we&#39;re dealing with), but it might be more&#xA;problematic if quantization is used with larger values. Any thoughts on&#xA;this?&#xA;&#xA;5) Fees (and other properties?)&#xA;&#xA;How can we integrate fees into the function? I must admit, I haven&#39;t&#xA;even thought about that, yet. A copy-paste answer would be great,&#xA;though! :) Maybe it&#39;s also a good idea to punish channels based on their&#xA;CLTV delta? Ratio of enabled channels? Age? Manual punishment score? ...&#xA;&#xA;6) Non-Zero Base Fee&#xA;&#xA;See Twitter [4].&#xA;&#xA;According to Stefan [5] it should be possible to integrate ZmnSCPxj&#39;s ideas&#xA;to make this work with non-zero base fees. How?&#xA;Simpler approach: Twitter [6].&#xA;&#xA;7) Private Channels&#xA;&#xA;[very niche topic, not really that interesting nor urgent]&#xA;&#xA;I&#39;m a fan of adding private channels to provide more outbound liquidity,&#xA;mainly to reduce gossip and hide my intentions. If my total liquidity to&#xA;some peer is below the amount announced in public channels, I don&#39;t see&#xA;any meaningful complication. However, I might have a public channel of&#xA;size N and several private channels bringing my local liquidity to some&#xA;value &gt;N. It&#39;s rather obvious that not announcing this fact is a bad&#xA;idea, as any #pickhardtpayments implementation would think I have 0-N on&#xA;my side of the channel(s). Assuming I&#39;m willing to accept this tradeoff,&#xA;do you see other complications or issues with hidden liquidity?&#xA;&#xA;My gut feeling is that this isn&#39;t an issue, at all, as channel balances&#xA;change all the time, which is something the algorithm already has to&#xA;deal with.&#xA;&#xA;8) Quality of Approximation&#xA;&#xA;There are some problems in computer science that are hard/impossible to&#xA;approximate, in the sense that any kind of deviation from the optimum&#xA;could cause the computed results to be extremely bad. Do you have some&#xA;idea (or proof) that your kind of approximation isn&#39;t causing a major&#xA;issue? I guess a piece-wise linearization with an infinite number of&#xA;pieces corresponds to the optimal result. Given a finite number of&#xA;pieces, how large is the difference to the optimum?&#xA;&#xA;Bye,&#xA;Carsten&#xA;&#xA;1: https://github.com/C-Otto/lnd-manageJ/issues/6&#xA;2: https://github.com/lightningnetwork/lnd/issues/5746&#xA;3: https://twitter.com/c_otto83/status/1502329970349248521&#xA;4: https://twitter.com/c_otto83/status/1502329271964033027&#xA;5: https://twitter.com/stefanwouldgo/status/1502681455918473217&#xA;6: https://twitter.com/c_otto83/status/1502330558793363464&#xA;-- &#xA;Dr. Carsten Otto&#xA;carsten at c-otto.de&#xA;https://c-otto.de&#xA;-------------- next part --------------&#xA;A non-text attachment was scrubbed...&#xA;Name: signature.asc&#xA;Type: application/pgp-signature&#xA;Size: 195 bytes&#xA;Desc: not available&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20220313/1437e67a/attachment.sig&gt;</html></oembed>