Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/next' into next-webgpu
Browse files Browse the repository at this point in the history
  • Loading branch information
GopherJ committed Aug 24, 2024
2 parents bbd1cf8 + e683be9 commit fea8595
Show file tree
Hide file tree
Showing 31 changed files with 1,023 additions and 606 deletions.
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
# Changelog

## 0.11.0 (TBD)
## 0.10.5 (2024-08-21)

#### Enhancements

- Updated `MastForest::read_from` to deserialize without computing node hashes unnecessarily (#1453).
- Assembler: Merge contiguous basic blocks (#1454).
- Assembler: Add a threshold number of operations after which we stop merging more in the same block (#1461).

#### Changes

- Added `new_unsafe()` constructors to MAST node types which do not compute node hashes (#1453).
- Consolidated `BasicBlockNode` constructors and converted assert flow to `MastForestError::EmptyBasicBlock` (#1453).

#### Fixes

- Fixed an issue with registering non-local procedures in `MemMastForestStore` (#1462).
- Added a check for circular external node lookups in the processor (#1464).

## 0.10.4 (2024-08-15) - `miden-processor` crate only

#### Enhancements

- Added support for executing `Dyn` nodes from external MAST forests (#1455).

## 0.10.3 (2024-08-12)

#### Enhancements
Expand Down
33 changes: 17 additions & 16 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Miden VM is a zero-knowledge virtual machine written in Rust. For any program ex

### Status and features

Miden VM is currently on release v0.11. 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.
Miden VM is currently on release v0.10. 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.

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).

Expand Down
6 changes: 3 additions & 3 deletions air/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "miden-air"
version = "0.11.0"
version = "0.10.5"
description = "Algebraic intermediate representation of Miden VM processor"
documentation = "https://docs.rs/miden-air/0.11.0"
documentation = "https://docs.rs/miden-air/0.10.5"
readme = "README.md"
categories = ["cryptography", "no-std"]
keywords = ["air", "arithmetization", "crypto", "miden"]
Expand Down Expand Up @@ -32,7 +32,7 @@ testing = []

[dependencies]
thiserror = { package = "miden-thiserror", version = "1.0", default-features = false }
vm-core = { package = "miden-core", path = "../core", version = "0.11", default-features = false }
vm-core = { package = "miden-core", path = "../core", version = "0.10", default-features = false }
winter-air = { package = "winter-air", version = "0.9", default-features = false }
winter-prover = { package = "winter-prover", version = "0.9", default-features = false }

Expand Down
6 changes: 3 additions & 3 deletions assembly/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "miden-assembly"
version = "0.11.0"
version = "0.10.5"
description = "Miden VM assembly language"
documentation = "https://docs.rs/miden-assembly/0.11.0"
documentation = "https://docs.rs/miden-assembly/0.10.5"
readme = "README.md"
categories = ["compilers", "no-std"]
keywords = ["assembler", "assembly", "language", "miden"]
Expand Down Expand Up @@ -34,7 +34,7 @@ smallvec = { version = "1.13", features = ["union", "const_generics", "const_new
thiserror = { package = "miden-thiserror", version = "1.0", default-features = false }
tracing = { version = "0.1", default-features = false, features = ["attributes"] }
unicode-width = { version = "0.1", features = ["no_std"] }
vm-core = { package = "miden-core", path = "../core", version = "0.11", default-features = false, features = [
vm-core = { package = "miden-core", path = "../core", version = "0.10", default-features = false, features = [
"diagnostics",
] }

Expand Down
36 changes: 18 additions & 18 deletions assembly/src/assembler/basic_block_builder.rs
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
use alloc::{borrow::Borrow, string::ToString, vec::Vec};

use vm_core::{mast::MastNodeId, AdviceInjector, AssemblyOp, Operation};
use vm_core::{mast::MastNodeId, AdviceInjector, AssemblyOp, Decorator, Operation};

use super::{
mast_forest_builder::MastForestBuilder, BodyWrapper, Decorator, DecoratorList, ProcedureContext,
};
use super::{mast_forest_builder::MastForestBuilder, BodyWrapper, DecoratorList, ProcedureContext};
use crate::{ast::Instruction, AssemblyError, Span};

// BASIC BLOCK BUILDER
// ================================================================================================

/// A helper struct for constructing SPAN blocks while compiling procedure bodies.
/// A helper struct for constructing basic blocks while compiling procedure bodies.
///
/// Operations and decorators can be added to a span builder via various `add_*()` and `push_*()`
/// methods, and then SPAN blocks can be extracted from the builder via `extract_*()` methods.
/// Operations and decorators can be added to a basic block builder via various `add_*()` and
/// `push_*()` methods, and then basic blocks can be extracted from the builder via `extract_*()`
/// methods.
///
/// The same span builder can be used to construct many blocks. It is expected that when the last
/// SPAN block in a procedure's body is constructed `extract_final_span_into()` will be used.
/// The same basic block builder can be used to construct many blocks. It is expected that when the
/// last basic block in a procedure's body is constructed [`Self::try_into_basic_block`] will be
/// used.
#[derive(Default)]
pub struct BasicBlockBuilder {
ops: Vec<Operation>,
Expand All @@ -27,11 +27,11 @@ pub struct BasicBlockBuilder {

/// Constructors
impl BasicBlockBuilder {
/// Returns a new [SpanBuilder] instantiated with the specified optional wrapper.
/// Returns a new [`BasicBlockBuilder`] instantiated with the specified optional wrapper.
///
/// If the wrapper is provided, the prologue of the wrapper is immediately appended to the
/// vector of span operations. The epilogue of the wrapper is appended to the list of
/// operations upon consumption of the builder via `extract_final_span_into()` method.
/// vector of span operations. The epilogue of the wrapper is appended to the list of operations
/// upon consumption of the builder via the [`Self::try_into_basic_block`] method.
pub(super) fn new(wrapper: Option<BodyWrapper>) -> Self {
match wrapper {
Some(wrapper) => Self {
Expand All @@ -47,12 +47,12 @@ impl BasicBlockBuilder {

/// Operations
impl BasicBlockBuilder {
/// Adds the specified operation to the list of span operations.
/// Adds the specified operation to the list of basic block operations.
pub fn push_op(&mut self, op: Operation) {
self.ops.push(op);
}

/// Adds the specified sequence of operations to the list of span operations.
/// Adds the specified sequence of operations to the list of basic block operations.
pub fn push_ops<I, O>(&mut self, ops: I)
where
I: IntoIterator<Item = O>,
Expand All @@ -61,7 +61,7 @@ impl BasicBlockBuilder {
self.ops.extend(ops.into_iter().map(|o| *o.borrow()));
}

/// Adds the specified operation n times to the list of span operations.
/// Adds the specified operation n times to the list of basic block operations.
pub fn push_op_many(&mut self, op: Operation, n: usize) {
let new_len = self.ops.len() + n;
self.ops.resize(new_len, op);
Expand All @@ -70,17 +70,17 @@ impl BasicBlockBuilder {

/// Decorators
impl BasicBlockBuilder {
/// Add the specified decorator to the list of span decorators.
/// Add the specified decorator to the list of basic block decorators.
pub fn push_decorator(&mut self, decorator: Decorator) {
self.decorators.push((self.ops.len(), decorator));
}

/// Adds the specified advice injector to the list of span decorators.
/// Adds the specified advice injector to the list of basic block decorators.
pub fn push_advice_injector(&mut self, injector: AdviceInjector) {
self.push_decorator(Decorator::Advice(injector));
}

/// Adds an AsmOp decorator to the list of span decorators.
/// Adds an AsmOp decorator to the list of basic block decorators.
///
/// This indicates that the provided instruction should be tracked and the cycle count for
/// this instruction will be computed when the call to set_instruction_cycle_count() is made.
Expand Down
Loading

0 comments on commit fea8595

Please sign in to comment.