Horizontal scaling within a serial payment channel #330
Replies: 3 comments 6 replies
-
One idea that @nikhilsaraf mentioned to me, that he referred to as the super channel, is to have one logical channel wrap many actual channels. This would in-effect be a layer above the actual payment channels. Payments would be routed to whichever payment channel is next either via some availability test or via round-robin selection. Benefits:
Costs:
|
Beta Was this translation helpful? Give feedback.
-
Another idea that @stanford-scs mentioned to me, that we can refer to as a buffered channel, is to buffer payments and deliver them as a block that either contains all payments or summarizes them into a final payment. The block would occur frequently but could contain a number of payments that is a scale beyond the number of payments a serial channel alone can coordinate. If the block is a summary of the payments within this essentially adds a second layer of net-settlement to the payment channel. The first layer is the net-settlement that the serial payment channel encodes into its close transactions. The second layer is the net-settlement that a payment encodes since a payment can be the sum of many payments layered on-top. Benefits:
Costs:
|
Beta Was this translation helpful? Give feedback.
-
An idea that was first shared at #287 (reply in thread), that we can refer to as a merging channel, is for both participants to stream payments as frequently as they wish to each other, queueing incoming payments, confirming them on their own time, and at each confirm merging them with the most recently sent payment. In an payment channel where the flow of payments is equally bi-directional and the volume of sending is greater than of confirming both participants may always be out-of-dated but are always catching up and could catch up for close. Benefits:
Costs:
|
Beta Was this translation helpful? Give feedback.
-
The current payment channel protocol described in the SEP is serial.
Participants agree together on a new net settlement amount. Each payment in the channel is a committed proposal to change that number. When I say committed, I mean the participant proposing the change is committed, they've signed everything they need to sign and the participant receiving the proposal is free to close the channel with that change without any further coordination.
The payment channel protocol doesn't require that the participant receiving the proposal confirm the transaction before the participant proposing can propose another payment, however there are implications for the proposer not waiting, as is described in the SEP.
There's a separate discussion #287 where we have discussed the problem of performing concurrent payments. That problem is similar, but distinct.
The serial nature of the protocol is a result of the participants operating on a single net settlement amount. Similar to how in concurrent applications there must be synchronization on mutating a shared variable, the channel must either synchronize or coordinate around changing the net settlement amount.
This discussion is for discussing how two participants using a single channel that reaches the limits of vertically scaling the channel, could horizontally scale the channel? If you have an idea please comment below. Let's try and keep one top-level comment per idea, with comments about that idea as sub-comments of that comment.
Beta Was this translation helpful? Give feedback.
All reactions