<oembed><type>rich</type><version>1.0</version><title>Bastien TEINTURIER [ARCHIVE] wrote</title><author_name>Bastien TEINTURIER [ARCHIVE] (npub17f…ntr0s)</author_name><author_url>https://yabu.me/npub17fjkngg0s0mfx4uhhz6n4puhflwvrhn2h5c78vdr5xda4mvqx89swntr0s</author_url><provider_name>njump</provider_name><provider_url>https://yabu.me</provider_url><html>📅 Original date posted:2019-11-22&#xA;📝 Original message:&#xA;I think there&#39;s another alternative than upfront payments to prevent spam,&#xA;which is maybe less&#xA;controversial (but potentially less effective as well - to be investigated).&#xA;&#xA;Why not adapt what has been done with email spam and PoW/merkle puzzles?&#xA;The high-level idea would be that the sender must solve a small PoW puzzle *for&#xA;each intermediate *&#xA;*node *and communicate the solution in the onion.&#xA;There are many ways we could do that (a new field in each intermediate hop,&#xA;grinding an HMAC&#xA;prefix, etc) so before going into specifics I only wanted to submit the&#xA;high-level idea.&#xA;What&#39;s neat with this is that it&#39;s simple, doesn&#39;t leak any privacy, and&#xA;avoids having to create a&#xA;node reputation system.&#xA;&#xA;We fight spam by forcing the sender to use some resources (instead of sats).&#xA;Maybe this idea has already been proposed and broken, if that&#39;s the case&#xA;I&#39;d love to see the&#xA;discussion if someone can surface it.&#xA;&#xA;Cheers,&#xA;Bastien&#xA;&#xA;Le lun. 11 nov. 2019 à 00:32, Rusty Russell &lt;rusty at rustcorp.com.au&gt; a&#xA;écrit :&#xA;&#xA;&gt; Anthony Towns &lt;aj at erisian.com.au&gt; writes:&#xA;&gt; &gt; On Fri, Nov 08, 2019 at 01:08:04PM +1030, Rusty Russell wrote:&#xA;&gt; &gt;&gt; Anthony Towns &lt;aj at erisian.com.au&gt; writes:&#xA;&gt; &gt;&gt; [ Snip summary, which is correct ]&#xA;&gt; &gt;&#xA;&gt; &gt; Huzzah!&#xA;&gt; &gt;&#xA;&gt; &gt; This correlates all the hops in a payment when the route reaches its end&#xA;&gt; &gt; (due to the final preimage getting propogated back for everyone to&#xA;&gt; justify&#xA;&gt; &gt; the funds they claim). Maybe solvable by converting from hashes to ECC&#xA;&gt; &gt; as the trapdoor function?&#xA;&gt;&#xA;&gt; I hadn&#39;t thought of this, but yes, once we&#39;ve eliminated the trivial&#xA;&gt; preimage correlation w/scriptless scripts it&#39;d be a shame to reintroduce&#xA;&gt; it here.&#xA;&gt;&#xA;&gt; We need an accumulator with some strange properties though:&#xA;&gt;&#xA;&gt; 1. Alice provides tokens and a base accumulator.&#xA;&gt; 2. Bob et. al can add these tokens to the accumulator.&#xA;&gt; 3. They can tell if invalid tokens have been added to the accumulator.&#xA;&gt; 4. They can tell how many tokens (alt: each token has a value and they&#xA;&gt;    can tell the value sum) have been added.&#xA;&gt; 5. They can&#39;t tell what tokens have been added (unless they know all&#xA;&gt;    the tokens, which is trivial).&#xA;&gt;&#xA;&gt; Any ideas?&#xA;&gt;&#xA;&gt; &gt; The refund amount propogating back also reveals the path, probably.&#xA;&gt; &gt; Could that be obfusticated by somehow paying each intermediate node&#xA;&gt; &gt; both as the funds go out and come back, so the refund decreases on the&#xA;&gt; &gt; way back?&#xA;&gt; &gt;&#xA;&gt; &gt; Oh, can we make the amounts work like the onion, where it stays constant?&#xA;&gt; &gt; So:&#xA;&gt; &gt;&#xA;&gt; &gt;   Alice wants to pay Dave via Bob, Carol. Bob gets 700 msat, Carol gets&#xA;&gt; &gt;   400 msat, Dave gets 300 msat, and Alice gets 100 msat refunded.&#xA;&gt; &gt;&#xA;&gt; &gt;   Success:&#xA;&gt; &gt;     Alice forwards 1500 msat to Bob   (-1500, +1500, 0, 0)&#xA;&gt; &gt;     Bob forwards 1500 msat to Carol   (-1500, 0, +1500, 0)&#xA;&gt; &gt;     Carol forwards 1500 msat to Dave  (-1500, 0, 0, +1500)&#xA;&gt; &gt;     Dave refunds 1200 msat to Carol   (-1500, 0, +1200, +300)&#xA;&gt; &gt;     Carol refunds 800 msat to Bob     (-1500, +800, +400, +300)&#xA;&gt; &gt;     Bob refunds 100 msat to Alice     (-1400, +700, +400, +300)&#xA;&gt;&#xA;&gt; Or, on success, upfront payment is fully refunded or not refunded at all&#xA;&gt; (since they get paid by normal fees)?  Either way, no data leak for that&#xA;&gt; case.&#xA;&gt;&#xA;&gt; &gt;   Clean routing failure at Carol/Dave:&#xA;&gt; &gt;     Alice forwards 1500 msat to Bob   (-1500, +1500, 0, 0)&#xA;&gt; &gt;     Bob forwards 1500 msat to Carol   (-1500, 0, +1500, 0)&#xA;&gt; &gt;     Carol says Dave&#39;s not talking&#xA;&gt; &gt;     Carol refunds 1100 msat to Bob    (-1500, +1100, +400, 0)&#xA;&gt; &gt;     Bob refunds 400 msat to Alice     (-1100, +700, +400, 0)&#xA;&gt; &gt;&#xA;&gt; &gt; I think that breaks the correlation pretty well, so you just need a&#xA;&gt; &gt; decent way of obscuring path length?&#xA;&gt;&#xA;&gt; I don&#39;t see how this breaks correlation?&#xA;&gt;&#xA;&gt; &gt; In the uncooperative routing failure case, I wonder if using an ECC&#xA;&gt; &gt; trapdoor and perhaps scriptless scripts, you could make it so Carol&#xA;&gt; &gt; doesn&#39;t even get an updated state without revealing the preimage...&#xA;&gt;&#xA;&gt; I&#39;m not sure.  We can make it so Carol has Bob&#39;s preimage(s), etc, so&#xA;&gt; that the node which fails doesn&#39;t get paid.  I initially thought this&#xA;&gt; would just make people pair up (fake) nodes, but it&#39;s probably not worth&#xA;&gt; it since their path would be less-selected in that case.&#xA;&gt;&#xA;&gt; Cheers,&#xA;&gt; Rusty.&#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/20191122/c0045b8d/attachment.html&gt;</html></oembed>