Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(bootstrap): include crates in noir projects hashes take 2 #11351

Merged
merged 2 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions noir-projects/noir-contracts/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ function compile {
../../noir/.rebuild_patterns \
../../avm-transpiler/.rebuild_patterns \
"^noir-projects/noir-contracts/contracts/$contract/" \
"^noir-projects/noir-protocol-circuits/crates" \
TomAFrench marked this conversation as resolved.
Show resolved Hide resolved
"^noir-projects/aztec-nr/" \
)"
if ! cache_download contract-$contract_hash.tar.gz &> /dev/null; then
Expand Down
10 changes: 4 additions & 6 deletions noir-projects/noir-protocol-circuits/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export BB=${BB:-../../barretenberg/cpp/build/bin/bb}
export NARGO=${NARGO:-../../noir/noir-repo/target/release/nargo}
export BB_HASH=$(cache_content_hash ../../barretenberg/cpp/.rebuild_patterns)
export NARGO_HASH=$(cache_content_hash ../../noir/.rebuild_patterns)
export CRATES_HASH=$(cache_content_hash crates)

# Set flags for parallel
export PARALLELISM=${PARALLELISM:-16}
Expand Down Expand Up @@ -42,6 +41,7 @@ rollup_honk_patterns=(
"rollup_merge"
)


ivc_regex=$(IFS="|"; echo "${ivc_patterns[*]}")
rollup_honk_regex=$(IFS="|"; echo "${rollup_honk_patterns[*]}")

Expand All @@ -65,12 +65,10 @@ function compile {
local json_path="./target/$filename"
local program_hash hash bytecode_hash vk vk_fields
local program_hash_cmd="$NARGO check --package $name --silence-warnings --show-program-hash | cut -d' ' -f2"
# echo_stderr $program_hash_cmd
program_hash=$(dump_fail "$program_hash_cmd")
echo_stderr "Hash preimage: $NARGO_HASH-$CRATES_HASH-$program_hash"
# We include CRATES_HASH as --show-program-hash does not do a good job at hashing dependencies.
# TODO(ci3) we may need to do a less granular hash if this doesn't work out.
hash=$(hash_str "$NARGO_HASH-$CRATES_HASH-$program_hash")

echo_stderr "Hash preimage: $NARGO_HASH-$program_hash"
hash=$(hash_str "$NARGO_HASH-$program_hash")
if ! cache_download circuit-$hash.tar.gz 1>&2; then
SECONDS=0
rm -f $json_path
Expand Down
Loading