According to the psbt Input Finalizer spec “All other data except the UTXO and unknown fields in the input key-value map should be cleared from the PSBT. The UTXO should be kept to allow Transaction Extractors to verify the final network serialized transaction.” In Bip78, the receiver clears this data after it finalizes its inputs, even if the utxo belongs to the sender which will need that data.
I ran into a problem where LND’s FinalizePsbt gRPC fails when this utxo data is missing. I see no good reason to remove this utxo information from the PSBT. I think LND’s RPC should also succeed regardless of this data being present because it can look it up with the unsigned_tx’s input outpoint (that’s what bitcoind’s finalizePsbt rpc does). Still I think LND’s RPC is technically BIP-0174 spec-compliant while BIP-0078 seems not to be.
https://github.com/lightningnetwork/lnd/blob/cf9a9864cf253dbbcac5904d360bbbde763e1ebe/lnwallet/rpcwallet/rpcwallet.go#L270-L286 According to the psbt Input Finalizer spec “All other data except the UTXO and unknown fields in the input key-value map should be cleared from the PSBT. The UTXO should be kept to allow Transaction Extractors to verify the final network serialized transaction.”
I ran into a problem where an LND acting as sender FinalizePsbt gRPC fails when sender utxo information is missing. I see no good reason to remove utxo information from the PSBT.
Edit Jun 2024: This problem also cropped up in sparrow wallet
tagging this issue in the rust-payjoin library @nickfarrow @kixunil @nicolasdorier