Skip to content

Commit c0b154a

Browse files
author
tomyrd
committed
feat: update miden-base with new 0.14 VM
1 parent bc837f2 commit c0b154a

10 files changed

Lines changed: 244 additions & 151 deletions

File tree

Cargo.lock

Lines changed: 219 additions & 134 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ default-members = ["crates/rust-client", "bin/miden-cli"]
1313

1414
[workspace.package]
1515
edition = "2024"
16-
rust-version = "1.86"
16+
rust-version = "1.87"
1717
license = "MIT"
1818
authors = ["miden contributors"]
1919
repository = "https://github.com/0xMiden/miden-client"

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ WARNINGS=RUSTDOCFLAGS="-D warnings"
1818

1919
PROVER_DIR="miden-base"
2020
PROVER_REPO="https://github.com/0xMiden/miden-base.git"
21-
PROVER_BRANCH="3d8c3b28048fffbb63592a971d0fcae5dc58bce9"
21+
PROVER_BRANCH="next"
2222
PROVER_FEATURES_TESTING=--features "testing"
2323
PROVER_PORT=50051
2424

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![LICENSE](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/0xMiden/miden-client/blob/main/LICENSE)
44
[![test](https://github.com/0xMiden/miden-client/actions/workflows/test.yml/badge.svg)](https://github.com/0xMiden/miden-client/actions/workflows/test.yml)
55
[![build](https://github.com/0xMiden/miden-client/actions/workflows/build.yml/badge.svg)](https://github.com/0xMiden/miden-client/actions/workflows/build.yml)
6-
[![RUST_VERSION](https://img.shields.io/badge/rustc-1.86+-lightgray.svg)](https://www.rust-lang.org/tools/install)
6+
[![RUST_VERSION](https://img.shields.io/badge/rustc-1.87+-lightgray.svg)](https://www.rust-lang.org/tools/install)
77
[![crates.io](https://img.shields.io/crates/v/miden-client)](https://crates.io/crates/miden-client)
88

99
This repository contains the Miden client, which provides a way to execute and prove transactions, facilitating the interaction with the Miden rollup.

bin/miden-cli/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This binary allows the user to interact with the Miden rollup via a simple comma
44

55
## Usage
66

7-
Before you can use the Miden client, you'll need to make sure you have both [Rust](https://www.rust-lang.org/tools/install) and SQLite3 installed. Miden client requires rust version **1.86** or higher.
7+
Before you can use the Miden client, you'll need to make sure you have both [Rust](https://www.rust-lang.org/tools/install) and SQLite3 installed. Miden client requires rust version **1.87** or higher.
88

99
### Running `miden-client`'s CLI
1010

crates/rust-client/src/transaction/mod.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ use core::fmt::{self};
7474
use miden_objects::{
7575
AssetError, Digest, Felt, Word,
7676
account::{Account, AccountCode, AccountDelta, AccountId},
77+
assembly::DefaultSourceManager,
7778
asset::{Asset, NonFungibleAsset},
7879
block::BlockNumber,
7980
note::{Note, NoteDetails, NoteId, NoteTag},
@@ -550,7 +551,13 @@ impl Client {
550551
// Execute the transaction and get the witness
551552
let executed_transaction = self
552553
.tx_executor
553-
.execute_transaction(account_id, block_num, notes, tx_args)
554+
.execute_transaction(
555+
account_id,
556+
block_num,
557+
notes,
558+
tx_args,
559+
Arc::new(DefaultSourceManager::default()), // TODO: Use the correct source manager
560+
)
554561
.await?;
555562

556563
// Check that the expected output notes matches the transaction outcome.
@@ -1024,6 +1031,7 @@ impl Client {
10241031
tx_script,
10251032
advice_inputs,
10261033
foreign_account_inputs,
1034+
Arc::new(DefaultSourceManager::default()), // TODO: Use the correct source manager
10271035
)
10281036
.await?)
10291037
}

crates/web-client/test/new_transactions.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ export const customTransaction = async (
296296
mem_loadw
297297
# => [NOTE_ARG_1]
298298
299-
push.${expectedNoteArg1} assert_eqw.err=101
299+
push.${expectedNoteArg1} assert_eqw.err="First note argument didn't match expected"
300300
# => []
301301
302302
# read second word
@@ -305,15 +305,15 @@ export const customTransaction = async (
305305
mem_loadw
306306
# => [NOTE_ARG_2]
307307
308-
push.${expectedNoteArg2} assert_eqw.err=102
308+
push.${expectedNoteArg2} assert_eqw.err="Second note argument didn't match expected"
309309
# => []
310310
311311
# store the note inputs to memory starting at address 0
312312
push.0 exec.note::get_inputs
313313
# => [num_inputs, inputs_ptr]
314314
315-
# make sure the number of inputs is 1
316-
eq.2 assert.err=103
315+
# make sure the number of inputs is 2
316+
eq.2 assert.err="P2ID script expects exactly 2 note inputs"
317317
# => [inputs_ptr]
318318
319319
# read the target account id from the note inputs
@@ -324,7 +324,7 @@ export const customTransaction = async (
324324
# => [account_id_prefix, target_account_id_prefix, ...]
325325
326326
# ensure account_id = target_account_id, fails otherwise
327-
assert_eq.err=104
327+
assert_eq.err="P2ID's target account address and transaction address do not match"
328328
# => [...]
329329
330330
exec.add_note_assets_to_account

docs/src/install-and-run.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Software prerequisites
22

3-
- [Rust installation](https://www.rust-lang.org/tools/install) minimum version 1.86.
3+
- [Rust installation](https://www.rust-lang.org/tools/install) minimum version 1.87.
44

55
## Install the client
66

tests/integration/asm/custom_p2id.masm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ begin
8383
mem_loadw
8484
# => [NOTE_ARG_1]
8585

86-
push.{expected_note_arg_1} assert_eqw.err=101
86+
push.{expected_note_arg_1} assert_eqw.err="First note argument didn't match expected"
8787
# => []
8888

8989
# read second word
@@ -92,15 +92,15 @@ begin
9292
mem_loadw
9393
# => [NOTE_ARG_2]
9494

95-
push.{expected_note_arg_2} assert_eqw.err=102
95+
push.{expected_note_arg_2} assert_eqw.err="Second note argument didn't match expected"
9696
# => []
9797

9898
# store the note inputs to memory starting at address 0
9999
push.0 exec.note::get_inputs
100100
# => [num_inputs, inputs_ptr]
101101

102-
# make sure the number of inputs is 1
103-
eq.2 assert.err=103
102+
# make sure the number of inputs is 2
103+
eq.2 assert.err="P2ID script expects exactly 2 note inputs"
104104
# => [inputs_ptr]
105105

106106
# read the target account id from the note inputs
@@ -111,7 +111,7 @@ begin
111111
# => [account_id_prefix, target_account_id_prefix, ...]
112112

113113
# ensure account_id = target_account_id, fails otherwise
114-
assert_eq.err=104
114+
assert_eq.err="P2ID's target account address and transaction address do not match"
115115
# => [...]
116116

117117
exec.add_note_assets_to_account

tests/integration/custom_transactions_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ async fn test_merkle_store() {
200200
push.4000 push.{pos} exec.mmr::get
201201
202202
# check the element matches what was inserted at `pos`
203-
push.{expected_element} assert_eqw.err=999
203+
push.{expected_element} assert_eqw.err=\"element in merkle store didn't match expected\"
204204
"
205205
)
206206
.as_str();

0 commit comments

Comments
 (0)