Skip to content

Commit 9e53e1f

Browse files
committed
revert two bad automerges.
1 parent eaf895b commit 9e53e1f

5 files changed

Lines changed: 38 additions & 121 deletions

File tree

avm-transpiler/Cargo.lock

Lines changed: 29 additions & 86 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bootstrap.sh

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -397,33 +397,6 @@ function prep {
397397
pull_submodules
398398
}
399399

400-
# Fail loudly if the build left any committed yarn.lock rewritten.
401-
#
402-
# A submodule or dependency bump that changes resolved versions but forgets to
403-
# regenerate the lockfile would otherwise drift silently: the build runs
404-
# `yarn install`, which rewrites the lockfile in the container and proceeds, so
405-
# nothing fails even though the committed lockfile is stale. The node-modules
406-
# cache_content_hash includes yarn.lock, but it is computed at install *start*,
407-
# so a rewrite during the build is never re-checked. This gate runs after the
408-
# build and turns such a desync (e.g. a noir-repo bump that forgot
409-
# yarn-project/yarn.lock) into a hard CI failure.
410-
function check_lockfiles {
411-
echo_header "lockfile drift check"
412-
local drifted
413-
drifted=$(git diff --name-only | grep -E '(^|/)yarn\.lock$' || true)
414-
if [ -n "$drifted" ]; then
415-
echo_stderr "ERROR: committed yarn.lock(s) were rewritten by the build:"
416-
echo_stderr "$drifted"
417-
git --no-pager diff -- $drifted >&2
418-
echo_stderr ""
419-
echo_stderr "A dependency or submodule bump changed resolved versions without committing the"
420-
echo_stderr "updated lockfile (e.g. a noir-repo bump that forgot yarn-project/yarn.lock)."
421-
echo_stderr "Regenerate and commit it: cd <project> && yarn install, then commit yarn.lock."
422-
exit 1
423-
fi
424-
echo "No lockfile drift detected."
425-
}
426-
427400
function build {
428401
prep
429402
echo_header "build"
@@ -771,22 +744,19 @@ case "$cmd" in
771744
export USE_TEST_CACHE=1
772745
export CI_FULL=0
773746
build_and_test fast
774-
check_lockfiles
775747
;;
776748
"ci-full")
777749
export CI=1
778750
export USE_TEST_CACHE=1
779751
export CI_FULL=1
780752
build_and_test full
781-
check_lockfiles
782753
bench
783754
;;
784755
"ci-full-no-test-cache")
785756
export CI=1
786757
export USE_TEST_CACHE=0
787758
export CI_FULL=1
788759
build_and_test full
789-
check_lockfiles
790760
bench
791761
;;
792762
"ci-chonk-input-update")

noir-projects/aztec-nr/aztec/src/note/note_getter.nr

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,9 @@ where
258258
};
259259
}
260260

261-
BoundedVec::from_parts(confirmed_notes_bvec_storage, hinted_notes.len())
261+
// We can use `from_parts_unchecked` instead of `from_parts` because we know that `confirmed_notes_bvec_storage`
262+
// contains all zeroes past `hinted_notes.len()` due to how it was initialized.
263+
BoundedVec::from_parts_unchecked(confirmed_notes_bvec_storage, hinted_notes.len())
262264
}
263265

264266
pub unconstrained fn view_note<Note>(owner: Option<AztecAddress>, storage_slot: Field) -> HintedNote<Note>

noir-projects/aztec-nr/aztec/src/utils/array/subbvec.nr

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ pub fn subbvec<T, let SrcMaxLen: u32, let DstMaxLen: u32>(
1919
bvec: BoundedVec<T, SrcMaxLen>,
2020
offset: u32,
2121
) -> BoundedVec<T, DstMaxLen> {
22-
// The new storage array is a subarray of the original one (which has zeroed storage past len), so elements past
23-
// the new len remain zeroed: `subarray` does not allow extending arrays past their original length.
24-
BoundedVec::from_parts(array::subarray(bvec.storage(), offset), bvec.len() - offset)
22+
// from_parts_unchecked does not verify that the elements past len are zeroed, but that is not an issue in our case
23+
// because we're constructing the new storage array as a subarray of the original one (which should have zeroed
24+
// storage past len), guaranteeing correctness. This is because `subarray` does not allow extending arrays past
25+
// their original length.
26+
BoundedVec::from_parts_unchecked(array::subarray(bvec.storage(), offset), bvec.len() - offset)
2527
}
2628

2729
mod test {

noir/noir-repo

Submodule noir-repo updated 1074 files

0 commit comments

Comments
 (0)