Skip to content

Commit

Permalink
chore: fix issue #6929 (off-by-one error in `UltraCircuitBuilder::cre…
Browse files Browse the repository at this point in the history
…ate_range_constraint`) (AztecProtocol/aztec-packages#6931)

Fix small bug that creates innaccurate range constraints for small
scalar values in UltraCircuitBuilder
  • Loading branch information
AztecBot committed Jun 6, 2024
2 parents e01be45 + 58f45a1 commit 3b4efb1
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .aztec-sync-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
f3234f1bf037b68237bd6a8b2bce8b016bb170d0
16deef6a83a9fe41e1f865e79e17c2f671604bb0
2 changes: 1 addition & 1 deletion acvm-repo/acvm_js/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function run_if_available {
require_command jq
require_command cargo
require_command wasm-bindgen
require_command wasm-opt
#require_command wasm-opt

self_path=$(dirname "$(readlink -f "$0")")
pname=$(cargo read-manifest | jq -r '.name')
Expand Down
1 change: 1 addition & 0 deletions acvm-repo/brillig_vm/src/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ impl<F: AcirField> Memory<F> {
if len == 0 {
return &[];
}

&self.inner[addr.to_usize()..(addr.to_usize() + len)]
}

Expand Down
1 change: 1 addition & 0 deletions compiler/noirc_evaluator/src/ssa/acir_gen/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ use acvm::acir::circuit::{AssertionPayload, ErrorSelector, OpcodeLocation};
use acvm::acir::native_types::Witness;
use acvm::acir::BlackBoxFunc;
use acvm::{acir::circuit::opcodes::BlockId, acir::AcirField, FieldElement};

use fxhash::FxHashMap as HashMap;
use im::Vector;
use iter_extended::{try_vecmap, vecmap};
Expand Down
1 change: 1 addition & 0 deletions compiler/noirc_frontend/src/elaborator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,7 @@ impl<'context> Elaborator<'context> {
self.local_module = trait_impl.module_id;
self.file = trait_impl.file_id;
self.current_trait_impl = trait_impl.impl_id;

trait_impl.trait_id = self.resolve_trait_by_path(trait_impl.trait_path.clone());

let self_type = trait_impl.methods.self_type.clone();
Expand Down
2 changes: 1 addition & 1 deletion tooling/noir_js_backend_barretenberg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"lint": "NODE_NO_WARNINGS=1 eslint . --ext .ts --ignore-path ./.eslintignore --max-warnings 0"
},
"dependencies": {
"@aztec/bb.js": "0.41.0",
"@aztec/bb.js": "portal:../../../../barretenberg/ts",
"@noir-lang/types": "workspace:*",
"fflate": "^0.8.0"
},
Expand Down
13 changes: 6 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -221,19 +221,18 @@ __metadata:
languageName: node
linkType: hard

"@aztec/bb.js@npm:0.41.0":
version: 0.41.0
resolution: "@aztec/bb.js@npm:0.41.0"
"@aztec/bb.js@portal:../../../../barretenberg/ts::locator=%40noir-lang%2Fbackend_barretenberg%40workspace%3Atooling%2Fnoir_js_backend_barretenberg":
version: 0.0.0-use.local
resolution: "@aztec/bb.js@portal:../../../../barretenberg/ts::locator=%40noir-lang%2Fbackend_barretenberg%40workspace%3Atooling%2Fnoir_js_backend_barretenberg"
dependencies:
comlink: ^4.4.1
commander: ^10.0.1
debug: ^4.3.4
tslib: ^2.4.0
bin:
bb.js: dest/node/main.js
checksum: e5e0095eaff3de45726366726337b131bb6ff7cf2cb53be705572c7d6715dae4c948bf86a03cfad68bc98c0c2d83e64cbe3723cc72260c8dbfa262af8cb81f9b
bb.js: ./dest/node/main.js
languageName: node
linkType: hard
linkType: soft

"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.11, @babel/code-frame@npm:^7.16.0, @babel/code-frame@npm:^7.22.13, @babel/code-frame@npm:^7.23.5, @babel/code-frame@npm:^7.8.3":
version: 7.23.5
Expand Down Expand Up @@ -4396,7 +4395,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@noir-lang/backend_barretenberg@workspace:tooling/noir_js_backend_barretenberg"
dependencies:
"@aztec/bb.js": 0.41.0
"@aztec/bb.js": "portal:../../../../barretenberg/ts"
"@noir-lang/types": "workspace:*"
"@types/node": ^20.6.2
"@types/prettier": ^3
Expand Down

0 comments on commit 3b4efb1

Please sign in to comment.