Skip to content

Tracking PR for v0.14.0 release#2303

Draft
bobbinth wants to merge 154 commits intomainfrom
next
Draft

Tracking PR for v0.14.0 release#2303
bobbinth wants to merge 154 commits intomainfrom
next

Conversation

@bobbinth
Copy link
Contributor

This is a tracking PR for v0.14.0 release.

avorylli and others added 30 commits January 17, 2026 09:47
* Add ExecError wrapper for better error reporting

* Add errors module to tx_context

* Refactor execute_code to use ExecError

Updated error handling in execute_code function to use ExecError instead of ExecutionError.

* Wrap ExecutionError in ExecError for assertions

* Refactor error handling to use 'anyhow' in tests

Refactor error handling in tests to use 'anyhow' for better context management. Update function signatures to return 'anyhow::Result' instead of 'miette::Result'.

* Replace miette with anyhow for error handling

* Update lib.rs

* Update Cargo.toml

* chore: rename `ExecError` method names

* chore: remove anyhow::anyhow! error mapping

---------

Co-authored-by: Philipp Gackstatter <[email protected]>
* chore: share serde across the workspace

* chore: share tokio

* chore: unify fs-err
* feat: rename NoteInputs to NoteStorage

This commit renames the NoteInputs type to NoteStorage throughout the codebase
to better reflect that these values represent stored data associated with a note
rather than inputs.

Changes include:
- Renamed NoteInputs struct to NoteStorage
- Renamed inputs.rs to storage.rs
- Updated MAX_INPUTS_PER_NOTE to MAX_NOTE_STORAGE_ITEMS
- Updated all related method names: inputs() -> storage(), num_values() -> len(), values() -> items()
- Updated all variable names: note_inputs -> note_storage
- Updated Assembly files with new terminology
- Updated error messages and constants
- Updated documentation

Closes #1662

* chore: complete note inputs to note storage rename

Address review feedback:
- Rename INPUT_NOTE_NUM_INPUTS_OFFSET to INPUT_NOTE_STORAGE_LENGTH_OFFSET
- Rename INPUT_NOTE_INPUTS_COMMITMENT_OFFSET to INPUT_NOTE_STORAGE_COMMITMENT_OFFSET
- Rename *_NUM_INPUTS constants to *_STORAGE_LENGTH
- Rename ERR_*_WRONG_NUMBER_OF_INPUTS to ERR_*_UNEXPECTED_STORAGE_LENGTH
- Rename mint_inputs.rs to mint_storage.rs
- Update function names: parse_p2id_inputs -> parse_p2id_storage
- Update error messages to use 'note storage items' terminology
- Update test helpers and assertions

* fix: rename remaining num_expected_inputs to expected_storage_length

* chore: rename remaining note inputs references to note storage

- Rename P2ID_NOTE_NUM_INPUTS to P2ID_NOTE_STORAGE_LENGTH
- Rename RPO_CLAIM_NOTE_INPUTS_COMMITMENT to RPO_CLAIM_NOTE_STORAGE_COMMITMENT
- Update comments: "note inputs" -> "note storage"
- Update error messages to use "note storage" terminology

* address PR review comments: rename get_inputs to get_storage

Changes based on Philip's review comments:
- B2AGG.masm: B2AGG_NOTE_INPUTS_COUNT → B2AGG_NOTE_STORAGE_LEN
- B2AGG.masm: ERR_B2AGG_WRONG_NUMBER_OF_INPUTS → ERR_B2AGG_UNEXPECTED_STORAGE_LENGTH
- lib.rs: claim_inputs → claim_storage_items
- prologue.masm: INPUT_COMMITMENT → STORAGE_COMMITMENT in comment
- active_note.masm: get_inputs → get_storage procedure rename
- note.masm: various comment updates (inputs → storage)
- shared_utils/note.masm: input values → storage values
- tx_args.rs: storage_commitment |-> inputs → storage_commitment |-> storage_items
- Updated all callers of get_inputs to get_storage

* fix: correct NoteError import path after merge

* fix: update generated files and fix import order

* Apply suggestions from code review

* chore: regenerate error files

* chore: revert foreign_inputs_len change

* Apply suggestions from code review

Co-authored-by: Philipp Gackstatter <[email protected]>

---------

Co-authored-by: Farukest <[email protected]>
Co-authored-by: Philipp Gackstatter <[email protected]>
Co-authored-by: Alexander John Lee <[email protected]>
* feat: working array

chore: simplify test

chore: be explicit about padding

* chore: add changelog entry for Array component (#2204)

* Initial plan

* chore: add changelog entry for PR 2203

Co-authored-by: mmagician <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: mmagician <[email protected]>

* fix: set_map_item no longer returns old root

* chore: change Try to TryFrom for AccountComponent

* chore: correct the docs

* chore: masm doc corrections

* chore: use BeWord instead of Word

* chore: adjust masm comment about max len

* Update crates/miden-standards/asm/account_components/array.masm

Co-authored-by: Andrey Khmuro <[email protected]>

* chore: turn array into utility

chore: remove component code

* chore: lint, simplify test & comments

* chore: remove unnecessary comments

* chore: remove duplicated changelog entry

* Apply suggestions from code review

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
Co-authored-by: Andrey Khmuro <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Alexander John Lee <[email protected]>
* feat: impl fist frontier version, add (yet buggy) test

* test: fix the test, fix the bug in algorithm

* chore: update changelog

* docs: add docs for the MMR frontier in the masm file

* refactor: update the doc comments, slightly update code

* refactor: update docs and comments, add overflow check, update test

* test: add more leaves

* test: add zero root test

* chore: rename `root` -> `expected_root`

in leaf assertion tests

* chore: lint

* chore: revert to using old dir structure

* fix: update max leaves constants and comments

* chore: regen errors file

* fix: first assert valid u32, only then u32lte

---------

Co-authored-by: Marti <[email protected]>
…2312)

* feat: impl fist frontier version, add (yet buggy) test

* test: fix the test, fix the bug in algorithm

* chore: update changelog

* docs: add docs for the MMR frontier in the masm file

* refactor: update the doc comments, slightly update code

* refactor: update docs and comments, add overflow check, update test

* test: add more leaves

* test: add zero root test

* chore: rename `root` -> `expected_root`

in leaf assertion tests

* chore: lint

* chore: revert to using old dir structure

* feat: generate test vectors with foundry

* feat: use agglayer submodule instead of copying source files

* chore: use generated test vectors in compat tests

* chore: remove the human-readable fn

* chore: split test vectors

into leaf<>root<>count paris; and canonical zeros

* chore: remove unnecessary metadata

* chore: cleanup readme

* changelog

* chore: ignore submodule from typos check

* chore: exclude submodule from toml fmt

* fix: update max leaves constants and comments

* chore: regen errors file

* refactor: use foundry cheatcode (#2314)

* chore: use workspace serde dep

* chore: cleanup changelog

---------

Co-authored-by: Andrey Khmuro <[email protected]>
Co-authored-by: Alexander John Lee <[email protected]>
* feat: add leafType param

fix after merge

* changelog
* feat: UPDATE_GER note outline

* feat: working update ger note

* chore: swap upper, lower GER parts

* lint: regen error file
mmagician and others added 30 commits March 4, 2026 16:52
* chore: enable CI on merge queue trigger

* Update .github/workflows/build-docs.yml

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
* Introducing a dedicated AccountIdKey type to unify and centralize all AccountId

* changelog for introduce AccountIdKey type

* refactor: clean up comments and improve code readability in AccountIdKey and tests

* refactor: update AccountIdKey conversion method and clean up imports

* refactor: reorganize AccountIdKey indices and clean up related code

* Apply suggestions from code review

* Update crates/miden-protocol/src/block/account_tree/account_id_key.rs

* Update crates/miden-protocol/src/block/account_tree/account_id_key.rs

* feat: validate account ID in `AccountTree::new`

---------

Co-authored-by: Bobbin Threadbare <[email protected]>
Co-authored-by: Philipp Gackstatter <[email protected]>
…n `account::set_item` and `account::set_map_item`
* feat: implement two-step ownership management for account components

- Add `ownable2step.masm` to provide two-step ownership functionality, requiring explicit acceptance of ownership transfers.
- Create Rust module for `Ownable2Step` struct to manage ownership state and storage layout.
- Introduce error handling for ownership operations in `standards.rs`.
- Develop comprehensive tests for ownership transfer, acceptance, and renouncement scenarios in `ownable2step.rs`.

* feat: add Ownable2Step account component for two-step ownership transfer

* fix: correct ownership word layout and update transfer ownership logic in ownable2step

* Refactor ownership management to use Ownable2Step pattern

- Updated the access control mechanism to implement a two-step ownership transfer pattern in the ownable2step module.
- Modified the storage layout to accommodate the new ownership structure, reversing the order of owner and nominated owner fields.
- Refactored the network fungible faucet to utilize the new Ownable2Step for ownership management.
- Adjusted related tests to validate the new ownership transfer logic and ensure correct behavior when transferring and accepting ownership.
- Updated error handling to reflect changes in ownership management, including new error messages for ownership transfer scenarios.

* refactor: update ownership word layout and adjust related logic in Ownable2Step

* refactor: rename owner and nominated_owner to get_owner and get_nominated_owner for consistency

* refactor: streamline ownership management in tests by utilizing Ownable2Step according to philip

* fix: `make format`

---------

Co-authored-by: Bobbin Threadbare <[email protected]>
Co-authored-by: Philipp Gackstatter <[email protected]>
…2575)

* feat(asm): add create_fungible_key proc for fungible asset vault keys

* chore: re-export create_fungible_key from `protocol::asset`

* chore: add changelog

---------

Co-authored-by: Philipp Gackstatter <[email protected]>
* feat: migrate miden-agglayer to VM 0.21 and crypto 0.22

Re-enable the miden-agglayer crate in the workspace and apply all
necessary API and convention changes from the VM 0.21 migration:

Rust changes:
- Remove FieldElement trait imports (removed from miden-core)
- Felt::as_int() -> Felt::as_canonical_u64()
- Program import moved to miden_core::program::Program
- bytes_to_packed_u32_felts -> bytes_to_packed_u32_elements (miden_core::utils)
- AccountId::try_from([Felt;2]) -> AccountId::try_from_elements(suffix, prefix)
- Serializable/Deserializable from miden_assembly::serde (was ::utils)

MASM changes:
- rpo256 -> poseidon2 (hash function migration)
- asset::mem_store/mem_load -> asset::store/load (procedure renames)
- u64::overflowing_mul -> u64::widening_mul
- u128_sub_no_underflow rewritten for LE convention (u64 procedures
  now use [lo, hi] input/output order)
- verify_u128_to_native_amount_conversion updated for LE result order

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* fix: migrate agglayer tests and fix LE convention issues

Re-enable agglayer tests in miden-testing and fix all compilation
and runtime errors from the VM 0.21 migration:

Test compilation fixes:
- FieldElement import removal, as_int -> as_canonical_u64
- AuthScheme::Falcon512Rpo -> Falcon512Poseidon2
- AdviceInputs path: miden_processor::advice::AdviceInputs
- FastProcessor::new_debug -> new().with_advice().with_debugging()
- StackInputs::new(vec![]) -> new(&[])
- bytes_to_packed_u32_felts -> bytes_to_packed_u32_elements
- AccountId::try_from -> try_from_elements

MASM runtime fixes:
- eth_address.masm: fix u32split LE output order in build_felt
  verification (movup.4 -> movup.3 for lo/hi comparison)
- bridge_out.masm: fix create_burn_note note_idx corruption -
  loc_loadw_be overwrites top 4 stack elements including both
  copies from dup; save note_idx to local instead (pre-existing
  bug that only manifested with multiple output notes)
- bridge_out.masm: fix num_leaves storage LE ordering - push
  new_leaf_count to stack top for Word[0] storage, use
  mem_storew_le instead of mem_storew_be for loading
- bridge_config.masm: update GER hash from Rpo256 to Poseidon2
- canonical_zeros: remove .rev() from build.rs generation, swap
  push order for LE memory layout
- Word element ordering fixes for bridge admin, GER manager,
  faucet registry keys, and conversion metadata

Test expectation fixes:
- Rpo256 -> Poseidon2 for GER hash computation
- Removed word reversal in root/proof reading (LE convention)
- Fixed expected storage value ordering
- mem_storew_be -> mem_storew_le in test MASM code

All 39 agglayer tests pass.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* style: apply rustfmt formatting

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* refactor: address PR review comments

- Extract `create_id_key(id: AccountId) -> Word` helper and reuse for
  bridge_admin, ger_manager, bridge_account_id, and faucet_registry_key
- Replace `felts_to_bytes` with re-export of `packed_u32_elements_to_bytes`
  from miden-core (identical implementation)
- Remove stale comment in config_note.rs
- Use `Felt::ONE` instead of `Felt::new(1)` in config_bridge test
- Add TODO comments referencing issue #2548 for getter helpers
- Simplify note_idx handling: use `padw` before `loc_loadw_le` instead of
  saving to a local variable; revert @Locals(15) to @Locals(14)
- Switch `loc_storew_be`/`loc_loadw_be` to `_le` variants in create_burn_note
- Add stack state comments before third overflowing_sub in u128_sub_no_underflow

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* chore: padding is 15

* remove utils re-export, faucet_registry_key

* chore: drop 4 words

* fix: pad before call invoc.; explicit stack comments

* fix: unnecesary dup and incorrect movup

* style: codify multi-element naming convention for MASM stack comments

Add convention to masm_doc_comment_fmt.md:
- `value` = single felt
- `value(N)` = N felts (non-word)
- `VALUE` = word (4 felts, no (4) suffix needed)

Apply throughout agglayer MASM: drop redundant (4) from ASSET_KEY,
ASSET_VALUE, SERIAL_NUM, SCRIPT_ROOT, RECIPIENT, NOTE_ATTACHMENT,
PROC_MAST_ROOT, OLD_VALUE, VALUE, U256_LO, U256_HI.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* chore: update comments on poseidon inputs

* Update crates/miden-protocol/masm_doc_comment_fmt.md

Co-authored-by: Philipp Gackstatter <[email protected]>

* chore: test for high x3

* fix: correctly rearrange lo/hi for sub

* chore: more explicit sub comments

* chore: revert changes to faucet config slot

* chore: revert prefix<>suffix storage ordering

* fix: store flag values at word[0] for LE convention

Change GER_KNOWN_FLAG and IS_FAUCET_REGISTERED_FLAG to be stored at
word[0] instead of word[3]. Under LE, `push.0.0.0.FLAG` puts FLAG at
stack top = word[0], matching the documented layout [1, 0, 0, 0].

Previously `push.FLAG.0.0.0` placed FLAG at stack bottom = word[3],
resulting in Word([0, 0, 0, 1]) which contradicted the docs.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* chore: use felts directly instead of extracting u64

* chore: fix build

* Apply suggestion from @PhilippGackstatter

Co-authored-by: Philipp Gackstatter <[email protected]>

* chore: use AccountIdKey

* refactor: push explicit zeros, dont assume padding is 0

* refactor: simplify assert_faucet_registered by asserting first

* chore: re-add miden-agglayer to feature checks

Now that miden-agglayer has been migrated, add it back to the
check-features.sh loop.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* refactor: explicit pointers for storing prefix/suffix

* refactor: swap to_account_id output to LE convention [suffix, prefix]

All other bridge/faucet MASM procedures use [suffix, prefix] (suffix on
top) for account IDs on the stack. Align to_account_id with this
convention by adding a swap at the end, and update all callers:
- faucet/mod.masm: update get_destination_account_id_data, claim, and
  build_p2id_output_note to handle the new stack order
- solidity_miden_address_conversion test: swap stack index expectations

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

---------

Co-authored-by: Claude (Opus) <[email protected]>
Co-authored-by: Bobbin Threadbare <[email protected]>
Co-authored-by: Philipp Gackstatter <[email protected]>
Co-authored-by: Bobbin Threadbare <[email protected]>
…repeated hashing (#2577)

* fix: move recompute logic to OutputNoteBuilder::add_asset to avoid rehashing

* changelog and lint

* chore: add `NoteAssets::into_vec`

---------

Co-authored-by: Bobbin Threadbare <[email protected]>
Co-authored-by: Philipp Gackstatter <[email protected]>
* feat: add support for callbacks in non-fungible assets

* chore: add test for block list note callback

* feat: implement `on_before_asset_added_to_note` callback

* chore: add test to make sure inputs are received correctly

* chore: deduplicate test setup code

* chore: add changelog

* fix: non-fungible asset delta not including asset metadata

* chore: deduplicate callback invocation procedures

* chore: deduplicate blocked account test

* chore: deduplicate note callback test

* chore: test empty callback proc root slot

* chore: Introduce `end_foreign_callback_context`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-from-maintainers PRs that come from internal contributors or integration partners. They should be given priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.