feat(standards): add salted P2ID constructors - #3897
Open
partylikeits1983 wants to merge 8 commits into
Open
partylikeits1983 wants to merge 8 commits into
partylikeits1983 wants to merge 8 commits into
Conversation
bobbinth
reviewed
Sep 17, 2026
partylikeits1983
requested review from
PhilippGackstatter,
bobbinth,
mmagician and
zeapoz
September 17, 2026 13:43
partylikeits1983
marked this pull request as ready for review
September 17, 2026 13:43
mmagician
reviewed
Sep 17, 2026
zeapoz
reviewed
Sep 17, 2026
zeapoz
left a comment
Collaborator
There was a problem hiding this comment.
Looks good to me! But I think we can improve the repeated doc sections a bit, and consolidate the redefined storage pointer constants
Share storage pointer constants between the P2ID script and constructors, and link salt setters to one privacy explanation. Move the follow-up changelog entries to Unreleased for the next release.
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.
MASM callers can now supply salt when creating P2ID notes through
prepare_note_with_saltandcreate_output_note_with_salt. Existing constructors remain "zero salt" wrappers.P2ID's consumption script lives in
p2id/script.masm, with constructors and public exports inp2id/mod.masm. There is precedent for this directory structure innotes/mint/, which separates fungible and non-fungible implementations.P2idNoteStoragenow usesbon::Builder, replacingwith_salt. Both Rust builders addgenerate_salt(&mut rng). Private notes continue to default to zero salt; the docs explain how to supply random, secret salt and the remaining note-tag privacy limitation.Follow-up to #3887.