<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:2022-06-28&#xA;📝 Original message:&#xA;Hi Roasbeef,&#xA;&#xA;This is over-design: if you fail to get reliable gossip, your routing&#xA;will suffer anyway.  Nothing new here.&#xA;&#xA;And if you *know* you&#39;re missing gossip, you can simply delay onchain&#xA;closures for longer: since nodes should respect the old channel ids for&#xA;a while anyway.&#xA;&#xA;Matt&#39;s proposal to simply defer treating onchain closes is elegant and&#xA;minimal.  We could go further and relax requirements to detect onchain&#xA;closes at all, and optionally add a perm close message.&#xA;&#xA;Cheers,&#xA;Rusty.&#xA;&#xA;Olaoluwa Osuntokun &lt;laolu32 at gmail.com&gt; writes:&#xA;&gt; Hi y&#39;all,&#xA;&gt;&#xA;&gt; This mail was inspired by this [1] spec PR from Lisa. At a high level, it&#xA;&gt; proposes the nodes add a delay between the time they see a channel closed on&#xA;&gt; chain, to when they remove it from their local channel graph. The motive&#xA;&gt; here is to give the gossip message that indicates a splice is in process,&#xA;&gt; &#34;enough&#34; time to propagate through the network. If a node can see this&#xA;&gt; message before/during the splicing operation, then they&#39;ll be able relate&#xA;&gt; the old and the new channels, meaning it&#39;s usable again by senders/receiver&#xA;&gt; _before_ the entire chain of transactions confirms on chain.&#xA;&gt;&#xA;&gt; IMO, this sort of arbitrary delay (expressed in blocks) won&#39;t actually&#xA;&gt; address the issue in practice. The proposal suffers from the following&#xA;&gt; issues:&#xA;&gt;&#xA;&gt;   1. 12 blocks is chosen arbitrarily. If for w/e reason an announcement&#xA;&gt;   takes longer than 2 hours to reach the &#34;economic majority&#34; of&#xA;&gt;   senders/receivers, then the channel won&#39;t be able to mask the splicing&#xA;&gt;   downtime.&#xA;&gt;&#xA;&gt;   2. Gossip propagation delay and offline peers. These days most nodes&#xA;&gt;   throttle gossip pretty aggressively. As a result, a pair of nodes doing&#xA;&gt;   several in-flight splices (inputs become double spent or something, so&#xA;&gt;   they need to try a bunch) might end up being rate limited within the&#xA;&gt;   network, causing the splice update msg to be lost or delayed significantly&#xA;&gt;   (IIRC CLN resets these values after 24 hours). On top of that, if a peer&#xA;&gt;   is offline for too long (think mobile senders), then they may miss the&#xA;&gt;   update all together as most nodes don&#39;t do a full historical&#xA;&gt;   _channel_update_ dump anymore.&#xA;&gt;&#xA;&gt; In order to resolve these issues, I think instead we need to rely on the&#xA;&gt; primary splicing signal being sourced from the chain itself. In other words,&#xA;&gt; if I see a channel close, and a closing transaction &#34;looks&#34; a certain way,&#xA;&gt; then I know it&#39;s a splice. This would be used in concert w/ any new gossip&#xA;&gt; messages, as the chain signal is a 100% foolproof way of letting an aware&#xA;&gt; peer know that a splice is actually happening (not a normal close). A chain&#xA;&gt; signal doesn&#39;t suffer from any of the gossip/time related issues above, as&#xA;&gt; the signal is revealed at the same time a peer learns of a channel&#xA;&gt; close/splice.&#xA;&gt;&#xA;&gt; Assuming, we agree that a chain signal has some sort of role in the ultimate&#xA;&gt; plans for splicing, we&#39;d need to decide on exactly _what_ such a signal&#xA;&gt; looks like. Off the top, a few options are:&#xA;&gt;&#xA;&gt;   1. Stuff something in the annex. Works in theory, but not in practice, as&#xA;&gt;   bitcoind (being the dominant full node implementation on the p2p network,&#xA;&gt;   as well as what all the miners use) treats annexes as non-standard. Also&#xA;&gt;   the annex itself might have some fundamental issues that get in the way of&#xA;&gt;   its use all together [2].&#xA;&gt;&#xA;&gt;   2. Re-use the anchors for this purpose. Anchor are nice as they allow for&#xA;&gt;   1st/2nd/3rd party CPFP. As a splice might have several inputs and outputs,&#xA;&gt;   both sides will want to make sure it gets confirmed in a timely manner.&#xA;&gt;   Ofc, RBF can be used here, but that requires both sides to be online to&#xA;&gt;   make adjustments. Pre-signing can work too, but the effectiveness&#xA;&gt;   (minimizing chain cost while expediting confirmation) would be dependent&#xA;&gt;   on the fee step size.&#xA;&gt;&#xA;&gt;   In this case, we&#39;d use a different multi-sig output (both sides can rotate&#xA;&gt;   keys if they want to), and then roll the anchors into this splicing&#xA;&gt;   transaction. Given that all nodes on the network know what the anchor size&#xA;&gt;   is (assuming feature bit understanding), they&#39;re able to realize that it&#39;s&#xA;&gt;   actually a splice, and they don&#39;t need to remove it from the channel graph&#xA;&gt;   (yet).&#xA;&gt;&#xA;&gt;   3. Related to the above: just re-use the same multi-sig output. If nodes&#xA;&gt;   don&#39;t care all that much about rotating these keys, then they can just use&#xA;&gt;   the same output. This is trivially recognizable by nodes, as they already&#xA;&gt;   know the funding keys used, as they&#39;re in the channel_announcement.&#xA;&gt;&#xA;&gt;   4. OP_RETURN (yeh, I had to list it). Self explanatory, push some bytes in&#xA;&gt;   an OP_RETURN and use that as the marker.&#xA;&gt;&#xA;&gt;   5. Fiddle w/ the locktime+sequence somehow to make it identifiable to&#xA;&gt;   verifiers. This might run into some unintended interactions if the inputs&#xA;&gt;   provided have either relative or absolute lock times. There might also be&#xA;&gt;   some interaction w/ the main constructing for eltoo (uses the locktime).&#xA;&gt;&#xA;&gt; Of all the options, I think #2 makes the most sense: we already use anchors&#xA;&gt; to be able to do fee bumping after-the-fact for closing transactions, so why&#xA;&gt; not inherit them here. They make the splicing transaction slightly larger,&#xA;&gt; so maybe #3 (or something else) is a better choice.&#xA;&gt;&#xA;&gt; The design space for spicing is preeetty large, so I figure the most&#xA;&gt; productive route might be discussing isolated aspects of it at a time.&#xA;&gt; Personally, I&#39;m not suuuper caught up w/ what the latest design drafts are&#xA;&gt; (aside from convos at the recent LN Dev Summit), but from my PoV, how to&#xA;&gt; communicate the splice to other peers has been an outstanding design&#xA;&gt; question.&#xA;&gt;&#xA;&gt; [1]: https://github.com/lightning/bolts/pull/1004&#xA;&gt; [2]:&#xA;&gt; https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-March/020045.html&#xA;&gt;&#xA;&gt; -- Laolu&#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</html></oembed>