fix(store): network notes must be public#1738
Merged
Mirko-von-Leipzig merged 5 commits intonextfrom Mar 4, 2026
Merged
Conversation
b2c665b to
7f40b6a
Compare
7f40b6a to
313defa
Compare
313defa to
22869b2
Compare
SantiagoPittella
approved these changes
Mar 3, 2026
igamigo
reviewed
Mar 4, 2026
Comment on lines
+86
to
+92
| // We check first to avoid cloning non-network notes. | ||
| OutputNote::Full(inner) => inner.is_network_note().then_some( | ||
| inner | ||
| .clone() | ||
| .into_account_target_network_note() | ||
| .expect("we just checked that this is a network note"), | ||
| ), |
Collaborator
There was a problem hiding this comment.
@juan518munoz found an issue here where this panics. then_some() will imply evaluating the inner value regardless, whereas something like then() would do it lazily. In any case we also found that it's probably not even necessary to check for if note.is_network_note() because the inner conversion already implicitly checks so you can probably mtach/check for Ok(network_note) instead. He'll open a PR soon.
Collaborator
Author
There was a problem hiding this comment.
Ah of course 🤦 Thank you!
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.
The counterpart of #1736 for the
nextbranch.This PR updates
miden-protocolto 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