Draft
Conversation
This was referenced Mar 6, 2026
d59d8d4 to
3a01c88
Compare
Contributor
Author
|
The integration tests are to be migrated after 0xMiden/miden-client#1891 is ready/merged. |
This was referenced Mar 17, 2026
dcf2c50 to
99777a4
Compare
12bd9e8 to
bb280a8
Compare
Contributor
Author
|
@bitwalker @mooori I'm mostly finished with this PR. I'm combing through it to do some cleanups and I'm waiting for the client/node PR updated with released protocol crates. I suggest to review it on a per-commit basis, skipping non-important commits. |
0183581 to
9999250
Compare
Migrate the compiler workspace from miden-vm v0.20 (crates.io) to
v0.21.1 (local checkout) and miden-base v0.13 to v0.14.
Key breaking changes addressed:
- Remove FieldElement/StarkField traits (now inherent methods on Felt)
- .as_int() -> .as_canonical_u64() across all crates
- miden_core::Program -> miden_core::program::Program
- miden_core::AdviceMap -> miden_core::advice::AdviceMap
- miden_core::utils::{Serializable,Deserializable} -> miden_core::serde::*
- miden_assembly::utils::Deserializable -> miden_assembly::serde::*
- Felt::ELEMENT_BYTES/read_from_bytes/elements_as_bytes removed
- Felt::inv() -> Field::try_inverse()
- StackOutputs::get_stack_item() -> get_element()
- miden_processor::AdviceInputs -> miden_processor::advice::AdviceInputs
- MASM: u32overflowing_mul -> u32widening_mul
- MASM: u32overflowing_madd -> u32widening_madd
- Breakpoint instruction removed (mapped to Nop)
- NoteInputs -> NoteStorage in miden-protocol v0.14
- Felt::from(bool) removed
- SmtLeaf::to_elements() now returns iterator (needs .collect())
use re-exported trait from the `miden-field`.
script size limit in the protocol)
through the Wasm CM boundary, triggered by the `Asset` growth (to 2 words)
9999250 to
95ef09a
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Close #970
This PR migrates the compiler and SDK stack to the newer Miden VM/runtime APIs, centered around
miden-vm0.22and the corresponding protocol/base updates.On the compiler side, this updates wasm lowering/codegen to match the new VM conventions, including the generalized sign-extension op, corrected little-endian limb handling for 64-bit values, and removal of legacy intrinsics in favor of the newer core/stdlib entry points.
The Miden SDK public API changes in this PR are:
Assetchanges from a single-word layout (inner: Word) to a two-word layout (key: Word,value: Word), andAsset::newnow takes(key, value).asset::build_fungible_asset/asset::build_non_fungible_assetare renamed toasset::create_fungible_asset/asset::create_non_fungible_asset.active_note::get_inputs()is renamed toactive_note::get_storage().input_note::get_inputs_info()is renamed toinput_note::get_storage_info(), andInputNoteInputsInfobecomesInputNoteStorageInfo { commitment, num_storage_items }.active_accountgainsget_assetandget_initial_assetfor direct vault lookups by asset key.AccountId,Tag,NoteIdx, andNoteTypenow convert to/fromWord, andStorageSlotIdaddsto_suffix_prefix().FeltandWordfrommiden_field(miden-core).Triggered by the migration changes in this PR:
i32/i64sign-extension cases.cabi_reallocruntime export required by generated component bindings when values are passed indirectly (Triggered by theAssetbecoming two word size).This PR is quite large. I suggest reviewing it on a per-commit basis, skipping not-important commits.
TODO:
protocolv0.14.0 miden-client#1891 is updated to the released protocol v0.14 crates;miden-clienmigration PR - 0xMiden/miden-client#1891