Skip to content

docs(standards): document that note scripts claim only remaining note assets - #3650

Merged
mmagician merged 6 commits into
nextfrom
mmagician-claude/docs-note-scripts-remaining-assets
Aug 21, 2026
Merged

docs(standards): document that note scripts claim only remaining note assets#3650
mmagician merged 6 commits into
nextfrom
mmagician-claude/docs-note-scripts-remaining-assets

Conversation

@mmagician

@mmagician mmagician commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

Documents the behavior discussed in #3601: standard note scripts claim the assets remaining in a note at consumption time, not the assets the note was funded with.

This is documentation only, and as pointed out in this comment, it

closes #3601

PSWAP is fixed in a stacked follow-up

PSWAP is the one standard script where the remaining-vs-initial distinction is not a benign characteristic but an economic drain: it prices the fill and sizes the creator's remainder note from the remaining offered amount.

claude added 2 commits August 20, 2026 14:17
… assets

Standard note scripts move the assets remaining in a note at consumption
time and do not compare them against the note's initial assets info. Per
the discussion in #3601 this is intentional (it enables authorized
deductions such as fees), so document the behavior where notes claim
their assets.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The PSWAP offered-amount drain is being fixed directly in a follow-up PR
rather than documented as accepted behavior, so remove the PSWAP hazard
warnings from this docs change. The neutral remaining-vs-initial wording
is kept consistent with the rest of the standards pass, and the SWAP note
(whose loss is consumer-side and not being changed) stays documented here.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread crates/miden-standards/asm/standards/notes/swap.masm Outdated
Comment thread crates/miden-standards/asm/standards/wallets/basic.masm Outdated
Comment thread crates/miden-standards/src/note/swap.rs Outdated
Comment thread docs/src/note.md Outdated
mmagician and others added 2 commits August 20, 2026 22:26
@mmagician
mmagician marked this pull request as ready for review August 20, 2026 20:27

@bobbinth bobbinth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good! Thank you!

@zeapoz zeapoz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good to me!

Comment thread CHANGELOG.md Outdated
@mmagician
mmagician added this pull request to the merge queue Aug 21, 2026
Merged via the queue into next with commit a354b72 Aug 21, 2026
20 checks passed
@mmagician
mmagician deleted the mmagician-claude/docs-note-scripts-remaining-assets branch August 21, 2026 14:02
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.

L-14: Standard Note Scripts Do Not Verify That They Claim a Note's Full Assets

4 participants