<oembed><type>rich</type><version>1.0</version><title>Joost Jager [ARCHIVE] wrote</title><author_name>Joost Jager [ARCHIVE] (npub1as…wfqmx)</author_name><author_url>https://yabu.me/npub1aslmpzentw224n3s6yccru4dq2qdlx7rfudfnqevfck637cjt6esswfqmx</author_url><provider_name>njump</provider_name><provider_url>https://yabu.me</provider_url><html>📅 Original date posted:2019-11-06&#xA;📝 Original message:&#xA;In my opinion, the prepayment should be a last resort. It does take away&#xA;some of the attractiveness of the Lightning Network. Especially if you need&#xA;to make many payment attempts over long routes, the tiny prepays do add up.&#xA;For a $10 payment, it&#39;s probably nothing to worry about. But for&#xA;micro-payments this can become prohibitively expensive. And it is exactly&#xA;the micro-payment use case where Lightning outshines other payment systems.&#xA;A not yet imagined micro-payment based service could even be the launchpad&#xA;to world domination. So I think we should be very careful with interfering&#xA;with that potential.&#xA;&#xA;Isn&#39;t spam something that can also be addressed by using rate limits for&#xA;failures? If all relevant nodes on the network employ rate limits, they can&#xA;isolate the spammer and diminish their disruptive abilities. If a node sees&#xA;that its outgoing htlc packets stack up, it can reduce the incoming flow on&#xA;the channels where the htlcs originate from. Large routing nodes could&#xA;agree with their peers on service levels that define these rate limits.&#xA;&#xA;Joost&#xA;&#xA;On Tue, Nov 5, 2019 at 3:25 AM Rusty Russell &lt;rusty at rustcorp.com.au&gt; wrote:&#xA;&#xA;&gt; Hi all,&#xA;&gt;&#xA;&gt;         It&#39;s been widely known that we&#39;re going to have to have up-front&#xA;&gt; payments for msgs eventually, to avoid Type 2 spam (I think of Type 1&#xA;&gt; link-local, Type 2 though multiple nodes, and Type 3 liquidity-using&#xA;&gt; spam).&#xA;&gt;&#xA;&gt;         Since both Offers and Joost&#39;s WhatSat are looking at sending&#xA;&gt; messages, it&#39;s time to float actual proposals.  I&#39;ve been trying to come&#xA;&gt; up with something for several years now, so thought I&#39;d present the best&#xA;&gt; I&#39;ve got in the hope that others can improve on it.&#xA;&gt;&#xA;&gt; 1. New feature bit, extended messages, etc.&#xA;&gt; 2. Adding an HTLC causes a *push* of a number of msat on&#xA;&gt;    commitment_signed (new field), and a hash.&#xA;&gt; 3. Failing/succeeding an HTLC returns some of those msat, and a count&#xA;&gt;    and preimage (new fields).&#xA;&gt;&#xA;&gt; How many msat can you take for forwarding?  That depends on you&#xA;&gt; presenting a series of preimages (which chain into a final hash given in&#xA;&gt; the HTLC add), which you get by decoding the onion.  You get to keep 50&#xA;&gt; msat[1] per preimage you present[2].&#xA;&gt;&#xA;&gt; So, how many preimages does the user have to give to have you forward&#xA;&gt; the payment?  That depends.  The base rate is 16 preimages, but subtract&#xA;&gt; one for each leading 4 zero bits of the SHA256(blockhash | hmac) of the&#xA;&gt; onion.  The blockhash is the hash of the block specified in the onion:&#xA;&gt; reject if it&#39;s not in the last 3 blocks[3].&#xA;&gt;&#xA;&gt; This simply adds some payment noise, while allowing a hashcash style&#xA;&gt; tradeoff of sats for work.&#xA;&gt;&#xA;&gt; The final node gets some variable number of preimages, which adds noise.&#xA;&gt; It should take all and subtract from the minimum required invoice amount&#xA;&gt; on success, or take some random number on failure.&#xA;&gt;&#xA;&gt; This leaks some forward information, and makes an explicit tradeoff for&#xA;&gt; the sender between amount spent and privacy, but it&#39;s the best I&#39;ve been&#xA;&gt; able to come up with.&#xA;&gt;&#xA;&gt; Thoughts?&#xA;&gt; Rusty.&#xA;&gt;&#xA;&gt; [1] If we assume $1 per GB, $10k per BTC and 64k messages, we get about&#xA;&gt;     655msat per message.  Flat pricing for simplicity; we&#39;re trying to&#xA;&gt;     prevent spam, not create a spam market.&#xA;&gt; [2] Actually, a number and a single preimage; you can check this is&#xA;&gt;     indeed the n&#39;th preimage.&#xA;&gt; [3] This reduces incentive to grind the damn things in advance, though&#xA;&gt;     maybe that&#39;s dumb?  We can also use a shorter hash (siphash?), or&#xA;&gt;     even truncated SHA256 (128 bits).&#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&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20191106/5bbc081f/attachment.html&gt;</html></oembed>