lightningdevkit / rust-lightning

A highly modular Bitcoin Lightning library written in Rust. It's rust-lightning, not Rusty's Lightning!
Other
1.14k stars 353 forks source link

Dual-funded channels and Splicing Project Tracking #1621

Open dunxen opened 2 years ago

dunxen commented 2 years ago

Overview

Project tracking and implementation status of interactive transaction construction, dual-funding (V2 channel establishment), channel quiescence, and splicing.

Specifications:

Wire messages

Dual-funding implementation phase feature table

:green_circle: = supported :red_circle: = unsupported Impl. phase Accept V2 Create V2 RBF Contribute funds
1. Accept V2 channels :green_circle: :red_circle: :red_circle: :red_circle:
2. Accept V2 channels w/RBF :green_circle: :red_circle: :green_circle: :red_circle:
3. Create V2 channels :green_circle: :green_circle: :green_circle: :green_circle:

Channel quiescence

Splicing

Prototype

0. Preparations

1. Basic implementation

2. Additional features

npslaney commented 2 years ago

Thinking through LSP onboarding strategies having the ability to start with a balanced channel is a really nice option. Definitely watching this one 👀

ariard commented 2 years ago

I think one of the first step could be to make OnchainTxHandler its own interface that way the reorg/fee-bumping/rebroadcast logic could be shared between our ChannelMonitor and MultipartyConstruction stuff. See : https://github.com/lightningdevkit/rust-lightning/issues/606#issuecomment-619338323 for ideas.

There is also an open question on how much code for doing that is already available in BDK.

dunxen commented 2 years ago

I think one of the first step could be to make OnchainTxHandler its own interface that way the reorg/fee-bumping/rebroadcast logic could be shared between our ChannelMonitor and MultipartyConstruction stuff. See : #606 (comment) for ideas.

There is also an open question on how much code for doing that is already available in BDK.

Thanks for the comment link! I'll sync up with the BDK peeps on that open question too.

ariard commented 1 year ago

Available to review advances in dual-funded implementation, even if it's early refactor for now. I've reviewed back recently the state of the BOLT proposal and it's sounds to be mature enough to solidify around a v0.1.

dunxen commented 1 year ago

Available to review advances in dual-funded implementation, even if it's early refactor for now. I've reviewed back recently the state of the BOLT proposal and it's sounds to be mature enough to solidify around a v0.1.

Great, picking up refactor next! 🙏

dunxen commented 1 year ago

Available to review advances in dual-funded implementation, even if it's early refactor for now. I've reviewed back recently the state of the BOLT proposal and it's sounds to be mature enough to solidify around a v0.1.

Great, picking up refactor next! pray

Next is now. So picking up from now :)

ariard commented 1 year ago

Good to have this, don’t hesitate to “review pin” like glozow doing for package relay: https://github.com/bitcoin/bitcoin/issues/27463#issue-1668056618 good practice imho to allocate review bandwidth accordingly.

ariard commented 12 months ago

FYI, current version of nversion=3 and package RBF sounds working well for both dual-funding and splicing: https://github.com/bitcoin/bitcoin/pull/25038#issuecomment-1712350787

There is one caveat where the first splicing transaction transitioning from nversion=2 to nversion=3 might have to be signed with a compelling feerate to be able to replace a pinning nversion=2 commitment state. If correct, I think it can be documented when nversion=3 is specified on the bolt-side.

All reserves kept as both package relay / nversion=3 / dual-funding and splicing are still work in progress and non-final.

toneloc commented 3 months ago

Hi, what is the status here?

Does LDK support dual-funding, and if it does, how? Thanks.

TheBlueMatt commented 3 months ago

Dual-funding and splicing in LDK is still a WIP, but hopefully coming soon.

toneloc commented 3 months ago

Ok, thanks. I will stay tuned here.

If there is another place I can follow along for early releases / and or testing please let me know.

dunxen commented 5 days ago

@optout21 I'm struggling to also assign you to this issue. Not sure if you can also assign yourself? :)

optout21 commented 4 days ago

UPDATED Here's my take on splicing tasks:

Prototype

0. Preparations

1. Basic implementation

2. Additional features

optout21 commented 13 hours ago

Updated splice tasks (in earlier comment)

dunxen commented 11 hours ago

Updated splice tasks (in earlier comment)

Thanks! Updated!

jkczyz commented 4 hours ago

I updated the quiescence section based on a discussion with @wpaulino.