<oembed><type>rich</type><version>1.0</version><author_name>npub1vjzmc45k8dgujppapp2ue20h3l9apnsntgv4c0ukncvv549q64gsz4x8dd</author_name><author_url>https://nostr.ae/npub1vjzmc45k8dgujppapp2ue20h3l9apnsntgv4c0ukncvv549q64gsz4x8dd</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2019-12-18&#xA;📝 Original message:&#xA;Hi Bastien,&#xA;&#xA;The use case you&#39;re describing strikes me as similar to a slashing protocol&#xA;for a LN node and a watchtower, i.e punishing&#xA;a lazy watchtower for not broadcasting a penalty tx on remote revoked&#xA;state. In both case you want &#34;if A don&#39;t do X&#xA;unlock some funds for B&#34;.&#xA;&#xA;Here a rough slashing protocol I&#39;ve sketched out to someone else off-list,&#xA;it may work for you use case if you replace the penalty tx&#xA;by the funding transaction as a way for the trusted channel funder to clear&#xA;his liability. Though you will need onchain interactivity&#xA;before the fact but you may be able to reuse slashing outpoint for multiple&#xA;channel funding.&#xA;&#xA;Slashing Protocol&#xA;----------------------&#xA;&#xA;Alice and Bob lock fund in channel outpoint X. They issue commitment tx N.&#xA;Will the accountable watchtower locks fund&#xA;in a 2-of-2 slashing outpoint Y with Bob the client.&#xA;&#xA;When Alice and Bob update channels to N&#39;, Bob and Will use some output from&#xA;commitment N (like upcoming anchor output)&#xA;to create an accountable tx M. M is paying to Bob after timelock+Bob sig or&#xA;is paying to transaction success_penalty P&#xA;with Will sig + Bob sig. Success_penalty P will have 2 inputs, one from M&#xA;and from J the justice tx than Bob has given&#xA;to Will. J is spending Alice&#39;s revoked commitment N.&#xA;&#xA;So this slashing protocol should avoid Bob making false claim, because you&#xA;need a revoked broadcast to enable the claim&#xA;and at same time we use a justice tx output as a proof than Will have done&#xA;its monitoring+punishment job. Will shouldn&#39;t&#xA;learn commitment balance if there is no channel breach and Alice and Bob&#xA;wouldn&#39;t be able to collude against Will, if&#xA;watchtower have a penalty tx on Alice non-revoked commitment tx, that&#39;s her&#xA;concern.&#xA;&#xA;So topology would be:&#xA;&#xA;                                                       to_Bob&#xA;                                                     /&#xA;          X  &lt;---------- N   &lt;--------- J&#xA;                                ^                   ^&#xA;                                   \                   \&#xA;            Y &lt;---------------  M  &lt;---------- P - to_Will&#xA;                                       \&#xA;                                        to_Bob&#xA;&#xA;&#xA;Main idea of the protocol is to use transactions topology of a first&#xA;contract as proofs for a subsidiary contract.&#xA;&#xA;I&#39;m quite sure it&#39;s insecure, just quick ideas, any thoughts ?&#xA;&#xA;(but would be really cool to have one accountable protocol to both&#xA;watchtower and pay-to-open use cases to save&#xA;engineering costs)&#xA;&#xA;Cheers,&#xA;&#xA;Antoine&#xA;&#xA;&#xA;Le mar. 17 déc. 2019 à 16:08, Ethan Heilman &lt;eth3rs at gmail.com&gt; a écrit :&#xA;&#xA;&gt; From where I&#39;m sitting the fact that OP_CAT allows people to build&#xA;&gt; more powerful constructions in Bitcoin without introducing additional&#xA;&gt; complexity at the consensus layer is a positive not a negative. Using&#xA;&gt; OP_CAT or OP_SUBSTRING to enforce ECDSA nonce reuse is a very powerful&#xA;&gt; protocol tool for enforcing fairness in layer two protocols.&#xA;&gt;&#xA;&gt; On Tue, Dec 17, 2019 at 11:27 AM ZmnSCPxj via Lightning-dev&#xA;&gt; &lt;lightning-dev at lists.linuxfoundation.org&gt; wrote:&#xA;&gt; &gt;&#xA;&gt; &gt; Good morning t-bast,&#xA;&gt; &gt;&#xA;&gt; &gt; Further, we can enforce that RBF is signalled for every spend of the&#xA;&gt; output by:&#xA;&gt; &gt;&#xA;&gt; &gt;     &lt;0&gt; OP_CHECKSEQUENCEVERIFY OP_DROP &lt;R&gt; OP_SWAP OP_CAT &lt;ACINQ&gt;&#xA;&gt; OP_CHECKSIG&#xA;&gt; &gt;&#xA;&gt; &gt; Requiring that RBF is signalled gives a little more assurance.&#xA;&gt; &gt; Suppose ACINQ becomes evil and double-spends the output.&#xA;&gt; &gt; The transaction that is posted in the mempool must be marked by RBF due&#xA;&gt; to the `OP_CHECKSEQUENCEVERIFY` opcode, since `nSequence` also doubles as&#xA;&gt; RBF opt-in.&#xA;&gt; &gt; Then anyone who notices the double-spend can RBF the double-spending&#xA;&gt; transaction to themselves rather than ACINQ.&#xA;&gt; &gt; This also further publishes ACINQ private key, until the winning&#xA;&gt; transaction has an `OP_RETURN` output that pays the entire value as fees&#xA;&gt; and nobody can RBF it further.&#xA;&gt; &gt;&#xA;&gt; &gt; This is a minor increase in the assurability of the construction, by&#xA;&gt; making any output that is double-spent directly revocable in favor of the&#xA;&gt; miners.&#xA;&gt; &gt; Again, it requires `OP_CAT`, which is a very dangerous opcode, allowing&#xA;&gt; such powerful constructions.&#xA;&gt; &gt;&#xA;&gt; &gt; Regards,&#xA;&gt; &gt; ZmnSCPxj&#xA;&gt; &gt;&#xA;&gt; &gt;&#xA;&gt; &gt; &gt; Thanks a lot David for the suggestion and pointers, that&#39;s a really&#xA;&gt; interesting solution.&#xA;&gt; &gt; &gt; I will dive into that in-depth, it could be very useful for many&#xA;&gt; layer-2 constructions.&#xA;&gt; &gt; &gt;&#xA;&gt; &gt; &gt; Thanks ZmnSCPxj as well for the quick feedback and the `OP_CAT`&#xA;&gt; construction,&#xA;&gt; &gt; &gt; a lot of cool tricks coming up once (if?) we have such tools in the&#xA;&gt; future ;)&#xA;&gt; &gt; &gt;&#xA;&gt; &gt; &gt; Le mar. 17 déc. 2019 à 16:14, ZmnSCPxj &lt;ZmnSCPxj at protonmail.com&gt; a&#xA;&gt; écrit :&#xA;&gt; &gt; &gt;&#xA;&gt; &gt; &gt; &gt; Good morning David, t-bast, and all,&#xA;&gt; &gt; &gt; &gt;&#xA;&gt; &gt; &gt; &gt; &gt; I&#39;m not aware of any way to currently force single-show signatures&#xA;&gt; in&#xA;&gt; &gt; &gt; &gt; &gt; Bitcoin, so this is pretty theoretical. Also, single-show&#xA;&gt; signatures&#xA;&gt; &gt; &gt; &gt; &gt; add a lot of fragility to any setup and make useful features like&#xA;&gt; RBF&#xA;&gt; &gt; &gt; &gt; &gt; fee bumping unavailable.&#xA;&gt; &gt; &gt; &gt;&#xA;&gt; &gt; &gt; &gt; With `OP_CAT`, we can enforce that a particular `R` is used, which&#xA;&gt; allows to implement single-show signatures.&#xA;&gt; &gt; &gt; &gt;&#xA;&gt; &gt; &gt; &gt;     # Assuming signatures are the concatenation of (R,s)&#xA;&gt; &gt; &gt; &gt;     &lt;R&gt; OP_SWAP OP_CAT &lt;ACINQ&gt; OP_CHECKSIG&#xA;&gt; &gt; &gt; &gt;&#xA;&gt; &gt; &gt; &gt; The above would then feed `s` only on the witness stack.&#xA;&gt; &gt; &gt; &gt;&#xA;&gt; &gt; &gt; &gt; Regards,&#xA;&gt; &gt; &gt; &gt; ZmnSCPxj&#xA;&gt; &gt;&#xA;&gt; &gt;&#xA;&gt; &gt; _______________________________________________&#xA;&gt; &gt; Lightning-dev mailing list&#xA;&gt; &gt; Lightning-dev at lists.linuxfoundation.org&#xA;&gt; &gt; https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&#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/20191217/52ad7f11/attachment.html&gt;</html></oembed>