<oembed><type>rich</type><version>1.0</version><author_name>npub1wtx5qvewc7pd6znlvwktq03mdld05mv3h5dkzfwd3dc30gdmsptsugtuyn</author_name><author_url>https://nostr.ae/npub1wtx5qvewc7pd6znlvwktq03mdld05mv3h5dkzfwd3dc30gdmsptsugtuyn</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2017-12-28&#xA;📝 Original message:&#xA;Mark Friedenbach &lt;mark at friedenbach.org&gt; writes:&#xA;&gt; Splitting a single payment into multiple invoices has bad semantic&#xA;&gt; properties. Beyond implementation difficulties it also makes the&#xA;&gt; payment no longer atomic. You can end up in a situation where part of&#xA;&gt; a transaction has gone through but then channel capacity has been&#xA;&gt; exhausted. The. What do you do?&#xA;&#xA;We are indeed working on a solution for multipath payments, and they are&#xA;pretty simple to implement if the sender and recipient know how to&#xA;handle them. Re-use the same HTLC secret along all paths and the&#xA;atomicity is re-established. The only blocker is that it increases&#xA;complexity on the recipient, e.g., how do I tell whether the partial&#xA;payment is all I&#39;ll ever get, or whether there is more incoming, when do&#xA;I abort waiting, and similar concerns. That&#39;s the reason it didn&#39;t make&#xA;it into the v1.0 spec, but we are confident that it&#39;ll be added soon.&#xA;&#xA;It is technically already possible to do so, if you hack together the&#xA;recipient node to wait for all parts of the payment before releasing the&#xA;secret. No need for multiple invoices.&#xA;&#xA;&gt; While an annoying (and potentially exploitable) edge case for&#xA;&gt; payments, it also makes it basically impossible in practice to build&#xA;&gt; higher level smart contracts on top of lightning channels as&#xA;&gt; primitives, since those constructs typically use a single HTLC&#xA;&gt; revelation as the decision gate between multiple contingent outcomes.&#xA;&#xA;Absolutely, that&#39;s why we want to have the payment contingent on a&#xA;single secret, or on secrets that can be derived from one another.&#xA;&#xA;&gt; I had always assumed the protocol limits were training wheels, and&#xA;&gt; would be shocked and dismayed if that were not the case (and would&#xA;&gt; immediately begin work on an alternative fork because such limits&#xA;&gt; would make lightning useless for my intended applications).&#xA;&#xA;They are training wheels, we just decided for our own implementations&#xA;that we want to limit individual potential losses due to bugs. It is&#xA;trivial to change that on a per-channel level, and we have all the&#xA;pieces in place to perform an upgrade using the feature bits, no need to&#xA;fork lightning just yet :-) You just need to agree on using larger&#xA;amounts with your peer, on the peer layer, there is nothing preventing&#xA;the use of large channels in the multi-hop layer.&#xA;&#xA;HTH,&#xA;Christian</html></oembed>