Skip to content

Commit

Permalink
chore: migrate to miden-vm v0.11 (#929)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fumuran authored Oct 28, 2024
1 parent dd01de8 commit b624d08
Show file tree
Hide file tree
Showing 30 changed files with 320 additions and 312 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
- Implement `Serializable` for `FungibleAsset` (#907).
- [BREAKING] Changed type of `EMPTY_STORAGE_MAP_ROOT` constant to `RpoDigst`, which references constant from `miden-crypto` (#916).
- Added `TransactionExecutor::load_account_code()` method to support foreign procedure invocation (#936).
- [BREAKING] Migrated to v0.11 version of Miden VM (#929).

## 0.5.1 (2024-08-28) - `miden-objects` crate only

Expand Down
88 changes: 44 additions & 44 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 24 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ members = [

[workspace.package]
edition = "2021"
rust-version = "1.80"
rust-version = "1.82"
license = "MIT"
authors = ["Miden contributors"]
homepage = "https://polygon.technology/polygon-miden"
Expand All @@ -32,14 +32,30 @@ codegen-units = 1
lto = true

[workspace.dependencies]
assembly = { package = "miden-assembly", version = "0.10", default-features = false }
miden-crypto = { version = "0.10", default-features = false }
#assembly = { package = "miden-assembly", version = "0.10", default-features = false }
assembly = { package = "miden-assembly", git = "https://github.com/0xPolygonMiden/miden-vm.git", branch = "next", default-features = false }

miden-crypto = { version = "0.11", default-features = false }
#miden-crypto = { git = "https://github.com/0xPolygonMiden/miden-vm.git", branch = "next", default-features = false }

miden-lib = { path = "miden-lib", version = "0.6", default-features = false }
miden-objects = { path = "objects", version = "0.6", default-features = false }
miden-prover = { version = "0.10", default-features = false }
miden-stdlib = { version = "0.10", default-features = false }

#miden-prover = { version = "0.10", default-features = false }
miden-prover = { git = "https://github.com/0xPolygonMiden/miden-vm.git", branch = "next", default-features = false }

#miden-stdlib = { version = "0.10", default-features = false }
miden-stdlib = { git = "https://github.com/0xPolygonMiden/miden-vm.git", branch = "next", default-features = false }

miden-tx = { path = "miden-tx", version = "0.6", default-features = false }
miden-verifier = { version = "0.10", default-features = false }

#miden-verifier = { version = "0.10", default-features = false }
miden-verifier = { git = "https://github.com/0xPolygonMiden/miden-vm.git", branch = "next", default-features = false }

rand = { version = "0.8", default-features = false }
vm-core = { package = "miden-core", version = "0.10", default-features = false }
vm-processor = { package = "miden-processor", version = "0.10", default-features = false }

#vm-core = { package = "miden-core", version = "0.10", default-features = false }
vm-core = { package = "miden-core", git = "https://github.com/0xPolygonMiden/miden-vm.git", branch = "next", default-features = false }

#vm-processor = { package = "miden-processor", version = "0.10", default-features = false }
vm-processor = { package = "miden-processor", git = "https://github.com/0xPolygonMiden/miden-vm.git", branch = "next", default-features = false }
10 changes: 5 additions & 5 deletions miden-lib/asm/kernels/transaction/lib/account.masm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use.std::collections::smt
use.std::crypto::hashes::native
use.std::crypto::hashes::rpo
use.std::mem

use.kernel::constants
Expand Down Expand Up @@ -190,7 +190,7 @@ export.get_current_hash
mem_stream hperm mem_stream hperm

# extract account hash
exec.native::state_to_digest
exec.rpo::squeeze_digest

# drop memory pointer
movup.4 drop
Expand Down Expand Up @@ -694,7 +694,7 @@ export.validate_seed
# => [RATE, RATE, CAP]

# extract digest
exec.native::state_to_digest
exec.rpo::squeeze_digest
# => [DIG]

# assert the account id matches the account id of the new account and extract pow
Expand Down Expand Up @@ -781,7 +781,7 @@ export.save_account_storage_data
# AS => []

# extract the digest
exec.native::state_to_digest
exec.rpo::squeeze_digest
# OS => [DIGEST, end_ptr', STORAGE_COMMITMENT]

# drop end_ptr
Expand Down Expand Up @@ -850,7 +850,7 @@ export.save_account_procedure_data
# AS => []

# extract the digest
exec.native::state_to_digest
exec.rpo::squeeze_digest
# OS => [DIGEST, end_ptr', CODE_COMMITMENT]

# drop end_ptr
Expand Down
6 changes: 3 additions & 3 deletions miden-lib/asm/kernels/transaction/lib/epilogue.masm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use.kernel::memory
use.kernel::note
use.kernel::tx

use.std::crypto::hashes::native
use.std::crypto::hashes::rpo

# ERRORS
# =================================================================================================
Expand Down Expand Up @@ -193,11 +193,11 @@ proc.update_account_storage_commitment
# => [PAD, PAD, PAD, start_ptr, end_ptr]

# hash elements from memory
exec.native::hash_memory_even
exec.rpo::absorb_double_words_from_memory
# => [PERM, PERM, PERM, start_ptr, end_ptr]

# extract the digest
exec.native::state_to_digest
exec.rpo::squeeze_digest
# => [DIGEST, end_ptr, end_ptr]

# clean stack
Expand Down
2 changes: 0 additions & 2 deletions miden-lib/asm/kernels/transaction/lib/memory.masm
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use.std::crypto::hashes::native

use.kernel::account
use.kernel::constants

Expand Down
Loading

0 comments on commit b624d08

Please sign in to comment.