Skip to content

chore: Rename NoteMetadata to PartialNoteMetadata#2887

Merged
PhilippGackstatter merged 132 commits into
nextfrom
pgackst-partial-note-metadata
May 12, 2026
Merged

chore: Rename NoteMetadata to PartialNoteMetadata#2887
PhilippGackstatter merged 132 commits into
nextfrom
pgackst-partial-note-metadata

Conversation

@PhilippGackstatter
Copy link
Copy Markdown
Contributor

@PhilippGackstatter PhilippGackstatter commented May 8, 2026

Renames NoteMetadata to PartialNoteMetadata and NoteMetadataHeader to NoteMetadata as motivated in #2874 (comment).

Small change sneaked in: Simplifies BatchNoteTree and BlockNoteTree constructors to take NoteHeader instead of NoteId + NoteMetadata.

closes #2874

Also optimizes metadata header serialization.
Copy link
Copy Markdown
Collaborator

@mmagician mmagician left a comment

Choose a reason for hiding this comment

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

LGTM thanks!

Copy link
Copy Markdown
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you! I left a couple of optional nits inline.

Comment thread crates/miden-protocol/src/note/partial.rs Outdated
Comment thread crates/miden-protocol/src/note/metadata.rs
Base automatically changed from pgackst-multiple-note-attachments-followup to next May 12, 2026 09:36
PhilippGackstatter and others added 8 commits May 12, 2026 11:50
* Note lifecycle assertion macros

* Replace chain/tx assert macros with helper methods

Address comments from the issuse #2805, drop the 4 macros in favor of plain helper methods.
 - `assert_note_committed!`  -> `MockChain::is_note_committed`
 - `assert_note_unspent!`    -> `MockChain::is_note_unspent`
 - `assert_note_consumed!`   -> `MockChain::is_note_consumed`
 - `assert_note_consumed_by!` -> `ExecutedTransaction::consumes_note`

Keep `assert_note_created!` since it does spec matching with optional fields.
* fix(protocol): encode note metadata v1 as one

* fix(protocol): import ToString in metadata tests

* docs(protocol): clarify account id version checks

---------

Co-authored-by: Bobbin Threadbare <43513081+bobbinth@users.noreply.github.com>
@PhilippGackstatter PhilippGackstatter added this pull request to the merge queue May 12, 2026
Merged via the queue into next with commit d61a80a May 12, 2026
19 checks passed
@PhilippGackstatter PhilippGackstatter deleted the pgackst-partial-note-metadata branch May 12, 2026 10:26
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.

Rename NoteMetadataHeader

5 participants