-
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
multi: use taproot errwhere applicable for change/delivery/tower addresses #6810
Conversation
@guggero I fixed that failing tower test by using a taproot address in the test itself. It was using a p2pkh address before. |
25e6b40
to
93a138a
Compare
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.
There seem to be more fee estimation issues hidden somewhere in the funding flow.
I see this error in the basic_funding_flow
itest: unmatched backend error: -26: TX rejected: transaction 370af31500a362f8b0e2b097ed33dc2de533b0a917316934097cf00272c30c11 has insufficient priority (2.9268292682926827e+06 <= 5.76e+07)
We seem to assume P2WKH outputs in several places:
- funding change output: https://github.com/lightningnetwork/lnd/blob/master/lnwallet/chanfunding/coin_select.go#L102
- justice output of breach sweep: https://github.com/lightningnetwork/lnd/blob/master/contractcourt/breacharbiter.go#L1352
- watchtower reward output: https://github.com/lightningnetwork/lnd/blob/master/watchtower/wtclient/backup_task.go#L201
93a138a
to
b628e3f
Compare
Alrighty, I pushed up a set of fresh commits that should cover all the outstanding cases. I broke up the commits to make things a bit easier to follow. There were a still areas where we also assumed the expected dust output that should be fixed. |
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.
Nice, LGTM 🎉
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.
minor comment/qs
ed0d0c5
to
6093c75
Compare
This change covers sweep addresses for: the breach arbitrator, and watch tower clients.
In this commit, we modify the watch tower to use P2TR addrs for just about anything sweep related. One eye sore in this diff are the changes to `backup_task_internal_test.go`. All the values are hard coded, and now either differ by a value of 48, or needed to be modified to account for the new assumptions propagated to rewards values and fees.
6093c75
to
91bc4b5
Compare
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.
lgtm if sign_psbt
here (https://github.com/lightningnetwork/lnd/runs/7798107595?check_suite_focus=true) is an unrelated flake
Investigated offline, appears to be a flake unique to the |
With this PR, we'll start to use taproot addresses by default when: sweeping all funds from the wallet, funding channels, and sending blobs to watch towers.
Fixes #6666