-
Notifications
You must be signed in to change notification settings - Fork 21
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
Fix Payjoin: Add back original PSBT input to payjoin proposal #267
Conversation
Unlike Bitcoin Core's walletprocesspsbt RPC, BKD's finalize_psbt only checks if the script in the PSBT input map matches the descriptor and does not check whether it has control of the OutPoint specified in the unsigned_tx's TxIn. So the original_psbt input data needs to be added back into payjoin_psbt without overwriting receiver input. BIP 78 spec clears script data from payjoin proposal.
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.
Neat! LGTM, we can test this in our next release.
I've added
|
e7188b9
to
de8d8b3
Compare
These changes still look fine. If any fixes need to be made, we can do them in a separate PR. I'll be sure to run CI checks on this as well. |
I've invited you to the project with write access so your contributions can run in CI more easily. |
Looks like there was a linter issue. I'm closing this for #269. |
Unlike Bitcoin Core's walletprocesspsbt RPC, BDK's finalize_psbt only checks if the script in the PSBT input map matches the descriptor and does not check whether it has control of the OutPoint specified in the unsigned_tx's TxIn. BIP 78 spec clears script data from payjoin proposal. So the original_psbt input data needs to be added back into payjoin_psbt without overwriting receiver input.
See where we ran into the same problem with BDK-CLI and the proposed solution there.