<div dir="ltr"><div>&gt; Mainly limitations of our descriptor language, TBH.  </div><div> </div><div>I don&#39;t follow...so it&#39;s a size issue? Or wanting to avoid &quot;repeated&quot;</div><div>fields?</div><div><br></div><div>&gt; I thought about restarting the revocation sequence, but it seems like that</div><div>&gt; only saves a tiny amount since we only store log(N) entries</div><div><br></div><div>Yeah that makes sense, forgetting the HTLC state is a big enough win in and</div><div>of itself.</div><div><br></div><div>&gt;&gt;&gt; Splice Signing</div><div>&gt;&gt;</div><div>&gt;&gt; It seems that we&#39;re missing some fields here if we&#39;re to allow the splicing</div><div>&gt;&gt; of inputs to be done in a non-blocking manner. We&#39;ll need to send two</div><div>&gt;&gt; revocation points for the new commitment: one to allow it to be created, and</div><div>&gt;&gt; another to allow updates to proceed right after the signing is completed. In</div><div>&gt;&gt; this case we&#39;ll also need to update both commitments in tandem until the</div><div>&gt;&gt; splicing transaction has been sufficiently confirmed.</div><div>&gt;</div><div>&gt;I think we can use the existing revocation points for both.</div><div><br></div><div>Yep, if we retain the existing shachain trees, then we just continue to</div><div>extend the leaves!</div><div><br></div><div>&gt; We&#39;re basically co-generating a tx here, just like shutdown, except it&#39;s</div><div>&gt; funding a new replacement channel.  Do we want to CPFP this one too?</div><div><br></div><div>It&#39;d be nice to be able to also anchor down this splicing transaction given</div><div>that we may only allow a single outstanding splicing operation to begin</div><div>with. Being able to CPFP it (and later on provide arbitrary fee inputs)</div><div>allows be to speed up the process if I want to queue another operation up</div><div>right afterwards.</div><div><br></div><div>-- Laolu</div><div><br></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Oct 17, 2018 at 9:31 AM Rusty Russell &lt;<a href="mailto:rusty@rustcorp.com.au">rusty@rustcorp.com.au</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Olaoluwa Osuntokun &lt;<a href="mailto:laolu32@gmail.com" target="_blank">laolu32@gmail.com</a>&gt; writes:<br>
&gt; Hi Rusty,<br>
&gt;<br>
&gt; Happy to get the splicing train rolling!<br>
&gt;<br>
&gt;&gt; We&#39;ve had increasing numbers of c-lightning users get upset they can&#39;t<br>
&gt;&gt; open multiple channels, so I guess we&#39;re most motivated to allow splicing<br>
&gt; of<br>
&gt;&gt; existing channels<br>
&gt;<br>
&gt; Splicing isn&#39;t a substitute for allowing multiple channels. Multiple<br>
&gt; channels allow nodes to:<br>
&gt;<br>
&gt;   * create distinct channels with distinct acceptance policies.<br>
&gt;   * create a mix of public and non-advertised channels with a node.<br>
&gt;   * be able to send more than the (current) max HTLC amount<br>
&gt;     using various flavors of AMP.<br>
&gt;   * get past the (current) max channel size value<br>
&gt;   * allow a link to carry more HTLCs (due to the current super low max HTLC<br>
&gt;     values) given the additional HTLC pressure that<br>
&gt;     AMP may produce (alternative is a commitment fan out)<br>
<br>
These all seem marginal to me.  I think if we start hitting max values,<br>
we should discuss increasing them.<br>
<br>
&gt; Is there a fundamental reason that CL will never allow nodes to create<br>
&gt; multiple channels? It seems unnecessarily limiting.<br>
<br>
Yeah, we have a daemon per peer.  It&#39;s really simple with 1 daemon, 1<br>
channel.  My own fault: I was the one who insisted we mux multiple<br>
connections over the same transport; if we&#39;d gone for independent<br>
connections our implementation would have been trivial.<br>
<br>
&gt;&gt; Splice Negotiation:<br>
&gt;<br>
&gt; Any reason to now make the splicing_add_* messages allow one to add several<br>
&gt; inputs in a single message? Given &quot;acceptable&quot; constraints for how large the<br>
&gt; witness and pkScripts can be, we can easily enforce an upper limit on the<br>
&gt; number of inputs/outputs to add.<br>
<br>
Mainly limitations of our descriptor language, TBH.  <br>
<br>
&gt; I like that the intro messages have already been designed with the<br>
&gt; concurrent case in mind beyond a simpler propose/accept flow. However is<br>
&gt; there any reason why it doesn&#39;t also allow either side to fully re-negotiate<br>
&gt; _all_ the funding details? Splicing is a good opportunity to garbage collect<br>
&gt; the prior revocation state, and also free up obsolete space in watch towers.<br>
<br>
I thought about restarting the revocation sequence, but it seems like<br>
that only saves a tiny amount since we only store log(N) entries.  We<br>
can drop old HTLC info post-splice though, and (after some delay for<br>
obscurity) tell watchtowers to drop old entries I think.<br>
<br>
&gt; Additionally, as the size of the channel is either expanding or contracting,<br>
&gt; both sides should be allowed to modify things like the CSV param, reserve,<br>
&gt; max accepted htlc&#39;s, max htlc size, etc. Many of these parameters like the<br>
&gt; CSV value should scale with the size of the channel, not allowing these<br>
&gt; parameters to be re-negotiated could result in odd scenarios like still<br>
&gt; maintain a 1 week CSV when the channel size has dipped from 1 BTC to 100k<br>
&gt; satoshis.<br>
<br>
Yep, good idea!  I missed that.<br>
<br>
Brings up a side point about these values, which deserves its own<br>
post...<br>
<br>
&gt;&gt; 1. type: 40 (`splice_add_input`) (`option_splice`)<br>
&gt;<br>
&gt; In order to add nested p2sh inputs, we&#39;ll need to also expose the redeem<br>
&gt; script here, or add additional fields to allow sides to set a sig script as<br>
&gt; well as witness during the signing phase.<br>
&gt;<br>
&gt;&gt; - scriptpubkey is empty, or of form &#39;HASH160 &lt;20-byte-script-hash&gt; EQUAL&#39;<br>
&gt;<br>
&gt; So no P2SH? :(<br>
<br>
Another omission, yeah, we&#39;d want that too I think.<br>
<br>
&gt;&gt;    * [`4`:`feerate_per_kw`]<br>
&gt;<br>
&gt; What fee rate is this? IMO we should do commitmentv2 before splicing as then<br>
&gt; we can more or less do away with the initiator distinction and have most<br>
&gt; fees be ad hoc.<br>
<br>
We&#39;re basically co-generating a tx here, just like shutdown, except it&#39;s<br>
funding a new replacement channel.  Do we want to CPFP this one too?<br>
<br>
&gt;&gt; Splice Signing<br>
&gt;<br>
&gt; It seems that we&#39;re missing some fields here if we&#39;re to allow the splicing<br>
&gt; of inputs to be done in a non-blocking manner. We&#39;ll need to send two<br>
&gt; revocation points for the new commitment: one to allow it to be created, and<br>
&gt; another to allow updates to proceed right after the signing is completed. In<br>
&gt; this case we&#39;ll also need to update both commitments in tandem until the<br>
&gt; splicing transaction has been sufficiently confirmed.<br>
<br>
I think we can use the existing revocation points for both.<br>
<br>
&gt; Also, what about change addresses? Are they to be explicitly specified as<br>
&gt; splice outs?<br>
<br>
They&#39;d be splice-outs, yeah.<br>
<br>
&gt;&gt; 1. type: 43 (`splice_commitment_signature`) (`option_splice`)<br>
&gt;<br>
&gt; It may be worth pointing out there that we&#39;re able to transfer all existing<br>
&gt; HTLCs over to the new commitment as additional context.<br>
<br>
Yeah, I think people missed that it was non-blocking like that.<br>
<br>
&gt;&gt; 1. type: 45 (`splice_witness`) (`option_splice`)<br>
&gt;<br>
&gt; Should also allow either side to specify the sig script here if we&#39;re to<br>
&gt; allow nested p2sh (which we should IMO!).<br>
<br>
Yep.<br>
<br>
&gt;&gt;   * [`2`:`len`]<br>
&gt;&gt;   * [`len`:`witnesses`]<br>
&gt;<br>
&gt; Is the extra length needed if all the witness elements themselves are length<br>
&gt; delimited?<br>
<br>
Yes, we always length-delimit fields so we can add options later.<br>
<br>
&gt;<br>
&gt; It isn&#39;t clear in the current draft, but I take it that the splice_signature<br>
&gt; is for the old multi-sig?<br>
<br>
Yes, that&#39;s the signature required to spend the old funding txout.<br>
<br>
&gt;&gt; so we append to the existing `channel_update` for the original channel,<br>
&gt;&gt; using a new `message_flags` field:<br>
&gt;<br>
&gt; IMO, we need to hold off on optional fields for now, until we revisit the<br>
&gt; formatting in order to actually get it right. As is now, all the optional<br>
&gt; fields are basically serial mandatory soft forks. So clients must understand<br>
&gt; the prior in order to understand the following fields. Instead, we<br>
&gt; essentially need more of a map design.<br>
<br>
You need to add prior options to your wire parser, but that&#39;s usually<br>
the most trivial part of handling them.  And they may waste space on the<br>
wire since we treat them as append-only, but OTOH it avoids<br>
combinatorial testing explosion.<br>
<br>
&gt;&gt; The post-splice reserve is 1% of post-splice capcacity (rounded down).<br>
&gt;<br>
&gt; This should be re-negotiated at time of splice creation, rather than a new<br>
&gt; hard coded value in the protocol.<br>
&gt;<br>
&gt;&gt; In addition, you can forget everything about the old channel (including<br>
&gt;&gt; old HTLCs and revocation requirements).<br>
&gt;<br>
&gt; We still have the same shachain state however (if we don&#39;t allow new state<br>
&gt; to be exchanged during the start of the splicing scenario), correct?<br>
<br>
Yep.<br>
<br>
Thanks,<br>
Rusty.<br>
<br>
&gt; -- Laolu<br>
&gt;<br>
&gt; -- Laolu<br>
<br>
PS, Damn, I always suspected there were multiple Roasbeefs, and we&#39;re simply<br>
dealing with the output of an advanced multiplexing protocol.  I present<br>
the above as conclusive evidence of this thesis...<br>
</blockquote></div></div>