Skip to content

fix(store): network notes must be public#1738

Open
Mirko-von-Leipzig wants to merge 3 commits intonextfrom
mirko/fix-network-notes-next
Open

fix(store): network notes must be public#1738
Mirko-von-Leipzig wants to merge 3 commits intonextfrom
mirko/fix-network-notes-next

Conversation

@Mirko-von-Leipzig
Copy link
Collaborator

@Mirko-von-Leipzig Mirko-von-Leipzig commented Mar 3, 2026

The counterpart of #1736 for the next branch.

This PR updates miden-protocol to include 0xMiden/protocol#2365 which added network note support. This PR then replaces our adhoc (and faulty) implementation with the one from protocol.

This does leave our types and conversions in a bit of a wonky state -- things could be cleaned up further, but since we're already actively refactoring the ntx-builder I've elected to not do this.

Fixes #1726

@Mirko-von-Leipzig Mirko-von-Leipzig force-pushed the mirko/fix-network-notes-next branch from b2c665b to 7f40b6a Compare March 3, 2026 08:53
@Mirko-von-Leipzig Mirko-von-Leipzig force-pushed the mirko/fix-network-notes-next branch from 7f40b6a to 313defa Compare March 3, 2026 08:53
@Mirko-von-Leipzig Mirko-von-Leipzig marked this pull request as ready for review March 3, 2026 08:53
@Mirko-von-Leipzig Mirko-von-Leipzig force-pushed the mirko/fix-network-notes-next branch from 313defa to 22869b2 Compare March 3, 2026 08:59
account_id: conversions::network_account_id_to_bytes(note.account_id()),
note_data: conversions::single_target_note_to_bytes(note),
nullifier: conversions::nullifier_to_bytes(&note.as_note().nullifier()),
account_id: conversions::network_account_id_to_bytes(
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: there's a bit of an inconsistency on how we are casting to bytes. In https://github.com/0xMiden/node/pull/1738/changes#diff-18f92718b4914ffa99386fe38041dec4064cde98763edefa1f8750462449af70R142 we are using:

            nullifier: note.as_note().nullifier().to_bytes(),
            account_id: note.target_account_id().to_bytes(),

Copy link
Contributor

@partylikeits1983 partylikeits1983 left a comment

Choose a reason for hiding this comment

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

Looks great!

Copy link
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!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Network note missing public details

4 participants