Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .noir-sync-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5a3d2bc0e13a12b039c793c73d7817924c13e159
a6e5526851f717c88799926796e36d6b6225be90
4 changes: 2 additions & 2 deletions noir/noir-repo/.github/workflows/publish-nargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ jobs:
cargo build --package nargo_cli --release --target ${{ matrix.target }} --no-default-features --features "${{ inputs.features }}"
cargo build --package noir_profiler --release --target ${{ matrix.target }} --no-default-features --features "${{ inputs.features }}"
cargo build --package noir_inspector --release --target ${{ matrix.target }} --no-default-features --features "${{ inputs.features }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Package artifacts
run: |
Expand Down Expand Up @@ -237,5 +239,3 @@ jobs:
make_latest: false
overwrite: true
tag: ${{ format('{0}-{1}', 'nightly', steps.date.outputs.date) }}


10 changes: 6 additions & 4 deletions noir/noir-repo/.github/workflows/reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ jobs:

- name: Build Nargo
run: cargo build --package nargo_cli --release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Package artifacts
run: |
Expand Down Expand Up @@ -305,7 +307,7 @@ jobs:
repository: ${{ matrix.repo }}
path: test-repo
ref: ${{ matrix.ref }}

- name: Fetch noir dependencies
working-directory: ./test-repo/${{ matrix.path }}
run: |
Expand Down Expand Up @@ -341,7 +343,7 @@ jobs:
path: ${{ steps.compilation_report.outputs.report_path }}
retention-days: 3
overwrite: true

- name: Generate execution report
id: execution_report
working-directory: ./test-repo/${{ matrix.path }}
Expand All @@ -359,7 +361,7 @@ jobs:

echo "report_name=$REPORT_NAME" >> $GITHUB_OUTPUT
echo "report_path=$REPORT_PATH" >> $GITHUB_OUTPUT

- name: Upload execution report
if: ${{ !matrix.cannot_execute }}
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -716,7 +718,7 @@ jobs:
- upload_compilation_memory_report
- upload_execution_report
- upload_execution_memory_report

steps:
- name: Report overall success
run: |
Expand Down
4 changes: 3 additions & 1 deletion noir/noir-repo/.github/workflows/test-js-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ jobs:

- name: Build Nargo
run: cargo build --package nargo_cli --release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Package artifacts
run: |
Expand Down Expand Up @@ -535,7 +537,7 @@ jobs:
fail-fast: false
matrix:
include: ${{ fromJson( needs.critical-library-list.outputs.libraries )}}

name: Check external repo - ${{ matrix.repo }}/${{ matrix.path }}
steps:
- name: Checkout
Expand Down
124 changes: 124 additions & 0 deletions noir/noir-repo/Cargo.lock

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

7 changes: 7 additions & 0 deletions noir/noir-repo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ members = [
"acvm-repo/bn254_blackbox_solver",
# Utility crates
"utils/iter-extended",
"utils/protobuf",
]
default-members = [
"tooling/nargo_cli",
Expand Down Expand Up @@ -94,6 +95,7 @@ noirc_abi = { path = "tooling/noirc_abi" }
noirc_artifacts = { path = "tooling/noirc_artifacts" }
noirc_artifacts_info = { path = "tooling/noirc_artifacts_info" }
noir_artifact_cli = { path = "tooling/artifact_cli" }
noir_protobuf = { path = "utils/protobuf" }

# Arkworks
ark-bn254 = { version = "^0.5.0", default-features = false, features = [
Expand Down Expand Up @@ -137,6 +139,11 @@ criterion = "0.5.0"
# https://github.com/tikv/pprof-rs/pull/172
pprof = { version = "0.14", features = ["flamegraph", "criterion"] }

# Protobuf
prost = "0.13"
prost-build = "0.13"
protoc-prebuilt = "0.3"

cfg-if = "1.0.0"
dirs = "4"
serde = { version = "1.0.136", features = ["derive"] }
Expand Down
16 changes: 16 additions & 0 deletions noir/noir-repo/acvm-repo/acir/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,42 @@ workspace = true
[dependencies]
acir_field.workspace = true
brillig.workspace = true
noir_protobuf.workspace = true

color-eyre.workspace = true
serde.workspace = true
thiserror.workspace = true
flate2.workspace = true
bincode.workspace = true
base64.workspace = true
prost.workspace = true
serde-big-array = "0.5.1"
strum = { workspace = true }
strum_macros = { workspace = true }

proptest = { workspace = true, optional = true }
proptest-derive = { workspace = true, optional = true }

[build-dependencies]
prost-build.workspace = true
protoc-prebuilt.workspace = true

[dev-dependencies]
serde_json = "1.0"
serde-reflection = "0.3.6"
serde-generate = "0.25.1"
fxhash.workspace = true
criterion.workspace = true
pprof.workspace = true
num-bigint.workspace = true

acir = { path = ".", features = ["arb"] } # Self to turn on `arb`.

[features]
default = []
bn254 = ["acir_field/bn254"]
bls12_381 = ["acir_field/bls12_381"]
arb = ["proptest", "proptest-derive", "brillig/arb"]

[[bench]]
name = "serialization"
Expand Down
24 changes: 24 additions & 0 deletions noir/noir-repo/acvm-repo/acir/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
use std::path::Path;

fn main() {
let (protoc_bin, include_dir) =
protoc_prebuilt::init("29.3").expect("failed to initialize protoc");

unsafe {
std::env::set_var("PROTOC", protoc_bin);
}

prost_build::compile_protos(
&[
// DTOs for a `Program`, which work with the types in `acir.cpp`
"./src/proto/program.proto",
// DTOs for the `WitnessStack`, which work with the types in `witness.cpp`
"./src/proto/acir/witness.proto",
// A pared down DTO for `Program`, so Barretenberg can ignore the Brillig part.
// This is only included to make sure it compiles.
"./src/proto/acir/program.proto",
],
&[Path::new("./src/proto"), include_dir.as_path()],
)
.expect("failed to compile .proto schemas");
}
4 changes: 4 additions & 0 deletions noir/noir-repo/acvm-repo/acir/src/circuit/brillig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use serde::{Deserialize, Serialize};
/// Inputs for the Brillig VM. These are the initial inputs
/// that the Brillig VM will use to start.
#[derive(Clone, PartialEq, Eq, Serialize, Deserialize, Debug, Hash)]
#[cfg_attr(feature = "arb", derive(proptest_derive::Arbitrary))]
pub enum BrilligInputs<F> {
Single(Expression<F>),
Array(Vec<Expression<F>>),
Expand All @@ -15,6 +16,7 @@ pub enum BrilligInputs<F> {
/// Outputs for the Brillig VM. Once the VM has completed
/// execution, this will be the object that is returned.
#[derive(Clone, PartialEq, Eq, Serialize, Deserialize, Debug, Hash)]
#[cfg_attr(feature = "arb", derive(proptest_derive::Arbitrary))]
pub enum BrilligOutputs {
Simple(Witness),
Array(Vec<Witness>),
Expand All @@ -24,6 +26,7 @@ pub enum BrilligOutputs {
/// a full Brillig function to be executed by the Brillig VM.
/// This is stored separately on a program and accessed through a [BrilligPointer].
#[derive(Clone, PartialEq, Eq, Serialize, Deserialize, Default, Debug, Hash)]
#[cfg_attr(feature = "arb", derive(proptest_derive::Arbitrary))]
pub struct BrilligBytecode<F> {
pub bytecode: Vec<BrilligOpcode<F>>,
}
Expand All @@ -32,6 +35,7 @@ pub struct BrilligBytecode<F> {
#[derive(
Clone, Debug, PartialEq, Eq, Serialize, Deserialize, Hash, Copy, Default, PartialOrd, Ord,
)]
#[cfg_attr(feature = "arb", derive(proptest_derive::Arbitrary))]
#[serde(transparent)]
pub struct BrilligFunctionId(pub u32);

Expand Down
Loading