Skip to content

Update NoteId and NoteCommitment computation#2861

Draft
Fumuran wants to merge 5 commits intonextfrom
andrew-note-id-rename
Draft

Update NoteId and NoteCommitment computation#2861
Fumuran wants to merge 5 commits intonextfrom
andrew-note-id-rename

Conversation

@Fumuran
Copy link
Copy Markdown
Contributor

@Fumuran Fumuran commented May 1, 2026

Summary

This PR separates note details from the full public note identifier: it introduces NoteDetailsCommitment (recipient + assets only), defines NoteId as the merged hash of the details commitment and metadata commitment (matching block/batch note-tree leaves), and renames kernel memory, assembly, and call sites so terminology matches that model end-to-end.

Changes

Rust (miden-protocol)

  • Adds NoteDetailsCommitment and wires NoteHeader / Note so the serialized header stores details commitment + metadata, while NoteId is derived via NoteId::new(details_commitment, metadata).
  • Updates NoteDetails to expose commitment() for the details hash (replacing the old overloaded id() semantics).
  • Adjusts block/batch note trees, Merkle verification, transaction inputs/outputs, batch trackers, advice inputs, and tests to use details commitment vs NoteId consistently; removes the previous compute_note_commitment-style helpers where superseded.

Transaction kernel (MASM + memory.rs)

  • Renames offsets (INPUT_NOTE_DETAILS_COMMITMENT_OFFSET, OUTPUT_NOTE_DETAILS_COMMITMENT_OFFSET) and procedures (compute_input_note_details_commitment, compute_output_note_details_commitment, set_input_note_details_commitment) so offset 0 of each note segment holds the details commitment; authentication uses NOTE_ID (merged leaf) and docs use EMPTY_WORD_OR_NOTE_ID for the input-notes commitment hash second limb where applicable.
  • Aligns kernel memory diagrams and constant names with the layout above.

Part of: #1731

@Fumuran Fumuran added the pr-from-maintainers PRs that come from internal contributors or integration partners. They should be given priority label May 1, 2026
@Fumuran Fumuran marked this pull request as ready for review May 6, 2026 16:36
@Fumuran Fumuran requested review from PhilippGackstatter and mmagician and removed request for PhilippGackstatter and mmagician May 6, 2026 16:38
@Fumuran
Copy link
Copy Markdown
Contributor Author

Fumuran commented May 6, 2026

Work should be continued after #2874 is solved

@Fumuran Fumuran marked this pull request as draft May 6, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-from-maintainers PRs that come from internal contributors or integration partners. They should be given priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant