From ZmnSCPxj at protonmail.com Thu Nov 22 08:20:20 2018 From: ZmnSCPxj at protonmail.com (ZmnSCPxj) Date: Thu, 22 Nov 2018 08:20:20 +0000 Subject: [Lightning-dev] Base AMP In-Reply-To: <87pnuyniza.fsf@rustcorp.com.au> References: <87a7maf7jh.fsf@gmail.com> <2GH68_8IDCnzwQUhLoqLVrLZSXXP5jZYM5GLwEsV0CMVL_qvZQpliKI1ng0dmCPA-dlWnFRUuWJV7OQMsoFd-kwDzCGmk27H4dqYV1RPJhc=@protonmail.com> <20181116154527.25adgchhfsz7aa43@erisian.com.au> <87va4rp91k.fsf@rustcorp.com.au> <87pnuyniza.fsf@rustcorp.com.au> Message-ID: Good morning Rusty, Okay, I shall modify pull request as you suggested. Regards, ZmnSCPxj Sent with ProtonMail Secure Email. ??????? Original Message ??????? On Thursday, November 22, 2018 6:50 AM, Rusty Russell wrote: > ZmnSCPxj ZmnSCPxj at protonmail.com writes: > > > Good morning Rusty, > > > > > And do not play with `amount_to_forward`, as it's an important > > > signal to the final node that the previous node did not offer less value > > > for the HTLC than it was supposed to. (You could steal the top bit to > > > signal partial payment if you really want to). > > > > If `incomplete_payment` flag is set, then final nodes must claim HTLCs only if: > > > > sum(incoming_htlc_amt) >= amt_to_pay > > > > No, because now you've lost assurance that thisparticular HTLC hasn't > been skimmed by the previous node. > > ie. if I suspect a payment is using Base-AMP (and that's pretty clear if > I see two identical payment_hashes), I can reduce the amount I offer in > the outgoing HTLC to 1 satoshi: if it doesn't fail immediately, the next > hop is the final destination. > > > Where `sum(incoming_htlc_amt)` is the total `incoming_htlc_amt` for all incoming HTLCs terminating at this final node with the same `payment_hash`. > > But it's unnecessary for the recipient to know the total amount I meant > to pay; they just need to return the receipt once it exceeds the amount > they want. > > Cheers, > Rusty.