-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #361 from maticnetwork/next
Tracking PR for v0.3 release
- Loading branch information
Showing
282 changed files
with
38,522 additions
and
27,910 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Changelog | ||
|
||
## 0.3.0 (2022-11-23) | ||
|
||
- Implemented `call` operation for context-isolated function calls. | ||
- Added support for custom kernels. | ||
- Implemented `syscall` operation for kernel calls, and added a new `caller` instruction for accessing the hash of the calling function. | ||
- Implemented `mem_stream` operation for fast hashing of memory regions. | ||
- Implemented `adv_pipe` operation for fast "unhashing" of inputs into memory. | ||
- Added support for unlimited number of stack inputs/outputs. | ||
- [BREAKING] Redesigned Miden assembly input/output instructions for environment, random access memory, local memory, and non-deterministic "advice" inputs. | ||
- [BREAKING] Reordered the output stack for Miden assembly cryptographic operations `mtree_set` and `mtree_get` to improve efficiency. | ||
- Refactored the advice provider to add support for advice maps, and added the `adv.mem` decorator for copying memory regions into the advice map. | ||
- [BREAKING] Refactored the Assembler and added support for module providers. (Standard library is no longer available by default.) | ||
- Implemented AIR constraints for the stack component. | ||
- Added Miden REPL tool. | ||
- Improved performance with various internal refactorings and optimizations. | ||
|
||
## 0.2.0 (2022-08-09) | ||
|
||
- Implemented new decoder which removes limitations on the depth of control flow logic. | ||
- Introduced chiplet architecture to offload complex computations to specialized modules. | ||
- Added read-write random access memory. | ||
- Added support for operations with 32-bit unsigned integers. | ||
- Redesigned advice provider to include Merkle path advice sets. | ||
- Changed base field of the VM to the prime field with modulus 2^64 - 2^32 + 1. | ||
|
||
## 0.1.0 (2021-11-16) | ||
|
||
- Initial release (migration of the original [Distaff VM](https://github.com/GuildOfWeavers/distaff) codebase to [Winterfell](https://github.com/novifinancial/winterfell) backend). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
use criterion::{criterion_group, criterion_main, Criterion}; | ||
use miden_air::stack::op_flags::{generate_evaluation_frame, OpFlags}; | ||
use std::time::Duration; | ||
|
||
fn compute_op_flags(c: &mut Criterion) { | ||
let mut group = c.benchmark_group("compute_op_flags"); | ||
group.measurement_time(Duration::from_secs(10)); | ||
|
||
group.bench_function("op_flags", |bench| { | ||
let frame = generate_evaluation_frame(36); | ||
bench.iter(|| { | ||
let _flag = OpFlags::new(&frame); | ||
}); | ||
}); | ||
|
||
group.finish(); | ||
} | ||
|
||
criterion_group!(op_flags_group, compute_op_flags); | ||
criterion_main!(op_flags_group); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
use criterion::{criterion_group, criterion_main, Criterion}; | ||
use miden_air::{ | ||
stack::{ | ||
enforce_constraints, field_ops, io_ops, op_flags::generate_evaluation_frame, overflow, | ||
stack_manipulation, system_ops, u32_ops, NUM_GENERAL_CONSTRAINTS, | ||
}, | ||
Felt, FieldElement, | ||
}; | ||
use std::time::Duration; | ||
use vm_core::{Operation, STACK_TRACE_OFFSET}; | ||
|
||
fn enforce_stack_constraint(c: &mut Criterion) { | ||
let mut group = c.benchmark_group("enforce_stack_constraint"); | ||
group.measurement_time(Duration::from_secs(10)); | ||
|
||
group.bench_function("enforce_stack", |bench| { | ||
const NUM_CONSTRAINTS: usize = overflow::NUM_CONSTRAINTS | ||
+ system_ops::NUM_CONSTRAINTS | ||
+ u32_ops::NUM_CONSTRAINTS | ||
+ field_ops::NUM_CONSTRAINTS | ||
+ stack_manipulation::NUM_CONSTRAINTS | ||
+ io_ops::NUM_CONSTRAINTS | ||
+ NUM_GENERAL_CONSTRAINTS; | ||
|
||
let mut frame = generate_evaluation_frame(Operation::Inv.op_code() as usize); | ||
frame.current_mut()[STACK_TRACE_OFFSET] = Felt::new(89u64); | ||
frame.next_mut()[STACK_TRACE_OFFSET] = Felt::new(89u64).inv(); | ||
|
||
let mut result = [Felt::ZERO; NUM_CONSTRAINTS]; | ||
|
||
let frame = generate_evaluation_frame(36); | ||
bench.iter(|| { | ||
enforce_constraints(&frame, &mut result); | ||
}); | ||
}); | ||
|
||
group.finish(); | ||
} | ||
|
||
criterion_group!(enforce_stack_group, enforce_stack_constraint); | ||
criterion_main!(enforce_stack_group); |
Oops, something went wrong.