Update to select funding inputs before sending open_channel2 and splice_init and add excess to requests #2924
Closed
remyers wants to merge 2 commits intoACINQ:masterfrom
Closed
Update to select funding inputs before sending open_channel2 and splice_init and add excess to requests #2924remyers wants to merge 2 commits intoACINQ:masterfrom
remyers wants to merge 2 commits intoACINQ:masterfrom
Conversation
Contributor
Author
|
To compute the |
986267b to
fc86a9f
Compare
If a changeless set of inputs is found, excess funding (if any) will be added to the proposed `fundingAmount`/`fundingContribution` before sending `open_channel2`/`splice_init` respectively. InteractiveTxFunder sets `excess_opt` with the input value in excess of what is needed to achieve the requested target feerate. We assume our peer requires confirmed inputs. In the future we could add a heuristic for this, but it's safer to assume they want confirmed inputs.
Added the `SpliceStatus.SpliceInitiated` state for when `SpliceInit` is received with a valid liquidity request, but the wallet has yet returned funding inputs.
fc86a9f to
9ad797c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an alternative to PR #2903 which does not assume modifying bitcoind to add excess to a selected output during coin selection (see PR 30080).
When funds are added to a dual funded channel, or spliced into an existing channel, our channel should be credited in their channel balance any excess that is added to the channel over what the user requests. Currently if a changeless solution is found for funding, excess value over what was requested will be treated as waste and used as extra fees.
We introduce a new optional funding contributions parameter to
InteractiveTxBuilder. When set, we will start by processing the passed in funding inputs/outputs instead of usingInteractiveTxFunderto fund the transaction. The call toInteractiveTxFunderis now made before sendingopen_channel2orsplice_initand the results are then passed toInteractiveTxBuilder.This PR builds on PR #2887 - Use final spec values for splicing and should be rebased once the final official splicing code is merged.