From 455399fa42161dccfd507872805fa2bb64c557e5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Pedro=20Sousa?=
Date: Mon, 22 Jan 2024 14:04:15 +0000
Subject: [PATCH 01/70] chore(docs): removing oracles from 0.22.0 (#4104)
# Description
Removes Oracles documentation from version 0.22.0..
## Problem\*
We went on documenting oracles for 0.22.0 (and a lil bit painfully,
gonna be honest). Unforgivable.

Closes #4096
---------
Co-authored-by: Tom French
---
.github/workflows/docs-pr.yml | 2 +-
.../explainers/explainer-oracle.md | 57 ----
.../version-v0.22.0/how_to/how-to-oracles.md | 280 ------------------
.../version-v0.22.0/noir/syntax/oracles.md | 23 --
4 files changed, 1 insertion(+), 361 deletions(-)
delete mode 100644 docs/versioned_docs/version-v0.22.0/explainers/explainer-oracle.md
delete mode 100644 docs/versioned_docs/version-v0.22.0/how_to/how-to-oracles.md
delete mode 100644 docs/versioned_docs/version-v0.22.0/noir/syntax/oracles.md
diff --git a/.github/workflows/docs-pr.yml b/.github/workflows/docs-pr.yml
index cf40b9357cd..f4a1be826a8 100644
--- a/.github/workflows/docs-pr.yml
+++ b/.github/workflows/docs-pr.yml
@@ -40,7 +40,7 @@ jobs:
script: |
const labels = context.payload.pull_request.labels.map(label => label.name);
if (!labels.includes('documentation')) {
- github.issues.addLabels({
+ github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
diff --git a/docs/versioned_docs/version-v0.22.0/explainers/explainer-oracle.md b/docs/versioned_docs/version-v0.22.0/explainers/explainer-oracle.md
deleted file mode 100644
index 76dd0e36d6c..00000000000
--- a/docs/versioned_docs/version-v0.22.0/explainers/explainer-oracle.md
+++ /dev/null
@@ -1,57 +0,0 @@
----
-title: Oracles
-description: This guide provides an in-depth understanding of how Oracles work in Noir programming. Learn how to use outside calculations in your programs, constrain oracles, and understand their uses and limitations.
-keywords:
- - Noir Programming
- - Oracles
- - JSON-RPC
- - Foreign Call Handlers
- - Constrained Functions
- - Blockchain Programming
-sidebar_position: 1
----
-
-If you've seen "The Matrix" you may recall "The Oracle" as Gloria Foster smoking cigarettes and baking cookies. While she appears to "know things", she is actually providing a calculation of a pre-determined future. Noir Oracles are similar, in a way. They don't calculate the future (yet), but they allow you to use outside calculations in your programs.
-
-
-
-A Noir program is usually self-contained. You can pass certain inputs to it, and it will generate a deterministic output for those inputs. But what if you wanted to defer some calculation to an outside process or source?
-
-Oracles are functions that provide this feature.
-
-## Use cases
-
-An example usage for Oracles is proving something on-chain. For example, proving that the ETH-USDC quote was below a certain target at a certain block time. Or even making more complex proofs like proving the ownership of an NFT as an anonymous login method.
-
-Another interesting use case is to defer expensive calculations to be made outside of the Noir program, and then constraining the result; similar to the use of [unconstrained functions](../noir/syntax/unconstrained.md).
-
-In short, anything that can be constrained in a Noir program but needs to be fetched from an external source is a great candidate to be used in oracles.
-
-## Constraining oracles
-
-Just like in The Matrix, Oracles are powerful. But with great power, comes great responsibility. Just because you're using them in a Noir program doesn't mean they're true. Noir has no superpowers. If you want to prove that Portugal won the Euro Cup 2016, you're still relying on potentially untrusted information.
-
-To give a concrete example, Alice wants to login to the [NounsDAO](https://nouns.wtf/) forum with her username "noir_nouner" by proving she owns a noun without revealing her ethereum address. Her Noir program could have a oracle call like this:
-
-```rust
-#[oracle(getNoun)]
-unconstrained fn get_noun(address: Field) -> Field
-```
-
-This oracle could naively resolve with the number of Nouns she possesses. However, it is useless as a trusted source, as the oracle could resolve to anything Alice wants. In order to make this oracle call actually useful, Alice would need to constrain the response from the oracle, by proving her address and the noun count belongs to the state tree of the contract.
-
-In short, **Oracles don't prove anything. Your Noir program does.**
-
-:::danger
-
-If you don't constrain the return of your oracle, you could be clearly opening an attack vector on your Noir program. Make double-triple sure that the return of an oracle call is constrained!
-
-:::
-
-## How to use Oracles
-
-On CLI, Nargo resolves oracles by making JSON RPC calls, which means it would require an RPC node to be running.
-
-In JavaScript, NoirJS accepts and resolves arbitrary call handlers (that is, not limited to JSON) as long as they matches the expected types the developer defines. Refer to [Foreign Call Handler](../reference/NoirJS/noir_js/type-aliases/ForeignCallHandler.md) to learn more about NoirJS's call handling.
-
-If you want to build using oracles, follow through to the [oracle guide](../how_to/how-to-oracles.md) for a simple example on how to do that.
diff --git a/docs/versioned_docs/version-v0.22.0/how_to/how-to-oracles.md b/docs/versioned_docs/version-v0.22.0/how_to/how-to-oracles.md
deleted file mode 100644
index 61cabe586e6..00000000000
--- a/docs/versioned_docs/version-v0.22.0/how_to/how-to-oracles.md
+++ /dev/null
@@ -1,280 +0,0 @@
----
-title: How to use Oracles
-description: Learn how to use oracles in your Noir program with examples in both Nargo and NoirJS. This guide also covers writing a JSON RPC server and providing custom foreign call handlers for NoirJS.
-keywords:
- - Noir Programming
- - Oracles
- - Nargo
- - NoirJS
- - JSON RPC Server
- - Foreign Call Handlers
-sidebar_position: 1
----
-
-This guide shows you how to use oracles in your Noir program. For the sake of clarity, it assumes that:
-
-- You have read the [explainer on Oracles](../explainers/explainer-oracle.md) and are comfortable with the concept.
-- You have a Noir program to add oracles to. You can create one using the [vite-hardhat starter](https://github.com/noir-lang/noir-starter/tree/main/vite-hardhat) as a boilerplate.
-- You understand the concept of a JSON-RPC server. Visit the [JSON-RPC website](https://www.jsonrpc.org/) if you need a refresher.
-- You are comfortable with server-side JavaScript (e.g. Node.js, managing packages, etc.).
-
-For reference, you can find the snippets used in this tutorial on the [Aztec DevRel Repository](https://github.com/AztecProtocol/dev-rel/tree/main/how_to_oracles/code-snippets/how-to-oracles).
-
-## Rundown
-
-This guide has 3 major steps:
-
-1. How to modify our Noir program to make use of oracle calls as unconstrained functions
-2. How to write a JSON RPC Server to resolve these oracle calls with Nargo
-3. How to use them in Nargo and how to provide a custom resolver in NoirJS
-
-## Step 1 - Modify your Noir program
-
-An oracle is defined in a Noir program by defining two methods:
-
-- An unconstrained method - This tells the compiler that it is executing an [unconstrained functions](../noir/syntax/unconstrained.md).
-- A decorated oracle method - This tells the compiler that this method is an RPC call.
-
-An example of an oracle that returns a `Field` would be:
-
-```rust
-#[oracle(getSqrt)]
-unconstrained fn sqrt(number: Field) -> Field { }
-
-unconstrained fn get_sqrt(number: Field) -> Field {
- sqrt(number)
-}
-```
-
-In this example, we're wrapping our oracle function in a unconstrained method, and decorating it with `oracle(getSqrt)`. We can then call the unconstrained function as we would call any other function:
-
-```rust
-fn main(input: Field) {
- let sqrt = get_sqrt(input);
-}
-```
-
-In the next section, we will make this `getSqrt` (defined on the `sqrt` decorator) be a method of the RPC server Noir will use.
-
-:::danger
-
-As explained in the [Oracle Explainer](../explainers/explainer-oracle.md), this `main` function is unsafe unless you constrain its return value. For example:
-
-```rust
-fn main(input: Field) {
- let sqrt = get_sqrt(input);
- assert(sqrt[0].pow_32(2) as u64 == input as u64); // <---- constrain the return of an oracle!
-}
-```
-
-:::
-
-:::info
-
-Currently, oracles only work with single params or array params. For example:
-
-```rust
-#[oracle(getSqrt)]
-unconstrained fn sqrt([Field; 2]) -> [Field; 2] { }
-```
-
-:::
-
-## Step 2 - Write an RPC server
-
-Brillig will call *one* RPC server. Most likely you will have to write your own, and you can do it in whatever language you prefer. In this guide, we will do it in Javascript.
-
-Let's use the above example of an oracle that consumes an array with two `Field` and returns their square roots:
-
-```rust
-#[oracle(getSqrt)]
-unconstrained fn sqrt(input: [Field; 2]) -> [Field; 2] { }
-
-unconstrained fn get_sqrt(input: [Field; 2]) -> [Field; 2] {
- sqrt(input)
-}
-
-fn main(input: [Field; 2]) {
- let sqrt = get_sqrt(input);
- assert(sqrt[0].pow_32(2) as u64 == input[0] as u64);
- assert(sqrt[1].pow_32(2) as u64 == input[1] as u64);
-}
-```
-
-:::info
-
-Why square root?
-
-In general, computing square roots is computationally more expensive than multiplications, which takes a toll when speaking about ZK applications. In this case, instead of calculating the square root in Noir, we are using our oracle to offload that computation to be made in plain. In our circuit we can simply multiply the two values.
-
-:::
-
-Now, we should write the correspondent RPC server, starting with the [default JSON-RPC 2.0 boilerplate](https://www.npmjs.com/package/json-rpc-2.0#example):
-
-```js
-import { JSONRPCServer } from "json-rpc-2.0";
-import express from "express";
-import bodyParser from "body-parser";
-
-const app = express();
-app.use(bodyParser.json());
-
-const server = new JSONRPCServer();
-app.post("/", (req, res) => {
- const jsonRPCRequest = req.body;
- server.receive(jsonRPCRequest).then((jsonRPCResponse) => {
- if (jsonRPCResponse) {
- res.json(jsonRPCResponse);
- } else {
- res.sendStatus(204);
- }
- });
-});
-
-app.listen(5555);
-```
-
-Now, we will add our `getSqrt` method, as expected by the `#[oracle(getSqrt)]` decorator in our Noir code. It maps through the params array and returns their square roots:
-
-```js
-server.addMethod("getSqrt", async (params) => {
- const values = params[0].Array.map(({ inner }) => {
- return { inner: `${Math.sqrt(parseInt(inner, 16))}` };
- });
- return { values: [{ Array: values }] };
-});
-```
-
-:::tip
-
-Brillig expects an object with an array of values. Each value is an object declaring to be `Single` or `Array` and returning a `inner` property *as a string*. For example:
-
-```json
-{ "values": [{ "Array": [{ "inner": "1" }, { "inner": "2"}]}]}
-{ "values": [{ "Single": { "inner": "1" }}]}
-{ "values": [{ "Single": { "inner": "1" }}, { "Array": [{ "inner": "1", { "inner": "2" }}]}]}
-```
-
-If you're using Typescript, the following types may be helpful in understanding the expected return value and making sure they're easy to follow:
-
-```js
-interface Value {
- inner: string,
-}
-
-interface SingleForeignCallParam {
- Single: Value,
-}
-
-interface ArrayForeignCallParam {
- Array: Value[],
-}
-
-type ForeignCallParam = SingleForeignCallParam | ArrayForeignCallParam;
-
-interface ForeignCallResult {
- values: ForeignCallParam[],
-}
-```
-
-:::
-
-## Step 3 - Usage with Nargo
-
-Using the [`nargo` CLI tool](../getting_started/installation/index.md), you can use oracles in the `nargo test`, `nargo execute` and `nargo prove` commands by passing a value to `--oracle-resolver`. For example:
-
-```bash
-nargo test --oracle-resolver http://localhost:5555
-```
-
-This tells `nargo` to use your RPC Server URL whenever it finds an oracle decorator.
-
-## Step 4 - Usage with NoirJS
-
-In a JS environment, an RPC server is not strictly necessary, as you may want to resolve your oracles without needing any JSON call at all. NoirJS simply expects that you pass a callback function when you generate proofs, and that callback function can be anything.
-
-For example, if your Noir program expects the host machine to provide CPU pseudo-randomness, you could simply pass it as the `foreignCallHandler`. You don't strictly need to create an RPC server to serve pseudo-randomness, as you may as well get it directly in your app:
-
-```js
-const foreignCallHandler = (name, inputs) => crypto.randomBytes(16) // etc
-
-await noir.generateFinalProof(inputs, foreignCallHandler)
-```
-
-As one can see, in NoirJS, the [`foreignCallHandler`](../reference/NoirJS/noir_js/type-aliases/ForeignCallHandler.md) function simply means "a callback function that returns a value of type [`ForeignCallOutput`](../reference/NoirJS/noir_js/type-aliases/ForeignCallOutput.md). It doesn't have to be an RPC call like in the case for Nargo.
-
-:::tip
-
-Does this mean you don't have to write an RPC server like in [Step #2](#step-2---write-an-rpc-server)?
-
-You don't technically have to, but then how would you run `nargo test` or `nargo prove`? To use both `Nargo` and `NoirJS` in your development flow, you will have to write a JSON RPC server.
-
-:::
-
-In this case, let's make `foreignCallHandler` call the JSON RPC Server we created in [Step #2](#step-2---write-an-rpc-server), by making it a JSON RPC Client.
-
-For example, using the same `getSqrt` program in [Step #1](#step-1---modify-your-noir-program) (comments in the code):
-
-```js
-import { JSONRPCClient } from "json-rpc-2.0";
-
-// declaring the JSONRPCClient
-const client = new JSONRPCClient((jsonRPCRequest) => {
-// hitting the same JSON RPC Server we coded above
- return fetch("http://localhost:5555", {
- method: "POST",
- headers: {
- "content-type": "application/json",
- },
- body: JSON.stringify(jsonRPCRequest),
- }).then((response) => {
- if (response.status === 200) {
- return response
- .json()
- .then((jsonRPCResponse) => client.receive(jsonRPCResponse));
- } else if (jsonRPCRequest.id !== undefined) {
- return Promise.reject(new Error(response.statusText));
- }
- });
-});
-
-// declaring a function that takes the name of the foreign call (getSqrt) and the inputs
-const foreignCallHandler = async (name, input) => {
- // notice that the "inputs" parameter contains *all* the inputs
- // in this case we to make the RPC request with the first parameter "numbers", which would be input[0]
- const oracleReturn = await client.request(name, [
- { Array: input[0].map((i) => ({ inner: i.toString("hex") })) },
- ]);
- return [oracleReturn.values[0].Array.map((x) => x.inner)];
-};
-
-// the rest of your NoirJS code
-const input = { input: [4, 16] };
-const { witness } = await noir.execute(numbers, foreignCallHandler);
-```
-
-:::tip
-
-If you're in a NoirJS environment running your RPC server together with a frontend app, you'll probably hit a familiar problem in full-stack development: requests being blocked by [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) policy. For development only, you can simply install and use the [`cors` npm package](https://www.npmjs.com/package/cors) to get around the problem:
-
-```bash
-yarn add cors
-```
-
-and use it as a middleware:
-
-```js
-import cors from "cors";
-
-const app = express();
-app.use(cors())
-```
-
-:::
-
-## Conclusion
-
-Hopefully by the end of this guide, you should be able to:
-
-- Write your own logic around Oracles and how to write a JSON RPC server to make them work with your Nargo commands.
-- Provide custom foreign call handlers for NoirJS.
diff --git a/docs/versioned_docs/version-v0.22.0/noir/syntax/oracles.md b/docs/versioned_docs/version-v0.22.0/noir/syntax/oracles.md
deleted file mode 100644
index 2e6a6818d48..00000000000
--- a/docs/versioned_docs/version-v0.22.0/noir/syntax/oracles.md
+++ /dev/null
@@ -1,23 +0,0 @@
----
-title: Oracles
-description: Dive into how Noir supports Oracles via RPC calls, and learn how to declare an Oracle in Noir with our comprehensive guide.
-keywords:
- - Noir
- - Oracles
- - RPC Calls
- - Unconstrained Functions
- - Programming
- - Blockchain
-sidebar_position: 6
----
-
-Noir has support for Oracles via RPC calls. This means Noir will make an RPC call and use the return value for proof generation.
-
-Since Oracles are not resolved by Noir, they are [`unconstrained` functions](./unconstrained.md)
-
-You can declare an Oracle through the `#[oracle()]` flag. Example:
-
-```rust
-#[oracle(get_number_sequence)]
-unconstrained fn get_number_sequence(_size: Field) -> [Field] {}
-```
From 199d129bd7ae02c4336399455ecda69905dfa1bd Mon Sep 17 00:00:00 2001
From: Tom French <15848336+TomAFrench@users.noreply.github.com>
Date: Mon, 22 Jan 2024 14:09:36 +0000
Subject: [PATCH 02/70] chore: replace explicit subtractions with nots (#4097)
# Description
## Problem\*
Resolves
## Summary\*
Small PR to replace usage of `(1-x)` instead of `not(x)` for boolean
`x`. This improves readability of the codegen imo.
## Additional Context
## Documentation\*
Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[Exceptional Case]** Documentation to be submitted in a separate
PR.
# PR Checklist\*
- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
---
.../noirc_evaluator/src/ssa/function_builder/mod.rs | 8 +++++---
compiler/noirc_evaluator/src/ssa/ssa_gen/context.rs | 12 +++++++-----
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/compiler/noirc_evaluator/src/ssa/function_builder/mod.rs b/compiler/noirc_evaluator/src/ssa/function_builder/mod.rs
index 852848afb81..44be423be10 100644
--- a/compiler/noirc_evaluator/src/ssa/function_builder/mod.rs
+++ b/compiler/noirc_evaluator/src/ssa/function_builder/mod.rs
@@ -367,10 +367,12 @@ impl FunctionBuilder {
let r_squared = self.insert_binary(r, BinaryOp::Mul, r);
let a = self.insert_binary(r_squared, BinaryOp::Mul, lhs);
let idx = self.field_constant(FieldElement::from((bit_size - i) as i128));
- let b = self.insert_array_get(rhs_bits, idx, Type::field());
+ let b = self.insert_array_get(rhs_bits, idx, Type::bool());
+ let not_b = self.insert_not(b);
+ let b = self.insert_cast(b, Type::field());
+ let not_b = self.insert_cast(not_b, Type::field());
let r1 = self.insert_binary(a, BinaryOp::Mul, b);
- let c = self.insert_binary(one, BinaryOp::Sub, b);
- let r2 = self.insert_binary(c, BinaryOp::Mul, r_squared);
+ let r2 = self.insert_binary(r_squared, BinaryOp::Mul, not_b);
r = self.insert_binary(r1, BinaryOp::Add, r2);
}
r
diff --git a/compiler/noirc_evaluator/src/ssa/ssa_gen/context.rs b/compiler/noirc_evaluator/src/ssa/ssa_gen/context.rs
index f1a2154d3a8..0e155776545 100644
--- a/compiler/noirc_evaluator/src/ssa/ssa_gen/context.rs
+++ b/compiler/noirc_evaluator/src/ssa/ssa_gen/context.rs
@@ -270,11 +270,12 @@ impl<'a> FunctionContext<'a> {
/// helper function which add instructions to the block computing the absolute value of the
/// given signed integer input. When the input is negative, we return its two complement, and itself when it is positive.
fn absolute_value_helper(&mut self, input: ValueId, sign: ValueId, bit_size: u32) -> ValueId {
+ assert_eq!(self.builder.type_of_value(sign), Type::bool());
+
// We compute the absolute value of lhs
- let one = self.builder.numeric_constant(FieldElement::one(), Type::bool());
let bit_width =
self.builder.numeric_constant(FieldElement::from(2_i128.pow(bit_size)), Type::field());
- let sign_not = self.builder.insert_binary(one, BinaryOp::Sub, sign);
+ let sign_not = self.builder.insert_not(sign);
// We use unsafe casts here, this is fine as we're casting to a `field` type.
let as_field = self.builder.insert_cast(input, Type::field());
@@ -472,7 +473,6 @@ impl<'a> FunctionContext<'a> {
location: Location,
) {
let is_sub = operator == BinaryOpKind::Subtract;
- let one = self.builder.numeric_constant(FieldElement::one(), Type::bool());
let half_width = self.builder.numeric_constant(
FieldElement::from(2_i128.pow(bit_size - 1)),
Type::unsigned(bit_size),
@@ -484,7 +484,7 @@ impl<'a> FunctionContext<'a> {
let mut rhs_sign = self.builder.insert_binary(rhs_as_unsigned, BinaryOp::Lt, half_width);
let message = if is_sub {
// lhs - rhs = lhs + (-rhs)
- rhs_sign = self.builder.insert_binary(one, BinaryOp::Sub, rhs_sign);
+ rhs_sign = self.builder.insert_not(rhs_sign);
"attempt to subtract with overflow".to_string()
} else {
"attempt to add with overflow".to_string()
@@ -518,13 +518,15 @@ impl<'a> FunctionContext<'a> {
let product = self.builder.insert_cast(product_field, Type::unsigned(bit_size));
// Then we check the signed product fits in a signed integer of bit_size-bits
- let not_same = self.builder.insert_binary(one, BinaryOp::Sub, same_sign);
+ let not_same = self.builder.insert_not(same_sign);
let not_same_sign_field =
self.insert_safe_cast(not_same, Type::unsigned(bit_size), location);
let positive_maximum_with_offset =
self.builder.insert_binary(half_width, BinaryOp::Add, not_same_sign_field);
let product_overflow_check =
self.builder.insert_binary(product, BinaryOp::Lt, positive_maximum_with_offset);
+
+ let one = self.builder.numeric_constant(FieldElement::one(), Type::bool());
self.builder.set_location(location).insert_constrain(
product_overflow_check,
one,
From 5be9f9d7e2f39ca228df10e5a530474af0331704 Mon Sep 17 00:00:00 2001
From: kevaundray
Date: Mon, 22 Jan 2024 15:16:33 +0000
Subject: [PATCH 03/70] chore: Release Noir(0.23.0) (#3862)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
:robot: I have created a release *beep* *boop*
---
0.23.0
## [0.23.0](https://github.com/noir-lang/noir/compare/v0.22.0...v0.23.0)
(2024-01-22)
### ⚠ BREAKING CHANGES
* Ban nested slices
([#4018](https://github.com/noir-lang/noir/issues/4018))
* Breaking changes from aztec-packages
([#3955](https://github.com/noir-lang/noir/issues/3955))
* Rename Arithmetic opcode to AssertZero
([#3840](https://github.com/noir-lang/noir/issues/3840))
* remove circuit methods from noir_wasm
([#3869](https://github.com/noir-lang/noir/issues/3869))
### Features
* Add `assert_max_bit_size` method to `Field`
([#4016](https://github.com/noir-lang/noir/issues/4016))
([bc9a44f](https://github.com/noir-lang/noir/commit/bc9a44f285e0569825a307b06ee8acd93461c87e))
* Add `noir-compiler` checks to `aztec_macros`
([#4031](https://github.com/noir-lang/noir/issues/4031))
([420a5c7](https://github.com/noir-lang/noir/commit/420a5c74a14dcfeede04337a42282093a7b5e63e))
* Add a `--force` flag to force a full recompile
([#4054](https://github.com/noir-lang/noir/issues/4054))
([27a8e68](https://github.com/noir-lang/noir/commit/27a8e6864643d81d96e84990e2e26cd16596a695))
* Add dependency resolver for `noir_wasm` and implement `FileManager`
for consistency with native interface
([#3891](https://github.com/noir-lang/noir/issues/3891))
([c29c7d7](https://github.com/noir-lang/noir/commit/c29c7d7c9615b9f45c696b1bdc1c497d55469dfa))
* Add foreign call support to `noir_codegen` functions
([#3933](https://github.com/noir-lang/noir/issues/3933))
([e5e52a8](https://github.com/noir-lang/noir/commit/e5e52a81b31d7735b680e97a9bef89a010a99763))
* Add MVP `nargo export` command
([#3870](https://github.com/noir-lang/noir/issues/3870))
([fbb51ed](https://github.com/noir-lang/noir/commit/fbb51ed33e9e4d9105d8946cdfc4ea387c85258e))
* Add support for codegenning multiple functions which use the same
structs in their interface
([#3868](https://github.com/noir-lang/noir/issues/3868))
([1dcfcc5](https://github.com/noir-lang/noir/commit/1dcfcc5265f618685a783504b1d4be213e4cda2d))
* Added efficient field comparisons for bn254
([#4042](https://github.com/noir-lang/noir/issues/4042))
([1f9cad0](https://github.com/noir-lang/noir/commit/1f9cad00c57ea257f57419d2446a46938beb19f9))
* Assert maximum bit size when creating a U128 from an integer
([#4024](https://github.com/noir-lang/noir/issues/4024))
([8f9c7e4](https://github.com/noir-lang/noir/commit/8f9c7e4de9f2ae5b39714d8e0d26b2befcd11c4a))
* Avoid unnecessary range checks by inspecting instructions for casts
([#4039](https://github.com/noir-lang/noir/issues/4039))
([378c18e](https://github.com/noir-lang/noir/commit/378c18eb42d75852b97f849d05c9e3f650601339))
* Breaking changes from aztec-packages
([#3955](https://github.com/noir-lang/noir/issues/3955))
([5be049e](https://github.com/noir-lang/noir/commit/5be049eee6c342649462282ee04f6411e6ea392c))
* Bubble up `Instruction::Constrain`s to be applied as early as
possible. ([#4065](https://github.com/noir-lang/noir/issues/4065))
([66f5cdd](https://github.com/noir-lang/noir/commit/66f5cddc133ba0311028eba96c0ff6ec2ecaee59))
* Cached LSP parsing
([#4083](https://github.com/noir-lang/noir/issues/4083))
([b4f724e](https://github.com/noir-lang/noir/commit/b4f724e848b291a733e417c394ac3fc7649c08c5))
* Comparison for signed integers
([#3873](https://github.com/noir-lang/noir/issues/3873))
([bcbd49b](https://github.com/noir-lang/noir/commit/bcbd49b8b44749e149f83c1240094fa2f0a19087))
* Decompose `Instruction::Cast` to have an explicit truncation
instruction ([#3946](https://github.com/noir-lang/noir/issues/3946))
([35f18ef](https://github.com/noir-lang/noir/commit/35f18ef4d7c8041e3cf622a5643748d0793c2aa6))
* Decompose `Instruction::Constrain` into multiple more basic
constraints ([#3892](https://github.com/noir-lang/noir/issues/3892))
([51cf9d3](https://github.com/noir-lang/noir/commit/51cf9d37c8b9fbb14bb54b178d93129a7563e131))
* Docker testing flow
([#3895](https://github.com/noir-lang/noir/issues/3895))
([179c90d](https://github.com/noir-lang/noir/commit/179c90dc3263c85de105c57925d9c5894427e8e1))
* Extract parsing to its own pass and do it in parallel
([#4063](https://github.com/noir-lang/noir/issues/4063))
([569cbbc](https://github.com/noir-lang/noir/commit/569cbbc231a242c32821cba56f3649f3228a1cc7))
* Implement `Eq` trait on curve points
([#3944](https://github.com/noir-lang/noir/issues/3944))
([abf751a](https://github.com/noir-lang/noir/commit/abf751ab7f57f87520be16b2bc6168efdf95a430))
* Implement DAP protocol in Nargo
([#3627](https://github.com/noir-lang/noir/issues/3627))
([13834d4](https://github.com/noir-lang/noir/commit/13834d43bd876909cb50494a41b42297f7e6375b))
* Implement generic traits
([#4000](https://github.com/noir-lang/noir/issues/4000))
([916fd15](https://github.com/noir-lang/noir/commit/916fd158aa361ac80d32767f575ad896c3462b15))
* Implement Operator Overloading
([#3931](https://github.com/noir-lang/noir/issues/3931))
([4b16090](https://github.com/noir-lang/noir/commit/4b16090beecd0fcdd41c9e7b8f615c4625c26a5b))
* **lsp:** Cache definitions for goto requests
([#3930](https://github.com/noir-lang/noir/issues/3930))
([4a2140f](https://github.com/noir-lang/noir/commit/4a2140f1f36bbe3afbc006f8db74820308ae27d5))
* **lsp:** Goto global
([#4043](https://github.com/noir-lang/noir/issues/4043))
([15237b3](https://github.com/noir-lang/noir/commit/15237b34dbce5ea54973a178449e67cca8ac4f9d))
* **lsp:** Goto struct member inside Impl method
([#3918](https://github.com/noir-lang/noir/issues/3918))
([99c2c5a](https://github.com/noir-lang/noir/commit/99c2c5a2c2c0da6bad783b60d9e3de8d9a1f4ee4))
* **lsp:** Goto trait from trait impl
([#3956](https://github.com/noir-lang/noir/issues/3956))
([eb566e2](https://github.com/noir-lang/noir/commit/eb566e2125e847a3e3efbd2bc15a88a1c454a7df))
* **lsp:** Goto trait method declaration
([#3991](https://github.com/noir-lang/noir/issues/3991))
([eb79166](https://github.com/noir-lang/noir/commit/eb79166f7d2b7aa45c9c6c0aa37db1c0a5dfa00f))
* **lsp:** Goto type alias
([#4061](https://github.com/noir-lang/noir/issues/4061))
([dc83385](https://github.com/noir-lang/noir/commit/dc83385e9fe5766cd8218265be38c54243cae76e))
* **lsp:** Goto type definition
([#4029](https://github.com/noir-lang/noir/issues/4029))
([8bb4ddf](https://github.com/noir-lang/noir/commit/8bb4ddfdd81d491ff713a056a7eae522f329d173))
* **lsp:** Re-add code lens feature with improved performance
([#3829](https://github.com/noir-lang/noir/issues/3829))
([8f5cd6c](https://github.com/noir-lang/noir/commit/8f5cd6c0b641b3970bf626e8910b2a4c7cc8c310))
* Optimize array ops for arrays of structs
([#4027](https://github.com/noir-lang/noir/issues/4027))
([c9ec0d8](https://github.com/noir-lang/noir/commit/c9ec0d811ddc8653201ed765b51585a7c1b946fb))
* Optimize logic gate ACIR-gen
([#3897](https://github.com/noir-lang/noir/issues/3897))
([926460a](https://github.com/noir-lang/noir/commit/926460a0c70e21e2f4720148cf424e44ab9b0678))
* Prefer `AcirContext`-native methods for performing logic operations
([#3898](https://github.com/noir-lang/noir/issues/3898))
([0ec39b8](https://github.com/noir-lang/noir/commit/0ec39b8396084ed1e7f20609c8ad8a5844a86674))
* Remove range constraints from witnesses which are constrained to be
constants ([#3928](https://github.com/noir-lang/noir/issues/3928))
([afe9c7a](https://github.com/noir-lang/noir/commit/afe9c7a38bb9d4245205d3aa46d4ce23d70a5671))
* Remove truncation from brillig casts
([#3997](https://github.com/noir-lang/noir/issues/3997))
([857ff97](https://github.com/noir-lang/noir/commit/857ff97b196174a0999f0fe7e387bfca5c3b7cd3))
* Remove truncations which can be seen to be noops using type
information ([#3953](https://github.com/noir-lang/noir/issues/3953))
([cc3c2c2](https://github.com/noir-lang/noir/commit/cc3c2c22644f0b5d8369bad2362ea6e9112a0713))
* Remove unnecessary predicate from `Lt` instruction
([#3922](https://github.com/noir-lang/noir/issues/3922))
([a63433f](https://github.com/noir-lang/noir/commit/a63433fb8747722ec3cf2c6eb85d34e5b04bc15c))
* Simplify chains of casts to be all in terms of the original `ValueId`
([#3984](https://github.com/noir-lang/noir/issues/3984))
([2384d3e](https://github.com/noir-lang/noir/commit/2384d3e97af24a8718fbf57f6b276a5ce1de06fe))
* Simplify multiplications by `0` or `1` in ACIR gen
([#3924](https://github.com/noir-lang/noir/issues/3924))
([e58844d](https://github.com/noir-lang/noir/commit/e58844daf9f040626a3a7595f8c4f831e48a4037))
* Support for u128
([#3913](https://github.com/noir-lang/noir/issues/3913))
([b4911dc](https://github.com/noir-lang/noir/commit/b4911dcf676f0925ac631ba6f60fc9c4945b2fee))
* Support printing more types
([#4071](https://github.com/noir-lang/noir/issues/4071))
([f5c4632](https://github.com/noir-lang/noir/commit/f5c4632e174beba508e1e31d0e2ae3f6d028ae2c))
* Sync `aztec-packages`
([#4011](https://github.com/noir-lang/noir/issues/4011))
([fee2452](https://github.com/noir-lang/noir/commit/fee24523c427c27f0bdaf98ea09a852a2da3e94c))
* Sync commits from `aztec-packages`
([#4068](https://github.com/noir-lang/noir/issues/4068))
([7a8f3a3](https://github.com/noir-lang/noir/commit/7a8f3a33b57875e681e3d81e667e3570a1cdbdcc))
* Use singleton `WasmBlackBoxFunctionSolver` in `noir_js`
([#3966](https://github.com/noir-lang/noir/issues/3966))
([10b28de](https://github.com/noir-lang/noir/commit/10b28def4d74822b7af2c19a1cc693788272b00b))
### Bug Fixes
* Acir gen doesn't panic on unsupported BB function
([#3866](https://github.com/noir-lang/noir/issues/3866))
([34fd978](https://github.com/noir-lang/noir/commit/34fd978d206789a9e9f5167bfd690a34386834d0))
* Allow abi encoding arrays of structs from JS
([#3867](https://github.com/noir-lang/noir/issues/3867))
([9b713f8](https://github.com/noir-lang/noir/commit/9b713f8cf599df262a12ec1098136c50b2b46766))
* Allow abi encoding tuples from JS
([#3894](https://github.com/noir-lang/noir/issues/3894))
([f7fa181](https://github.com/noir-lang/noir/commit/f7fa1811ad2591020c914976f26e2f11a91cd177))
* Allow ast when macro errors
([#4005](https://github.com/noir-lang/noir/issues/4005))
([efccec3](https://github.com/noir-lang/noir/commit/efccec3c24eb093fba99b1c29f01a78aae5776d0))
* Allow lsp to run inside of a docker container
([#3876](https://github.com/noir-lang/noir/issues/3876))
([2529977](https://github.com/noir-lang/noir/commit/2529977acd684219f57ef086415557cc07af043b))
* Bit-shifts for signed integers
([#3890](https://github.com/noir-lang/noir/issues/3890))
([6ddd98a](https://github.com/noir-lang/noir/commit/6ddd98ab7d3fefde491cf12b785f76bf0585609e))
* Checks for cyclic dependencies
([#3699](https://github.com/noir-lang/noir/issues/3699))
([642011a](https://github.com/noir-lang/noir/commit/642011ab6ebbe8f012eda1da1abbf8660500723d))
* **debugger:** Crash when stepping through locations spanning multiple
lines ([#3920](https://github.com/noir-lang/noir/issues/3920))
([223e860](https://github.com/noir-lang/noir/commit/223e860975c2698bd5043340b937de74552ec15b))
* Don't fail if no tests and the user didn't provide a pattern
([#3864](https://github.com/noir-lang/noir/issues/3864))
([decbd0f](https://github.com/noir-lang/noir/commit/decbd0f0c019844cd2b235e7804d2f6ba7b23897))
* Fix advisory issue in cargo-deny
([#4077](https://github.com/noir-lang/noir/issues/4077))
([19baea0](https://github.com/noir-lang/noir/commit/19baea0d18e2d26bd04b649f79dd8e681488d1dc))
* Fixing dark mode background on the CTA button
([#3882](https://github.com/noir-lang/noir/issues/3882))
([57eae42](https://github.com/noir-lang/noir/commit/57eae42080d6a928e8010c6bc77489964a5777ef))
* Fixup exports from `noir_wasm`
([#4022](https://github.com/noir-lang/noir/issues/4022))
([358cdd2](https://github.com/noir-lang/noir/commit/358cdd2725444091b3322c47754e3cbd9b1d3614))
* Handle multiple imports in the same file
([#3903](https://github.com/noir-lang/noir/issues/3903))
([219423e](https://github.com/noir-lang/noir/commit/219423eb87fa12bd8cca2a6fd2ce4c06e308783c))
* Hoist constraints on inputs to top of program
([#4076](https://github.com/noir-lang/noir/issues/4076))
([447aa34](https://github.com/noir-lang/noir/commit/447aa343555cbd5a7cd735876e08f43271ecdd40))
* Implement missing codegen for `BlackBoxFunc::EcdsaSecp256r1` in
brillig ([#3943](https://github.com/noir-lang/noir/issues/3943))
([2c5eceb](https://github.com/noir-lang/noir/commit/2c5eceb04ab6bc38e954492642121c7fe3da866f))
* Improve `nargo test` output
([#3973](https://github.com/noir-lang/noir/issues/3973))
([3ab5ff4](https://github.com/noir-lang/noir/commit/3ab5ff431145a1f747b698caed15caebaa145f04))
* Make `constant_to_radix` emit a slice instead of an array
([#4049](https://github.com/noir-lang/noir/issues/4049))
([5cdb1d0](https://github.com/noir-lang/noir/commit/5cdb1d0dabe2e38a1610f718747cc2fb4263339d))
* Operator overloading & static trait method references resolving to
generic impls ([#3967](https://github.com/noir-lang/noir/issues/3967))
([f1de8fa](https://github.com/noir-lang/noir/commit/f1de8fa3247bcee624bcd7a0f89fe7c7cd8430f1))
* Preserve brillig entrypoint functions without arguments
([#3951](https://github.com/noir-lang/noir/issues/3951))
([1111465](https://github.com/noir-lang/noir/commit/1111465551557ed9e97e4b43d6eccc4b5896a39f))
* Prevent `Instruction::Constrain`s for non-primitive types
([#3916](https://github.com/noir-lang/noir/issues/3916))
([467948f](https://github.com/noir-lang/noir/commit/467948f9ee9ae65b4e2badaa1d15835fced3e835))
* Remove panic for adding an invalid crate name in wasm compiler
([#3977](https://github.com/noir-lang/noir/issues/3977))
([7a1baa5](https://github.com/noir-lang/noir/commit/7a1baa56faa2deb385ef1b6c9da9073dafd5a376))
* Return error rather instead of panicking on invalid circuit
([#3976](https://github.com/noir-lang/noir/issues/3976))
([67201bf](https://github.com/noir-lang/noir/commit/67201bfc21a9c8858aa86be9cd47d463fb78d925))
* Search all levels of struct nesting before codegenning primitive types
([#3970](https://github.com/noir-lang/noir/issues/3970))
([13ae014](https://github.com/noir-lang/noir/commit/13ae014ddcbd9eddb401c563b95053f7a1a89f1c))
* Update generics docs to mention we have traits now
([#3980](https://github.com/noir-lang/noir/issues/3980))
([c2acdf1](https://github.com/noir-lang/noir/commit/c2acdf1793a67abc9a074457e057a44da3b82c39))
### Miscellaneous Chores
* Ban nested slices
([#4018](https://github.com/noir-lang/noir/issues/4018))
([f8a1fb7](https://github.com/noir-lang/noir/commit/f8a1fb7eed1ae4a9779eb16b142a64094aa603c6))
* Remove circuit methods from noir_wasm
([#3869](https://github.com/noir-lang/noir/issues/3869))
([12d884e](https://github.com/noir-lang/noir/commit/12d884e2b74efab7257626d8878ea1a7455ecf85))
* Rename Arithmetic opcode to AssertZero
([#3840](https://github.com/noir-lang/noir/issues/3840))
([836f171](https://github.com/noir-lang/noir/commit/836f17145c2901060706294461c2d282dd121b3e))
0.39.0
## [0.39.0](https://github.com/noir-lang/noir/compare/v0.38.0...v0.39.0)
(2024-01-22)
### ⚠ BREAKING CHANGES
* Breaking changes from aztec-packages
([#3955](https://github.com/noir-lang/noir/issues/3955))
* Rename Arithmetic opcode to AssertZero
([#3840](https://github.com/noir-lang/noir/issues/3840))
* Remove unused methods on ACIR opcodes
([#3841](https://github.com/noir-lang/noir/issues/3841))
* Remove partial backend feature
([#3805](https://github.com/noir-lang/noir/issues/3805))
### Features
* Aztec-packages
([#3754](https://github.com/noir-lang/noir/issues/3754))
([c043265](https://github.com/noir-lang/noir/commit/c043265e550b59bd4296504826fe15d3ce3e9ad2))
* Breaking changes from aztec-packages
([#3955](https://github.com/noir-lang/noir/issues/3955))
([5be049e](https://github.com/noir-lang/noir/commit/5be049eee6c342649462282ee04f6411e6ea392c))
* Remove range constraints from witnesses which are constrained to be
constants ([#3928](https://github.com/noir-lang/noir/issues/3928))
([afe9c7a](https://github.com/noir-lang/noir/commit/afe9c7a38bb9d4245205d3aa46d4ce23d70a5671))
* Speed up transformation of debug messages
([#3815](https://github.com/noir-lang/noir/issues/3815))
([2a8af1e](https://github.com/noir-lang/noir/commit/2a8af1e4141ffff61547ee1c2837a6392bd5db48))
* Sync `aztec-packages`
([#4011](https://github.com/noir-lang/noir/issues/4011))
([fee2452](https://github.com/noir-lang/noir/commit/fee24523c427c27f0bdaf98ea09a852a2da3e94c))
* Sync commits from `aztec-packages`
([#4068](https://github.com/noir-lang/noir/issues/4068))
([7a8f3a3](https://github.com/noir-lang/noir/commit/7a8f3a33b57875e681e3d81e667e3570a1cdbdcc))
### Bug Fixes
* Deserialize odd length hex literals
([#3747](https://github.com/noir-lang/noir/issues/3747))
([4000fb2](https://github.com/noir-lang/noir/commit/4000fb279221eb07187d657bfaa7f1c7b311abf2))
* Return error rather instead of panicking on invalid circuit
([#3976](https://github.com/noir-lang/noir/issues/3976))
([67201bf](https://github.com/noir-lang/noir/commit/67201bfc21a9c8858aa86be9cd47d463fb78d925))
### Miscellaneous Chores
* Remove partial backend feature
([#3805](https://github.com/noir-lang/noir/issues/3805))
([0383100](https://github.com/noir-lang/noir/commit/0383100853a80a5b28b797cdfeae0d271f1b7805))
* Remove unused methods on ACIR opcodes
([#3841](https://github.com/noir-lang/noir/issues/3841))
([9e5d0e8](https://github.com/noir-lang/noir/commit/9e5d0e813d61a0bfb5ee68174ed287c5a20f1579))
* Rename Arithmetic opcode to AssertZero
([#3840](https://github.com/noir-lang/noir/issues/3840))
([836f171](https://github.com/noir-lang/noir/commit/836f17145c2901060706294461c2d282dd121b3e))
---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
---------
Co-authored-by: TomAFrench
---
.release-please-manifest.json | 4 +-
CHANGELOG.md | 92 +++++++++++++++++++
Cargo.lock | 52 +++++------
Cargo.toml | 16 ++--
acvm-repo/CHANGELOG.md | 32 +++++++
acvm-repo/acir/Cargo.toml | 2 +-
acvm-repo/acir_field/Cargo.toml | 2 +-
acvm-repo/acvm/Cargo.toml | 2 +-
acvm-repo/acvm_js/Cargo.toml | 2 +-
acvm-repo/acvm_js/package.json | 2 +-
acvm-repo/blackbox_solver/Cargo.toml | 2 +-
acvm-repo/bn254_blackbox_solver/Cargo.toml | 2 +-
acvm-repo/brillig/Cargo.toml | 2 +-
acvm-repo/brillig_vm/Cargo.toml | 2 +-
compiler/wasm/package.json | 2 +-
flake.nix | 2 +-
tooling/noir_codegen/package.json | 2 +-
tooling/noir_js/package.json | 2 +-
.../noir_js_backend_barretenberg/package.json | 2 +-
tooling/noir_js_types/package.json | 2 +-
tooling/noirc_abi_wasm/package.json | 2 +-
yarn.lock | 74 ++++++++++++++-
22 files changed, 246 insertions(+), 56 deletions(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 01f6fb140b1..f440a7a2c51 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,4 +1,4 @@
{
- ".": "0.22.0",
- "acvm-repo": "0.38.0"
+ ".": "0.23.0",
+ "acvm-repo": "0.39.0"
}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3fc044076a0..af7eb5b2f19 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,97 @@
# Changelog
+## [0.23.0](https://github.com/noir-lang/noir/compare/v0.22.0...v0.23.0) (2024-01-22)
+
+
+### ⚠ BREAKING CHANGES
+
+* Ban nested slices ([#4018](https://github.com/noir-lang/noir/issues/4018))
+* Breaking changes from aztec-packages ([#3955](https://github.com/noir-lang/noir/issues/3955))
+* Rename Arithmetic opcode to AssertZero ([#3840](https://github.com/noir-lang/noir/issues/3840))
+* remove circuit methods from noir_wasm ([#3869](https://github.com/noir-lang/noir/issues/3869))
+
+### Features
+
+* Add `assert_max_bit_size` method to `Field` ([#4016](https://github.com/noir-lang/noir/issues/4016)) ([bc9a44f](https://github.com/noir-lang/noir/commit/bc9a44f285e0569825a307b06ee8acd93461c87e))
+* Add `noir-compiler` checks to `aztec_macros` ([#4031](https://github.com/noir-lang/noir/issues/4031)) ([420a5c7](https://github.com/noir-lang/noir/commit/420a5c74a14dcfeede04337a42282093a7b5e63e))
+* Add a `--force` flag to force a full recompile ([#4054](https://github.com/noir-lang/noir/issues/4054)) ([27a8e68](https://github.com/noir-lang/noir/commit/27a8e6864643d81d96e84990e2e26cd16596a695))
+* Add dependency resolver for `noir_wasm` and implement `FileManager` for consistency with native interface ([#3891](https://github.com/noir-lang/noir/issues/3891)) ([c29c7d7](https://github.com/noir-lang/noir/commit/c29c7d7c9615b9f45c696b1bdc1c497d55469dfa))
+* Add foreign call support to `noir_codegen` functions ([#3933](https://github.com/noir-lang/noir/issues/3933)) ([e5e52a8](https://github.com/noir-lang/noir/commit/e5e52a81b31d7735b680e97a9bef89a010a99763))
+* Add MVP `nargo export` command ([#3870](https://github.com/noir-lang/noir/issues/3870)) ([fbb51ed](https://github.com/noir-lang/noir/commit/fbb51ed33e9e4d9105d8946cdfc4ea387c85258e))
+* Add support for codegenning multiple functions which use the same structs in their interface ([#3868](https://github.com/noir-lang/noir/issues/3868)) ([1dcfcc5](https://github.com/noir-lang/noir/commit/1dcfcc5265f618685a783504b1d4be213e4cda2d))
+* Added efficient field comparisons for bn254 ([#4042](https://github.com/noir-lang/noir/issues/4042)) ([1f9cad0](https://github.com/noir-lang/noir/commit/1f9cad00c57ea257f57419d2446a46938beb19f9))
+* Assert maximum bit size when creating a U128 from an integer ([#4024](https://github.com/noir-lang/noir/issues/4024)) ([8f9c7e4](https://github.com/noir-lang/noir/commit/8f9c7e4de9f2ae5b39714d8e0d26b2befcd11c4a))
+* Avoid unnecessary range checks by inspecting instructions for casts ([#4039](https://github.com/noir-lang/noir/issues/4039)) ([378c18e](https://github.com/noir-lang/noir/commit/378c18eb42d75852b97f849d05c9e3f650601339))
+* Breaking changes from aztec-packages ([#3955](https://github.com/noir-lang/noir/issues/3955)) ([5be049e](https://github.com/noir-lang/noir/commit/5be049eee6c342649462282ee04f6411e6ea392c))
+* Bubble up `Instruction::Constrain`s to be applied as early as possible. ([#4065](https://github.com/noir-lang/noir/issues/4065)) ([66f5cdd](https://github.com/noir-lang/noir/commit/66f5cddc133ba0311028eba96c0ff6ec2ecaee59))
+* Cached LSP parsing ([#4083](https://github.com/noir-lang/noir/issues/4083)) ([b4f724e](https://github.com/noir-lang/noir/commit/b4f724e848b291a733e417c394ac3fc7649c08c5))
+* Comparison for signed integers ([#3873](https://github.com/noir-lang/noir/issues/3873)) ([bcbd49b](https://github.com/noir-lang/noir/commit/bcbd49b8b44749e149f83c1240094fa2f0a19087))
+* Decompose `Instruction::Cast` to have an explicit truncation instruction ([#3946](https://github.com/noir-lang/noir/issues/3946)) ([35f18ef](https://github.com/noir-lang/noir/commit/35f18ef4d7c8041e3cf622a5643748d0793c2aa6))
+* Decompose `Instruction::Constrain` into multiple more basic constraints ([#3892](https://github.com/noir-lang/noir/issues/3892)) ([51cf9d3](https://github.com/noir-lang/noir/commit/51cf9d37c8b9fbb14bb54b178d93129a7563e131))
+* Docker testing flow ([#3895](https://github.com/noir-lang/noir/issues/3895)) ([179c90d](https://github.com/noir-lang/noir/commit/179c90dc3263c85de105c57925d9c5894427e8e1))
+* Extract parsing to its own pass and do it in parallel ([#4063](https://github.com/noir-lang/noir/issues/4063)) ([569cbbc](https://github.com/noir-lang/noir/commit/569cbbc231a242c32821cba56f3649f3228a1cc7))
+* Implement `Eq` trait on curve points ([#3944](https://github.com/noir-lang/noir/issues/3944)) ([abf751a](https://github.com/noir-lang/noir/commit/abf751ab7f57f87520be16b2bc6168efdf95a430))
+* Implement DAP protocol in Nargo ([#3627](https://github.com/noir-lang/noir/issues/3627)) ([13834d4](https://github.com/noir-lang/noir/commit/13834d43bd876909cb50494a41b42297f7e6375b))
+* Implement generic traits ([#4000](https://github.com/noir-lang/noir/issues/4000)) ([916fd15](https://github.com/noir-lang/noir/commit/916fd158aa361ac80d32767f575ad896c3462b15))
+* Implement Operator Overloading ([#3931](https://github.com/noir-lang/noir/issues/3931)) ([4b16090](https://github.com/noir-lang/noir/commit/4b16090beecd0fcdd41c9e7b8f615c4625c26a5b))
+* **lsp:** Cache definitions for goto requests ([#3930](https://github.com/noir-lang/noir/issues/3930)) ([4a2140f](https://github.com/noir-lang/noir/commit/4a2140f1f36bbe3afbc006f8db74820308ae27d5))
+* **lsp:** Goto global ([#4043](https://github.com/noir-lang/noir/issues/4043)) ([15237b3](https://github.com/noir-lang/noir/commit/15237b34dbce5ea54973a178449e67cca8ac4f9d))
+* **lsp:** Goto struct member inside Impl method ([#3918](https://github.com/noir-lang/noir/issues/3918)) ([99c2c5a](https://github.com/noir-lang/noir/commit/99c2c5a2c2c0da6bad783b60d9e3de8d9a1f4ee4))
+* **lsp:** Goto trait from trait impl ([#3956](https://github.com/noir-lang/noir/issues/3956)) ([eb566e2](https://github.com/noir-lang/noir/commit/eb566e2125e847a3e3efbd2bc15a88a1c454a7df))
+* **lsp:** Goto trait method declaration ([#3991](https://github.com/noir-lang/noir/issues/3991)) ([eb79166](https://github.com/noir-lang/noir/commit/eb79166f7d2b7aa45c9c6c0aa37db1c0a5dfa00f))
+* **lsp:** Goto type alias ([#4061](https://github.com/noir-lang/noir/issues/4061)) ([dc83385](https://github.com/noir-lang/noir/commit/dc83385e9fe5766cd8218265be38c54243cae76e))
+* **lsp:** Goto type definition ([#4029](https://github.com/noir-lang/noir/issues/4029)) ([8bb4ddf](https://github.com/noir-lang/noir/commit/8bb4ddfdd81d491ff713a056a7eae522f329d173))
+* **lsp:** Re-add code lens feature with improved performance ([#3829](https://github.com/noir-lang/noir/issues/3829)) ([8f5cd6c](https://github.com/noir-lang/noir/commit/8f5cd6c0b641b3970bf626e8910b2a4c7cc8c310))
+* Optimize array ops for arrays of structs ([#4027](https://github.com/noir-lang/noir/issues/4027)) ([c9ec0d8](https://github.com/noir-lang/noir/commit/c9ec0d811ddc8653201ed765b51585a7c1b946fb))
+* Optimize logic gate ACIR-gen ([#3897](https://github.com/noir-lang/noir/issues/3897)) ([926460a](https://github.com/noir-lang/noir/commit/926460a0c70e21e2f4720148cf424e44ab9b0678))
+* Prefer `AcirContext`-native methods for performing logic operations ([#3898](https://github.com/noir-lang/noir/issues/3898)) ([0ec39b8](https://github.com/noir-lang/noir/commit/0ec39b8396084ed1e7f20609c8ad8a5844a86674))
+* Remove range constraints from witnesses which are constrained to be constants ([#3928](https://github.com/noir-lang/noir/issues/3928)) ([afe9c7a](https://github.com/noir-lang/noir/commit/afe9c7a38bb9d4245205d3aa46d4ce23d70a5671))
+* Remove truncation from brillig casts ([#3997](https://github.com/noir-lang/noir/issues/3997)) ([857ff97](https://github.com/noir-lang/noir/commit/857ff97b196174a0999f0fe7e387bfca5c3b7cd3))
+* Remove truncations which can be seen to be noops using type information ([#3953](https://github.com/noir-lang/noir/issues/3953)) ([cc3c2c2](https://github.com/noir-lang/noir/commit/cc3c2c22644f0b5d8369bad2362ea6e9112a0713))
+* Remove unnecessary predicate from `Lt` instruction ([#3922](https://github.com/noir-lang/noir/issues/3922)) ([a63433f](https://github.com/noir-lang/noir/commit/a63433fb8747722ec3cf2c6eb85d34e5b04bc15c))
+* Simplify chains of casts to be all in terms of the original `ValueId` ([#3984](https://github.com/noir-lang/noir/issues/3984)) ([2384d3e](https://github.com/noir-lang/noir/commit/2384d3e97af24a8718fbf57f6b276a5ce1de06fe))
+* Simplify multiplications by `0` or `1` in ACIR gen ([#3924](https://github.com/noir-lang/noir/issues/3924)) ([e58844d](https://github.com/noir-lang/noir/commit/e58844daf9f040626a3a7595f8c4f831e48a4037))
+* Support for u128 ([#3913](https://github.com/noir-lang/noir/issues/3913)) ([b4911dc](https://github.com/noir-lang/noir/commit/b4911dcf676f0925ac631ba6f60fc9c4945b2fee))
+* Support printing more types ([#4071](https://github.com/noir-lang/noir/issues/4071)) ([f5c4632](https://github.com/noir-lang/noir/commit/f5c4632e174beba508e1e31d0e2ae3f6d028ae2c))
+* Sync `aztec-packages` ([#4011](https://github.com/noir-lang/noir/issues/4011)) ([fee2452](https://github.com/noir-lang/noir/commit/fee24523c427c27f0bdaf98ea09a852a2da3e94c))
+* Sync commits from `aztec-packages` ([#4068](https://github.com/noir-lang/noir/issues/4068)) ([7a8f3a3](https://github.com/noir-lang/noir/commit/7a8f3a33b57875e681e3d81e667e3570a1cdbdcc))
+* Use singleton `WasmBlackBoxFunctionSolver` in `noir_js` ([#3966](https://github.com/noir-lang/noir/issues/3966)) ([10b28de](https://github.com/noir-lang/noir/commit/10b28def4d74822b7af2c19a1cc693788272b00b))
+
+
+### Bug Fixes
+
+* Acir gen doesn't panic on unsupported BB function ([#3866](https://github.com/noir-lang/noir/issues/3866)) ([34fd978](https://github.com/noir-lang/noir/commit/34fd978d206789a9e9f5167bfd690a34386834d0))
+* Allow abi encoding arrays of structs from JS ([#3867](https://github.com/noir-lang/noir/issues/3867)) ([9b713f8](https://github.com/noir-lang/noir/commit/9b713f8cf599df262a12ec1098136c50b2b46766))
+* Allow abi encoding tuples from JS ([#3894](https://github.com/noir-lang/noir/issues/3894)) ([f7fa181](https://github.com/noir-lang/noir/commit/f7fa1811ad2591020c914976f26e2f11a91cd177))
+* Allow ast when macro errors ([#4005](https://github.com/noir-lang/noir/issues/4005)) ([efccec3](https://github.com/noir-lang/noir/commit/efccec3c24eb093fba99b1c29f01a78aae5776d0))
+* Allow lsp to run inside of a docker container ([#3876](https://github.com/noir-lang/noir/issues/3876)) ([2529977](https://github.com/noir-lang/noir/commit/2529977acd684219f57ef086415557cc07af043b))
+* Bit-shifts for signed integers ([#3890](https://github.com/noir-lang/noir/issues/3890)) ([6ddd98a](https://github.com/noir-lang/noir/commit/6ddd98ab7d3fefde491cf12b785f76bf0585609e))
+* Checks for cyclic dependencies ([#3699](https://github.com/noir-lang/noir/issues/3699)) ([642011a](https://github.com/noir-lang/noir/commit/642011ab6ebbe8f012eda1da1abbf8660500723d))
+* **debugger:** Crash when stepping through locations spanning multiple lines ([#3920](https://github.com/noir-lang/noir/issues/3920)) ([223e860](https://github.com/noir-lang/noir/commit/223e860975c2698bd5043340b937de74552ec15b))
+* Don't fail if no tests and the user didn't provide a pattern ([#3864](https://github.com/noir-lang/noir/issues/3864)) ([decbd0f](https://github.com/noir-lang/noir/commit/decbd0f0c019844cd2b235e7804d2f6ba7b23897))
+* Fix advisory issue in cargo-deny ([#4077](https://github.com/noir-lang/noir/issues/4077)) ([19baea0](https://github.com/noir-lang/noir/commit/19baea0d18e2d26bd04b649f79dd8e681488d1dc))
+* Fixing dark mode background on the CTA button ([#3882](https://github.com/noir-lang/noir/issues/3882)) ([57eae42](https://github.com/noir-lang/noir/commit/57eae42080d6a928e8010c6bc77489964a5777ef))
+* Fixup exports from `noir_wasm` ([#4022](https://github.com/noir-lang/noir/issues/4022)) ([358cdd2](https://github.com/noir-lang/noir/commit/358cdd2725444091b3322c47754e3cbd9b1d3614))
+* Handle multiple imports in the same file ([#3903](https://github.com/noir-lang/noir/issues/3903)) ([219423e](https://github.com/noir-lang/noir/commit/219423eb87fa12bd8cca2a6fd2ce4c06e308783c))
+* Hoist constraints on inputs to top of program ([#4076](https://github.com/noir-lang/noir/issues/4076)) ([447aa34](https://github.com/noir-lang/noir/commit/447aa343555cbd5a7cd735876e08f43271ecdd40))
+* Implement missing codegen for `BlackBoxFunc::EcdsaSecp256r1` in brillig ([#3943](https://github.com/noir-lang/noir/issues/3943)) ([2c5eceb](https://github.com/noir-lang/noir/commit/2c5eceb04ab6bc38e954492642121c7fe3da866f))
+* Improve `nargo test` output ([#3973](https://github.com/noir-lang/noir/issues/3973)) ([3ab5ff4](https://github.com/noir-lang/noir/commit/3ab5ff431145a1f747b698caed15caebaa145f04))
+* Make `constant_to_radix` emit a slice instead of an array ([#4049](https://github.com/noir-lang/noir/issues/4049)) ([5cdb1d0](https://github.com/noir-lang/noir/commit/5cdb1d0dabe2e38a1610f718747cc2fb4263339d))
+* Operator overloading & static trait method references resolving to generic impls ([#3967](https://github.com/noir-lang/noir/issues/3967)) ([f1de8fa](https://github.com/noir-lang/noir/commit/f1de8fa3247bcee624bcd7a0f89fe7c7cd8430f1))
+* Preserve brillig entrypoint functions without arguments ([#3951](https://github.com/noir-lang/noir/issues/3951)) ([1111465](https://github.com/noir-lang/noir/commit/1111465551557ed9e97e4b43d6eccc4b5896a39f))
+* Prevent `Instruction::Constrain`s for non-primitive types ([#3916](https://github.com/noir-lang/noir/issues/3916)) ([467948f](https://github.com/noir-lang/noir/commit/467948f9ee9ae65b4e2badaa1d15835fced3e835))
+* Remove panic for adding an invalid crate name in wasm compiler ([#3977](https://github.com/noir-lang/noir/issues/3977)) ([7a1baa5](https://github.com/noir-lang/noir/commit/7a1baa56faa2deb385ef1b6c9da9073dafd5a376))
+* Return error rather instead of panicking on invalid circuit ([#3976](https://github.com/noir-lang/noir/issues/3976)) ([67201bf](https://github.com/noir-lang/noir/commit/67201bfc21a9c8858aa86be9cd47d463fb78d925))
+* Search all levels of struct nesting before codegenning primitive types ([#3970](https://github.com/noir-lang/noir/issues/3970)) ([13ae014](https://github.com/noir-lang/noir/commit/13ae014ddcbd9eddb401c563b95053f7a1a89f1c))
+* Update generics docs to mention we have traits now ([#3980](https://github.com/noir-lang/noir/issues/3980)) ([c2acdf1](https://github.com/noir-lang/noir/commit/c2acdf1793a67abc9a074457e057a44da3b82c39))
+
+
+### Miscellaneous Chores
+
+* Ban nested slices ([#4018](https://github.com/noir-lang/noir/issues/4018)) ([f8a1fb7](https://github.com/noir-lang/noir/commit/f8a1fb7eed1ae4a9779eb16b142a64094aa603c6))
+* Remove circuit methods from noir_wasm ([#3869](https://github.com/noir-lang/noir/issues/3869)) ([12d884e](https://github.com/noir-lang/noir/commit/12d884e2b74efab7257626d8878ea1a7455ecf85))
+* Rename Arithmetic opcode to AssertZero ([#3840](https://github.com/noir-lang/noir/issues/3840)) ([836f171](https://github.com/noir-lang/noir/commit/836f17145c2901060706294461c2d282dd121b3e))
+
## [0.22.0](https://github.com/noir-lang/noir/compare/v0.21.0...v0.22.0) (2023-12-18)
diff --git a/Cargo.lock b/Cargo.lock
index 95be87306ce..93f1d25fc76 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4,7 +4,7 @@ version = 3
[[package]]
name = "acir"
-version = "0.38.0"
+version = "0.39.0"
dependencies = [
"acir_field",
"base64 0.21.2",
@@ -23,7 +23,7 @@ dependencies = [
[[package]]
name = "acir_field"
-version = "0.38.0"
+version = "0.39.0"
dependencies = [
"ark-bls12-381",
"ark-bn254",
@@ -37,7 +37,7 @@ dependencies = [
[[package]]
name = "acvm"
-version = "0.38.0"
+version = "0.39.0"
dependencies = [
"acir",
"acvm_blackbox_solver",
@@ -53,7 +53,7 @@ dependencies = [
[[package]]
name = "acvm_blackbox_solver"
-version = "0.38.0"
+version = "0.39.0"
dependencies = [
"acir",
"blake2",
@@ -68,7 +68,7 @@ dependencies = [
[[package]]
name = "acvm_js"
-version = "0.38.0"
+version = "0.39.0"
dependencies = [
"acvm",
"bn254_blackbox_solver",
@@ -212,7 +212,7 @@ checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6"
[[package]]
name = "arena"
-version = "0.22.0"
+version = "0.23.0"
dependencies = [
"generational-arena",
]
@@ -416,7 +416,7 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
name = "aztec_macros"
-version = "0.22.0"
+version = "0.23.0"
dependencies = [
"iter-extended",
"noirc_frontend",
@@ -580,7 +580,7 @@ dependencies = [
[[package]]
name = "bn254_blackbox_solver"
-version = "0.38.0"
+version = "0.39.0"
dependencies = [
"acir",
"acvm_blackbox_solver",
@@ -602,7 +602,7 @@ dependencies = [
[[package]]
name = "brillig"
-version = "0.38.0"
+version = "0.39.0"
dependencies = [
"acir_field",
"serde",
@@ -610,7 +610,7 @@ dependencies = [
[[package]]
name = "brillig_vm"
-version = "0.38.0"
+version = "0.39.0"
dependencies = [
"acir",
"acvm_blackbox_solver",
@@ -1683,7 +1683,7 @@ dependencies = [
[[package]]
name = "fm"
-version = "0.22.0"
+version = "0.23.0"
dependencies = [
"codespan-reporting",
"iter-extended",
@@ -2295,7 +2295,7 @@ dependencies = [
[[package]]
name = "iter-extended"
-version = "0.22.0"
+version = "0.23.0"
[[package]]
name = "itertools"
@@ -2648,7 +2648,7 @@ checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389"
[[package]]
name = "nargo"
-version = "0.22.0"
+version = "0.23.0"
dependencies = [
"acvm",
"codespan-reporting",
@@ -2676,7 +2676,7 @@ dependencies = [
[[package]]
name = "nargo_cli"
-version = "0.22.0"
+version = "0.23.0"
dependencies = [
"acvm",
"assert_cmd",
@@ -2727,7 +2727,7 @@ dependencies = [
[[package]]
name = "nargo_fmt"
-version = "0.22.0"
+version = "0.23.0"
dependencies = [
"bytecount",
"noirc_frontend",
@@ -2739,7 +2739,7 @@ dependencies = [
[[package]]
name = "nargo_toml"
-version = "0.22.0"
+version = "0.23.0"
dependencies = [
"dirs",
"fm",
@@ -2812,7 +2812,7 @@ dependencies = [
[[package]]
name = "noir_debugger"
-version = "0.22.0"
+version = "0.23.0"
dependencies = [
"acvm",
"assert_cmd",
@@ -2835,7 +2835,7 @@ dependencies = [
[[package]]
name = "noir_lsp"
-version = "0.22.0"
+version = "0.23.0"
dependencies = [
"acvm",
"async-lsp",
@@ -2861,7 +2861,7 @@ dependencies = [
[[package]]
name = "noir_wasm"
-version = "0.22.0"
+version = "0.23.0"
dependencies = [
"acvm",
"build-data",
@@ -2884,7 +2884,7 @@ dependencies = [
[[package]]
name = "noirc_abi"
-version = "0.22.0"
+version = "0.23.0"
dependencies = [
"acvm",
"iter-extended",
@@ -2901,7 +2901,7 @@ dependencies = [
[[package]]
name = "noirc_abi_wasm"
-version = "0.22.0"
+version = "0.23.0"
dependencies = [
"acvm",
"build-data",
@@ -2918,7 +2918,7 @@ dependencies = [
[[package]]
name = "noirc_driver"
-version = "0.22.0"
+version = "0.23.0"
dependencies = [
"acvm",
"aztec_macros",
@@ -2938,7 +2938,7 @@ dependencies = [
[[package]]
name = "noirc_errors"
-version = "0.22.0"
+version = "0.23.0"
dependencies = [
"acvm",
"base64 0.21.2",
@@ -2955,7 +2955,7 @@ dependencies = [
[[package]]
name = "noirc_evaluator"
-version = "0.22.0"
+version = "0.23.0"
dependencies = [
"acvm",
"fxhash",
@@ -2971,7 +2971,7 @@ dependencies = [
[[package]]
name = "noirc_frontend"
-version = "0.22.0"
+version = "0.23.0"
dependencies = [
"acvm",
"arena",
@@ -2995,7 +2995,7 @@ dependencies = [
[[package]]
name = "noirc_printable_type"
-version = "0.22.0"
+version = "0.23.0"
dependencies = [
"acvm",
"iter-extended",
diff --git a/Cargo.toml b/Cargo.toml
index f0fc7249efc..8a827cacfcd 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -38,7 +38,7 @@ resolver = "2"
[workspace.package]
# x-release-please-start-version
-version = "0.22.0"
+version = "0.23.0"
# x-release-please-end
authors = ["The Noir Team "]
edition = "2021"
@@ -49,14 +49,14 @@ repository = "https://github.com/noir-lang/noir/"
[workspace.dependencies]
# ACVM workspace dependencies
-acir_field = { version = "0.38.0", path = "acvm-repo/acir_field", default-features = false }
-acir = { version = "0.38.0", path = "acvm-repo/acir", default-features = false }
-acvm = { version = "0.38.0", path = "acvm-repo/acvm" }
+acir_field = { version = "0.39.0", path = "acvm-repo/acir_field", default-features = false }
+acir = { version = "0.39.0", path = "acvm-repo/acir", default-features = false }
+acvm = { version = "0.39.0", path = "acvm-repo/acvm" }
stdlib = { version = "0.37.1", package = "acvm_stdlib", path = "acvm-repo/stdlib", default-features = false }
-brillig = { version = "0.38.0", path = "acvm-repo/brillig", default-features = false }
-brillig_vm = { version = "0.38.0", path = "acvm-repo/brillig_vm", default-features = false }
-acvm_blackbox_solver = { version = "0.38.0", path = "acvm-repo/blackbox_solver", default-features = false }
-bn254_blackbox_solver = { version = "0.38.0", path = "acvm-repo/bn254_blackbox_solver", default-features = false }
+brillig = { version = "0.39.0", path = "acvm-repo/brillig", default-features = false }
+brillig_vm = { version = "0.39.0", path = "acvm-repo/brillig_vm", default-features = false }
+acvm_blackbox_solver = { version = "0.39.0", path = "acvm-repo/blackbox_solver", default-features = false }
+bn254_blackbox_solver = { version = "0.39.0", path = "acvm-repo/bn254_blackbox_solver", default-features = false }
# Noir compiler workspace dependencies
arena = { path = "compiler/utils/arena" }
diff --git a/acvm-repo/CHANGELOG.md b/acvm-repo/CHANGELOG.md
index d413bd390c4..7f68244a7eb 100644
--- a/acvm-repo/CHANGELOG.md
+++ b/acvm-repo/CHANGELOG.md
@@ -5,6 +5,38 @@ 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.39.0](https://github.com/noir-lang/noir/compare/v0.38.0...v0.39.0) (2024-01-22)
+
+
+### ⚠ BREAKING CHANGES
+
+* Breaking changes from aztec-packages ([#3955](https://github.com/noir-lang/noir/issues/3955))
+* Rename Arithmetic opcode to AssertZero ([#3840](https://github.com/noir-lang/noir/issues/3840))
+* Remove unused methods on ACIR opcodes ([#3841](https://github.com/noir-lang/noir/issues/3841))
+* Remove partial backend feature ([#3805](https://github.com/noir-lang/noir/issues/3805))
+
+### Features
+
+* Aztec-packages ([#3754](https://github.com/noir-lang/noir/issues/3754)) ([c043265](https://github.com/noir-lang/noir/commit/c043265e550b59bd4296504826fe15d3ce3e9ad2))
+* Breaking changes from aztec-packages ([#3955](https://github.com/noir-lang/noir/issues/3955)) ([5be049e](https://github.com/noir-lang/noir/commit/5be049eee6c342649462282ee04f6411e6ea392c))
+* Remove range constraints from witnesses which are constrained to be constants ([#3928](https://github.com/noir-lang/noir/issues/3928)) ([afe9c7a](https://github.com/noir-lang/noir/commit/afe9c7a38bb9d4245205d3aa46d4ce23d70a5671))
+* Speed up transformation of debug messages ([#3815](https://github.com/noir-lang/noir/issues/3815)) ([2a8af1e](https://github.com/noir-lang/noir/commit/2a8af1e4141ffff61547ee1c2837a6392bd5db48))
+* Sync `aztec-packages` ([#4011](https://github.com/noir-lang/noir/issues/4011)) ([fee2452](https://github.com/noir-lang/noir/commit/fee24523c427c27f0bdaf98ea09a852a2da3e94c))
+* Sync commits from `aztec-packages` ([#4068](https://github.com/noir-lang/noir/issues/4068)) ([7a8f3a3](https://github.com/noir-lang/noir/commit/7a8f3a33b57875e681e3d81e667e3570a1cdbdcc))
+
+
+### Bug Fixes
+
+* Deserialize odd length hex literals ([#3747](https://github.com/noir-lang/noir/issues/3747)) ([4000fb2](https://github.com/noir-lang/noir/commit/4000fb279221eb07187d657bfaa7f1c7b311abf2))
+* Return error rather instead of panicking on invalid circuit ([#3976](https://github.com/noir-lang/noir/issues/3976)) ([67201bf](https://github.com/noir-lang/noir/commit/67201bfc21a9c8858aa86be9cd47d463fb78d925))
+
+
+### Miscellaneous Chores
+
+* Remove partial backend feature ([#3805](https://github.com/noir-lang/noir/issues/3805)) ([0383100](https://github.com/noir-lang/noir/commit/0383100853a80a5b28b797cdfeae0d271f1b7805))
+* Remove unused methods on ACIR opcodes ([#3841](https://github.com/noir-lang/noir/issues/3841)) ([9e5d0e8](https://github.com/noir-lang/noir/commit/9e5d0e813d61a0bfb5ee68174ed287c5a20f1579))
+* Rename Arithmetic opcode to AssertZero ([#3840](https://github.com/noir-lang/noir/issues/3840)) ([836f171](https://github.com/noir-lang/noir/commit/836f17145c2901060706294461c2d282dd121b3e))
+
## [0.38.0](https://github.com/noir-lang/noir/compare/v0.37.1...v0.38.0) (2023-12-18)
diff --git a/acvm-repo/acir/Cargo.toml b/acvm-repo/acir/Cargo.toml
index b44c64dd838..49b10c57cc8 100644
--- a/acvm-repo/acir/Cargo.toml
+++ b/acvm-repo/acir/Cargo.toml
@@ -2,7 +2,7 @@
name = "acir"
description = "ACIR is the IR that the VM processes, it is analogous to LLVM IR"
# x-release-please-start-version
-version = "0.38.0"
+version = "0.39.0"
# x-release-please-end
authors.workspace = true
edition.workspace = true
diff --git a/acvm-repo/acir_field/Cargo.toml b/acvm-repo/acir_field/Cargo.toml
index cedfc66e734..dde121f4029 100644
--- a/acvm-repo/acir_field/Cargo.toml
+++ b/acvm-repo/acir_field/Cargo.toml
@@ -2,7 +2,7 @@
name = "acir_field"
description = "The field implementation being used by ACIR."
# x-release-please-start-version
-version = "0.38.0"
+version = "0.39.0"
# x-release-please-end
authors.workspace = true
edition.workspace = true
diff --git a/acvm-repo/acvm/Cargo.toml b/acvm-repo/acvm/Cargo.toml
index be2391a3216..a40148a01ef 100644
--- a/acvm-repo/acvm/Cargo.toml
+++ b/acvm-repo/acvm/Cargo.toml
@@ -2,7 +2,7 @@
name = "acvm"
description = "The virtual machine that processes ACIR given a backend/proof system."
# x-release-please-start-version
-version = "0.38.0"
+version = "0.39.0"
# x-release-please-end
authors.workspace = true
edition.workspace = true
diff --git a/acvm-repo/acvm_js/Cargo.toml b/acvm-repo/acvm_js/Cargo.toml
index e8d46b9717e..226e273c306 100644
--- a/acvm-repo/acvm_js/Cargo.toml
+++ b/acvm-repo/acvm_js/Cargo.toml
@@ -2,7 +2,7 @@
name = "acvm_js"
description = "Typescript wrapper around the ACVM allowing execution of ACIR code"
# x-release-please-start-version
-version = "0.38.0"
+version = "0.39.0"
# x-release-please-end
authors.workspace = true
edition.workspace = true
diff --git a/acvm-repo/acvm_js/package.json b/acvm-repo/acvm_js/package.json
index 2d878e961da..4ec9b1a2da3 100644
--- a/acvm-repo/acvm_js/package.json
+++ b/acvm-repo/acvm_js/package.json
@@ -1,6 +1,6 @@
{
"name": "@noir-lang/acvm_js",
- "version": "0.38.0",
+ "version": "0.39.0",
"publishConfig": {
"access": "public"
},
diff --git a/acvm-repo/blackbox_solver/Cargo.toml b/acvm-repo/blackbox_solver/Cargo.toml
index 749ef8f289a..7359cf307e4 100644
--- a/acvm-repo/blackbox_solver/Cargo.toml
+++ b/acvm-repo/blackbox_solver/Cargo.toml
@@ -2,7 +2,7 @@
name = "acvm_blackbox_solver"
description = "A solver for the blackbox functions found in ACIR and Brillig"
# x-release-please-start-version
-version = "0.38.0"
+version = "0.39.0"
# x-release-please-end
authors.workspace = true
edition.workspace = true
diff --git a/acvm-repo/bn254_blackbox_solver/Cargo.toml b/acvm-repo/bn254_blackbox_solver/Cargo.toml
index b98bb370f74..a73aded231f 100644
--- a/acvm-repo/bn254_blackbox_solver/Cargo.toml
+++ b/acvm-repo/bn254_blackbox_solver/Cargo.toml
@@ -2,7 +2,7 @@
name = "bn254_blackbox_solver"
description = "Solvers for black box functions which are specific for the bn254 curve"
# x-release-please-start-version
-version = "0.38.0"
+version = "0.39.0"
# x-release-please-end
authors.workspace = true
edition.workspace = true
diff --git a/acvm-repo/brillig/Cargo.toml b/acvm-repo/brillig/Cargo.toml
index ee8651faeec..b9cedfe8d60 100644
--- a/acvm-repo/brillig/Cargo.toml
+++ b/acvm-repo/brillig/Cargo.toml
@@ -2,7 +2,7 @@
name = "brillig"
description = "Brillig is the bytecode ACIR uses for non-determinism."
# x-release-please-start-version
-version = "0.38.0"
+version = "0.39.0"
# x-release-please-end
authors.workspace = true
edition.workspace = true
diff --git a/acvm-repo/brillig_vm/Cargo.toml b/acvm-repo/brillig_vm/Cargo.toml
index 91bef2572bb..5a8a34be881 100644
--- a/acvm-repo/brillig_vm/Cargo.toml
+++ b/acvm-repo/brillig_vm/Cargo.toml
@@ -2,7 +2,7 @@
name = "brillig_vm"
description = "The virtual machine that processes Brillig bytecode, used to introduce non-determinism to the ACVM"
# x-release-please-start-version
-version = "0.38.0"
+version = "0.39.0"
# x-release-please-end
authors.workspace = true
edition.workspace = true
diff --git a/compiler/wasm/package.json b/compiler/wasm/package.json
index 412e9c82f9a..2aaf4a494df 100644
--- a/compiler/wasm/package.json
+++ b/compiler/wasm/package.json
@@ -3,7 +3,7 @@
"contributors": [
"The Noir Team "
],
- "version": "0.22.0",
+ "version": "0.23.0",
"license": "(MIT OR Apache-2.0)",
"main": "dist/main.js",
"types": "./dist/types/src/index.d.cts",
diff --git a/flake.nix b/flake.nix
index 2300d009114..6849dc0a0ad 100644
--- a/flake.nix
+++ b/flake.nix
@@ -73,7 +73,7 @@
# Configuration shared between builds
config = {
# x-release-please-start-version
- version = "0.22.0";
+ version = "0.23.0";
# x-release-please-end
src = pkgs.lib.cleanSourceWith {
diff --git a/tooling/noir_codegen/package.json b/tooling/noir_codegen/package.json
index 7d76b1a9138..60ccf5ec2a5 100644
--- a/tooling/noir_codegen/package.json
+++ b/tooling/noir_codegen/package.json
@@ -3,7 +3,7 @@
"contributors": [
"The Noir Team "
],
- "version": "0.22.0",
+ "version": "0.23.0",
"packageManager": "yarn@3.5.1",
"license": "(MIT OR Apache-2.0)",
"type": "module",
diff --git a/tooling/noir_js/package.json b/tooling/noir_js/package.json
index ed2fd225810..356909a1e35 100644
--- a/tooling/noir_js/package.json
+++ b/tooling/noir_js/package.json
@@ -3,7 +3,7 @@
"contributors": [
"The Noir Team "
],
- "version": "0.22.0",
+ "version": "0.23.0",
"packageManager": "yarn@3.5.1",
"license": "(MIT OR Apache-2.0)",
"type": "module",
diff --git a/tooling/noir_js_backend_barretenberg/package.json b/tooling/noir_js_backend_barretenberg/package.json
index e22ea2ff49d..cd2a6354ac4 100644
--- a/tooling/noir_js_backend_barretenberg/package.json
+++ b/tooling/noir_js_backend_barretenberg/package.json
@@ -3,7 +3,7 @@
"contributors": [
"The Noir Team "
],
- "version": "0.22.0",
+ "version": "0.23.0",
"packageManager": "yarn@3.5.1",
"license": "(MIT OR Apache-2.0)",
"type": "module",
diff --git a/tooling/noir_js_types/package.json b/tooling/noir_js_types/package.json
index 0276b8d087c..ef75f3d2fb3 100644
--- a/tooling/noir_js_types/package.json
+++ b/tooling/noir_js_types/package.json
@@ -4,7 +4,7 @@
"The Noir Team "
],
"packageManager": "yarn@3.5.1",
- "version": "0.22.0",
+ "version": "0.23.0",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://noir-lang.org/",
"repository": {
diff --git a/tooling/noirc_abi_wasm/package.json b/tooling/noirc_abi_wasm/package.json
index d023e1e4391..db0f6c29153 100644
--- a/tooling/noirc_abi_wasm/package.json
+++ b/tooling/noirc_abi_wasm/package.json
@@ -3,7 +3,7 @@
"contributors": [
"The Noir Team "
],
- "version": "0.22.0",
+ "version": "0.23.0",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://noir-lang.org/",
"repository": {
diff --git a/yarn.lock b/yarn.lock
index e7822f59bdc..db3f493bc62 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -221,6 +221,20 @@ __metadata:
languageName: node
linkType: hard
+"@aztec/bb.js@npm:0.16.0":
+ version: 0.16.0
+ resolution: "@aztec/bb.js@npm:0.16.0"
+ dependencies:
+ comlink: ^4.4.1
+ commander: ^10.0.1
+ debug: ^4.3.4
+ tslib: ^2.4.0
+ bin:
+ bb.js: dest/node/main.js
+ checksum: 5f68b4ad16284a3a871e0ad21fea05aed670383bc639c9d07ab3bf9b7a9d15cc8a4e5cda404a9290775ad5023924739543a8aac37d602892dd1fb5087521970b
+ languageName: node
+ linkType: hard
+
"@aztec/bb.js@npm:0.19.0":
version: 0.19.0
resolution: "@aztec/bb.js@npm:0.19.0"
@@ -4381,6 +4395,13 @@ __metadata:
languageName: node
linkType: hard
+"@noir-lang/acvm_js@npm:0.38.0":
+ version: 0.38.0
+ resolution: "@noir-lang/acvm_js@npm:0.38.0"
+ checksum: 42a5bba45135d1df0d0eb3f7b65439733e016580bad610e859e140638d42200d6b856ff11c4b30417b74ce011da7c39861aafb1c5b8c7211de2172aea449c635
+ languageName: node
+ linkType: hard
+
"@noir-lang/acvm_js@workspace:*, @noir-lang/acvm_js@workspace:acvm-repo/acvm_js":
version: 0.0.0-use.local
resolution: "@noir-lang/acvm_js@workspace:acvm-repo/acvm_js"
@@ -4399,7 +4420,18 @@ __metadata:
languageName: unknown
linkType: soft
-"@noir-lang/backend_barretenberg@^0.22.0, @noir-lang/backend_barretenberg@workspace:*, @noir-lang/backend_barretenberg@workspace:tooling/noir_js_backend_barretenberg":
+"@noir-lang/backend_barretenberg@npm:^0.22.0":
+ version: 0.22.0
+ resolution: "@noir-lang/backend_barretenberg@npm:0.22.0"
+ dependencies:
+ "@aztec/bb.js": 0.16.0
+ "@noir-lang/types": 0.22.0
+ fflate: ^0.8.0
+ checksum: ead456218ba61d925e0fc5b47d1b94272e980b44a220f1262fb6cdc73cff7cd4232ddc69dd67bb21e50f0b43e7696d4a96fde15e3eadc0bf223ec6d59e014e23
+ languageName: node
+ linkType: hard
+
+"@noir-lang/backend_barretenberg@workspace:*, @noir-lang/backend_barretenberg@workspace:tooling/noir_js_backend_barretenberg":
version: 0.0.0-use.local
resolution: "@noir-lang/backend_barretenberg@workspace:tooling/noir_js_backend_barretenberg"
dependencies:
@@ -4443,7 +4475,18 @@ __metadata:
languageName: unknown
linkType: soft
-"@noir-lang/noir_js@^0.22.0, @noir-lang/noir_js@workspace:*, @noir-lang/noir_js@workspace:tooling/noir_js":
+"@noir-lang/noir_js@npm:^0.22.0":
+ version: 0.22.0
+ resolution: "@noir-lang/noir_js@npm:0.22.0"
+ dependencies:
+ "@noir-lang/acvm_js": 0.38.0
+ "@noir-lang/noirc_abi": 0.22.0
+ "@noir-lang/types": 0.22.0
+ checksum: 3b0873ad87521415af11208bebe5690191d03fa06dcd515789f0a63f7641146cdcb01d292b208452856ea3967e196c8332cb2618e013f9e7e5ce7d6e09de043d
+ languageName: node
+ linkType: hard
+
+"@noir-lang/noir_js@workspace:*, @noir-lang/noir_js@workspace:tooling/noir_js":
version: 0.0.0-use.local
resolution: "@noir-lang/noir_js@workspace:tooling/noir_js"
dependencies:
@@ -4466,7 +4509,14 @@ __metadata:
languageName: unknown
linkType: soft
-"@noir-lang/noir_wasm@^0.22.0, @noir-lang/noir_wasm@workspace:*, @noir-lang/noir_wasm@workspace:compiler/wasm":
+"@noir-lang/noir_wasm@npm:^0.22.0":
+ version: 0.22.0
+ resolution: "@noir-lang/noir_wasm@npm:0.22.0"
+ checksum: 7ac0ca170bf312df761d7ccfd32a67a27f88f15ad4eed1807864295d761d3b2176ffb82f4c6931e1bc06b225d6f738519962c79ffbce9a33d5ef8a6a2bdea82c
+ languageName: node
+ linkType: hard
+
+"@noir-lang/noir_wasm@workspace:*, @noir-lang/noir_wasm@workspace:compiler/wasm":
version: 0.0.0-use.local
resolution: "@noir-lang/noir_wasm@workspace:compiler/wasm"
dependencies:
@@ -4510,6 +4560,13 @@ __metadata:
languageName: unknown
linkType: soft
+"@noir-lang/noirc_abi@npm:0.22.0":
+ version: 0.22.0
+ resolution: "@noir-lang/noirc_abi@npm:0.22.0"
+ checksum: a250c6cc5ca37fcf02663f8d6b027776f0e58920fb8f8a84efcf74f079f235bb11bbad682ba332211d9b9a79b6a3eb7faede7701cd88582b682971a41ca6212d
+ languageName: node
+ linkType: hard
+
"@noir-lang/noirc_abi@workspace:*, @noir-lang/noirc_abi@workspace:tooling/noirc_abi_wasm":
version: 0.0.0-use.local
resolution: "@noir-lang/noirc_abi@workspace:tooling/noirc_abi_wasm"
@@ -4540,7 +4597,16 @@ __metadata:
languageName: unknown
linkType: soft
-"@noir-lang/types@^0.22.0, @noir-lang/types@workspace:*, @noir-lang/types@workspace:tooling/noir_js_types":
+"@noir-lang/types@npm:0.22.0, @noir-lang/types@npm:^0.22.0":
+ version: 0.22.0
+ resolution: "@noir-lang/types@npm:0.22.0"
+ dependencies:
+ "@noir-lang/noirc_abi": 0.22.0
+ checksum: 5dd1badf0449c518e755172de1d2f2c1b95bfaf7b7328b7de00b8ce9ba68bd447ca65e827185da7d737e7e88dcaf296b29687ffe2e1f5b4d5cc31ce3e3b4f208
+ languageName: node
+ linkType: hard
+
+"@noir-lang/types@workspace:*, @noir-lang/types@workspace:tooling/noir_js_types":
version: 0.0.0-use.local
resolution: "@noir-lang/types@workspace:tooling/noir_js_types"
dependencies:
From 189aa48c6c32fb6621b0e38a1f2d5d76d26ff0f2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=81lvaro=20Rodr=C3=ADguez?=
Date: Mon, 22 Jan 2024 16:48:58 +0100
Subject: [PATCH 04/70] fix: Respect order in bubble up for redundant asserts
(#4109)
# Description
## Problem\*
Bubble up was reordering redundant assertions for the same data. This PR
makes it respect the order for those.
## Summary\*
## Additional Context
## Documentation\*
Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[Exceptional Case]** Documentation to be submitted in a separate
PR.
# PR Checklist\*
- [x] I have tested the changes locally.
- [ ] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
---------
Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
---
.../src/ssa/opt/bubble_up_constrains.rs | 126 ++++++++++++++++--
1 file changed, 118 insertions(+), 8 deletions(-)
diff --git a/compiler/noirc_evaluator/src/ssa/opt/bubble_up_constrains.rs b/compiler/noirc_evaluator/src/ssa/opt/bubble_up_constrains.rs
index cb9519eeb2e..8a903cbd87b 100644
--- a/compiler/noirc_evaluator/src/ssa/opt/bubble_up_constrains.rs
+++ b/compiler/noirc_evaluator/src/ssa/opt/bubble_up_constrains.rs
@@ -1,4 +1,9 @@
-use crate::ssa::{ir::instruction::Instruction, ssa_gen::Ssa};
+use std::collections::HashMap;
+
+use crate::ssa::{
+ ir::instruction::{Instruction, InstructionId},
+ ssa_gen::Ssa,
+};
impl Ssa {
/// A simple SSA pass to go through each instruction and move every `Instruction::Constrain` to immediately
@@ -10,6 +15,12 @@ impl Ssa {
let instructions = function.dfg[block].take_instructions();
let mut filtered_instructions = Vec::with_capacity(instructions.len());
+ // Multiple constrains can bubble up to sit under a single instruction. We want to maintain the ordering of these constraints,
+ // so we need to keep track of how many constraints are attached to a given instruction.
+ // Some assertions don't operate on instruction results, so we use Option so we also track the None case
+ let mut inserted_at_instruction: HashMap