ACINQ / eclair

A scala implementation of the Lightning Network.
Apache License 2.0
1.23k stars 267 forks source link

Rework virtual channel abstractions #2311

Open t-bast opened 2 years ago

t-bast commented 2 years ago

We currently have an AbstractCommitments trait that was introduced to support hosted channels implemented in plugins. However, this is a leaky abstraction that created many issues in the codebase, to which we found work-arounds that most likely never really worked with hosted channels.

I'd like to remove that trait and re-design from the ground up. Now that folks like @engenegr and @btcontract have some experience running and maintaining hosted channels in production, I'd like to know what abstractions eclair should provide to make it easy to implement such virtual channels. We'll most likely want a new set of messages/events, separate from the ones used by real channels, to guarantee stability across eclair releases.

Based on my current understanding, the only things that are missing today are ways to inject a virtual channel into:

Am I missing something? Can you provide more details about which operations happen at the boundaries between eclair and such plugins?

evd0kim commented 2 years ago

Likely we won't have any capacity to redesign HC plugin. There are only two of us with @NCrashed and we also really busy working with SBW with an option to be only persons who maintain this wallet (fork to be precise). I will try to follow your thoughts as soon as I will be sure that Asset Channels protocol, which is replacement for HC supporting ticker and price in channel state, works fine.

evd0kim commented 2 years ago

@t-bast can you help us in refactoring Hosted channels? I am asking just in case we decide to continue working on Eclair.

t-bast commented 2 years ago

No, we really don't have the resources to work on something like hosted channels, we already have a very full backlog.