Is it possible that funding transaction of Lightning Network channel has got just one input? And if yes will it be one-directional during whole period of channel existence? Or after some off-chain transactions into Lightning Network, channel will become bidirectional due to second participant will have some funds after this transactions?
-
The original title "lightning network funding transaction" was not a question. I changed the title suggesting a question which seemed to me to be the essence of your post. Please feel free to edit the title again if my suggestion does not fit.– Rene PickhardtCommented May 17, 2019 at 5:45
2 Answers
The amount of inputs of the funding TX has nothing to do with the question if the channel is unidirectional or bi directional.
What is relevant to understand is how the commitment tx encodes the balance of the channel. (the difference between capacity and balance was discussed in this question
In the standard case the balance of the channel gives all the capacity to the party funding the channel. (currently only one party can fund a payment channel but this will change with dual funded channels which are supposed to come with the next protocol update aka BOLT 1.1). So in the beginning of the lifetime of the channel it seems unidirectional as only the funding party can send money by making a payment or routing a third party payment on this channel.
However once that has been done the commitment transaction is invalidated and a new one is negotiated which has a different distribution of the balance. Now the party funding the channel is able to receive Bitcoin on this Channel.
There is one tiny exception: every channel partner must keep 1% of the channel capacity as a reserve for the penalty if a channel brach happens. So if the party that funded the channel makes initially a payment of less than 1% of the channel capacity it still cannot receive on that channel.
-
One small question. Should be all inputs of funding transaction be from one address or they can be from different addresses which belong to one wallet? Commented May 17, 2019 at 11:52
-
In the current specifications of lightning network channels, only one party contributes to the funding transaction. However, the channel itself is always bidirectional. In fact the channel can possibly become bidirectional since the very inception of channel. This is because the party funding the channel can optionally send some specific amount unconditionally to the other party when the channel is established. But yes, as the channel balance of the other party increases, it can support higher payments.