Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a63109d

Browse files
authored
chore: merge main branch into next (0xMiden#1351)
1 parent 1a65242 commit a63109d

22 files changed

Lines changed: 95 additions & 64 deletions

File tree

.git-blame-ignore-revs

Lines changed: 0 additions & 2 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
# Changelog
22

3-
## 0.9.0 (TBD)
3+
## 0.9.2 (2024-05-22) - `stdlib` crate only
4+
- Skip writing MASM documentation to file when building on docs.rs (#1341).
5+
6+
## 0.9.2 (2024-05-09) - `assembly` crate only
7+
- Remove usage of `group_vector_elements()` from `combine_blocks()` (#1331).
8+
9+
## 0.9.2 (2024-04-25) - `air` and `processor` crates only
10+
- Allowed enabling debug mode via `ExecutionOptions` (#1316).
11+
12+
## 0.9.1 (2024-04-04)
13+
14+
- Added additional trait implementations to error types (#1306).
15+
16+
## 0.9.0 (2024-04-03)
417

518
#### Packaging
619
- [BREAKING] The package `miden-vm` crate was renamed from `miden` to `miden-vm`. Now the package and crate names match (#1271).

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Miden VM is a zero-knowledge virtual machine written in Rust. For any program ex
1717
* If you'd like to learn more about STARKs, check out the [references](#references) section.
1818

1919
### Status and features
20-
Miden VM is currently on release v0.8. In this release, most of the core features of the VM have been stabilized, and most of the STARK proof generation has been implemented. While we expect to keep making changes to the VM internals, the external interfaces should remain relatively stable, and we will do our best to minimize the amount of breaking changes going forward.
20+
Miden VM is currently on release v0.9. In this release, most of the core features of the VM have been stabilized, and most of the STARK proof generation has been implemented. While we expect to keep making changes to the VM internals, the external interfaces should remain relatively stable, and we will do our best to minimize the amount of breaking changes going forward.
2121

2222
The next version of the VM is being developed in the [next](https://github.com/0xPolygonMiden/miden-vm/tree/next) branch. There is also a documentation for the latest features and changes in the next branch [documentation next branch](https://0xpolygonmiden.github.io/miden-vm/intro/main.html).
2323

air/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[package]
22
name = "miden-air"
3-
version = "0.8.0"
3+
version = "0.9.2"
44
description = "Algebraic intermediate representation of Miden VM processor"
55
authors = ["miden contributors"]
66
readme = "README.md"
77
license = "MIT"
88
repository = "https://github.com/0xPolygonMiden/miden-vm"
9-
documentation = "https://docs.rs/miden-air/0.8.0"
9+
documentation = "https://docs.rs/miden-air/0.9.2"
1010
categories = ["cryptography", "no-std"]
1111
keywords = ["air", "arithmetization", "crypto", "miden"]
1212
edition = "2021"
@@ -30,7 +30,7 @@ std = ["vm-core/std", "winter-air/std"]
3030
internals = []
3131

3232
[dependencies]
33-
vm-core = { package = "miden-core", path = "../core", version = "0.8", default-features = false }
33+
vm-core = { package = "miden-core", path = "../core", version = "0.9", default-features = false }
3434
winter-air = { package = "winter-air", version = "0.9", default-features = false }
3535
winter-prover = { package = "winter-prover", version = "0.9", default-features = false }
3636

air/src/options.rs

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ pub struct ExecutionOptions {
171171
max_cycles: u32,
172172
expected_cycles: u32,
173173
enable_tracing: bool,
174+
enable_debugging: bool,
174175
}
175176

176177
impl Default for ExecutionOptions {
@@ -179,6 +180,7 @@ impl Default for ExecutionOptions {
179180
max_cycles: u32::MAX,
180181
expected_cycles: MIN_TRACE_LEN as u32,
181182
enable_tracing: false,
183+
enable_debugging: false,
182184
}
183185
}
184186
}
@@ -211,30 +213,51 @@ impl ExecutionOptions {
211213
max_cycles,
212214
expected_cycles,
213215
enable_tracing,
216+
enable_debugging: false,
214217
})
215218
}
216219

217-
/// Enables Host to handle the `tracing` instructions.
220+
/// Enables execution of the `trace` instructions.
218221
pub fn with_tracing(mut self) -> Self {
219222
self.enable_tracing = true;
220223
self
221224
}
222225

226+
/// Enables execution of programs in debug mode.
227+
///
228+
/// In debug mode the VM does the following:
229+
/// - Executes `debug` instructions (these are ignored in regular mode).
230+
/// - Records additional info about program execution (e.g., keeps track of stack state at
231+
/// every cycle of the VM) which enables stepping through the program forward and backward.
232+
pub fn with_debugging(mut self) -> Self {
233+
self.enable_debugging = true;
234+
self
235+
}
236+
223237
// PUBLIC ACCESSORS
224238
// --------------------------------------------------------------------------------------------
225239

226-
/// Returns maximum number of cycles
240+
/// Returns maximum number of cycles a program is allowed to execute for.
227241
pub fn max_cycles(&self) -> u32 {
228242
self.max_cycles
229243
}
230244

231-
/// Returns number of the expected cycles
245+
/// Returns the number of cycles a program is expected to take.
246+
///
247+
/// This will serve as a hint to the VM for how much memory to allocate for a program's
248+
/// execution trace and may result in performance improvements when the number of expected
249+
/// cycles is equal to the number of actual cycles.
232250
pub fn expected_cycles(&self) -> u32 {
233251
self.expected_cycles
234252
}
235253

236-
/// Returns a flag indicating whether the Host should handle `trace` instructions
254+
/// Returns a flag indicating whether the VM should execute `trace` instructions.
237255
pub fn enable_tracing(&self) -> bool {
238256
self.enable_tracing
239257
}
258+
259+
/// Returns a flag indicating whether the VM should execute a program in debug mode.
260+
pub fn enable_debugging(&self) -> bool {
261+
self.enable_debugging
262+
}
240263
}

assembly/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[package]
22
name = "miden-assembly"
3-
version = "0.8.0"
3+
version = "0.9.2"
44
description = "Miden VM assembly language"
55
authors = ["miden contributors"]
66
readme = "README.md"
77
license = "MIT"
88
repository = "https://github.com/0xPolygonMiden/miden-vm"
9-
documentation = "https://docs.rs/miden-assembly/0.8.0"
9+
documentation = "https://docs.rs/miden-assembly/0.9.2"
1010
categories = ["compilers", "no-std"]
1111
keywords = ["assembler", "assembly", "language", "miden"]
1212
edition = "2021"
@@ -48,7 +48,7 @@ tracing = { version = "0.1", default-features = false, features = [
4848
] }
4949
thiserror = { version = "1.0", git = "https://github.com/bitwalker/thiserror", branch = "no-std", default-features = false }
5050
unicode-width = { version = "0.1", features = ["no_std"] }
51-
vm-core = { package = "miden-core", path = "../core", version = "0.8", default-features = false }
51+
vm-core = { package = "miden-core", path = "../core", version = "0.9", default-features = false }
5252

5353
[dev-dependencies]
5454
pretty_assertions = "1.4"

core/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[package]
22
name = "miden-core"
3-
version = "0.8.0"
3+
version = "0.9.1"
44
description = "Miden VM core components"
55
authors = ["miden contributors"]
66
readme = "README.md"
77
license = "MIT"
88
repository = "https://github.com/0xPolygonMiden/miden-vm"
9-
documentation = "https://docs.rs/miden-core/0.8.0"
9+
documentation = "https://docs.rs/miden-core/0.9.1"
1010
categories = ["emulators", "no-std"]
1111
keywords = ["instruction-set", "miden", "program"]
1212
edition = "2021"

docs/src/intro/main.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Miden VM is a zero-knowledge virtual machine written in Rust. For any program executed on Miden VM, a STARK-based proof of execution is automatically generated. This proof can then be used by anyone to verify that the program was executed correctly without the need for re-executing the program or even knowing the contents of the program.
33

44
## Status and features
5-
Miden VM is currently on release v0.8. In this release, most of the core features of the VM have been stabilized, and most of the STARK proof generation has been implemented. While we expect to keep making changes to the VM internals, the external interfaces should remain relatively stable, and we will do our best to minimize the amount of breaking changes going forward.
5+
Miden VM is currently on release v0.9. In this release, most of the core features of the VM have been stabilized, and most of the STARK proof generation has been implemented. While we expect to keep making changes to the VM internals, the external interfaces should remain relatively stable, and we will do our best to minimize the amount of breaking changes going forward.
66

77
At this point, Miden VM is good enough for experimentation, and even for real-world applications, but it is not yet ready for production use. The codebase has not been audited and contains known and unknown bugs and security flaws.
88

docs/src/intro/usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Usage
2-
Before you can use Miden VM, you'll need to make sure you have Rust [installed](https://www.rust-lang.org/tools/install). Miden VM v0.8 requires Rust version **1.75** or later.
2+
Before you can use Miden VM, you'll need to make sure you have Rust [installed](https://www.rust-lang.org/tools/install). Miden VM v0.9 requires Rust version **1.75** or later.
33

44
Miden VM consists of several crates, each of which exposes a small set of functionality. The most notable of these crates are:
55
* [miden-processor](https://crates.io/crates/miden-processor), which can be used to execute Miden VM programs.

docs/src/user_docs/assembly/field_operations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ If the error code is omitted, the default value of $0$ is assumed.
2323

2424
### Arithmetic and Boolean operations
2525

26-
The arithmetic operations below are performed in a 64-bit [prime filed](https://en.wikipedia.org/wiki/Finite_field) defined by modulus $p = 2^{64} - 2^{32} + 1$. This means that overflow happens after a value exceeds $p$. Also, the result of divisions may appear counter-intuitive because divisions are defined via inversions.
26+
The arithmetic operations below are performed in a 64-bit [prime field](https://en.wikipedia.org/wiki/Finite_field) defined by modulus $p = 2^{64} - 2^{32} + 1$. This means that overflow happens after a value exceeds $p$. Also, the result of divisions may appear counter-intuitive because divisions are defined via inversions.
2727

2828
| Instruction | Stack_input | Stack_output | Notes |
2929
| ------------------------------------------------------------------------------ | ----------- | ------------- | ------------------------------------------------------------------------------------------------------------ |

0 commit comments

Comments
 (0)