<oembed><type>rich</type><version>1.0</version><author_name>npub1zw7cc8z78v6s3grujfvcv3ckpvg6kr0w7nz9yzvwyglyg0qu5sjsqhkhpx</author_name><author_url>https://nostr.ae/npub1zw7cc8z78v6s3grujfvcv3ckpvg6kr0w7nz9yzvwyglyg0qu5sjsqhkhpx</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2018-10-10&#xA;📝 Original message:&#xA;René Pickhardt &lt;r.pickhardt at googlemail.com&gt; writes:&#xA;&gt; So let us take the example of Splicing in:&#xA;&gt; * The situation before splicing is that we have one output in our funding&#xA;&gt; tx that is being spent with each commitment tx. (actually if the channel&#xA;&gt; was spliced before we have more inputs but that should not change anything)&#xA;&gt; * Splice in would create one additional output that can be spent in future&#xA;&gt; commitment tx.&#xA;&gt; * I propose while splicing in this output should be spent by a special&#xA;&gt; commitment tx which goes to the funder of the splicing operation. This&#xA;&gt; should happen before the actual funding takes place. The other commitment&#xA;&gt; tx spending the original output continues to operate (assuring non blocking&#xA;&gt; splice in operation).&#xA;&gt; * Once we have enough confirmations we merge the channels (either&#xA;&gt; automatically or with the next channel update). A new commitment tx is&#xA;&gt; being created which now spends each output of each of the two funding tx&#xA;&gt; and assigns the channel balance to the channel partners accordingly to the&#xA;&gt; two independent channels. The old commitment txs are being invalidated.&#xA;&gt; * The disadvantage is that while splicing is not completed and if the&#xA;&gt; funder of the splicing tx is trying to publish an old commitment tx the&#xA;&gt; node will only be punished by sending all the funds of the first funding tx&#xA;&gt; to the partner as the special commitment tx of the 2nd output has no newer&#xA;&gt; state yet.&#xA;&#xA;Yes, this is the alternative method; produce a parallel funding tx&#xA;(which only needs to support a single revocation, or could even be done&#xA;by a long timeout) and then join them when it reaches the agreed depth.&#xA;&#xA;It has some elegance; particularly because one side doesn&#39;t have to do&#xA;any validation or store anything until it&#39;s about to splice in.  You get&#xA;asked for a key and signature, you produce a new one, and sign whatever&#xA;tx they want.  They hand you back the tx and the key you used once it&#39;s&#xA;buried far enough, and you check the tx is indeed buried and the output&#xA;is the script you&#39;re expecting, then you flip the commitment tx.&#xA;&#xA;But I chose chose not to do this because every transaction commitment&#xA;forever will require 2 signatures, and doesn&#39;t allow us to forget old&#xA;revocation information.&#xA;&#xA;And it has some strange side-effects: onchain this looks like two&#xA;channels; do we gossip about both?  We have to figure the limit on&#xA;splice-in to make sure the commitment tx stays under 400kSipa.&#xA;&#xA;&gt; I believe splicing out is even safer:&#xA;&gt; * One just creates a spent of the funding tx which has two outputs. One&#xA;&gt; output goes to the recipient of the splice out operation and the second&#xA;&gt; output acts as a new funding transaction for the newly spliced channel.&#xA;&gt; Once signatures for the new commitment transaction are exchanged (basically&#xA;&gt; following the protocol to open a channel) the splicing operation can be&#xA;&gt; broadcasted.&#xA;&gt;&#xA;&gt; * The old channel MUST NOT be used anymore but the new channel can be&#xA;&gt; operational right away without blockchain confirmation. In case someone&#xA;&gt; tries to publish an old state of the old channel it will be a double spent&#xA;&gt; of the splicing operation and in the worst case will be punished and the&#xA;&gt; splicing was not successful.&#xA;&gt;&#xA;&gt;  if one publishes an old state of the new&#xA;&gt; channel everything will just work as normal even if the funding tx is not&#xA;&gt; yet mined. It could only be replaced with an old state of the previous&#xA;&gt; channel (which as we saw is not a larger risk than the usual operation of a&#xA;&gt; lightning node)&#xA;&#xA;Right, you&#39;re relying on CPFP pushing through the splice-out tx if it&#xA;gets stuck.  This requires that we check carefully for standardness and&#xA;other constraints which might prevent this; for example, we can&#39;t allow&#xA;more than 20 (?) of these in a row without being sufficiently buried&#xA;since I think that&#39;s where CPFP calculations top out.&#xA;&#xA;&gt; As mentioned maybe you had this workflow already in your mind but I don&#39;t&#xA;&gt; see why we need to send around all the messages twice with my workflow. We&#xA;&gt; only need to maintain double state but only until it is fair / safe to do&#xA;&gt; so. I would also believe that with my approach it should be possible (but&#xA;&gt; not really necessary) to have multiple splicing operations in parallel.&#xA;&#xA;The extra sigs are only needed in transition, though; once splicing is&#xA;over the channel looks exactly like a newly created one, which is nice.&#xA;&#xA;&gt; One other question: What happens to the short_channel_id of a channel to&#xA;&gt; which founds have been spliced in?&#xA;&#xA;In the parallel splice world, they look like two channels.  In my&#xA;proposal it looks like a new channel, with a channel_update to make sure&#xA;modern nodes know that the transition is happening.&#xA;&#xA;Cheers,&#xA;Rusty.</html></oembed>