lightningnetwork / lnd

Lightning Network Daemon ⚡️
MIT License
7.65k stars 2.07k forks source link

sweep+funding: default to P2TR outputs for all change addresses and new addrs #6666

Closed Roasbeef closed 2 years ago

Roasbeef commented 2 years ago

Tracking a follow up from the recent PR that supports P2TR inputs in the sweeper: https://github.com/lightningnetwork/lnd/pull/6632#discussion_r894698363

In a few areas, we still use p2wkh addr by default when generating funding outputs and change addrs when sweeping. We shoudl switch to always using P2TR outputs for change addrs, as then that'll tend all a user's funds towards P2TR outputs over time just due to normal operation.

The comment thread linked above shows all the known areas that need to be modified to using P2TR everywhere for change addrs.

carlaKC commented 2 years ago

Interested in picking this up if nobody's working on it yet?

guggero commented 2 years ago

Feel free to look into this. I started and then ran into some fee estimation issues. See my WIP commit here: https://github.com/guggero/lnd/tree/default-change-taproot

Roasbeef commented 2 years ago

Related PR: https://github.com/lightningnetwork/lnd/pull/6633

Roasbeef commented 2 years ago

@carlaKC are you still planning on tackling this?

Roasbeef commented 2 years ago

PR up here: #6810. Thx @guggero for starting the impl