Rusty Russell [ARCHIVE] on Nostr: 📅 Original date posted:2019-11-06 📝 Original message: Olaoluwa Osuntokun ...
📅 Original date posted:2019-11-06
📝 Original message:
Olaoluwa Osuntokun <laolu32 at gmail.com> writes:
> Hi Rusty,
>
> Agreed w.r.t the need for prepaid HTLCS, I've been mulling over other
> alternatives for a few years now, and none of them seems to resolve the
> series of routing related incentive issues that prepaid HTLCs would.
>
>> Since both Offers and Joost's WhatSat are looking at sending messages,
>> it's time to float actual proposals.
>
> IMO both should just be done over HORNET, so we don't need introduce a new
> set of internal protocol level messages whenever we have some new
> control/signalling need. Instead, we'd have a control/signal channel (give
> me
> routes, invoices, sign this, etc), and a payment channel (HTLCs as used
> today).
I'm not so sure, as I don't think we're going to actually use each one
more than once or twice?
I mean, we could stream movies through LN, but I think that's an added
service, which would be best done by HORNET.
>> 2. Adding an HTLC causes a *push* of a number of msat on commitment_signed
>> (new field), and a hash.
>
> The prepay amount should be signalled in the update add message instead.
> This lets HTLCs carry a heterogeneous set of prepay amounts. In addition, we
> need a new onion field as well to signal the incoming amount the node
> _should_ have received (allows them to detect deviations in the sender's
> intended route).
Sorry, brain fart: it's a new field in the update_add_htlc of course.
I just, um, added that to make sure you were all reading carefully! :_
>> 3. Failing/succeeding an HTLC returns some of those msat, and a count and
>> preimage (new fields).
>
> Failing shouldn't return the prepay amount, otherwise extending long lived
> HTLCs then cancelling them at the last minute is still costless. This
> costlessness of _adding_ an HTLC to a _remote_ commitment is IMO, the
> biggest incentive flaw that exists today in the greater routing network.
No, that's type (liquidity) 3 spam, which needs a completely different
solution.
Definitely needs fixing, but up-front fees don't do it (except in the
case where you might want to indicate you're *going* to have a long-held
HTLC, where you'd pay additional up-front, but that's future work).
>> You get to keep 50 msat[1] per preimage you present[2].
>
> We should avoid introducing any new constants to the protocol, as they're
> typically dreamed up independent of any empirical lessons learned from
> deployment.
OTOH, we should avoid creating more complex knobs for users, since the
complexity of the protocol is becoming unmanagable. I think we did this
too much with v1, so instead of getting empirical data we got defaults
which in practice are unspecified specifications.
I like a flat value to start, since it's easy to implement and deploy.
> On the topic of the prepay cost, the channel update message should be
> extended to allow nodes to signal prepay costs similar to the way we handle
> regular payment success fees. In order to eliminate a number of costless
> attacks possible today on the routing network, nodes should also be able to
> signal a new coefficient used to _scale_ the prepay fee as a function of the
> CLTV value of the incoming HTLC.
... and HTLC amount, surely? That becomes a pretty complex tuning
parameter.
I think we should directly target type 3 spam through a separate
mechanism (as discussed previously). This is just to prevent quantity
of messages.
> With this addition, senders need to pay to
> _add_ an HTLC to a remote commitment transaction (fixed base cost), then
> also need to pay a variable rate that scales with the duration of the
> proposed outgoing CLTV value (senders ofc don't prepay to themselves). Once
> we introduce this, loop attacks and the like are no longer free to launch,
> and nodes can dynamically respond to congestion in the network by raising
> their prepay prices.
I disagree; you should signal with normal fees, not prepay. Otherwise
we're increasing fees at a time that success rates are lowering, which
makes the incentive misalightment far more promiment :(
Cheers,
Rusty.
Published at
2023-06-09 12:57:11Event JSON
{
"id": "791260f50ed1bc44bbe605ee64ce05f54747ece3f1325114df965eed41301295",
"pubkey": "13bd8c1c5e3b3508a07c92598647160b11ab0deef4c452098e223e443c1ca425",
"created_at": 1686315431,
"kind": 1,
"tags": [
[
"e",
"0c91e21e034533f122e94b0fd3031654ae905512e27a1262e64ae8c7923a76b8",
"",
"root"
],
[
"e",
"11596355c54b70ae97ee5fa41ab007c92d89915c9b3ec41b63df71fe577bba9c",
"",
"reply"
],
[
"p",
"2df3fc2660459521b852c995d4fc1a93938389a5e085677d0ebb33ef92cc5476"
]
],
"content": "📅 Original date posted:2019-11-06\n📝 Original message:\nOlaoluwa Osuntokun \u003claolu32 at gmail.com\u003e writes:\n\u003e Hi Rusty,\n\u003e\n\u003e Agreed w.r.t the need for prepaid HTLCS, I've been mulling over other\n\u003e alternatives for a few years now, and none of them seems to resolve the\n\u003e series of routing related incentive issues that prepaid HTLCs would.\n\u003e\n\u003e\u003e Since both Offers and Joost's WhatSat are looking at sending messages,\n\u003e\u003e it's time to float actual proposals.\n\u003e\n\u003e IMO both should just be done over HORNET, so we don't need introduce a new\n\u003e set of internal protocol level messages whenever we have some new\n\u003e control/signalling need. Instead, we'd have a control/signal channel (give\n\u003e me\n\u003e routes, invoices, sign this, etc), and a payment channel (HTLCs as used\n\u003e today).\n\nI'm not so sure, as I don't think we're going to actually use each one\nmore than once or twice?\n\nI mean, we could stream movies through LN, but I think that's an added\nservice, which would be best done by HORNET.\n\n\u003e\u003e 2. Adding an HTLC causes a *push* of a number of msat on commitment_signed\n\u003e\u003e (new field), and a hash.\n\u003e\n\u003e The prepay amount should be signalled in the update add message instead.\n\u003e This lets HTLCs carry a heterogeneous set of prepay amounts. In addition, we\n\u003e need a new onion field as well to signal the incoming amount the node\n\u003e _should_ have received (allows them to detect deviations in the sender's\n\u003e intended route).\n\nSorry, brain fart: it's a new field in the update_add_htlc of course.\n\nI just, um, added that to make sure you were all reading carefully! :_\n\n\u003e\u003e 3. Failing/succeeding an HTLC returns some of those msat, and a count and\n\u003e\u003e preimage (new fields).\n\u003e\n\u003e Failing shouldn't return the prepay amount, otherwise extending long lived\n\u003e HTLCs then cancelling them at the last minute is still costless. This\n\u003e costlessness of _adding_ an HTLC to a _remote_ commitment is IMO, the\n\u003e biggest incentive flaw that exists today in the greater routing network.\n\nNo, that's type (liquidity) 3 spam, which needs a completely different\nsolution.\n\nDefinitely needs fixing, but up-front fees don't do it (except in the\ncase where you might want to indicate you're *going* to have a long-held\nHTLC, where you'd pay additional up-front, but that's future work).\n\n\u003e\u003e You get to keep 50 msat[1] per preimage you present[2].\n\u003e\n\u003e We should avoid introducing any new constants to the protocol, as they're\n\u003e typically dreamed up independent of any empirical lessons learned from\n\u003e deployment.\n\nOTOH, we should avoid creating more complex knobs for users, since the\ncomplexity of the protocol is becoming unmanagable. I think we did this\ntoo much with v1, so instead of getting empirical data we got defaults\nwhich in practice are unspecified specifications.\n\nI like a flat value to start, since it's easy to implement and deploy.\n\n\u003e On the topic of the prepay cost, the channel update message should be\n\u003e extended to allow nodes to signal prepay costs similar to the way we handle\n\u003e regular payment success fees. In order to eliminate a number of costless\n\u003e attacks possible today on the routing network, nodes should also be able to\n\u003e signal a new coefficient used to _scale_ the prepay fee as a function of the\n\u003e CLTV value of the incoming HTLC.\n\n... and HTLC amount, surely? That becomes a pretty complex tuning\nparameter.\n\nI think we should directly target type 3 spam through a separate\nmechanism (as discussed previously). This is just to prevent quantity\nof messages.\n\n\u003e With this addition, senders need to pay to\n\u003e _add_ an HTLC to a remote commitment transaction (fixed base cost), then\n\u003e also need to pay a variable rate that scales with the duration of the\n\u003e proposed outgoing CLTV value (senders ofc don't prepay to themselves). Once\n\u003e we introduce this, loop attacks and the like are no longer free to launch,\n\u003e and nodes can dynamically respond to congestion in the network by raising\n\u003e their prepay prices.\n\nI disagree; you should signal with normal fees, not prepay. Otherwise\nwe're increasing fees at a time that success rates are lowering, which\nmakes the incentive misalightment far more promiment :(\n\nCheers,\nRusty.",
"sig": "68899c3a5eb840d59f68626c58f2fcc819ec843c2e069be3eeed06abf5e3e54f349bde1bacced8a6222b812ba81388747a140fbee17e37371c2a441f7e887749"
}