Skip to content
LearnBitcoin

ResearchBitcoin Dev Archive lightning-dev list

Thoughts on JoinChannels, benefits for LN using Schnorr sig ?

2 messages, Mar 7, 2016. Started by Jérôme Legoupil.

Jérôme Legoupil, Tier Nolan

Permalink First message in the Wayback Machine

Jérôme Legoupil permalink original

Hi,

I am throwing out a thought about multi-party channels (a payment channels that involve > 2 participants). I'm going to call them JoinChannels (I haven't found anything in the literature regarding these objects).

I see significant benefits of JoinChannels over 2-2 payment channels for Lightning Network :

   -
   JoinChannels take less blockchain space : for example 3 parties linked
   together with 2-2 channels require 3 channels, that is to say 3
   multisig(2/2) transactions on the blockchain to open, while a JoinChannel
   only takes 1 multisig(3/3). The space efficiency really kicks in with
   Schnorr sigs and the signature time is only 2 rounds (independent of the
   number of participants !).
   -
   JoinChannels enable bigger transfers of value threw LN (higher
   connectivy) : if Alice wants to transfer X to Bob threw LN, all of the
   intermediate 2-2channels (of the path found) need to all have at least X
   locked in the right direction. With JoinChannels, an intermediate LN node
   is more efficient because instead of spreading his funds in multiple 2-2
   channels, he can put the sum of his funds in a JoinChannels and the
   threshold condition of a transfer to occur is consequently higher. I have a
   little example below.

The downside, is that all the participants of a JoinChannel need to be online in order to participate in a LN transfer (which may become a problem if the payment needs to through multiple JoinChannels that contain hundreds or thousands of participants).

Cheers, Jerome

---

This little example shows that JoinChannels enable bigger transfers of value threw LN.

In this configuration, Sender can't send "2" to Receiver because B doesn't have enough funds in AB channel.

Receiver
       |1
       |
       |2       ??
      A1-------0B
 1->2\         /1->2 ??
         \      /
    1->0\   /1->0
            C
             |1->3
             |
             |2->0
         Sender

If (A,B,C) had performed a (3/3) JoinChannel : Sender could have sent "2" to Receiver for a same value of funds locked in the previous example

Receiver
      |1->3
      |
      |2->0
     A        B
1->3\\\\////1->1
        \\\///
         \\//
          \/2->0
          C
           |1->3
           |
           |2->0
      Sender
Tier Nolan in reply to Jérôme Legoupil permalink original

I was thinking about something similar, the big problem is that everyone has to be online. What is needed is a way to do consensus enforced sequence numbers.

The principle is that the locktime would lock the transaction outputs (like with the coinbase outputs) rather than prevent the transaction from being included in the blockchain. Transactions could double spend these transactions (and make them invalid) as long as they had higher sequence numbers. Once the locktime is hit, then the last one is locked.

Thinking more about it, this could be done by a soft fork, if the locked transactions list was committed to in the coinbase. You could only replace transactions in the "pending" list if they have higher sequence numbers. At this point, it could need a new field, since sequence numbers are being used for relative CLTV. Transactions which double spend transactions in the pending list would not be allowed in the main blocks.

This means that broadcasting an expired state of the channel will just have someone else broadcast one with a higher sequence number and have your transaction removed from the pending list. It doesn't protect against a party broadcasting early, but at least the final state is the one that ends up as the channel close transaction.

There would be fees to pay to get into the pending list too, and it doesn't change when the final locktime is anyway.

I think the ideal situation would be where only those who are negatively affected have to sign to change the state. Moving money from A to B would only require A's signature on the state change.

For example, a join-channel could have a "moderator" and normal participants. To sign a state change, you need the moderator's agreement and anyone who would lose money by the change. The moderator is responsible for making sure each sequence number is only signed once. Any of the participants can poll the moderator to get the current state of the channel after they have been offline for a while. The hub would probably act as moderator and there would have to be a penalty if the moderator signs the same state number twice.

Ideally, the users would sign the updates periodically even if they aren't trading to reduce clutter. If someone signs state 180, then they are signing all previous states too. This means that you don't even need to have any state that everyone has signed.