Skip to content

Commit

Permalink
Merge 46a51ae into 57f3c9b
Browse files Browse the repository at this point in the history
  • Loading branch information
AztecBot authored Aug 27, 2024
2 parents 57f3c9b + 46a51ae commit 2c51d01
Show file tree
Hide file tree
Showing 160 changed files with 6,841 additions and 1,578 deletions.
2 changes: 1 addition & 1 deletion .noir-sync-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1958a7932642e2fa556a903a3186b142a70e3e48
86c151aa43ba990a0e900995064a88fc2ae6637d
19 changes: 5 additions & 14 deletions avm-transpiler/src/transpile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ use std::collections::BTreeMap;

use acvm::acir::brillig::{BitSize, IntegerBitSize, Opcode as BrilligOpcode};

use acvm::acir::circuit::OpcodeLocation;
use acvm::acir::circuit::BrilligOpcodeLocation;
use acvm::brillig_vm::brillig::{
BinaryFieldOp, BinaryIntOp, BlackBoxOp, HeapArray, HeapVector, MemoryAddress, ValueOrArray,
};
use acvm::{AcirField, FieldElement};
use noirc_errors::debug_info::DebugInfo;
use noirc_errors::Location;

use crate::instructions::{
AvmInstruction, AvmOperand, AvmTypeTag, ALL_DIRECT, FIRST_OPERAND_INDIRECT,
Expand Down Expand Up @@ -1088,19 +1087,11 @@ pub fn patch_debug_info_pcs(
patched_debug_info.brillig_locations.iter()
{
// create a new map with all of its keys (OpcodeLocations) patched
let mut patched_locations: BTreeMap<OpcodeLocation, Vec<Location>> = BTreeMap::new();
let mut patched_locations = BTreeMap::new();
for (original_opcode_location, source_locations) in opcode_locations_map.iter() {
match original_opcode_location {
OpcodeLocation::Brillig { acir_index, brillig_index } => {
let avm_opcode_location = OpcodeLocation::Brillig {
acir_index: *acir_index,
// patch the PC
brillig_index: brillig_pcs_to_avm_pcs[*brillig_index],
};
patched_locations.insert(avm_opcode_location, source_locations.clone());
}
OpcodeLocation::Acir(_) => (),
}
let avm_opcode_location =
BrilligOpcodeLocation(brillig_pcs_to_avm_pcs[original_opcode_location.0]);
patched_locations.insert(avm_opcode_location, source_locations.clone());
}
// insert the new map as a brillig locations map for the current function id
patched_brillig_locations.insert(*brillig_function_id, patched_locations);
Expand Down
4 changes: 2 additions & 2 deletions noir-projects/noir-protocol-circuits/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ MIN_PARALLEL_VK_GENERATION_MEMORY=500000000
if [[ AVAILABLE_MEMORY -lt MIN_PARALLEL_VK_GENERATION_MEMORY ]]; then
echo "System does not have enough memory for parallel vk generation, falling back to sequential"

for pathname in "./target"/*.json; do
for pathname in "./target"/*.json; do
BB_HASH=$BB_HASH node ../scripts/generate_vk_json.js "$pathname" "./target/keys"
done

else

echo "Generating vks in parallel..."
for pathname in "./target"/*.json; do
for pathname in "./target"/*.json; do
BB_HASH=$BB_HASH node ../scripts/generate_vk_json.js "$pathname" "./target/keys" &
done

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ authors = [""]
compiler_version = ">=0.30.0"

[dependencies]
bigint = {tag = "v0.3.0", git = "https://github.com/noir-lang/noir-bignum" }
bigint = {tag = "v0.3.1", git = "https://github.com/noir-lang/noir-bignum" }
Loading

0 comments on commit 2c51d01

Please sign in to comment.