-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
cnct: anchor output sweeping and fee bumping #3758
Merged
joostjager
merged 17 commits into
lightningnetwork:master
from
joostjager:anchor-output-poc-joost
Mar 18, 2020
Merged
cnct: anchor output sweeping and fee bumping #3758
joostjager
merged 17 commits into
lightningnetwork:master
from
joostjager:anchor-output-poc-joost
Mar 18, 2020
Conversation
This file contains 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
joostjager
force-pushed
the
anchor-output-poc-joost
branch
5 times, most recently
from
December 2, 2019 11:28
3a906e6
to
bb94988
Compare
joostjager
force-pushed
the
anchor-output-poc-joost
branch
2 times, most recently
from
December 3, 2019 10:32
79e8375
to
6df6c0e
Compare
joostjager
force-pushed
the
anchor-output-poc-joost
branch
4 times, most recently
from
December 12, 2019 12:38
338b1f2
to
7f4ecde
Compare
joostjager
force-pushed
the
anchor-output-poc-joost
branch
4 times, most recently
from
January 7, 2020 16:20
ef5d3c6
to
f4ac679
Compare
Closed
joostjager
force-pushed
the
anchor-output-poc-joost
branch
5 times, most recently
from
January 24, 2020 11:32
aaac70c
to
bec3316
Compare
joostjager
force-pushed
the
anchor-output-poc-joost
branch
3 times, most recently
from
January 27, 2020 10:33
e6c5a18
to
c72e852
Compare
joostjager
force-pushed
the
anchor-output-poc-joost
branch
2 times, most recently
from
February 12, 2020 09:03
cf266e3
to
8c9717c
Compare
joostjager
force-pushed
the
anchor-output-poc-joost
branch
from
March 16, 2020 16:55
e36eccc
to
a6784a4
Compare
Co-authored-by: Joost Jager <joost.jager@gmail.com>
Exclusive group is a static property that doesn't need to be updated. Requiring the exclusive group to be passed into UpdateParams creates a burden for the caller to make sure they supply the existing group. This change will be beneficial for users that bump anchor sweeps that have exclusive groups set.
joostjager
force-pushed
the
anchor-output-poc-joost
branch
from
March 17, 2020 13:21
a6784a4
to
64c60f2
Compare
halseth
reviewed
Mar 17, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, LGTM ✅ Only non-blockinng comments.
halseth
approved these changes
Mar 17, 2020
Prior to this change, the trigger height for closed channels was set to the current best block height. As this height is in some cases used as a height hint, the spend may have been missed.
Allows unit testing of the channel arbitrator with fewer dependencies. This is a preparation for the addition of anchor sweeping.
Relay fee is needed later to sweep anchors at the minimum fee rate.
joostjager
force-pushed
the
anchor-output-poc-joost
branch
from
March 17, 2020 15:34
64c60f2
to
2cd26d0
Compare
Need to fix |
joostjager
force-pushed
the
anchor-output-poc-joost
branch
2 times, most recently
from
March 18, 2020 08:08
b01923b
to
afc5023
Compare
Start anchor sweep attempts immediately after the commitment transaction has been published. This makes the anchor known to the sweeper and allows the user to bump the fee on it to get their commitment transaction confirmed in case the fee committed too is insufficient for timely confirmation.
Preparation for the anchor resolver which does not have persistent state.
Preparation for anchor resolver. The recovered anchor amount should still be included in the pending channel report even after it has been resolved. This also fixes an existing bug that in some cases caused the recovered amount from an htlc resolver not to be included in the total.
Sweeping anchors and being able to bump the fee was already added in a previous commit. This commit extends anchor sweeping with an anchor resolver object that becomes active after the commitment tx confirms. At that point, the anchors do not serve the purpose of getting the commitment tranaction confirmed anymore. It is however still possible to reclaim some of their value if using a low fee rate.
To make it easier to determine which pending sweep to bump in order to get your anchor commitment tx confirmed.
This command allows users to easily bump the fee on their unconfirmed closing transactions.
joostjager
force-pushed
the
anchor-output-poc-joost
branch
from
March 18, 2020 11:27
afc5023
to
fa115b5
Compare
Anchors itest failure fixed as part of 'cnct: pre-confirmation anchor sweep' |
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.
LND supports an experimental commitment format that produces anchor outputs (#3829, lightning/bolts#688). Anchor outputs allow users to increase the fee of their commitment txes after they've been published. It allows timely confirmation even if the miner fee of the commitment tx itself is insufficient.
This PR adds the functionality required to do so. When the commitment tx isn't confirming, the
BumpFee
rpc can be used to increase the fee of the total package. Anchor outpoints that are available can be discovered via thePendingChannels
andPendingSweeps
rpcs.To make the experience more friendly towards users, a composite
lncli
commandbumpclosefee
is added.For channels in the
waiting_close_channels
stage, this command can be used as follows:lncli wallet bumpclosefee 2b66cf489298b5b4a9305127413e4124e385588178e4b0fc4cec2d28c277b17d:0 --sat_per_byte 15
Notes:
lnd
needs to be built with thewalletrpc
subserver enabled.OpenChannel
when both sides runlnd
with--protocol.anchors
lnd
will most likely require anchor channels to be closed before upgrading.Important implementation changes made: