Skip to content

Remove sender sigs from receiver psbt_to_sign#1560

Merged
arminsabouri merged 1 commit into
payjoin:masterfrom
xstoicunicornx:update-psbt_to_sign
May 16, 2026
Merged

Remove sender sigs from receiver psbt_to_sign#1560
arminsabouri merged 1 commit into
payjoin:masterfrom
xstoicunicornx:update-psbt_to_sign

Conversation

@xstoicunicornx
Copy link
Copy Markdown
Collaborator

Summary

Currently the psbt_to_sign helper function in the ProvisionalProposal typestate in v1 and v2 returns the provisional proposal without removing the outdated sender signature elements. Since the purpose of this helper function is to allow the caller to extract the PSBT for the payjoin proposal tx so that it can be signed outside of the state machine flow it makes sense to return a PSBT that has already stripped the outdated sender signature(s) rather than forcing the caller to do this themselves.

Misc

This was suggested to be a separate PR that could probably get merged faster here.

Please confirm the following before requesting review:

@coveralls
Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 25944304013

Coverage increased (+0.004%) to 85.297%

Details

  • Coverage increased (+0.004%) from the base build.
  • Patch coverage: 15 of 15 lines across 3 files are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 13671
Covered Lines: 11661
Line Coverage: 85.3%
Coverage Strength: 395.75 hits per line

💛 - Coveralls

Copy link
Copy Markdown
Collaborator

@spacebear21 spacebear21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK, clean and reasonable refactor

Copy link
Copy Markdown
Collaborator

@arminsabouri arminsabouri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK f4dbf3d

tracing::trace!("Clearing sender input {i}");
psbt.inputs[i].final_script_sig = None;
psbt.inputs[i].final_script_witness = None;
psbt.inputs[i].tap_key_sig = None;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Odd that we remove keyspend sigs and not script or any other partial sig. Which should not be present either way (only final_script_sig or final_script_witness)

Comment thread payjoin/src/core/receive/mod.rs
@arminsabouri arminsabouri merged commit bf6e060 into payjoin:master May 16, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants