Closed alexbosworth closed 2 years ago
I think I spotted the issue, when we sign we skip if the bip32 derivation info isn't present: https://github.com/lightningnetwork/lnd/blob/master/lnwallet/btcwallet/psbt.go#L132-L136
However, when we fund w/ a P2TR input, we only place the new taproot specific info: https://github.com/btcsuite/btcwallet/blob/af5562928b707e0b56c1e44052ece3205bb66552/wallet/psbt.go#L273-L288
The itests we have also always put both and old and new information: https://github.com/lightningnetwork/lnd/blob/7106ea59db9ade78d65bb46605f94637900c0e3f/lntest/itest/lnd_psbt_test.go#L769-L776
If this is correct, then we need to fix this on the btcwallet
side, then update the lnd
dep.
Background
Given a funded PSBT using
FundPsbt
, the resulting funded PSBT should be able to be signed withSignPsbt
but there is no signature being added in the result ofSignPsbt
when an input is a P2TR input like there is when an input is a P2WPKH.Your environment
Steps to reproduce
FundPsbt
with 1 output and 1 input, where the input is a P2TRSignPsbt
in walletrpcAlso do the same thing, but where the input is a P2WPKH
Expected behavior
Both the P2TR signing and the P2WPKH signing should result in a partially signed PSBT
Actual behavior
For the P2TR funded PSBT the output of
SignPsbt
will be equal to the output ofFundPbst
, meaning it is not partially signedFor the P2WPKH funded PSBT it will include a partial signature as expected