Skip to content

Commit

Permalink
feat: Sync from noir (#8125)
Browse files Browse the repository at this point in the history
Automated pull of development from the
[noir](https://github.com/noir-lang/noir) programming language, a
dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
chore: crypto blackbox tests
(noir-lang/noir#5614)
feat: Improve "type annotations needed" errors
(noir-lang/noir#5830)
chore: enum dummy ID for `FuncId` in monomorphizer and docstring fixes
(noir-lang/noir#5421)
chore: delete wip fuzzing files that got accidentally added
(noir-lang/noir#5829)
chore: test ACVM `BigInt` (noir-lang/noir#5559)
fix(docs): Fix file paths for metaprogramming docs
(noir-lang/noir#5826)
fix: bit shifting type checking
(noir-lang/noir#5824)
feat: add Expr::as_method_call
(noir-lang/noir#5822)
chore: Fix docs typo (noir-lang/noir#5821)
feat: add `UnresolvedType::is_field` and `Expr::as_assign`
(noir-lang/noir#5804)
chore: Add docs for each comptime method
(noir-lang/noir#5802)
chore: Add comptime docs (noir-lang/noir#5800)
fix: Handle multiple entry points for Brillig call stack resolution
after metadata deduplication
(noir-lang/noir#5788)
fix(acir_gen): Nested dynamic array initialization
(noir-lang/noir#5810)
fix: honor function visibility in LSP completion
(noir-lang/noir#5809)
feat: LSP completion now works better in the middle of idents
(noir-lang/noir#5795)
feat: Explicit Associated Types & Constants
(noir-lang/noir#5739)
feat: add `Expr::as_cast` and `UnresolvedType::is_field`
(noir-lang/noir#5801)
feat: add `Expr` methods: as_comptime, as_unsafe, is_break, is_continue
(noir-lang/noir#5799)
fix: do not use predicate for index in array operation, when the index
is safe (noir-lang/noir#5779)
chore: Toggle underconstrained check
(noir-lang/noir#5724)
feat: Add `Expr::as_block` and `Expr::has_semicolon`
(noir-lang/noir#5784)
feat: LSP hover and go-to-definition for crates
(noir-lang/noir#5786)
fix(acvm): Clear ACIR call stack after successful circuit execution
(noir-lang/noir#5783)
chore: sanitize url's to only allow github
(noir-lang/noir#5776)
chore: enable constant inputs for more blackbox
(noir-lang/noir#5647)
chore: move sha2 functions into the `hash` module
(noir-lang/noir#5768)
END_COMMIT_OVERRIDE

---------

Co-authored-by: sirasistant <sirasistant@gmail.com>
Co-authored-by: Maxim Vezenov <mvezenov@gmail.com>
  • Loading branch information
3 people authored Aug 27, 2024
1 parent 57f3c9b commit 61d6f25
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 61d6f25

Please sign in to comment.