Research/Bitcoin Dev Archive / lightning-dev list
Is it possible to fund multiple channels using single transaction with multiple output?
3 messages, Dec 25 to 26, 2017. Started by Ignatius Rivaldi.
Ignatius Rivaldi, Christian Decker, ZmnSCPxj
Hi,
I'm a noob in bitcoin and lightning network, and several days ago I just knew a concept called transaction batching, which is to pay multiple payments with single transaction and single transaction fee, which is much cheaper then doing multiple payments with multiple transactions and multiple transaction fee. Now, is it possible to use this thing to create multiple lightning channels with single transaction, reducing transaction fee?
Thanks,
Hi Ignatius,
welcome to the list :-)
Quoted text (7 lines)
> I'm a noob in bitcoin and lightning network, and several days ago I > just knew a concept called transaction batching, which is to pay > multiple payments with single transaction and single transaction fee, > which is much cheaper then doing multiple payments with multiple > transactions and multiple transaction fee. Now, is it possible to use > this thing to create multiple lightning channels with single > transaction, reducing transaction fee?
Absolutely, the protocol always refers to a channel by its short channel ID (blockheight, transaction pos, output pos). So a single transaction can fund multiple channels. I should however mention that this is currently not implemented in any of the wallets, but it shouldn't be too much of a problem to do so. The main problem is that in order to use this you need to coordinate the fund-channel process for all channels in parallel, so initially it's probably only going to be used to fund channels from a single initiator.
Cheers, Christian
Good morning Ignatius and Christian,
I was thinking of this also recently.
I was thinking it would be possible to create a "multifundchannel" command, which accepts multiple node id and msatoshi pairs, which would create a transaction with multiple channel outputs and negotiate with each node. A difficulty would be ensuring that all target nodes are alive, as well as to consider what to do if some of the target nodes are not contactable - do we "fail hard" and not make any channels or do we "fail soft" and make channels only with nodes that are alive and ignore dead nodes, but that can be added as an option. Another difficulty would be to wait for all counterparties to complete the protocol and sign the commitment transactions, before signing and broadcasting the initial opening transaction. Doable, I suppose.
The same command can then be modified in the future to utilize Decker-Burchert-Wattenhofer channel factories, where the channel factory (like the current channels) are initially funded by a single party. In the same way that we punted on the funding of channels and made them initially funded by a single party, we could punt on channel factories and make them initially funded by a single party, but add new protocol messages for channel factory operations (although I cannot imagine how those would function as yet -- but then we should really focus on making the network itself first).
Regards, ZmnSCPxj
Quoted text (35 lines)
> -------- Original Message -------- > Subject: Re: [Lightning-dev] Is it possible to fund multiple channels using single transaction with multiple output? > Local Time: December 25, 2017 7:41 PM > UTC Time: December 25, 2017 11:41 AM > From: decker.christian at gmail.com > To: Ignatius Rivaldi <minecraft2048 at gmail.com>, lightning-dev at lists.linuxfoundation.org > > Hi Ignatius, > > welcome to the list :-) > >> I'm a noob in bitcoin and lightning network, and several days ago I >> just knew a concept called transaction batching, which is to pay >> multiple payments with single transaction and single transaction fee, >> which is much cheaper then doing multiple payments with multiple >> transactions and multiple transaction fee. Now, is it possible to use >> this thing to create multiple lightning channels with single >> transaction, reducing transaction fee? > > Absolutely, the protocol always refers to a channel by its short channel > ID (blockheight, transaction pos, output pos). So a single transaction > can fund multiple channels. I should however mention that this is > currently not implemented in any of the wallets, but it shouldn't be too > much of a problem to do so. The main problem is that in order to use > this you need to coordinate the fund-channel process for all channels in > parallel, so initially it's probably only going to be used to fund > channels from a single initiator. > > Cheers, > Christian > --------------------------------------------------------------- > > Lightning-dev mailing list > Lightning-dev at lists.linuxfoundation.org > https://www.learnbitcoin.com/archive/lists/lightning-dev