ZmnSCPxj [ARCHIVE] on Nostr: 📅 Original date posted:2018-11-21 📝 Original message: Good morning Rusty, > And ...
📅 Original date posted:2018-11-21
📝 Original message:
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).
I do not view this as playing with the existing `amt_to_forward`, but rather retaining its previous use.
If it helps, we can rewrite the *current* pre-AMP spec as below:
2. data:
...
* [`8` : `amt_to_forward` / `amt_to_pay`]
...
* `amt_to_forward` - for **non-final** nodes, this is the value to forward to the next node.
Non-final nodes MUST check:
incoming_htlc_amt - fee >= amt_to_forward
* `amt_to_pay` - for **final** nodes, this is the value that is intended to reach it.
Final nodes MUST check:
incoming_htlc_amt >= amt_to_pay
Then for Base AMP:
* `amt_to_pay` - for **final** nodes, this is the total value that is intended to reach it.
If `incomplete_payment` flag is not set, final nodes MUST check:
incoming_htlc_amt >= amt_to_pay
If `incomplete_payment` flag is set, then final nodes must claim HTLCs only if:
sum(incoming_htlc_amt) >= amt_to_pay
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`.
Now perhaps we can argue that for AMP we should have two fields `amt_to_pay_for_this_partial_payment` and `amt_to_pay_for_total_payment` instead.
Regards,
ZmnSCPxj
Published at
2023-06-09 12:52:45Event JSON
{
"id": "4efa85663b4b6e3e8bb9b816fcc7ead75ee5aeb6feb4d0637730968fa9e0de33",
"pubkey": "4505072744a9d3e490af9262bfe38e6ee5338a77177b565b6b37730b63a7b861",
"created_at": 1686315165,
"kind": 1,
"tags": [
[
"e",
"809f1a75998ec1e3eebcb7a31f0cc9fe5473d678fb16cc9dfe25f3232ec33478",
"",
"root"
],
[
"e",
"70cc358371b04262739131af9297e47063f48f1bf7f534990b6ec391f98b783c",
"",
"reply"
],
[
"p",
"13bd8c1c5e3b3508a07c92598647160b11ab0deef4c452098e223e443c1ca425"
]
],
"content": "📅 Original date posted:2018-11-21\n📝 Original message:\nGood morning Rusty,\n\n\u003e And do not play with `amount_to_forward`, as it's an important\n\u003e signal to the final node that the previous node did not offer less value\n\u003e for the HTLC than it was supposed to. (You could steal the top bit to\n\u003e signal partial payment if you really want to).\n\nI do not view this as playing with the existing `amt_to_forward`, but rather retaining its previous use.\n\nIf it helps, we can rewrite the *current* pre-AMP spec as below:\n\n2. data:\n ...\n * [`8` : `amt_to_forward` / `amt_to_pay`]\n\n...\n\n* `amt_to_forward` - for **non-final** nodes, this is the value to forward to the next node.\n Non-final nodes MUST check:\n\n incoming_htlc_amt - fee \u003e= amt_to_forward\n\n* `amt_to_pay` - for **final** nodes, this is the value that is intended to reach it.\n Final nodes MUST check:\n\n incoming_htlc_amt \u003e= amt_to_pay\n\nThen for Base AMP:\n\n* `amt_to_pay` - for **final** nodes, this is the total value that is intended to reach it.\n If `incomplete_payment` flag is not set, final nodes MUST check:\n\n incoming_htlc_amt \u003e= amt_to_pay\n\n If `incomplete_payment` flag is set, then final nodes must claim HTLCs only if:\n\n sum(incoming_htlc_amt) \u003e= amt_to_pay\n\n 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`.\n\n\n\nNow perhaps we can argue that for AMP we should have two fields `amt_to_pay_for_this_partial_payment` and `amt_to_pay_for_total_payment` instead.\n\n\nRegards,\nZmnSCPxj",
"sig": "60e6260199c71b9200945cd2e6d8a04bd0b1267ba4c641c9cde0910f9c3b36f525093163be7cc3570d116ad28f6fda8a8391f09831d461219a3ac05327bf01b8"
}