Research/Bitcoin Dev Archive / lightning-dev list
Bi-directional or uni-directional?
4 messages, Nov 20 to 21, 2017. Started by Alan Carbery.
Alan Carbery (2), Rusty Russell, Pierre
Hi,
All the tutorials that I've read about Lightning describe bi-directional channels. However, reading through the draft RFC I'm wondering if it's uni-directional only. Can anyone clarify if this is the case and if so then is there a reason for not doing bi-directional channels in the first release?
Cheers,
Alan
Alan Carbery via Lightning-dev <lightning-dev at lists.linuxfoundation.org> writes:
Quoted text (7 lines)
> Hi, > > All the tutorials that I've read about Lightning describe bi-directional > channels. However, reading through the draft RFC I'm wondering if it's > uni-directional only. Can anyone clarify if this is the case and if so then > is there a reason for not doing bi-directional channels in the first > release?
No, they're bidirectional! It's just that each side sends a batch of updates followed by a commitment, then the other side replies with an ack. Both sides can do that independently and it all works out.
Hope that helps! Rusty.
Thanks for the response Rusty.
I think what's confusing me is that the tutorials all show an example where Alice and Bob each put 5BTC into the funding transaction. However, in the spec open_channel has the funding_satoshis attribute for this purpose while accept_channel does not. Does this mean that each channel is funded by one party only but they can make payments in both directions (assuming that some initial payments are made by the party funding the channel)? Any idea about the rationale for one-sided channel funding?
Regards, Alan
-----Original Message----- From: Rusty Russell [mailto:rusty at rustcorp.com.au] Sent: 21 November 2017 03:05 To: Alan Carbery <alancarb at googlemail.com>; lightning-dev at lists.linuxfoundation.org Subject: Re: [Lightning-dev] Bi-directional or uni-directional?
Alan Carbery via Lightning-dev <lightning-dev at lists.linuxfoundation.org> writes:
Quoted text (12 lines, sent without quote marks)
> Hi, > > All the tutorials that I've read about Lightning describe > bi-directional channels. However, reading through the draft RFC I'm > wondering if it's uni-directional only. Can anyone clarify if this is > the case and if so then is there a reason for not doing bi-directional > channels in the first release? No, they're bidirectional! It's just that each side sends a batch of updates followed by a commitment, then the other side replies with an ack. Both sides can do that independently and it all works out. Hope that helps! Rusty.
Hi,
Quoted text (3 lines)
> Does this mean that each channel is funded by one party only but they can make payments in both directions (assuming that some initial payments are made by the party funding the channel)?
Yes. Note that the field `push_msat` allows that initial payment to be made as part of the channel opening.
Quoted text (1 line)
> Any idea about the rationale for one-sided channel funding?
It is just simpler for v1.0, but there already is a PR [1] for dual funding in the works.
Cheers
Pierre
[1] https://github.com/lightningnetwork/lightning-rfc/pull/184