<oembed><type>rich</type><version>1.0</version><title>Conner Fromknecht [ARCHIVE] wrote</title><author_name>Conner Fromknecht [ARCHIVE] (npub1za…uua2a)</author_name><author_url>https://yabu.me/npub1za0a9afyj7um5feva0d5xmhfsah3zxm252hna2duq0numa952frqvuua2a</author_url><provider_name>njump</provider_name><provider_url>https://yabu.me</provider_url><html>📅 Original date posted:2018-11-13&#xA;📝 Original message:&#xA;Good morning all,&#xA;&#xA;&gt; MUST NOT forward (if an intermediate node) or claim (if the final node) unless&#xA;&gt; it has received a total greater or equal to `intended_total_payment` in all&#xA;&gt; incoming HTLCs for the same `payment_hash`.&#xA;&#xA;I was under the impression that this would not require changes on behalf of the&#xA;intermediaries, and only need to be implemented by the sender and receiver?&#xA;If not, then nodes would need to advertise that they support this so that the&#xA;sender can be sure to route through the subset of nodes that support it.&#xA;&#xA;Either way, it would seem that this constraint can only be accurately enforced&#xA;by the receiver. If any partial payments fail, then the `intended_total_payment`&#xA;through an intermediary may never arise and the payment would be held. This&#xA;would also seem to exclude the possibility of iterative path finding, since the&#xA;entire payment flow must be known up front during onion packet construction.&#xA;&#xA;Seems the proposal still works without the intermediaries needing to know this?&#xA;&#xA;We may want to add that the receiver:&#xA;* SHOULD fail the payment if `intended_total_payment` is less than the invoice&#xA;   amount&#xA;&#xA;&gt; I&#39;m wondering, since these payments are no longer atomic, should we name it&#xA;&gt; accordingly?&#xA;&#xA;Indeed this true. Perhaps NAMP or CPHR (Concurrent Payment Hash Re-use) are more&#xA;accurate and may avoid confusion?&#xA;&#xA;Cheers,&#xA;Conner&#xA;On Tue, Nov 13, 2018 at 8:33 AM Johan Torås Halseth &lt;johanth at gmail.com&gt; wrote:&#xA;&gt;&#xA;&gt; Good evening Z and list,&#xA;&gt;&#xA;&gt; I&#39;m wondering, since these payments are no longer atomic, should we name it accordingly?&#xA;&gt;&#xA;&gt; Cheers,&#xA;&gt; Johan&#xA;&gt;&#xA;&gt; On Tue, Nov 13, 2018 at 1:28 PM ZmnSCPxj via Lightning-dev &lt;lightning-dev at lists.linuxfoundation.org&gt; wrote:&#xA;&gt;&gt;&#xA;&gt;&gt; Good morning list,&#xA;&gt;&gt;&#xA;&gt;&gt; I propose the below to support Base AMP.&#xA;&gt;&gt;&#xA;&gt;&gt; The below would allow arbitrary merges of paths, but not arbitrary splits.  I am uncertain about the safety of arbitrary splits.&#xA;&gt;&gt;&#xA;&gt;&gt; ### The `multipath_merge_per_hop` type (`option_base_amp`)&#xA;&gt;&gt;&#xA;&gt;&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;&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;&gt;&#xA;&gt;&gt; 1. type: 1 (`termination_per_hop`)&#xA;&gt;&gt; 2. data:&#xA;&gt;&gt;   * [`8` : `short_channel_id`]&#xA;&gt;&gt;   * [`8` : `amt_to_forward`]&#xA;&gt;&gt;   * [`4` : `outgoing_cltv_value`]&#xA;&gt;&gt;   * [`8` : `intended_total_payment`]&#xA;&gt;&gt;   * [`4` : `zeros`]&#xA;&gt;&gt;&#xA;&gt;&gt; The contents of this hop will be the same across all paths of the Base AMP.&#xA;&gt;&gt; The `payment_hash` of the incoming HTLCs will also be the same across all paths of the Base AMP.&#xA;&gt;&gt;&#xA;&gt;&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;&gt;&#xA;&gt;&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;&gt;&#xA;&gt;&gt; The receiver:&#xA;&gt;&gt;&#xA;&gt;&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;&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;&gt;&#xA;&gt;&gt; The sender:&#xA;&gt;&gt;&#xA;&gt;&gt; * MUST use the same `payment_hash` for all paths of a single multipath payment.&#xA;&gt;&gt;&#xA;&gt;&gt; Regards,&#xA;&gt;&gt; ZmnSCPxj&#xA;&gt;&gt; _______________________________________________&#xA;&gt;&gt; Lightning-dev mailing list&#xA;&gt;&gt; Lightning-dev at lists.linuxfoundation.org&#xA;&gt;&gt; https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&#xA;&gt;&#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>