Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PSBT-based funding of channels #1565

Open
Kixunil opened this issue Oct 13, 2020 · 4 comments
Open

PSBT-based funding of channels #1565

Kixunil opened this issue Oct 13, 2020 · 4 comments
Assignees

Comments

@Kixunil
Copy link

Kixunil commented Oct 13, 2020

I'd love to be able to use PSBTs to fund channels just like what LND allows.
This would allow for more fine-grained control of the resulting transaction and some experimentation.

@t-bast t-bast self-assigned this Oct 13, 2020
@t-bast
Copy link
Member

t-bast commented Oct 13, 2020

This is in progress, it depends on PSBT support in bitcoin-lib (see ACINQ/bitcoin-lib#43)

@saubyk
Copy link

saubyk commented Oct 29, 2020

Hi @t-bast will this include coin selection as well for funding channel open transactions?

Or should that be requested as a separate feature?

@t-bast
Copy link
Member

t-bast commented Nov 2, 2020

I can't answer that yet, I'll need time to dive into it more.

@t-bast
Copy link
Member

t-bast commented May 10, 2022

Now that dual funding is nearing completion, I have a better view of what would be involved for something like this. I don't know when we will be able to implement it, but here is roughly how it could work, let me know if something here doesn't feel right from a user's perspective.

We would expose a new RPC to open multiple channels at once, taking a PSBT as input with a high-enough input(s) amount to cover all the requested channels. We would send this request to a new actor (e.g. BatchFunder) that will supervise the process. This actor would initiate the individual opening flows and provide a wrapped OnChainWallet that redirects funding requests to itself. It would wait to receive funding requests for all the requested channels, and then would return a new PSBT to the node operator and wait.

The node operator would add signatures to that PSBT and call yet another new RPC (e.g. finalizeBatch) with the signed PSBT: that request would go to the BatchFunder who would complete the funding requests from individual channels.

There is an issue with that feature though: dual funding added support for RBF-ing funding transactions, but it would be really hard to do in this setup. However, maybe this isn't such an issue: I expect users of this RPC to be monitoring the mempool feerate closely and trying to optimize their fees, so they wouldn't want to RBF such transactions? Also, they could rely on CPFP instead of RBF to speed up confirmation if necessary.

We could think of a similar feature for batching splices as well, but the lack of RBF support may be more harmful, so we would really need to provide a CPFP mechanism.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants