Skip to content

Conversation

@PhilippGackstatter
Copy link
Contributor

Introduces a standard NetworkAccountTarget attachment for use in network transactions. It replaces NoteTag::NetworkAccount (removed in #2219) to identify notes targeted at network accounts. To create a "targeted network note", i.e. a note intended to be consumed by a network account, this attachment should be used instead of using NoteTag::NetworkAccount.

Miden node can try decoding a NoteAttachment (accessible in NoteMetadata) into a NetworkAccountTarget to check if a note is targeted at a network account. An alternative way would be to check if NoteAttachment::attachment_type() == NetworkAccountTarget::ATTACHMENT_TYPE and only then attempt decoding.

Tagging @Mirko-von-Leipzig and @sergerad for review since this type will be used in network transactions. Please let me know if the process I described would work or if you need any additional APIs exposed, etc.

part of #2109

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 just a couple of small comments inline.

@PhilippGackstatter PhilippGackstatter force-pushed the pgackst-note-attachment-kernel-api branch from cff70aa to e22c488 Compare January 15, 2026 07:52
Base automatically changed from pgackst-note-attachment-kernel-api to next January 15, 2026 08:07
@PhilippGackstatter PhilippGackstatter force-pushed the pgackst-network-note-attachment branch from 7726b77 to e8d4f86 Compare January 15, 2026 08:12
@PhilippGackstatter PhilippGackstatter merged commit b2b8c20 into next Jan 15, 2026
17 checks passed
@PhilippGackstatter PhilippGackstatter deleted the pgackst-network-note-attachment branch January 15, 2026 08:26
afa7789 pushed a commit to afa7789/miden-base that referenced this pull request Jan 15, 2026
)

* feat: Implement `NetworkAccountTarget`

* chore: Let SPAWN note create output notes with attachment

* chore: test creating note with NetworkAccountTarget attachment

* chore: add changelog

* fix: don't use super::* import

* feat: Add `WellKnownNoteAttachment`

* chore: Use 8-bit tag for exec hint; remove `AfterBlockNumber`

* chore: improve network account target error
afa7789 pushed a commit to afa7789/miden-base that referenced this pull request Jan 15, 2026
)

* feat: Implement `NetworkAccountTarget`

* chore: Let SPAWN note create output notes with attachment

* chore: test creating note with NetworkAccountTarget attachment

* chore: add changelog

* fix: don't use super::* import

* feat: Add `WellKnownNoteAttachment`

* chore: Use 8-bit tag for exec hint; remove `AfterBlockNumber`

* chore: improve network account target error
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.

5 participants