Skip to content

refactor(standards): unify PSWAP paybacks with fixed recipients - #4074

Open
partylikeits1983 wants to merge 38 commits into
ajl-pswap-fixed-recipientfrom
ajl-pswap-fixed-paybacks
Open

partylikeits1983 wants to merge 38 commits into
ajl-pswap-fixed-recipientfrom
ajl-pswap-fixed-paybacks

Conversation

@partylikeits1983

@partylikeits1983 partylikeits1983 commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Use a fixed recipient hash for both public and private PSWAP paybacks. Public paybacks use P2ID; private fills can target any note script, while private cancellation requires a P2ID preimage.

Fill attachments distinguish successive payments. Both modes accept explicit discovery tags; PswapNote::PAYBACK_TAG provides a shared tag without identifying the owner. Public reclaim still requires the creator account.

@partylikeits1983 partylikeits1983 changed the title Use fixed recipients for both PSWAP payback modes refactor(standards): unify PSWAP paybacks with fixed recipients Oct 20, 2026
@partylikeits1983 partylikeits1983 added the standards Related to standard note scripts or account components label Oct 20, 2026
Comment on lines 57 to 59
Public { recipient: P2idNoteRecipient },
/// Private P2ID paybacks to a fixed recipient commitment, with an explicit discovery tag.
Private { recipient: Word, tag: NoteTag },

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.

could we also not add a tag with the public payback variant, and simplify things further?

@partylikeits1983
partylikeits1983 marked this pull request as ready for review October 21, 2026 17:47
# Conflicts:
#	crates/miden-standards/asm/standards/notes/pswap.masm
@partylikeits1983
partylikeits1983 marked this pull request as draft October 22, 2026 12:16
@partylikeits1983
partylikeits1983 removed this pull request from stack #4085 October 22, 2026 18:06
@partylikeits1983
partylikeits1983 marked this pull request as ready for review October 22, 2026 18:09

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

standards Related to standard note scripts or account components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants