Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' into jb/acvm-js-publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
jonybur authored Sep 7, 2023
2 parents e57b90b + d40a10e commit 0bbd3fd
Show file tree
Hide file tree
Showing 33 changed files with 186 additions and 64 deletions.
18 changes: 9 additions & 9 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
".": "0.25.0",
"acir": "0.25.0",
"acir_field": "0.25.0",
"acvm": "0.25.0",
"acvm_js": "0.25.0",
"stdlib": "0.25.0",
"brillig": "0.25.0",
"brillig_vm": "0.25.0",
"blackbox_solver": "0.25.0"
".": "0.26.0",
"acir": "0.26.0",
"acir_field": "0.26.0",
"acvm": "0.26.0",
"acvm_js": "0.26.0",
"stdlib": "0.26.0",
"brillig": "0.26.0",
"brillig_vm": "0.26.0",
"blackbox_solver": "0.26.0"
}
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.26.0](https://github.com/noir-lang/acvm/compare/root-v0.25.0...root-v0.26.0) (2023-09-07)


### ⚠ BREAKING CHANGES

* Add a low and high limb to scalar mul opcode ([#532](https://github.com/noir-lang/acvm/issues/532))

### Miscellaneous Chores

* Add a low and high limb to scalar mul opcode ([#532](https://github.com/noir-lang/acvm/issues/532)) ([b054f66](https://github.com/noir-lang/acvm/commit/b054f66be9c73d4e02dbecdab80874a907f19242))

## [0.25.0](https://github.com/noir-lang/acvm/compare/root-v0.24.1...root-v0.25.0) (2023-09-04)


Expand Down
16 changes: 8 additions & 8 deletions Cargo.lock

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

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ rust-version = "1.66"
repository = "https://github.com/noir-lang/acvm/"

[workspace.dependencies]
acir = { version = "0.25.0", path = "acir", default-features = false }
acir_field = { version = "0.25.0", path = "acir_field", default-features = false }
stdlib = { package = "acvm_stdlib", version = "0.25.0", path = "stdlib", default-features = false }
brillig = { version = "0.25.0", path = "brillig", default-features = false }
blackbox_solver = { package = "acvm_blackbox_solver", version = "0.25.0", path = "blackbox_solver", default-features = false }
acir = { version = "0.26.0", path = "acir", default-features = false }
acir_field = { version = "0.26.0", path = "acir_field", default-features = false }
stdlib = { package = "acvm_stdlib", version = "0.26.0", path = "stdlib", default-features = false }
brillig = { version = "0.26.0", path = "brillig", default-features = false }
blackbox_solver = { package = "acvm_blackbox_solver", version = "0.26.0", path = "blackbox_solver", default-features = false }

bincode = "1.3.3"

Expand Down
11 changes: 11 additions & 0 deletions acir/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## [0.26.0](https://github.com/noir-lang/acvm/compare/acir-v0.25.0...acir-v0.26.0) (2023-09-07)


### ⚠ BREAKING CHANGES

* Add a low and high limb to scalar mul opcode ([#532](https://github.com/noir-lang/acvm/issues/532))

### Miscellaneous Chores

* Add a low and high limb to scalar mul opcode ([#532](https://github.com/noir-lang/acvm/issues/532)) ([b054f66](https://github.com/noir-lang/acvm/commit/b054f66be9c73d4e02dbecdab80874a907f19242))

## [0.25.0](https://github.com/noir-lang/acvm/compare/acir-v0.24.1...acir-v0.25.0) (2023-09-04)


Expand Down
2 changes: 1 addition & 1 deletion acir/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "acir"
description = "ACIR is the IR that the VM processes, it is analogous to LLVM IR"
version = "0.25.0"
version = "0.26.0"
authors.workspace = true
edition.workspace = true
license.workspace = true
Expand Down
10 changes: 6 additions & 4 deletions acir/src/circuit/opcodes/black_box_function_call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ pub enum BlackBoxFuncCall {
output: Witness,
},
FixedBaseScalarMul {
input: FunctionInput,
low: FunctionInput,
high: FunctionInput,
outputs: (Witness, Witness),
},
Keccak256 {
Expand Down Expand Up @@ -160,7 +161,8 @@ impl BlackBoxFuncCall {
output: Witness(0),
},
BlackBoxFunc::FixedBaseScalarMul => BlackBoxFuncCall::FixedBaseScalarMul {
input: FunctionInput::dummy(),
low: FunctionInput::dummy(),
high: FunctionInput::dummy(),
outputs: (Witness(0), Witness(0)),
},
BlackBoxFunc::Keccak256 => {
Expand Down Expand Up @@ -210,8 +212,8 @@ impl BlackBoxFuncCall {
BlackBoxFuncCall::AND { lhs, rhs, .. } | BlackBoxFuncCall::XOR { lhs, rhs, .. } => {
vec![*lhs, *rhs]
}
BlackBoxFuncCall::FixedBaseScalarMul { input, .. }
| BlackBoxFuncCall::RANGE { input } => vec![*input],
BlackBoxFuncCall::FixedBaseScalarMul { low, high, .. } => vec![*low, *high],
BlackBoxFuncCall::RANGE { input } => vec![*input],
BlackBoxFuncCall::SchnorrVerify {
public_key_x,
public_key_y,
Expand Down
9 changes: 5 additions & 4 deletions acir/tests/test_program_serialization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ fn addition_circuit() {
#[test]
fn fixed_base_scalar_mul_circuit() {
let fixed_base_scalar_mul = Opcode::BlackBoxFuncCall(BlackBoxFuncCall::FixedBaseScalarMul {
input: FunctionInput { witness: Witness(1), num_bits: FieldElement::max_num_bits() },
low: FunctionInput { witness: Witness(1), num_bits: FieldElement::max_num_bits() },
high: FunctionInput { witness: Witness(1), num_bits: FieldElement::max_num_bits() },
outputs: (Witness(2), Witness(3)),
});

Expand All @@ -76,9 +77,9 @@ fn fixed_base_scalar_mul_circuit() {
circuit.write(&mut bytes).unwrap();

let expected_serialization: Vec<u8> = vec![
31, 139, 8, 0, 0, 0, 0, 0, 0, 255, 93, 137, 91, 10, 0, 0, 4, 4, 215, 227, 203, 253, 207,
43, 132, 146, 169, 105, 106, 87, 1, 16, 154, 170, 77, 61, 229, 84, 222, 191, 240, 169, 156,
61, 0, 36, 111, 164, 5, 80, 0, 0, 0,
31, 139, 8, 0, 0, 0, 0, 0, 0, 255, 93, 202, 65, 10, 0, 64, 8, 2, 64, 183, 246, 212, 255,
223, 27, 21, 21, 72, 130, 12, 136, 31, 192, 67, 167, 180, 209, 73, 201, 234, 249, 109, 132,
84, 218, 3, 23, 46, 165, 61, 88, 0, 0, 0,
];

assert_eq!(bytes, expected_serialization)
Expand Down
7 changes: 7 additions & 0 deletions acir_field/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [0.26.0](https://github.com/noir-lang/acvm/compare/acir_field-v0.25.0...acir_field-v0.26.0) (2023-09-07)


### Miscellaneous Chores

* **acir_field:** Synchronize acvm versions

## [0.25.0](https://github.com/noir-lang/acvm/compare/acir_field-v0.24.1...acir_field-v0.25.0) (2023-09-04)


Expand Down
2 changes: 1 addition & 1 deletion acir_field/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "acir_field"
description = "The field implementation being used by ACIR."
version = "0.25.0"
version = "0.26.0"
authors.workspace = true
edition.workspace = true
license.workspace = true
Expand Down
18 changes: 18 additions & 0 deletions acvm/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## [0.26.0](https://github.com/noir-lang/acvm/compare/acvm-v0.25.0...acvm-v0.26.0) (2023-09-07)


### ⚠ BREAKING CHANGES

* Add a low and high limb to scalar mul opcode ([#532](https://github.com/noir-lang/acvm/issues/532))

### Miscellaneous Chores

* Add a low and high limb to scalar mul opcode ([#532](https://github.com/noir-lang/acvm/issues/532)) ([b054f66](https://github.com/noir-lang/acvm/commit/b054f66be9c73d4e02dbecdab80874a907f19242))


### Dependencies

* The following workspace dependencies were updated
* dependencies
* brillig_vm bumped from 0.25.0 to 0.26.0

## [0.25.0](https://github.com/noir-lang/acvm/compare/acvm-v0.24.1...acvm-v0.25.0) (2023-09-04)


Expand Down
4 changes: 2 additions & 2 deletions acvm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "acvm"
description = "The virtual machine that processes ACIR given a backend/proof system."
version = "0.25.0"
version = "0.26.0"
authors.workspace = true
edition.workspace = true
license.workspace = true
Expand All @@ -17,7 +17,7 @@ thiserror.workspace = true

acir.workspace = true
stdlib.workspace = true
brillig_vm = { version = "0.25.0", path = "../brillig_vm", default-features = false }
brillig_vm = { version = "0.26.0", path = "../brillig_vm", default-features = false }
blackbox_solver.workspace = true

indexmap = "1.7.0"
Expand Down
8 changes: 5 additions & 3 deletions acvm/src/pwg/blackbox/fixed_base_scalar_mul.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ use crate::{
pub(super) fn fixed_base_scalar_mul(
backend: &impl BlackBoxFunctionSolver,
initial_witness: &mut WitnessMap,
input: FunctionInput,
low: FunctionInput,
high: FunctionInput,
outputs: (Witness, Witness),
) -> Result<(), OpcodeResolutionError> {
let scalar = witness_to_value(initial_witness, input.witness)?;
let low = witness_to_value(initial_witness, low.witness)?;
let high = witness_to_value(initial_witness, high.witness)?;

let (pub_x, pub_y) = backend.fixed_base_scalar_mul(scalar)?;
let (pub_x, pub_y) = backend.fixed_base_scalar_mul(low, high)?;

insert_value(&outputs.0, pub_x, initial_witness)?;
insert_value(&outputs.1, pub_y, initial_witness)?;
Expand Down
4 changes: 2 additions & 2 deletions acvm/src/pwg/blackbox/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ pub(crate) fn solve(
message,
*output,
),
BlackBoxFuncCall::FixedBaseScalarMul { input, outputs } => {
fixed_base_scalar_mul(backend, initial_witness, *input, *outputs)
BlackBoxFuncCall::FixedBaseScalarMul { low, high, outputs } => {
fixed_base_scalar_mul(backend, initial_witness, *low, *high, *outputs)
}
BlackBoxFuncCall::RecursiveAggregation { output_aggregation_object, .. } => {
// Solve the output of the recursive aggregation to zero to prevent missing assignment errors
Expand Down
3 changes: 2 additions & 1 deletion acvm/tests/solver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ impl BlackBoxFunctionSolver for StubbedBackend {
}
fn fixed_base_scalar_mul(
&self,
_input: &FieldElement,
_low: &FieldElement,
_high: &FieldElement,
) -> Result<(FieldElement, FieldElement), BlackBoxResolutionError> {
panic!("Path not trodden by this test")
}
Expand Down
18 changes: 18 additions & 0 deletions acvm_js/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## [0.26.0](https://github.com/noir-lang/acvm/compare/acvm_js-v0.25.0...acvm_js-v0.26.0) (2023-09-07)


### ⚠ BREAKING CHANGES

* Add a low and high limb to scalar mul opcode ([#532](https://github.com/noir-lang/acvm/issues/532))

### Miscellaneous Chores

* Add a low and high limb to scalar mul opcode ([#532](https://github.com/noir-lang/acvm/issues/532)) ([b054f66](https://github.com/noir-lang/acvm/commit/b054f66be9c73d4e02dbecdab80874a907f19242))


### Dependencies

* The following workspace dependencies were updated
* dependencies
* acvm bumped from 0.25.0 to 0.26.0

## [0.25.0](https://github.com/noir-lang/acvm/compare/acvm_js-v0.24.1...acvm_js-v0.25.0) (2023-09-04)


Expand Down
4 changes: 2 additions & 2 deletions acvm_js/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "acvm_js"
description = "Typescript wrapper around the ACVM allowing execution of ACIR code"
version = "0.25.0" # x-release-please-version
version = "0.26.0" # x-release-please-version
authors.workspace = true
edition.workspace = true
license.workspace = true
Expand All @@ -17,7 +17,7 @@ crate-type = ["cdylib"]
cfg-if = "1.0.0"

[target.'cfg(target_arch = "wasm32")'.dependencies]
acvm = { version = "0.25.0", path = "../acvm", default-features = false }
acvm = { version = "0.26.0", path = "../acvm", default-features = false }
wasm-bindgen = { version = "0.2.87", features = ["serde-serialize"] }
wasm-bindgen-futures = "0.4.36"
serde = { version = "1.0.136", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion acvm_js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@noir-lang/acvm_js",
"version": "0.25.0",
"version": "0.26.0",
"private": true,
"repository": {
"type": "git",
Expand Down
7 changes: 3 additions & 4 deletions acvm_js/test/shared/fixed_base_scalar_mul.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
// See `fixed_base_scalar_mul_circuit` integration test in `acir/tests/test_program_serialization.rs`.
export const bytecode = Uint8Array.from([
31, 139, 8, 0, 0, 0, 0, 0, 0, 255, 93, 137, 91, 10, 0, 0, 4, 4, 215, 227, 203,
253, 207, 43, 132, 146, 169, 105, 106, 87, 1, 16, 154, 170, 77, 61, 229, 84,
222, 191, 240, 169, 156, 61, 0, 36, 111, 164, 5, 80, 0, 0, 0,
31, 139, 8, 0, 0, 0, 0, 0, 0, 255, 93, 202, 65, 10, 0, 64, 8, 2, 64, 183, 246,
212, 255, 223, 27, 21, 21, 72, 130, 12, 136, 31, 192, 67, 167, 180, 209, 73,
201, 234, 249, 109, 132, 84, 218, 3, 23, 46, 165, 61, 88, 0, 0, 0,
]);

export const initialWitnessMap = new Map([
[1, "0x0000000000000000000000000000000000000000000000000000000000000001"],
]);
Expand Down
11 changes: 11 additions & 0 deletions blackbox_solver/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## [0.26.0](https://github.com/noir-lang/acvm/compare/acvm_blackbox_solver-v0.25.0...acvm_blackbox_solver-v0.26.0) (2023-09-07)


### ⚠ BREAKING CHANGES

* Add a low and high limb to scalar mul opcode ([#532](https://github.com/noir-lang/acvm/issues/532))

### Miscellaneous Chores

* Add a low and high limb to scalar mul opcode ([#532](https://github.com/noir-lang/acvm/issues/532)) ([b054f66](https://github.com/noir-lang/acvm/commit/b054f66be9c73d4e02dbecdab80874a907f19242))

## [0.25.0](https://github.com/noir-lang/acvm/compare/acvm_blackbox_solver-v0.24.1...acvm_blackbox_solver-v0.25.0) (2023-09-04)


Expand Down
Loading

0 comments on commit 0bbd3fd

Please sign in to comment.