Skip to content
LearnBitcoin

ResearchBitcoin Dev Archive lightning-dev list

Including a Protocol for splicing to BOLT

16 messages, Jun 25 to Aug 27, 2018. Started by René Pickhardt.

Olaoluwa Osuntokun (4), Rusty Russell (4), ZmnSCPxj (3), Christian Decker (2), Corné Plooy (2), René Pickhardt

Permalink First message in the Wayback Machine

René Pickhardt permalink original

Hey everyone,

I found a mail from 6 month ago on this list ( c.f.: https://www.learnbitcoin.com/archive/lists/lightning-dev/t/2017/reducing-the-number-of-blockchain-transactions-used-by-the-ln-and-the-fees-paid-2#m-d7585790 ) in which it was stated that there was a plan to include a splicing protocol as BOLT 1.1 (On a side node I wonder weather it would make more sense to include splicing to BOLT 3?) I checked out the git repo and issues and don't see that anyone is currently working on that topic and that it hasn't been included yet. Am I correct? If noone works on this at the moment and the spec is still needed I might take the initiative on that one over the next weeks. If someone is working on this I would kindly offer my support.

The background for my question: Last weekend I have been attending the 2nd lightninghackday in Berlin and we had quite some intensive discussions about the autopilot feature and splicing. (c.f. a summary can be found on my blog: https://www.rene-pickhardt.de/improve-the-autopilot-of-bitcoins-lightning-network-summary-of-the-bar-camp-session-at-the-2nd-lightninghackday-in-berlin )

They people from lightning labs told me that they are currently started working on splicing but even though it seems technically straight forward the protocols should also be formalized. Previously I planned working on improving the intelligence of the autopilot feature of the lightning network however on the weekend I got convinced that splicing should be much higher priority and the process should be specified in the lightning rfc.

Also it would be nice if someone would be willing to help out improving the quality of the spec that I would create since it will be my first time adding work to such a formal rfc.

best Rene

Olaoluwa Osuntokun in reply to René Pickhardt permalink original

Hi René,

Speaking at a high level, the main differ between modifying autopilot strategies (channel bootstrapping, and maintenance) vs something like splicing, is that the former is purely policy while the latter is actually a protocol modifications. With respect to difficulty, the first option (in lnd at least) requires a dev to work solely on a high level (implementing a series of "pure" interfaces), on the other hand something like splicing requires a bit more low-level knowledge of Bitcoin, the protocol, and also specific details of an implementation (funding channels, signing, sync, etc).

Splicing is likely something to be included (along with many other things on our various wish lists) within BOLT 1.1, which will start to be "officially" drafted late fall of this year. However of course it's possible for implementations to start to draft up working versions, reserving a temporary feature bit.

Quoted text (2 lines)
> They people from lightning labs told me that they are currently started
> working on splicing

Yep, I have a branch locally that has started a full async version of splicing. Mostly started to see if any implementation level details would be a surprise, compared to how we think it all should work in our heads.

Quoted text (1 line)
> but even though it seems technically straight forward t

Well the full async implementation may be a bit involved, depending on the architecture of the implementation (see the second point below).

In the abstract, I'd say a splicing proposal should include the following:

  * a generic message for both splice in/out
    * this allows both sides to schedule/queue up possible changes,
      opportunistically piggy-backing then on top of the other sides
      initiation
    * most of the channel params can also be re-negotiated as this point,
      another upside is this effectively allows garbage collecting old
      revocation state
  * fully async splice in/out
     * async is ideal as we don't need to block channel operation for
       confirmations, this greatly improves the UX of the process
     * async splice in should use a technique similar to what Conner has
       suggested in the past [0], otherwise it would need to block :(
  * a sort of pre-announcement gossip messages
     * purpose of this is to signal to other nodes "hey this channel is
       about to change outpoints, but you can keep routing through it"
     * otherwise, if this doesn't exist, then nodes would interpret the
       action as a close then open of a channel, rather than a re-allocation

Jumping down to a lower level detail, the inclusion of a sort of "scheduler" for splicing can also allow implementations to greatly batch all their operations. One example is using a splicing session initiated by the remote party to open channels, send regular on-chain payments, CPFP pending sweeps/commitments, etc.

[0]: https://github.com/lightningnetwork/lightning-rfc/issues/280#issuecomment-388269599

-- Laolu

On Mon, Jun 25, 2018 at 3:10 AM René Pickhardt via Lightning-dev < lightning-dev at lists.linuxfoundation.org> wrote:

Quoted text (46 lines)
> Hey everyone,
>
> I found a mail from 6 month ago on this list ( c.f.:
> https://www.learnbitcoin.com/archive/lists/lightning-dev/t/2017/reducing-the-number-of-blockchain-transactions-used-by-the-ln-and-the-fees-paid-2#m-d7585790 )
> in which it was stated that there was a plan to include a splicing protocol
> as BOLT 1.1 (On a side node I wonder weather it would make more sense to
> include splicing to BOLT 3?) I checked out the git repo and issues and
> don't see that anyone is currently working on that topic and that it hasn't
> been included yet. Am I correct?
> If noone works on this at the moment and the spec is still needed I might
> take the initiative on that one over the next weeks. If someone is working
> on this I would kindly offer my support.
>
> The background for my question: Last weekend I have been attending the 2nd
> lightninghackday in Berlin and we had quite some intensive discussions
> about the autopilot feature and splicing. (c.f. a summary can be found on
> my blog:
> https://www.rene-pickhardt.de/improve-the-autopilot-of-bitcoins-lightning-network-summary-of-the-bar-camp-session-at-the-2nd-lightninghackday-in-berlin
> )
>
> They people from lightning labs told me that they are currently started
> working on splicing but even though it seems technically straight forward
> the protocols should also be formalized. Previously I planned working on
> improving the intelligence of the autopilot feature of the lightning
> network however on the weekend I got convinced that splicing should be much
> higher priority and the process should be specified in the lightning rfc.
>
> Also it would be nice if someone would be willing to help out improving
> the quality of the spec that I would create since it will be my first time
> adding work to such a formal rfc.
>
> best Rene
>
>
> --
> www.rene-pickhardt.de
> <http://www.beijing-china-blog.com/>
>
> Skype: rene.pickhardt
>
> mobile: +•• (•)••• •••• •••• <+••%20•••%20••••••••>
> _______________________________________________
> Lightning-dev mailing list
> Lightning-dev at lists.linuxfoundation.org
> https://www.learnbitcoin.com/archive/lists/lightning-dev
>
ZmnSCPxj in reply to Olaoluwa Osuntokun permalink original

Good morning Laolu,

Quoted text (19 lines)
>> but even though it seems technically straight forward t
>
> Well the full async implementation may be a bit involved, depending on the
> architecture of the implementation (see the second point below).
>
> In the abstract, I'd say a splicing proposal should include the following:
>
>   * a generic message for both splice in/out
>     * this allows both sides to schedule/queue up possible changes,
>       opportunistically piggy-backing then on top of the other sides
>       initiation
>     * most of the channel params can also be re-negotiated as this point,
>       another upside is this effectively allows garbage collecting old
>       revocation state
>   * fully async splice in/out
>      * async is ideal as we don't need to block channel operation for
>        confirmations, this greatly improves the UX of the process
>      * async splice in should use a technique similar to what Conner has
>        suggested in the past [0], otherwise it would need to block :(

It increases complexity. I suppose it would be OK to limit splice-in so that if a splice-in has not been buried deeply in the chain yet, you cannot splice-in even more, to limit the number of parallel updates you need to keep track of to only 2.

Quoted text (5 lines)
>   * a sort of pre-announcement gossip messages
>      * purpose of this is to signal to other nodes "hey this channel is
>        about to change outpoints, but you can keep routing through it"
>      * otherwise, if this doesn't exist, then nodes would interpret the
>        action as a close then open of a channel, rather than a re-allocation

At first it seems benign to me -- after all, the channel is simply "reopened" and what does it matter whether other nodes know if the new channel is the same as the old channel? -- but then there will be a time of a few blocks where other nodes consider the channel closed but the replacement channel is not yet deep enough onchain to be reannounced. So I suppose it enables routing across the channel during those few blocks.

Regards, ZmnSCPxj

Rusty Russell in reply to ZmnSCPxj permalink original

I'm delighted someone is fleshing this out!

Splice-out is easy, splice-in is harder.

Note that there are two ways:

1. Broadcast a spend which joins with one or more random outputs and
   then maintain both the old and new channels (ie. both sets of
   signatures) until it confirms deeply enough.  This is the original
   plan, as detailed in [0].
2. Pre-commit. You either set up what is basically another funding tx,
   then join the channels together once it's deep enough.

The second is simpler, but requires two onchain txs, thus I prefer the original model despite the complexity.

I think for 1.1 it's OK to limit this to one concurrent change at a time (ie. for the 6 blocks or whatever, you can't organize *another* splice in/out).

The gossip extension is difficult:

1. If we extend channel_announce that won't propagate through old nodes
   until the new channel is 6 deep, and it's wasted space (sigs + old-chanid)
   once the splice is old news.
2. If we extend channel_update it won't propagate once the new spend is seen
   on the bitcoin network.
3. A new message type won't propagate at all through old nodes: maybe it
   could be made so that the "splice information" sigs + old-chanid is
   discardable though.

Hmm... Rusty.

ZmnSCPxj via Lightning-dev <lightning-dev at lists.linuxfoundation.org> writes:

Quoted text (38 lines)
> Good morning Laolu,
>
>>> but even though it seems technically straight forward t
>>
>> Well the full async implementation may be a bit involved, depending on the
>> architecture of the implementation (see the second point below).
>>
>> In the abstract, I'd say a splicing proposal should include the following:
>>
>>   * a generic message for both splice in/out
>>     * this allows both sides to schedule/queue up possible changes,
>>       opportunistically piggy-backing then on top of the other sides
>>       initiation
>>     * most of the channel params can also be re-negotiated as this point,
>>       another upside is this effectively allows garbage collecting old
>>       revocation state
>>   * fully async splice in/out
>>      * async is ideal as we don't need to block channel operation for
>>        confirmations, this greatly improves the UX of the process
>>      * async splice in should use a technique similar to what Conner has
>>        suggested in the past [0], otherwise it would need to block :(
>
> It increases complexity. I suppose it would be OK to limit splice-in so that if a splice-in has not been buried deeply in the chain yet, you cannot splice-in even more, to limit the number of parallel updates you need to keep track of to only 2.
>
>>   * a sort of pre-announcement gossip messages
>>      * purpose of this is to signal to other nodes "hey this channel is
>>        about to change outpoints, but you can keep routing through it"
>>      * otherwise, if this doesn't exist, then nodes would interpret the
>>        action as a close then open of a channel, rather than a re-allocation
>
> At first it seems benign to me -- after all, the channel is simply "reopened" and what does it matter whether other nodes know if the new channel is the same as the old channel? -- but then there will be a time of a few blocks where other nodes consider the channel closed but the replacement channel is not yet deep enough onchain to be reannounced.  So I suppose it enables routing across the channel during those few blocks.
>
> Regards,
> ZmnSCPxj
> _______________________________________________
> Lightning-dev mailing list
> Lightning-dev at lists.linuxfoundation.org
> https://www.learnbitcoin.com/archive/lists/lightning-dev
ZmnSCPxj in reply to Rusty Russell permalink original

Good morning all,

Quoted text (17 lines)
>     The gossip extension is difficult:
>
> 3.  If we extend channel_announce that won't propagate through old nodes
>
>     until the new channel is 6 deep, and it's wasted space (sigs + old-chanid)
>
>     once the splice is old news.
>
> 4.  If we extend channel_update it won't propagate once the new spend is seen
>
>     on the bitcoin network.
>
> 5.  A new message type won't propagate at all through old nodes: maybe it
>
>     could be made so that the "splice information" sigs + old-chanid is
>
>     discardable though.

For myself, I think, for old nodes, it should just appear as a "normal" close followed by a "normal" open.

So, instead, maybe a new `channel_announce_reopen` which informs everyone that an old scid will eventually become a new scid, and that the nodes involved will still consider routes via the old scid to be valid regardless.

Then an ordinary `channel_announce` once the announce depth of the new scid is reached.

Quoted text (2 lines)
>From point of view of old nodes, the channel is closed for some blocks, but a new channel between the two nodes is then announced.

>From point of view of new nodes, the channel is referred to using the previous scid, until an ordinary `channel_announce` is received, and then the channel is referred to using the new scid.

---

For myself, I think splice is less priority than AMP. But I prefer an AMP which retains proper ZKCP (i.e. receipt of preimage at payer implies receipt of payment at payee, to facilitate trustless on-to-offchain and off-to-onchain bridges).

With AMP, size of channels is less important, and many small channels will work almost as well as a few large channels.

On-to-offchain and off-to-onchain bridges form a different layer and moves complexity from Lightning protocol to a different "bridge" layer. These bridges also make dual-funding channels less necessary (the main reason for dual-funding is to get incoming capacity, and incoming capacity can be easily had with some spare BTC and an off-to-onchain bridge (use onchain funds to make channel to anywhere, pay off-to-onchain bridge to give you back onchain funds, et voila you have incoming channel), and providing the bridge service is properly incentivized, too, so we do not need to worry about proper incentives for dual-funding).

Regards, ZmnSCPxj

Christian Decker in reply to ZmnSCPxj permalink original

ZmnSCPxj via Lightning-dev <lightning-dev at lists.linuxfoundation.org> writes:

Quoted text (2 lines)
> For myself, I think, for old nodes, it should just appear as a
> "normal" close followed by a "normal" open.

That's exactly what they should look like, since the channel is being closed with the existing protocol and opened (possibly with a slightly different value).

Quoted text (4 lines)
> So, instead, maybe a new `channel_announce_reopen` which informs
> everyone that an old scid will eventually become a new scid, and that
> the nodes involved will still consider routes via the old scid to be
> valid regardless.

I thought of it more as a new alias for the old channel, so that the update in the network view is just switching names after the announce depth is reached.

Quoted text (9 lines)
> Then an ordinary `channel_announce` once the announce depth of the new
> scid is reached.
>
> From point of view of old nodes, the channel is closed for some
> blocks, but a new channel between the two nodes is then announced.
>
> From point of view of new nodes, the channel is referred to using the
> previous scid, until an ordinary `channel_announce` is received, and
> then the channel is referred to using the new scid.

The message announcing the reopen or the alias should probably preceed the actual close, otherwise nodes may prune the channel from their view upon seeing the close. The message then simply has the effect of saying "ignore the close, let it linger for 6 more blocks before really removing from your network view".

Quoted text (4 lines)
> For myself, I think splice is less priority than AMP. But I prefer an
> AMP which retains proper ZKCP (i.e. receipt of preimage at payer
> implies receipt of payment at payee, to facilitate trustless
> on-to-offchain and off-to-onchain bridges).

Agreed, multipath routing is a priority, but I think splicing is just as much a key piece to a better UX, since it allows to ignore differences between on-chain and off-chain funds, showing just a single balance for all use-cases.

Quoted text (2 lines)
> With AMP, size of channels is less important, and many small channels
> will work almost as well as a few large channels.

Well, capacities are still very much important, and if there is a smaller min-cut separating source and destination than the total amount of the payment, then the payment will still fail. We now simply no longer require a single channel with sufficient capacity to exist.

Rusty Russell in reply to Christian Decker permalink original

Christian Decker <decker.christian at gmail.com> writes:

Quoted text (10 lines)
> ZmnSCPxj via Lightning-dev <lightning-dev at lists.linuxfoundation.org> writes:
>> For myself, I think splice is less priority than AMP. But I prefer an
>> AMP which retains proper ZKCP (i.e. receipt of preimage at payer
>> implies receipt of payment at payee, to facilitate trustless
>> on-to-offchain and off-to-onchain bridges).
>
> Agreed, multipath routing is a priority, but I think splicing is just as
> much a key piece to a better UX, since it allows to ignore differences
> between on-chain and off-chain funds, showing just a single balance for
> all use-cases.

Agreed, we need both. Multi-channel was a hack because splicing doesn't exist, and I'd rather not ever have to implement multi-channel :)

AMP is important, but it's a nasty compromise with the current limitations. I want to have my cake and eat it too, and I'm pretty sure it's possible once the Scnorr-Eltoonicorn arrives.

Cheers, Rusty.

Olaoluwa Osuntokun in reply to Rusty Russell permalink original

What's the nasty compromise?

Let's also not underestimate how big of an update switching to dlog based HTLCs will be.

On Wed, Jul 4, 2018, 4:21 PM Rusty Russell <rusty at rustcorp.com.au> wrote:

Quoted text (28 lines)
> Christian Decker <decker.christian at gmail.com> writes:
>
> > ZmnSCPxj via Lightning-dev <lightning-dev at lists.linuxfoundation.org>
> writes:
> >> For myself, I think splice is less priority than AMP. But I prefer an
> >> AMP which retains proper ZKCP (i.e. receipt of preimage at payer
> >> implies receipt of payment at payee, to facilitate trustless
> >> on-to-offchain and off-to-onchain bridges).
> >
> > Agreed, multipath routing is a priority, but I think splicing is just as
> > much a key piece to a better UX, since it allows to ignore differences
> > between on-chain and off-chain funds, showing just a single balance for
> > all use-cases.
>
> Agreed, we need both.  Multi-channel was a hack because splicing doesn't
> exist, and I'd rather not ever have to implement multi-channel :)
>
> AMP is important, but it's a nasty compromise with the current
> limitations.  I want to have my cake and eat it too, and I'm pretty sure
> it's possible once the Scnorr-Eltoonicorn arrives.
>
> Cheers,
> Rusty.
> _______________________________________________
> Lightning-dev mailing list
> Lightning-dev at lists.linuxfoundation.org
> https://www.learnbitcoin.com/archive/lists/lightning-dev
>
Rusty Russell in reply to Olaoluwa Osuntokun permalink original

Olaoluwa Osuntokun <laolu32 at gmail.com> writes:

Quoted text (4 lines)
> What's the nasty compromise?
>
> Let's also not underestimate how big of an update switching to dlog based
> HTLCs will be.

Was referring to losing proof-of-payment; that's vital in a system without intermediaries. We have to decide what the lesser evil is.

And yeah, I called it Schnorr-Eltoonicorn not only because it's sooooo pretty, but because actually capturing it will be a saga.

Cheers, Rusty.

Quoted text (30 lines)
> On Wed, Jul 4, 2018, 4:21 PM Rusty Russell <rusty at rustcorp.com.au> wrote:
>
>> Christian Decker <decker.christian at gmail.com> writes:
>>
>> > ZmnSCPxj via Lightning-dev <lightning-dev at lists.linuxfoundation.org>
>> writes:
>> >> For myself, I think splice is less priority than AMP. But I prefer an
>> >> AMP which retains proper ZKCP (i.e. receipt of preimage at payer
>> >> implies receipt of payment at payee, to facilitate trustless
>> >> on-to-offchain and off-to-onchain bridges).
>> >
>> > Agreed, multipath routing is a priority, but I think splicing is just as
>> > much a key piece to a better UX, since it allows to ignore differences
>> > between on-chain and off-chain funds, showing just a single balance for
>> > all use-cases.
>>
>> Agreed, we need both.  Multi-channel was a hack because splicing doesn't
>> exist, and I'd rather not ever have to implement multi-channel :)
>>
>> AMP is important, but it's a nasty compromise with the current
>> limitations.  I want to have my cake and eat it too, and I'm pretty sure
>> it's possible once the Scnorr-Eltoonicorn arrives.
>>
>> Cheers,
>> Rusty.
>> _______________________________________________
>> Lightning-dev mailing list
>> Lightning-dev at lists.linuxfoundation.org
>> https://www.learnbitcoin.com/archive/lists/lightning-dev
>>
ZmnSCPxj in reply to Rusty Russell permalink original

Good morning all,

Quoted text (9 lines)
> > What's the nasty compromise?
> >
> > Let's also not underestimate how big of an update switching to dlog based
> >
> > HTLCs will be.
>
> Was referring to losing proof-of-payment; that's vital in a system
>
> without intermediaries. We have to decide what the lesser evil is.

Without the inherent ZKCP, it becomes impossible to build a trustless off-to-on/on-to-offchain bridge, since a trustless swap outside of Lightning becomes impossible. To my mind, ZKCP is an important building block in cryptocurrency: it is what we use in Lightning for routing. Further, ZKCP can be composed together to form a larger ZKCP, which again is what we use in Lightning for routing.

The ZKCP here is what lets LN endpoint to interact with the chain and lets off-to-on/on-to-offchain bridges to be trustless.

off/onchain bridges are important as they provide:

1.  Incoming channels: Get some onchain funds from cold storage (or borrowed), create an outgoing channel (likely to the bridge for best chance of working), then ask bridge for an invoice to send money to an address you control onchain. The outgoing channel capacity becomes incoming capacity, you get (most of) your money back (minus fees) onchain.
2.  Reloading spent channels.  Give bridge an invoice and pay to the bridge to trigger it reloading your channel.
3.  Unloading full channels. If you earn so much money (minus what you spend on expenses, subcontractors, employees, suppliers, etc.) you can use the bridge to send directly to your cold storage.

#1 lets us leave out double-funded channels. #2 and #3 lets us leave out splice.

The interaction between bridge and Lightning is simply via BOLT11 invoices. Those provide the ZKCP necessary to make the bridge trustless.

AMP enhances such a Lightning+bridge network, since the importance of maximum channel capacity is reduced if a ZKCP-providing AMP is available. For myself, I would rather leave out AMP and double-funding and splicing than remove ZKCP.

One could imagine a semi-trusted ZKCP service for real-world items. Some semi-trusted institution provides special safeboxes for rent that can be unlocked either by seller private key after 1008 blocks, or by the recipient key and a proof-of-payment preimage (and records the preimage in some publicly-accessible website). To sell a real-world item, make a BOLT11 invoice, bring item to a safebox, lock it with appropriate keys and the invoice payment hash, give BOLT11 invoice to buyer. Buyer pays and gets proof-of-payment preimage, goes to safebox and gets item. Multi-way trades (A wants item from B, B wants item from C, C wants item from A) are just compositions of ZKCP.

Quoted text (4 lines)
>
> And yeah, I called it Schnorr-Eltoonicorn not only because it's sooooo
>
> pretty, but because actually capturing it will be a saga.

Bards shall sing about The Hunt for Schnorr-Eltoonicorn for ages, until Satoshi himself is but a vague memory of a myth long forgotten.

Regards, ZmnSCPxj

Olaoluwa Osuntokun in reply to Rusty Russell permalink original
Quoted text (2 lines)
> Was referring to losing proof-of-payment; that's vital in a system without
> intermediaries.  We have to decide what the lesser evil is.

As is now, we don't have a proper proof of payment. We have a "proof that someone paid". A proper proof of payment would be: "proof that bob paid carol". Aside from that, spontaneous payments is amongst the most request feature request I get from users and developers.

There're a few ways to achieve this with dlog based AMPs.

As far hash based AMPs, with a bit more interaction, and something like zkboo, one can achieve stronger binding. However, we'd lose the nice "one shot" property that dlog based AMPs allow.

Quoted text (2 lines)
> And yeah, I called it Schnorr-Eltoonicorn not only because it's sooooo
> pretty, but because actually capturing it will be a saga.

eltoo won't be the end-all-be-all as it comes along with several tradeoffs, like everything else does.

Also, everything we can do with Schnorr, we can also do with ECDSA, but today.

-- Laolu

On Wed, Jul 4, 2018 at 7:12 PM Rusty Russell <rusty at rustcorp.com.au> wrote:

Quoted text (49 lines)
> Olaoluwa Osuntokun <laolu32 at gmail.com> writes:
> > What's the nasty compromise?
> >
> > Let's also not underestimate how big of an update switching to dlog based
> > HTLCs will be.
>
> Was referring to losing proof-of-payment; that's vital in a system
> without intermediaries.  We have to decide what the lesser evil is.
>
> And yeah, I called it Schnorr-Eltoonicorn not only because it's sooooo
> pretty, but because actually capturing it will be a saga.
>
> Cheers,
> Rusty.
>
> > On Wed, Jul 4, 2018, 4:21 PM Rusty Russell <rusty at rustcorp.com.au>
> wrote:
> >
> >> Christian Decker <decker.christian at gmail.com> writes:
> >>
> >> > ZmnSCPxj via Lightning-dev <lightning-dev at lists.linuxfoundation.org>
> >> writes:
> >> >> For myself, I think splice is less priority than AMP. But I prefer an
> >> >> AMP which retains proper ZKCP (i.e. receipt of preimage at payer
> >> >> implies receipt of payment at payee, to facilitate trustless
> >> >> on-to-offchain and off-to-onchain bridges).
> >> >
> >> > Agreed, multipath routing is a priority, but I think splicing is just
> as
> >> > much a key piece to a better UX, since it allows to ignore differences
> >> > between on-chain and off-chain funds, showing just a single balance
> for
> >> > all use-cases.
> >>
> >> Agreed, we need both.  Multi-channel was a hack because splicing doesn't
> >> exist, and I'd rather not ever have to implement multi-channel :)
> >>
> >> AMP is important, but it's a nasty compromise with the current
> >> limitations.  I want to have my cake and eat it too, and I'm pretty sure
> >> it's possible once the Scnorr-Eltoonicorn arrives.
> >>
> >> Cheers,
> >> Rusty.
> >> _______________________________________________
> >> Lightning-dev mailing list
> >> Lightning-dev at lists.linuxfoundation.org
> >> https://www.learnbitcoin.com/archive/lists/lightning-dev
> >>
>
Olaoluwa Osuntokun in reply to ZmnSCPxj permalink original
Quoted text (4 lines)
> #1 lets us leave out double-funded channels.  #2 and #3 lets us leave out
> splice.

> For myself, I would rather leave out AMP and double-funding and splicing
> than remove ZKCP.

It isn't one or the other. ZKCPs are compatible with various flavors of AMP. All of these technologies can be rolled out, some with less coordination than others. Please stop presenting these upgrades as if they're opposing and fundamental constrains only allow a handful of them to be deployed.

Dual funded channels allow for immediate bi-directional transfers between endpoints. Splicing allows channels to contract or grow, as well as: pay out to on chain addresses, fund new channel on the fly, close into old channels, consolidate change addresses, create fee inputs for eltoo, orchestrate closing/opening coin-joins, etc, etc.

-- Laolu

On Wed, Jul 4, 2018 at 10:36 PM ZmnSCPxj <ZmnSCPxj at protonmail.com> wrote:

Quoted text (69 lines)
> Good morning all,
>
> > > What's the nasty compromise?
> > >
> > > Let's also not underestimate how big of an update switching to dlog
> based
> > >
> > > HTLCs will be.
> >
> > Was referring to losing proof-of-payment; that's vital in a system
> >
> > without intermediaries. We have to decide what the lesser evil is.
>
> Without the inherent ZKCP, it becomes impossible to build a trustless
> off-to-on/on-to-offchain bridge, since a trustless swap outside of
> Lightning becomes impossible.  To my mind, ZKCP is an important building
> block in cryptocurrency: it is what we use in Lightning for routing.
> Further, ZKCP can be composed together to form a larger ZKCP, which again
> is what we use in Lightning for routing.
>
> The ZKCP here is what lets LN endpoint to interact with the chain and lets
> off-to-on/on-to-offchain bridges to be trustless.
>
> off/onchain bridges are important as they provide:
>
> 1.  Incoming channels: Get some onchain funds from cold storage (or
> borrowed), create an outgoing channel (likely to the bridge for best chance
> of working), then ask bridge for an invoice to send money to an address you
> control onchain. The outgoing channel capacity becomes incoming capacity,
> you get (most of) your money back (minus fees) onchain.
> 2.  Reloading spent channels.  Give bridge an invoice and pay to the
> bridge to trigger it reloading your channel.
> 3.  Unloading full channels. If you earn so much money (minus what you
> spend on expenses, subcontractors, employees, suppliers, etc.) you can use
> the bridge to send directly to your cold storage.
>
> #1 lets us leave out double-funded channels.  #2 and #3 lets us leave out
> splice.
>
> The interaction between bridge and Lightning is simply via BOLT11
> invoices.  Those provide the ZKCP necessary to make the bridge trustless.
>
> AMP enhances such a Lightning+bridge network, since the importance of
> maximum channel capacity is reduced if a ZKCP-providing AMP is available.
> For myself, I would rather leave out AMP and double-funding and splicing
> than remove ZKCP.
>
> One could imagine a semi-trusted ZKCP service for real-world items.  Some
> semi-trusted institution provides special safeboxes for rent that can be
> unlocked either by seller private key after 1008 blocks, or by the
> recipient key and a proof-of-payment preimage (and records the preimage in
> some publicly-accessible website).  To sell a real-world item, make a
> BOLT11 invoice, bring item to a safebox, lock it with appropriate keys and
> the invoice payment hash, give BOLT11 invoice to buyer.  Buyer pays and
> gets proof-of-payment preimage, goes to safebox and gets item.  Multi-way
> trades (A wants item from B, B wants item from C, C wants item from A) are
> just compositions of ZKCP.
>
> >
> > And yeah, I called it Schnorr-Eltoonicorn not only because it's sooooo
> >
> > pretty, but because actually capturing it will be a saga.
>
> Bards shall sing about The Hunt for Schnorr-Eltoonicorn for ages, until
> Satoshi himself is but a vague memory of a myth long forgotten.
>
> Regards,
> ZmnSCPxj
>
Rusty Russell in reply to Olaoluwa Osuntokun permalink original

Olaoluwa Osuntokun <laolu32 at gmail.com> writes:

Quoted text (6 lines)
>> Was referring to losing proof-of-payment; that's vital in a system without
>> intermediaries.  We have to decide what the lesser evil is.
>
> As is now, we don't have a proper proof of payment. We have a "proof that
> someone paid". A proper proof of payment would be: "proof that bob paid
> carol".

Hi Laolu!

        I consider that proof-of-payer, which would be great.
proof-of-payment (though ours is trivially forgable by the payee) is
useful for the common case of "I paid, and you never shipped me my
widget!" arguments (assuming description is invoice is useful, such as
containing shipping address).

Our network of early adopters with no significant malicious players will not last, regrettably.

Quoted text (2 lines)
> Aside from that, spontaneous payments is amongst the most request feature
> request I get from users and developers.

But they're terrible for anything but donations. Businesses do *not* want people to get into the habit of resuing old invoices (even if we used dlog methods so it wasn't massively broken).

push-payments was one of the first support headaches we had at the Blockstream Store, and I'm not eager to repeat it. At least in that case we knew where to return the funds!

To be clear: (opt-in) reusable invoices are vital. But it's still part of an 'invoice -> pay' flow (though with the pay step repeated).

Quoted text (5 lines)
>> And yeah, I called it Schnorr-Eltoonicorn not only because it's sooooo
>> pretty, but because actually capturing it will be a saga.
>
> eltoo won't be the end-all-be-all as it comes along with several tradeoffs,
> like everything else does.

I somewhat agree that it has caveats, but it'll improve things significantly against what we have today.

Quoted text (2 lines)
> Also, everything we can do with Schnorr, we can also do with ECDSA, but
> today.

True. But it should be much easier...

Cheers, Rusty.

Corné Plooy in reply to Olaoluwa Osuntokun permalink original
Quoted text (2 lines)
> Aside from that, spontaneous payments is amongst the most request feature
> request I get from users and developers.

A while ago I realized that spontaneous payments (without proof of payment, mostly for donations only) can be realized quite easily if the payer generates the preimage and hash, and includes the preimage in the sphinx message to the payee node. If the payee node recognizes the sphinx message format, it can use the preimage to claim the payment.

CJP

Christian Decker in reply to Corné Plooy permalink original

Corné Plooy via Lightning-dev <lightning-dev at lists.linuxfoundation.org> writes:

Quoted text (10 lines)
>> Aside from that, spontaneous payments is amongst the most request feature
>> request I get from users and developers.
>
> A while ago I realized that spontaneous payments (without proof of
> payment, mostly for donations only) can be realized quite easily if the
> payer generates the preimage and hash, and includes the preimage in the
> sphinx message to the payee node. If the payee node recognizes the
> sphinx message format, it can use the preimage to claim the payment.
>
> CJP

You mean like we describe in the Brainstorming wiki [1]? We definitely need to make the Wiki more prominent :-)

[1] https://github.com/lightningnetwork/lightning-rfc/wiki/Brainstorming#passing-a-transfer-secret-in-the-onion
Corné Plooy in reply to Christian Decker permalink original

Now that you remind me of the wiki: I remember we discussed this before, so maybe I was just repeating myself (sorry). It is true the wiki should be more prominent.

CJP

Op 27-08-18 om 15:19 schreef Christian Decker:

Quoted text (15 lines)
> Corné Plooy via Lightning-dev <lightning-dev at lists.linuxfoundation.org>
> writes:
>>> Aside from that, spontaneous payments is amongst the most request feature
>>> request I get from users and developers.
>> A while ago I realized that spontaneous payments (without proof of
>> payment, mostly for donations only) can be realized quite easily if the
>> payer generates the preimage and hash, and includes the preimage in the
>> sphinx message to the payee node. If the payee node recognizes the
>> sphinx message format, it can use the preimage to claim the payment.
>>
>> CJP
> You mean like we describe in the Brainstorming wiki [1]? We definitely
> need to make the Wiki more prominent :-)
>
> [1] https://github.com/lightningnetwork/lightning-rfc/wiki/Brainstorming#passing-a-transfer-secret-in-the-onion