Commit 671a9dc
committed
fix: adapt metadata MASM to little-endian word ordering after upstream migration
The upstream LE migration (PR #2512) changed get_item to return [word[0], ..., word[3]]
(word[0] on top) instead of [word[3], ..., word[0]]. This commit:
- Reverses element extraction logic in all getters (get_token_metadata, get_max_supply,
get_decimals, get_token_symbol, get_token_supply, mutability checks)
- Fixes mutability flag extraction in all optional setters
- Fixes max_supply replacement logic in optional_set_max_supply
- Changes loc_storew_be/loc_loadw_be to loc_storew_le/loc_loadw_le to preserve
natural word element ordering in memory for hash computations
- Updates test hasher from Rpo256 to Poseidon2 to match MASM poseidon2 module
- Fixes get_owner stack depth (get_item returns +2 net elements with 2-felt slot IDs)
- Updates all inline MASM test assertions to match LE stack ordering1 parent 13878ca commit 671a9dc
3 files changed
Lines changed: 127 additions & 122 deletions
File tree
- crates
- miden-standards/asm/standards
- access
- metadata
- miden-testing/tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
92 | 96 | | |
93 | 97 | | |
94 | 98 | | |
| |||
0 commit comments