Skip to content

chore: remove unused SWAP and MINT attachments#2789

Open
PhilippGackstatter wants to merge 2 commits intonextfrom
pgackst-remove-parametric-attachment
Open

chore: remove unused SWAP and MINT attachments#2789
PhilippGackstatter wants to merge 2 commits intonextfrom
pgackst-remove-parametric-attachment

Conversation

@PhilippGackstatter
Copy link
Copy Markdown
Contributor

Removes unused attachment fields from SwapNoteStorage and MintNoteStorage.

Summary

  • Remove payback_attachment: NoteAttachment from SwapNoteStorage and the corresponding payback_note_attachment parameter from SwapNote::create
  • Remove attachment: NoteAttachment from both MintNoteStorage::Private and MintNoteStorage::Public variants, along with the with_attachment() method
  • Update SWAP and MINT MASM note scripts to remove attachment storage/loading and output_note::set_attachment calls
  • Reorder storage layouts to maintain word-aligned addresses for mem_loadw_le / mem_storew_le operations

Motivation

These attachment fields were always set to NoteAttachment::default() and never used. Removing them simplifies the storage layout and reduces the note storage size.

Note: The metadata attachment on the note (e.g. swap_note_attachment in SwapNote::create, attachment in MintNote::create) is not removed — only the redundant attachment fields stored inside the note storage.

This also makes the multiple note attachments PR easier to update.

part of #2555

@PhilippGackstatter PhilippGackstatter force-pushed the pgackst-remove-parametric-attachment branch from 113efda to 9b467ab Compare April 17, 2026 11:32
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.

1 participant