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
guggero
left a comment
There was a problem hiding this comment.
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. |
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
Crypt-iQ
left a comment
There was a problem hiding this comment.
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