Skip to content

Conversation

@SantiagoPittella
Copy link
Collaborator

In this PR I:

@SantiagoPittella SantiagoPittella added the no changelog This PR does not require an entry in the `CHANGELOG.md` file label Jan 21, 2026
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! I left a couple of comments inline - but nothing that's blocking this PR.

I do think we potentially have a bigger issue though that we should address in a follow-up PR:

It seems like we are still relying on note tag to find notes for a network account. Technically, this shouldn't work because network notes shouldn't use tags to encode target accounts (cc @PhilippGackstatter to confirm). Instead, they should be using note attachment data which contains full ID of the target account.

This has a couple of implications:

  • First, select_unconsumed_network_notes_by_tag() should really be select_unconsumed_network_notes_for_account() and should take account_id as a parameter instead of the tag.
  • Second, in addition (or maybe instead of) network_note_type, we probably want to have something like target_account_id field that is populated only for single-target network notes. Then, the query would be filtering against this ID rather than the tag.

Comment on lines 653 to 658
pub(crate) async fn select_unconsumed_network_notes(
&self,
network_account_prefix: u32,
block_num: BlockNumber,
page: Page,
) -> Result<(Vec<NoteRecord>, Page)> {
Copy link
Contributor

Choose a reason for hiding this comment

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

This may be a bigger refactoring, and so, probably not for this PR - but we should be using account ID here instead of network_account_prefix. Do we have an issue to change this already? If not, let's create one.

Copy link
Collaborator

Choose a reason for hiding this comment

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

We have #1549 which covers this

@PhilippGackstatter
Copy link
Contributor

It seems like we are still relying on note tag to find notes for a network account. Technically, this shouldn't work because network notes shouldn't use tags to encode target accounts (cc @PhilippGackstatter to confirm). Instead, they should be using note attachment data which contains full ID of the target account.

Yes, we should not be relying on the note tag at all for network notes anymore and should use the NetworkAccountTarget attachment instead.

@Mirko-von-Leipzig
Copy link
Collaborator

Mirko-von-Leipzig commented Jan 22, 2026

It seems like we are still relying on note tag to find notes for a network account. Technically, this shouldn't work because network notes shouldn't use tags to encode target accounts (cc @PhilippGackstatter to confirm). Instead, they should be using note attachment data which contains full ID of the target account.

Yes, we should not be relying on the note tag at all for network notes anymore and should use the NetworkAccountTarget attachment instead.

As in, this will still work temporarily, or this won't work at all and must be fixed before deploying to testnet?

@PhilippGackstatter
Copy link
Contributor

As in, this will still work temporarily, or this won't work at all and must be fixed before deploying to testnet?

Must be fixed before testnet. Relying on the note tag does not work anymore at all.

@bobbinth bobbinth modified the milestone: v0.13.0 Jan 22, 2026
@drahnr drahnr force-pushed the santiagopittella-miden-base-update-followups branch 2 times, most recently from 642a584 to 12c1ee4 Compare January 22, 2026 12:43
@drahnr
Copy link
Contributor

drahnr commented Jan 22, 2026

@SantiagoPittella I accidentally pushed to this/your branch (one additional commit), and force pushed back to your original state. Nothing should have changed 🤞

@SantiagoPittella SantiagoPittella merged commit ee46285 into next Jan 22, 2026
18 checks passed
@SantiagoPittella SantiagoPittella deleted the santiagopittella-miden-base-update-followups branch January 22, 2026 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog This PR does not require an entry in the `CHANGELOG.md` file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants