<oembed><type>rich</type><version>1.0</version><title>Rusty Russell [ARCHIVE] wrote</title><author_name>Rusty Russell [ARCHIVE] (npub1zw…hkhpx)</author_name><author_url>https://yabu.me/npub1zw7cc8z78v6s3grujfvcv3ckpvg6kr0w7nz9yzvwyglyg0qu5sjsqhkhpx</author_url><provider_name>njump</provider_name><provider_url>https://yabu.me</provider_url><html>📅 Original date posted:2021-01-07&#xA;📝 Original message:&#xA;Lloyd Fournier &lt;lloyd.fourn at gmail.com&gt; writes:&#xA;&gt; This achieves all properties except for (4 - distinguishable on-chain)&#xA;&gt; which is why it was dismissed.&#xA;&#xA;It also seems to require 2 txs per channel open?  (Interestingly I&#xA;missed that post previously, thanks for the pointer!)&#xA;&#xA;&gt; I think it is possible to extend the idea to achieve (4) and therefore&#xA;&gt; obtain all desired properties.&#xA;&gt; Simply put peers can just use the SINGLE|ANYONECANPAY signature as back ups&#xA;&gt; in case of abort. Here&#39;s how it could work in my mind:&#xA;&gt;&#xA;&gt; 1. Initiator requests dual-funding and provides a TX_temp spending their&#xA;&gt; input set to a main output and a change output (does not sign it yet). They&#xA;&gt; also provide a sighash SIGNLE|ANYONECANPAY signature on the main output&#xA;&gt; spending into TX_backup-fund and a signature on the first commitment&#xA;&gt; transaction spending from TX_backup-fund (exactly as in [6]).&#xA;&gt; 2. Peer responds with commitment TX signature for TX_backup-fund.&#xA;&gt; 3. Initiator responds with the signatures for TX_temp.&#xA;&gt; *Peer now has a fully functional transaction chain with which to open the&#xA;&gt; channel -- now they can attempt to upgrade to a SIGHASH_ALL opening*.&#xA;&gt; 4. Peer (if possible) checks there are no existing transactions in the&#xA;&gt; chain or mempool spending from the taker&#39;s inputs. If not it responds with&#xA;&gt; its inputs, change and commitment tx signature for a SIGHASH_ALL TX_fund.&#xA;&gt; 5. Initiator responds with commitment TX signature and TX_fund input&#xA;&gt; signatures.&#xA;&gt; 6. Peer broadcasts TX_fund.&#xA;&gt; *If at any point after step 3 Initiator does not respond for ~2 seconds&#xA;&gt; they broadcast TX_temp and TX_backup-funding*&#xA;&#xA;2 seconds is not sufficient; as an Australian (or Tor user) you should&#xA;know this :)&#xA;&#xA;But otherwise, it&#39;s kinda nice (bar breaking the interactive construction).&#xA;&#xA;&gt; We have (4) because the SINGLE|ANYONECANPAY signature only appears on-chain&#xA;&gt; in case of abort (i.e. TX_backup-funding makes it on-chain).&#xA;&gt; It appears to be pretty close to the ideal solution in terms of privacy and&#xA;&gt; security.&#xA;&gt; If the malicious initiator learns an output they will always have to spend&#xA;&gt; one of their inputs otherwise they will quickly get hit by the TX_temp +&#xA;&gt; TX_backup-funding.&#xA;&gt; Note that it is possible the node is just slow in which case even if step&#xA;&gt; TX_backup-funding makes it in both parties should just carry on with the&#xA;&gt; channel.&#xA;&gt;&#xA;&gt; The downsides are that it involves six rounds of communication and cannot&#xA;&gt; use the &#34;interactive tx building&#34; protocol developed for the original&#xA;&gt; proposal&#xA;&gt;&#xA;&gt; # Signaling Transactions&#xA;&gt;&#xA;&gt; Finally I present a simple but unintuitive protocol that achieves roughly&#xA;&gt; the same properties as the PoDLE protocol but without lightning gossip&#xA;&gt; messages.&#xA;&gt;&#xA;&gt; Whenever the initiator adds an input in the interactive tx building they&#xA;&gt; provide signatures on a &#34;signaling&#34; transaction spending that input (and&#xA;&gt; any inputs they have added so far).&#xA;&gt; The signaling transactions will typically spend the funds back to the&#xA;&gt; initiator&#39;s wallet.&#xA;&gt; Before revealing any of their inputs, the peer checks that none of the&#xA;&gt; inputs added by the initiator are in their mempool/chain.&#xA;&gt; If the initiator aborts the protocol after learning one of the peer&#39;s&#xA;&gt; inputs the peer broadcasts one of the signaling transactions.&#xA;&gt;&#xA;&gt; Like the PoDLE proposal this doesn&#39;t achieve (3) since a malicious peer&#xA;&gt; could broadcast the signaling transaction making the honest initiator pay a&#xA;&gt; transaction fee before using the input in another session.&#xA;&gt; To mitigate this a bit, the transactions could be RBF and have a 1&#xA;&gt; sat-per-byte feerate to give the initiator a decent amount of time to use&#xA;&gt; their input productively before the tx confirms (and paying a low fee if it&#xA;&gt; ever does confirm).&#xA;&gt;&#xA;&gt; The advantages of signaling transactions over PoDLE is that it doesn&#39;t&#xA;&gt; involve any wonky crypto or new gossip messages.&#xA;&gt; The advantage of the PoDLE proposal over this is that a malicious peer can&#xA;&gt; only blacklist the UTXO (not necessarily force you to spend it).&#xA;&#xA;We only need a single UTXO for this, which is even better.&#xA;&#xA;So the initiator sends a &#34;good faith&#34; signed tx, which spends one of its&#xA;UTXOs, to the accepter.  1sat-per-byte is probably a too low, but the&#xA;accepter can provide a feerate for it[1].  Opener aborts if that&#xA;&#34;good-faith&#34; feerate is too high.  It&#39;s implied that this is the first&#xA;added input, too.&#xA;&#xA;If the accepter screws the opener by broadcasting it, the opener can&#xA;still open a channel with someone else before it&#39;s confirmed: they just&#xA;can&#39;t use *that* utxo if they want another node to DF.  Or simply take&#xA;the loss, since the feerate is presumably minimal, and use CPFP.&#xA;&#xA;Cheers,&#xA;Rusty.&#xA;&#xA;[1] The latest c-lightning implementation of the spec[2] already has the&#xA;    accepter indicating min, max and preferred feerates (and then the&#xA;    opener selects within that range).  This would simply add another&#xA;    feerate field, suggest implementing as ceiling(min / 2, 1).&#xA;[2] Which Lisa promises she&#39;ll publish RSN, so we can add your derived&#xA;    points proposal to it.</html></oembed>