Repository navigation
feat(protocol): add output note sealing - #3923
Merged
Merged
Conversation
partylikeits1983
marked this pull request as ready for review
September 22, 2026 13:06
partylikeits1983
requested review from
PhilippGackstatter,
bobbinth and
mmagician
and removed request for
PhilippGackstatter
September 22, 2026 13:06
This was referenced Sep 22, 2026
zeapoz
reviewed
Sep 23, 2026
zeapoz
left a comment
Collaborator
There was a problem hiding this comment.
Implementation looks good to me! The question of whether this is the right approach I'll defer to other reviewers, but I left a couple of nits I spotted.
Merge next at 701b6e1 to pick up the latest release workflow updates. Link the sealing changelog entry to PR #3923, align the seal procedure table row, clarify the sealed-flag offset documentation, and rename the mixed test helper section to HELPERS. Validation: 77 output-note, callback, and foreign-account tests passed; workspace formatting, targeted spelling, and diff checks passed.
partylikeits1983
added a commit
that referenced
this pull request
Sep 23, 2026
Integrate PR #3923 and its latest next merge so PSWAP can compile and enforce immutable paybacks and remainders.
bobbinth
reviewed
Sep 23, 2026
bobbinth
left a comment
Contributor
There was a problem hiding this comment.
Looks good! Thank you! I left a few comments inline - the biggest one is about adding the is_sealed procedure.
PhilippGackstatter
approved these changes
Sep 24, 2026
PhilippGackstatter
left a comment
Contributor
There was a problem hiding this comment.
LGTM, left a few suggestions, nothing major.
zeapoz
approved these changes
Sep 24, 2026
zeapoz
left a comment
Collaborator
There was a problem hiding this comment.
Looks good! Left a question and a suggestion to reorganize some preexisting docs
Fumuran
approved these changes
Sep 25, 2026
Fumuran
left a comment
Contributor
There was a problem hiding this comment.
Looks great, I don't have any comments whatsoever!
partylikeits1983
added this pull request to stack #3948
September 25, 2026 10:43
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
summary:
This PR adds
miden::protocol::output_note::seal(note_idx). Once sealed, any attempt to add assets or attachments fails. Sealing is irreversible within the transaction and idempotent; other output notes remain mutable.The sealed flag is stored beside the dirty flag in output note memory.
output_note::sealrequires the active account to be the native account. The newoutput_note::is_sealed(note_idx)procedure returns the flag and can be called from any context.Note sealing is opt in. Note serialization and commitments are unchanged. This provides the kernel prerequisite for #3918 and #3911.
Related: output note sealing discussion, #3909.
why this is needed:
The shielded PSWAP flow needs to create a private
P2IDwhose contents the recipient can reconstruct. Currently, thePSWAPfiller can add assets or attachments to that output later in the transaction, changing itsNoteIdand making it unrecoverable from the expected details.