Skip to content

Commit

Permalink
Merge branch 'master' into tf/is-zero-acir-var
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench authored Dec 1, 2023
2 parents 7ff06a3 + 5a4a73d commit 6b2169d
Show file tree
Hide file tree
Showing 273 changed files with 11 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Rebuild ACIR artifacts
name: Build ACIR artifacts

on:
pull_request:
Expand Down Expand Up @@ -93,11 +93,6 @@ jobs:
chmod +x ${{ github.workspace }}/nargo/nargo
echo "${{ github.workspace }}/nargo" >> $GITHUB_PATH
- name: Set up Git user (Github Action)
run: |
git config --local user.name kevaundray
git config --local user.email [email protected]
- name: Run rebuild script
working-directory: test_programs
run: |
Expand All @@ -110,21 +105,3 @@ jobs:
name: acir-artifacts
path: ./test_programs/acir_artifacts
retention-days: 10

- name: Check for changes in acir_artifacts directory
id: check_changes
if: ${{ github.ref_name }} == "master"
run: |
git diff --quiet test_programs/acir_artifacts/ || echo "::set-output name=changes::true"
- name: Create or Update PR
if: steps.check_changes.outputs.changes == 'true'
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.NOIR_REPO_TOKEN }}
commit-message: "chore: update acir artifacts"
title: "chore: Update ACIR artifacts"
body: "Automatic PR to update acir artifacts"
add-paths: test_programs/acir_artifacts/*.gz
labels: "auto-pr"
branch: "auto-pr-rebuild-script-branch"
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,8 @@ impl AcirContext {
/// Converts the `AcirVar` to a `Witness` if it hasn't been already, and appends it to the
/// `GeneratedAcir`'s return witnesses.
pub(crate) fn return_var(&mut self, acir_var: AcirVar) -> Result<(), InternalError> {
let witness = self.var_to_witness(acir_var)?;
let return_var = self.get_or_create_witness_var(acir_var)?;
let witness = self.var_to_witness(return_var)?;
self.acir_ir.push_return_witness(witness);
Ok(())
}
Expand Down Expand Up @@ -1507,7 +1508,8 @@ impl AcirContext {
index: &AcirVar,
) -> Result<AcirVar, InternalError> {
// Fetch the witness corresponding to the index
let index_witness = self.var_to_witness(*index)?;
let index_var = self.get_or_create_witness_var(*index)?;
let index_witness = self.var_to_witness(index_var)?;

// Create a Variable to hold the result of the read and extract the corresponding Witness
let value_read_var = self.add_variable();
Expand All @@ -1528,11 +1530,12 @@ impl AcirContext {
value: &AcirVar,
) -> Result<(), InternalError> {
// Fetch the witness corresponding to the index
//
let index_witness = self.var_to_witness(*index)?;
let index_var = self.get_or_create_witness_var(*index)?;
let index_witness = self.var_to_witness(index_var)?;

// Fetch the witness corresponding to the value to be written
let value_write_witness = self.var_to_witness(*value)?;
let value_write_var = self.get_or_create_witness_var(*value)?;
let value_write_witness = self.var_to_witness(value_write_var)?;

// Add the memory write operation to the list of opcodes
let op = MemOp::write_to_mem_index(index_witness.into(), value_write_witness.into());
Expand Down Expand Up @@ -1574,6 +1577,7 @@ impl AcirContext {
) -> Result<(), InternalError> {
match input {
AcirValue::Var(var, _) => {
let var = self.get_or_create_witness_var(var)?;
witnesses.push(self.var_to_witness(var)?);
}
AcirValue::Array(values) => {
Expand Down
1 change: 1 addition & 0 deletions test_programs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
acir_artifacts
Binary file not shown.
Binary file not shown.
Binary file removed test_programs/acir_artifacts/1_mul/target/acir.gz
Binary file not shown.
Binary file removed test_programs/acir_artifacts/1_mul/target/witness.gz
Binary file not shown.
Binary file removed test_programs/acir_artifacts/2_div/target/acir.gz
Binary file not shown.
Binary file removed test_programs/acir_artifacts/2_div/target/witness.gz
Binary file not shown.
Binary file removed test_programs/acir_artifacts/3_add/target/acir.gz
Binary file not shown.
Binary file removed test_programs/acir_artifacts/3_add/target/witness.gz
Binary file not shown.
Binary file removed test_programs/acir_artifacts/4_sub/target/acir.gz
Binary file not shown.
Binary file removed test_programs/acir_artifacts/4_sub/target/witness.gz
Binary file not shown.
Binary file removed test_programs/acir_artifacts/5_over/target/acir.gz
Binary file not shown.
Binary file removed test_programs/acir_artifacts/5_over/target/witness.gz
Binary file not shown.
Binary file removed test_programs/acir_artifacts/6/target/acir.gz
Binary file not shown.
Binary file removed test_programs/acir_artifacts/6/target/witness.gz
Binary file not shown.
Binary file removed test_programs/acir_artifacts/6_array/target/acir.gz
Binary file not shown.
Binary file not shown.
Binary file removed test_programs/acir_artifacts/7/target/acir.gz
Binary file not shown.
Binary file removed test_programs/acir_artifacts/7/target/witness.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed test_programs/acir_artifacts/array_eq/target/acir.gz
Binary file not shown.
Binary file removed test_programs/acir_artifacts/array_eq/target/witness.gz
Binary file not shown.
Binary file removed test_programs/acir_artifacts/array_len/target/acir.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed test_programs/acir_artifacts/array_sort/target/acir.gz
Binary file not shown.
Binary file not shown.
Binary file removed test_programs/acir_artifacts/assert/target/acir.gz
Binary file not shown.
Binary file removed test_programs/acir_artifacts/assert/target/witness.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed test_programs/acir_artifacts/assign_ex/target/acir.gz
Binary file not shown.
Binary file not shown.
Binary file removed test_programs/acir_artifacts/bit_and/target/acir.gz
Binary file not shown.
Binary file removed test_programs/acir_artifacts/bit_and/target/witness.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed test_programs/acir_artifacts/bool_not/target/acir.gz
Binary file not shown.
Binary file not shown.
Binary file removed test_programs/acir_artifacts/bool_or/target/acir.gz
Binary file not shown.
Binary file removed test_programs/acir_artifacts/bool_or/target/witness.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed test_programs/acir_artifacts/brillig_not/target/acir.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed test_programs/acir_artifacts/cast_bool/target/acir.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed test_programs/acir_artifacts/eddsa/target/acir.gz
Binary file not shown.
Binary file removed test_programs/acir_artifacts/eddsa/target/witness.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed test_programs/acir_artifacts/generics/target/acir.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed test_programs/acir_artifacts/import/target/acir.gz
Binary file not shown.
Binary file removed test_programs/acir_artifacts/import/target/witness.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed test_programs/acir_artifacts/keccak256/target/acir.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed test_programs/acir_artifacts/modules/target/acir.gz
Binary file not shown.
Binary file removed test_programs/acir_artifacts/modules/target/witness.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed test_programs/acir_artifacts/modulus/target/acir.gz
Binary file not shown.
Binary file removed test_programs/acir_artifacts/modulus/target/witness.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed test_programs/acir_artifacts/pred_eq/target/acir.gz
Binary file not shown.
Binary file removed test_programs/acir_artifacts/pred_eq/target/witness.gz
Binary file not shown.
Binary file removed test_programs/acir_artifacts/references/target/acir.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed test_programs/acir_artifacts/scalar_mul/target/acir.gz
Binary file not shown.
Binary file not shown.
Binary file removed test_programs/acir_artifacts/schnorr/target/acir.gz
Binary file not shown.
Binary file removed test_programs/acir_artifacts/schnorr/target/witness.gz
Binary file not shown.
Binary file removed test_programs/acir_artifacts/sha256/target/acir.gz
Binary file not shown.
Binary file removed test_programs/acir_artifacts/sha256/target/witness.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed test_programs/acir_artifacts/simple_mut/target/acir.gz
Binary file not shown.
Binary file not shown.
Binary file removed test_programs/acir_artifacts/simple_not/target/acir.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed test_programs/acir_artifacts/slices/target/acir.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed test_programs/acir_artifacts/strings/target/witness.gz
Binary file not shown.
Binary file removed test_programs/acir_artifacts/struct/target/acir.gz
Binary file not shown.
Binary file removed test_programs/acir_artifacts/struct/target/witness.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed test_programs/acir_artifacts/submodules/target/acir.gz
Binary file not shown.
Binary file not shown.
Binary file removed test_programs/acir_artifacts/to_be_bytes/target/acir.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed test_programs/acir_artifacts/to_le_bytes/target/acir.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed test_programs/acir_artifacts/tuples/target/acir.gz
Binary file not shown.
Binary file removed test_programs/acir_artifacts/tuples/target/witness.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed test_programs/acir_artifacts/xor/target/acir.gz
Binary file not shown.
Binary file removed test_programs/acir_artifacts/xor/target/witness.gz
Binary file not shown.

0 comments on commit 6b2169d

Please sign in to comment.