Skip to content

Migrate to Miden VM v0.22.0 and Miden Crypto v0.23.0#2644

Merged
Fumuran merged 10 commits intonextfrom
andrew-migrate-to-v0.22.0
Mar 21, 2026
Merged

Migrate to Miden VM v0.22.0 and Miden Crypto v0.23.0#2644
Fumuran merged 10 commits intonextfrom
andrew-migrate-to-v0.22.0

Conversation

@Fumuran
Copy link
Copy Markdown
Contributor

@Fumuran Fumuran commented Mar 19, 2026

This PR updates the code to use the Miden VM of version v0.22.0 and Miden Crypto v0.23.0.

No breaking changes since previous v0.22.0-alpha.1 update.

@Fumuran Fumuran marked this pull request as ready for review March 19, 2026 22:41
@Fumuran Fumuran requested a review from bobbinth March 19, 2026 22:55
@bobbinth
Copy link
Copy Markdown
Contributor

Should we remove references to BeWord from the codebase? Or they are already gone?

Copy link
Copy Markdown
Collaborator

@mmagician mmagician left a comment

Choose a reason for hiding this comment

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

Thanks!

@Fumuran
Copy link
Copy Markdown
Contributor Author

Fumuran commented Mar 20, 2026

Should we remove references to BeWord from the codebase? Or they are already gone?

Ah, they're still there, but since we migrated to the poseidon2 already, I think they could be safely removed (AFAIK the words order was already reversed)

@Fumuran Fumuran force-pushed the andrew-migrate-to-v0.22.0 branch from 85ceb16 to dd4efd1 Compare March 20, 2026 13:18
Copy link
Copy Markdown
Contributor

@PhilippGackstatter PhilippGackstatter left a comment

Choose a reason for hiding this comment

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

Looks good to me!

# =================================================================================================

type EthereumAddressFormat = struct @bigendian { a: felt, b: felt, c: felt, d: felt, e: felt }
type EthereumAddressFormat = struct { a: felt, b: felt, c: felt, d: felt, e: felt }
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.

I think this was recently renamed - not sure if the renaming is applicable here though. cc @partylikeits1983.

Copy link
Copy Markdown
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you! I left a couple of comments inline - both should be pretty easy to address.

Comment on lines 4 to 7
# use $kernel::type_aliases::AccountID
use miden::core::mem
# use miden::standards::type_aliases::AccountID

pub type AccountID = struct { prefix: felt, suffix: felt }
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

For some reason I still can't use the imported types in the protocol lib (here and in the api.masm). Attempt to do so results in an error during the compilation:

  Warning:   ! unused import
      ,-[/Users/fumuran/Desktop/Miden/miden-base/target/debug/build/miden-protocol-ee74c6f9e81b4cd4/out/asm/kernels/transaction/api.masm:10:5]
    9 | use $kernel::tx
   10 | use $kernel::type_aliases::AccountID
      :     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   11 | 
      `----
    help: this import is never used and can be safely removed

while this import is clearly used (it returns undefined symbol reference on the used type if I remove the import). Interestingly this unused import error is raised even if the module is clearly doesn't exist, something like use $kernel::qwerty:type_aliases::AccountID. I'm not sure that this is a correct behavior, I would expect the undefined symbol reference to be raised. Could it be a bug?

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.

Is it only for importing from the $kernel namespace? If you can get a minimal reproducible example of this, would be good to file a bug in miden-vm.

Copy link
Copy Markdown
Contributor Author

@Fumuran Fumuran Mar 20, 2026

Choose a reason for hiding this comment

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

@bitwalker, @plafer could you guys please take a look? Is this an incorrect behavior, or I did something wrong?

Edit: sorry, didn't see Bobbin's response when was asking. I suppose it will be better for me to prepare an example first.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@Fumuran
Copy link
Copy Markdown
Contributor Author

Fumuran commented Mar 21, 2026

I would merge this PR just to unblock the release pipeline, but I'll create an issue and a minimal example for addressing this bug in a following PR.

@Fumuran Fumuran merged commit c05c5e6 into next Mar 21, 2026
17 checks passed
@Fumuran Fumuran deleted the andrew-migrate-to-v0.22.0 branch March 21, 2026 12:06
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.

4 participants