-
Notifications
You must be signed in to change notification settings - Fork 165
chore: refactor miden::protocol from ASSET to ASSET_KEY and ASSET_VALUE
#2410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 51 commits
Commits
Show all changes
94 commits
Select commit
Hold shift + click to select a range
dcd7ffa
chore: use `get_balance` helper in account_delta
PhilippGackstatter 67718c7
chore: Add `TryFrom<Word> for AssetVaultKey`
PhilippGackstatter 2052f82
feat: refactor `asset.masm`
PhilippGackstatter acdc97b
feat: add `fungible_asset.masm`
PhilippGackstatter 0374da3
feat: refactor `asset_vault.masm`
PhilippGackstatter 9b4e83b
feat: refactor `faucet.masm`
PhilippGackstatter 09ac617
feat: refactor `account.masm`
PhilippGackstatter aff2d9d
feat: refactor `account_delta.masm`
PhilippGackstatter 7137504
feat: refactor `epilogue.masm`
PhilippGackstatter a8086f1
feat: refactor `output_note.masm`
PhilippGackstatter f7d8454
feat: refactor `prologue.masm`
PhilippGackstatter 9be1b36
chore: increase `NOTE_MEM_SIZE` to 3072
PhilippGackstatter d7552fb
chore: adapt `NoteAssets` commitment
PhilippGackstatter 798df71
feat: refactor `note.masm`
PhilippGackstatter d7c4094
chore: refactor `api.masm`
PhilippGackstatter f83cd68
chore: regenerate kernel proc hashes
PhilippGackstatter 3ea65e5
chore: add changelog
PhilippGackstatter 199643b
Merge remote-tracking branch 'origin/next' into pgackst-kernel-asset-…
PhilippGackstatter 349a829
Merge remote-tracking branch 'origin/next' into pgackst-kernel-asset-…
PhilippGackstatter c1b163f
fix: faucet::mint output docs
PhilippGackstatter 96fe20e
Merge remote-tracking branch 'origin/next' into pgackst-kernel-asset-…
PhilippGackstatter be81101
Merge branch 'next' into pgackst-kernel-asset-key-value
PhilippGackstatter 1774785
Merge remote-tracking branch 'origin/next' into pgackst-kernel-asset-…
PhilippGackstatter 23263d6
chore: update memory.rs input/output note memory layouts
PhilippGackstatter d85482b
fix: duplicate num assets in memory.rs table
PhilippGackstatter e6909da
feat: move `build_asset_vault_key` to shared utils
PhilippGackstatter 2f200d5
feat: refactor `faucet::mint`
PhilippGackstatter 02502ee
feat: refactor `faucet::burn`
PhilippGackstatter 2a6cc50
chore: refactor `create_non_fungible_asset` for uniformity
PhilippGackstatter 01a0591
feat: refactor `native_account::remove_asset`
PhilippGackstatter 7256ad2
chore: move `mock::util` lib to miden-standards
PhilippGackstatter d3c7220
feat: refactor `move_asset_to_note`
PhilippGackstatter 82df521
feat: add asset key to SWAP storage
PhilippGackstatter 0b650bf
feat: refactor `native_account::add_asset`
PhilippGackstatter 5ff13bd
chore: refactor `receive_asset`
PhilippGackstatter b8bab15
feat: refactor `output_note::add_asset`
PhilippGackstatter 6a8dfd9
chore: deduplicate epilogue asset preservation test
PhilippGackstatter 21b0b02
chore: remove re-export of vault key builder procedures
PhilippGackstatter fc0e850
chore: regenerate kernel procedure hashes
PhilippGackstatter 77f4984
chore: add changelog
PhilippGackstatter 8530a46
fix: doc link to mock util lib
PhilippGackstatter b360b7d
chore: improve send_note_body impl and test
PhilippGackstatter b1af2ca
fix: replace leftover `ASSET`s with `ASSET_VALUE`
PhilippGackstatter 23daea6
chore: update protocol library docs
PhilippGackstatter 1a9963f
fix: rename leftover `ASSET` to `ASSET_VALUE`
PhilippGackstatter 136678c
Merge remote-tracking branch 'origin/next' into pgackst-kernel-asset-…
PhilippGackstatter abb0a94
Merge branch 'pgackst-kernel-asset-key-value' into pgackst-user-asset…
PhilippGackstatter 7ca82dd
chore: remove unused error
PhilippGackstatter e11fb33
chore: regenerate tx kernel errors
PhilippGackstatter f2f062c
Merge remote-tracking branch 'origin/next' into pgackst-kernel-asset-…
PhilippGackstatter 65a15aa
Merge branch 'pgackst-kernel-asset-key-value' into pgackst-user-asset…
PhilippGackstatter 60a00c7
Merge remote-tracking branch 'origin/next' into pgackst-kernel-asset-…
PhilippGackstatter fd47b2e
chore: improve note assets commitment computation
PhilippGackstatter 51c91f2
fix: input notes memory assertions
PhilippGackstatter d8de731
Merge branch 'pgackst-kernel-asset-key-value' into pgackst-user-asset…
PhilippGackstatter 625a3c8
chore: add renamed procedures to changelog
PhilippGackstatter 04a5fef
fix: incorrect stack and doc comment
PhilippGackstatter f416eec
Merge remote-tracking branch 'origin/next' into pgackst-kernel-asset-…
PhilippGackstatter ac817c4
Merge branch 'pgackst-kernel-asset-key-value' into pgackst-user-asset…
PhilippGackstatter 955d92b
fix: p2id::new test
PhilippGackstatter 1550298
Initial plan
Copilot c4bf16a
Address review nits: add load_asset_key_and_value utility, use explic…
Copilot e81a8ea
Fix load_asset_key_and_value procedure and usages in prologue and epi…
Copilot 7a57963
Run cargo fmt to fix formatting issues
Copilot 1ce31fa
Rename asset_value back to asset in tx_event.rs
Copilot 7bb2c67
Run cargo fmt to fix formatting after variable rename
Copilot e0ac414
Merge pull request #2438 from 0xMiden/copilot/sub-pr-2396
PhilippGackstatter 525d94f
Merge branch 'next' into pgackst-kernel-asset-key-value
PhilippGackstatter 7639505
Merge branch 'pgackst-kernel-asset-key-value' into pgackst-user-asset…
PhilippGackstatter 0a49bb4
Merge remote-tracking branch 'origin/next' into pgackst-kernel-asset-…
PhilippGackstatter 0ff5601
Merge branch 'pgackst-kernel-asset-key-value' into pgackst-user-asset…
PhilippGackstatter baf7474
Merge remote-tracking branch 'origin/next' into pgackst-kernel-asset-…
PhilippGackstatter 76f343e
Merge branch 'pgackst-kernel-asset-key-value' into pgackst-user-asset…
PhilippGackstatter 14e80e5
Merge remote-tracking branch 'origin/next' into pgackst-kernel-asset-…
PhilippGackstatter 2d42665
Merge branch 'pgackst-kernel-asset-key-value' into pgackst-user-asset…
PhilippGackstatter 7abde8b
Merge remote-tracking branch 'origin/next' into pgackst-kernel-asset-…
PhilippGackstatter c06263a
Merge branch 'pgackst-kernel-asset-key-value' into pgackst-user-asset…
PhilippGackstatter 8c82bea
Merge remote-tracking branch 'origin/next' into pgackst-kernel-asset-…
PhilippGackstatter 98bf47d
Merge branch 'pgackst-kernel-asset-key-value' into pgackst-user-asset…
PhilippGackstatter e31542d
Merge remote-tracking branch 'origin/next' into pgackst-kernel-asset-…
PhilippGackstatter ee4ccff
Merge branch 'pgackst-kernel-asset-key-value' into pgackst-user-asset…
PhilippGackstatter 97d02da
fix: avoid using undeclared stack
PhilippGackstatter 934f049
feat: reexport asset::mem_load
PhilippGackstatter fa660cd
Merge remote-tracking branch 'origin/next' into pgackst-kernel-asset-…
PhilippGackstatter 8ddcfd2
Merge branch 'pgackst-kernel-asset-key-value' into pgackst-user-asset…
PhilippGackstatter 9fc1662
Merge remote-tracking branch 'origin/next' into pgackst-kernel-asset-…
PhilippGackstatter f90acc8
Merge branch 'pgackst-kernel-asset-key-value' into pgackst-user-asset…
PhilippGackstatter 4a552a1
feat: Add `Asset::as_elements`
PhilippGackstatter 069ba66
chore: use `asset::mem_load` in swap note
PhilippGackstatter 25e1d54
Merge remote-tracking branch 'origin/next' into pgackst-kernel-asset-…
PhilippGackstatter e4bc64f
Merge branch 'pgackst-kernel-asset-key-value' into pgackst-user-asset…
PhilippGackstatter a7c52b2
Merge remote-tracking branch 'origin/next' into pgackst-kernel-asset-…
PhilippGackstatter 9f61f79
Merge branch 'pgackst-kernel-asset-key-value' into pgackst-user-asset…
PhilippGackstatter fc5ad3a
Merge remote-tracking branch 'origin/next' into pgackst-user-asset-ke…
PhilippGackstatter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not for this PR, but I do wonder if there are better ways to name these constants. I ran into the issue of defining memory locals for similar (w.r.t. function) constants in different procedures, only to find that names get unnecessarily long.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, agreed. My favorite thing would be constants that can be defined in a procedure body to make them scoped and accessible in only that body, e.g.:
Alternatively, we could define these in the
@localsattribute:The assembler could translate these into globally defined constants under the hood to not require a new MASM feature, though this may be a bit too much magic for an assembly language.
cc @bitwalker in case you have thoughts for how difficult this would be to add
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great suggestion!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this point we're just describing local variables 😅.
That said, with the type system available now, we could require declaring procedure locals with names + a type, and expand references to the names as base pointer + offset math, e.g.
local FOO: array<felt, 8>in the procedure body defines a local named 'FOOwhich gets allocated 8 elements of memory, and something likeloc_load.FOOwould load the first element, whileloc_load.FOO+3` would load the fourth element.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bitwalker I think that sounds great!