Skip to content

Commit

Permalink
[1 changes] fix: unknown slice lengths coming from as_slice (noir-lan…
Browse files Browse the repository at this point in the history
…g/noir#4725)

chore: remove unused env vars from `Cross.toml` (noir-lang/noir#4717)
feat: improve nargo check cli with --override flag and feedback for existing files (noir-lang/noir#4575)
feat: Allow slices to brillig entry points (noir-lang/noir#4713)
chore: simplify how `acvm_backend.wasm` is embedded (noir-lang/noir#4703)
fix(acvm): Mark outputs of Opcode::Call solvable (noir-lang/noir#4708)
fix: Field comparisons (noir-lang/noir#4704)
feat(acvm_js): Execute program  (noir-lang/noir#4694)
chore: simplify how blns is loaded into tests (noir-lang/noir#4705)
fix(ssa): Do not use get_value_max_num_bits when we want pure type information (noir-lang/noir#4700)
chore: remove conditional compilation around `acvm_js` package (noir-lang/noir#4702)
feat(docs): Documenting noir codegen (noir-lang/noir#4454)
chore: check for references to private functions during path resolution (noir-lang/noir#4622)
chore: fix clippy errors (noir-lang/noir#4684)
fix: Last use analysis & make it an SSA pass (noir-lang/noir#4686)
feat: improve SSA type-awareness in EQ and MUL instructions (noir-lang/noir#4691)
feat: improve optimisations on range constraints (noir-lang/noir#4690)
chore: remove last traces of nix (noir-lang/noir#4679)
chore: Use is_entry_point helper on RuntimeType (noir-lang/noir#4678)
  • Loading branch information
AztecBot committed Apr 5, 2024
1 parent bb71920 commit 39aba05
Show file tree
Hide file tree
Showing 151 changed files with 3,139 additions and 1,831 deletions.
20 changes: 0 additions & 20 deletions noir/noir-repo/.envrc

This file was deleted.

1 change: 0 additions & 1 deletion noir/noir-repo/.github/Cross.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
passthrough = [
"HOME",
"RUST_BACKTRACE",
"BARRETENBERG_BIN_DIR"
]
volumes = [
"HOME",
Expand Down
1 change: 1 addition & 0 deletions noir/noir-repo/.github/scripts/acvm_js-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
set -eu

.github/scripts/wasm-bindgen-install.sh
.github/scripts/wasm-opt-install.sh
yarn workspace @noir-lang/acvm_js build
1 change: 1 addition & 0 deletions noir/noir-repo/.github/scripts/noir-wasm-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
set -eu

.github/scripts/wasm-pack-install.sh
.github/scripts/wasm-opt-install.sh
yarn workspace @noir-lang/types build
yarn workspace @noir-lang/noir_wasm build
1 change: 1 addition & 0 deletions noir/noir-repo/.github/scripts/noirc-abi-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
set -eu

.github/scripts/wasm-bindgen-install.sh
.github/scripts/wasm-opt-install.sh
yarn workspace @noir-lang/noirc_abi build
2 changes: 1 addition & 1 deletion noir/noir-repo/.github/scripts/wasm-opt-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ cd $(dirname "$0")

./cargo-binstall-install.sh

cargo-binstall wasm-opt --version 0.116.0 -y
cargo-binstall wasm-opt --version 0.116.0 -y --force
14 changes: 13 additions & 1 deletion noir/noir-repo/.github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@ jobs:
- name: Install Yarn dependencies
uses: ./.github/actions/setup

- name: Install wasm-bindgen-cli
uses: taiki-e/install-action@v2
with:
tool: wasm-bindgen-cli@0.2.86

- name: Install wasm-opt
run: |
npm i wasm-opt -g
- name: Query new noir version
id: noir-version
run: |
Expand Down Expand Up @@ -107,17 +116,20 @@ jobs:
if: ${{ always() }}

needs:
- release-please
- update-acvm-workspace-package-versions
- update-docs

env:
# We treat any skipped or failing jobs as a failure for the workflow as a whole.
FAIL: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped') }
FAIL: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped') }}

steps:
- name: Add warning to sticky comment
uses: marocchino/sticky-pull-request-comment@v2
with:
# We need to specify the PR on which to make the comment as workflow is triggered by push.
number: ${{ fromJSON(needs.release-please.outputs.release-pr).number }}
# delete the comment in case failures have been fixed
delete: ${{ !env.FAIL }}
message: "The release workflow has not completed successfully. Releasing now will result in a broken release"
Expand Down
17 changes: 6 additions & 11 deletions noir/noir-repo/.github/workflows/test-js-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,16 @@ jobs:
- name: Install Yarn dependencies
uses: ./.github/actions/setup

- name: Install wasm-opt
run: ./.github/scripts/wasm-opt-install.sh

- name: Build noirc_abi
run: ./.github/scripts/noirc-abi-build.sh

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: noirc_abi_wasm
path: ./tooling/noirc_abi_wasm/outputs/out/noirc_abi_wasm
path: |
./tooling/noirc_abi_wasm/nodejs
./tooling/noirc_abi_wasm/web
retention-days: 10


Expand All @@ -100,9 +99,6 @@ jobs:
- name: Install Yarn dependencies
uses: ./.github/actions/setup

- name: Install wasm-opt
run: ./.github/scripts/wasm-opt-install.sh

- name: Build noir_js_types
run: yarn workspace @noir-lang/types build

Expand Down Expand Up @@ -138,17 +134,16 @@ jobs:
- name: Install Yarn dependencies
uses: ./.github/actions/setup

- name: Install wasm-opt
run: ./.github/scripts/wasm-opt-install.sh

- name: Build acvm_js
run: ./.github/scripts/acvm_js-build.sh

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: acvm-js
path: ./acvm-repo/acvm_js/outputs/out/acvm_js
path: |
./acvm-repo/acvm_js/nodejs
./acvm-repo/acvm_js/web
retention-days: 3

test-acvm_js-node:
Expand Down
6 changes: 0 additions & 6 deletions noir/noir-repo/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ pkg/
# Noir.js
tooling/noir_js/lib

# Nix stuff
**/outputs
result
.envrc.local
.direnv/

# Nargo output
*.proof
*.acir
Expand Down
1 change: 0 additions & 1 deletion noir/noir-repo/.vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"mkhl.direnv",
"jnoortheen.nix-ide",
"rust-lang.rust-analyzer",
"redhat.vscode-yaml",
"esbenp.prettier-vscode",
Expand Down
11 changes: 0 additions & 11 deletions noir/noir-repo/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,6 @@
"direnv.restart.automatic": true,
"redhat.telemetry.enabled": false,
"yaml.recommendations.show": false,
"nix.serverPath": "nil",
"nix.enableLanguageServer": true,
"nix.serverSettings": {
"nil": {
"formatting": {
"command": [
"nixpkgs-fmt"
]
}
}
},
"yaml.schemas": {
"https://json.schemastore.org/github-workflow.json": "${workspaceRoot}/.github/workflows/*.yml"
},
Expand Down
34 changes: 10 additions & 24 deletions noir/noir-repo/Cargo.lock

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

20 changes: 0 additions & 20 deletions noir/noir-repo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,26 +56,6 @@ Concretely the following items are on the road map:

This crate's minimum supported rustc version is 1.73.0.

## Working on this project

This project uses [Nix](https://nixos.org/) and [direnv](https://direnv.net/) to streamline the development experience. Please follow [our guidelines](https://noir-lang.org/docs/getting_started/installation/other_install_methods#option-3-compile-from-source) to setup your environment for working on the project.

### Building against a different local/remote version of Barretenberg

If you are working on this project and want a different version of Barretenberg (instead of the version this project is pinned against), you'll want to replace the lockfile version with your version. This can be done by running:

```sh
nix flake lock --override-input barretenberg /absolute/path/to/your/barretenberg
```

You can also point at a fork and/or branch on GitHub using:

```sh
nix flake lock --override-input barretenberg github:username/barretenberg/branch_name
```

__Note:__ You don't want to commit the updated lockfile, as it will fail in CI!

## License

Noir is free and open source. It is distributed under a dual license. (MIT/APACHE)
Expand Down
36 changes: 22 additions & 14 deletions noir/noir-repo/acvm-repo/acir/src/circuit/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,25 +216,33 @@ impl std::fmt::Display for Circuit {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
writeln!(f, "current witness index : {}", self.current_witness_index)?;

let write_public_inputs = |f: &mut std::fmt::Formatter<'_>,
public_inputs: &PublicInputs|
-> Result<(), std::fmt::Error> {
write!(f, "[")?;
let public_input_indices = public_inputs.indices();
for (index, public_input) in public_input_indices.iter().enumerate() {
write!(f, "{public_input}")?;
if index != public_input_indices.len() - 1 {
write!(f, ", ")?;
let write_witness_indices =
|f: &mut std::fmt::Formatter<'_>, indices: &[u32]| -> Result<(), std::fmt::Error> {
write!(f, "[")?;
for (index, witness_index) in indices.iter().enumerate() {
write!(f, "{witness_index}")?;
if index != indices.len() - 1 {
write!(f, ", ")?;
}
}
}
writeln!(f, "]")
};
writeln!(f, "]")
};

write!(f, "private parameters indices : ")?;
write_witness_indices(
f,
&self
.private_parameters
.iter()
.map(|witness| witness.witness_index())
.collect::<Vec<_>>(),
)?;

write!(f, "public parameters indices : ")?;
write_public_inputs(f, &self.public_parameters)?;
write_witness_indices(f, &self.public_parameters.indices())?;

write!(f, "return value indices : ")?;
write_public_inputs(f, &self.return_values)?;
write_witness_indices(f, &self.return_values.indices())?;

for opcode in &self.opcodes {
writeln!(f, "{opcode}")?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub struct WitnessStackError(#[from] SerializationError);
/// An ordered set of witness maps for separate circuits
#[derive(Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, Default, Serialize, Deserialize)]
pub struct WitnessStack {
pub stack: Vec<StackItem>,
stack: Vec<StackItem>,
}

#[derive(Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, Default, Serialize, Deserialize)]
Expand All @@ -37,6 +37,10 @@ impl WitnessStack {
self.stack.push(StackItem { index, witness });
}

pub fn pop(&mut self) -> Option<StackItem> {
self.stack.pop()
}

pub fn peek(&self) -> Option<&StackItem> {
self.stack.last()
}
Expand Down
Loading

0 comments on commit 39aba05

Please sign in to comment.