<oembed><type>rich</type><version>1.0</version><title>Christian Decker [ARCHIVE] wrote</title><author_name>Christian Decker [ARCHIVE] (npub1wt…gtuyn)</author_name><author_url>https://yabu.me/npub1wtx5qvewc7pd6znlvwktq03mdld05mv3h5dkzfwd3dc30gdmsptsugtuyn</author_url><provider_name>njump</provider_name><provider_url>https://yabu.me</provider_url><html>📅 Original date posted:2018-11-15&#xA;📝 Original message:&#xA;I&#39;m not sure this is an improvement at all over just allowing a single&#xA;merge-point, i.e., the destination. You see as long as we don&#39;t attempt&#xA;intermediate merges the routes are independent and failures of one HTLC&#xA;do not impact any other parts. Take for example the network below:&#xA;&#xA;  --------&#xA; /        \&#xA;A----B-----C-----D&#xA;\               /&#xA; -------E-------&#xA;&#xA;For simplicity let&#39;s assume unit capacities on all channels except C-D&#xA;and a total payment of 2 from A to D.&#xA;&#xA;If we use C as a merge point for the two partial payments A-C-D and&#xA;A-B-C-D, then C can only forward if both partial payment succeed, i.e.,&#xA;if for example A-C fails then we&#39;ll need to tear down the HTLCs for both&#xA;paths because it&#39;ll no longer be possible to find an alternative route&#xA;to fulfill the forwarding of 2 over C-D.&#xA;&#xA;If however we have two independent routes A-B-C-D and A-C-D, then A-C-D&#xA;can fail independently and we can recover by attempting A-E-D, no need&#xA;to touch A-B-C-D at all.&#xA;&#xA;Overall it seems we get very little benefit (we save some HTLC setups&#xA;and teardown) for a lot of added complexity. In the above case we would&#xA;have saved on a single C-D HTLC, and the cost of doing so is many times&#xA;larger (2 HTLCs needed to be torn down because we could no longer pass&#xA;enough capacity to C in order for it to reach the forward threshold).&#xA;&#xA;Let&#39;s please stick with the simple mechanism of having the recipient be&#xA;the only merge point.&#xA;&#xA;Cheers,&#xA;Christian&#xA;&#xA;ZmnSCPxj via Lightning-dev &lt;lightning-dev at lists.linuxfoundation.org&gt;&#xA;writes:&#xA;&gt; Good morning list,&#xA;&gt;&#xA;&gt; I propose the below to support Base AMP.&#xA;&gt;&#xA;&gt; The below would allow arbitrary merges of paths, but not arbitrary splits.  I am uncertain about the safety of arbitrary splits.&#xA;&gt;&#xA;&gt; ### The `multipath_merge_per_hop` type (`option_base_amp`)&#xA;&gt;&#xA;&gt; This indicates that payment has been split by the sender using Base AMP, and that the receiver should wait for the total intended payment before forwarding or claiming the payment.&#xA;&gt; In case the receiving node is not the last node in the path, then succeeding hops MUST be the same across all splits.&#xA;&gt;&#xA;&gt; 1. type: 1 (`termination_per_hop`)&#xA;&gt; 2. data:&#xA;&gt;   * [`8` : `short_channel_id`]&#xA;&gt;   * [`8` : `amt_to_forward`]&#xA;&gt;   * [`4` : `outgoing_cltv_value`]&#xA;&gt;   * [`8` : `intended_total_payment`]&#xA;&gt;   * [`4` : `zeros`]&#xA;&gt;&#xA;&gt; The contents of this hop will be the same across all paths of the Base AMP.&#xA;&gt; The `payment_hash` of the incoming HTLCs will also be the same across all paths of the Base AMP.&#xA;&gt;&#xA;&gt; `intended_total_payment` is the total amount of money that this node should expect to receive in all incoming paths to the same `payment_hash`.&#xA;&gt;&#xA;&gt; This may be the last hop of a payment onion, in which case the `HMAC` for this hop will be `0` (the same rule as for `per_hop_type` 0).&#xA;&gt;&#xA;&gt; The receiver:&#xA;&gt;&#xA;&gt; * MUST impose a reasonable timeout for waiting to receive all component paths, and fail all incoming HTLC offers for the `payment_hash`  if they have not totalled equal to `intended_total_payment`.&#xA;&gt; * MUST NOT forward (if an intermediate node) or claim (if the final node) unless it has received a total greater or equal to `intended_total_payment` in all incoming HTLCs for the same `payment_hash`.&#xA;&gt;&#xA;&gt; The sender:&#xA;&gt;&#xA;&gt; * MUST use the same `payment_hash` for all paths of a single multipath payment.&#xA;&gt;&#xA;&gt; Regards,&#xA;&gt; ZmnSCPxj&#xA;&gt; _______________________________________________&#xA;&gt; Lightning-dev mailing list&#xA;&gt; Lightning-dev at lists.linuxfoundation.org&#xA;&gt; https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev</html></oembed>