Research/Bitcoin Dev Archive / lightning-dev list
Replaceable Funding Transactions
3 messages, Jan 2 to 3, 2018. Started by ZmnSCPxj.
ZmnSCPxj (2), Pierre
Good morning list,
Reading the BOLT spec, and considering the common issue of slow transaction confirmation on the blockchain level, I want to ask the list if it is possible to use replaceable (replace-by-fee) funding transactions, at the current 1.0
BOLT v1.0 has a below suggestion:
Quoted text (3 lines)
> A non-funding node (fundee): > > * SHOULD forget the channel if it does not see the funding transaction after a reasonable timeout
So, to my mind, it is possible to do RBF funding transactions, as long as the counterparty allows multiple channels per peer (i.e. not work with c-lightning, which restricts one-channel-one-peer).
The consideration is below:
1. Send open_channel for channel #1 2. Receive accept_channel for channel #1 3. Create RBF-able funding transaction for low feerate. 4. Send funding_created for channel #1 5. Receive funding_signed for channel #1 6. Wait on blockchain. Since feerate is low, it does not confirm. So, we decide, we should increase fee rate. 7. Send open_channel for channel #2 to same party. 8. Receive accept_channel for channel #2. 9. Create replacement funding transaction for high feerate. 10. Send funding_created for channel #2. 11. Receive funding_signed for channel #2 12. Wait on blockchain. Because feerate is so high, it confirms quickly. 13. Send funding_locked for channel #2, receive funding_locked for channel #2 14. Let counterparty forget channel #1 (which is now impossible to make, as the funding transaction spends an already-spent UTXO).
Is the above possible in current BOLT spec (modulo, the fact that c-lightning restricts channels)?
Regards, ZmnSCPxj
Hi ZmnSCPxj,
I don't see why this wouldn't work as long as implementations on both ends supports channels multiplexing, like lnd or eclair do (didn't test it though).
But being the accepting node, I wouldn't like receiving too many channel requests that never confirm. Also, most of the time I don't think the opening of a channel should be considered a time-sensitive operation (in general, but there are exceptions to this of course).
Cheers,
Pierre
Good morning,
Quoted text (3 lines)
> I don't see why this wouldn't work as long as implementations on both > ends supports channels multiplexing, like lnd or eclair do (didn't > test it though).
Thank you, that is my understanding also.
Quoted text (2 lines)
> But being the accepting node, I wouldn't like receiving too many > channel requests that never confirm.
I understand and this is a concern. Hopefully a later Lightning BOLT spec can provide some kind of cancel_channel message to indicate that the funder node is very sure that a particular funding transaction will never confirm.
Quoted text (3 lines)
> Also, most of the time I don't > think the opening of a channel should be considered a time-sensitive > operation (in general, but there are exceptions to this of course).
I think all blockchain operations should be considered potentially time-sensitive, including channel opening.
In theory it would be possible (but likely not easy) to develop a wallet which strives to keep transactions replaceable. Each blockchain send from the wallet would replace any unconfirmed transaction, and funding a channel would be similar to such a blockchain-level send (except the protocol needs to wait for funding_signed for all channel counterparties before broadcasting a replacement transaction).
I also think that a good part of the frustration around transaction fees at the blockchain level is at least partly due to the lack of ways to control transaction fees after a transaction has been broadcast.
Regards, ZmnSCPxj