Skip to content

Commit

Permalink
chore: Dont generate vks for simulated circuits (#9625)
Browse files Browse the repository at this point in the history
Please read [contributing guidelines](CONTRIBUTING.md) and remove this
line.
  • Loading branch information
sirasistant authored Oct 31, 2024
1 parent 97a4c0c commit 366eff3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions noir-projects/noir-protocol-circuits/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,26 @@ esac
# This value may be too low.
# If vk generation fail with an amount of free memory greater than this value then it should be increased.
MIN_PARALLEL_VK_GENERATION_MEMORY=500000000
PARALLEL_VK=${PARALLEL_VK:-true}
PARALLEL_VK=${PARALLEL_VK:-false}

if [[ AVAILABLE_MEMORY -gt MIN_PARALLEL_VK_GENERATION_MEMORY ]] && [[ $PARALLEL_VK == "true" ]]; then
echo "Generating vks in parallel..."
for pathname in "./target"/*.json; do
BB_HASH=$BB_HASH node ../scripts/generate_vk_json.js "$pathname" "./target/keys" &
if [[ $pathname != *"_simulated"* ]]; then
BB_HASH=$BB_HASH node ../scripts/generate_vk_json.js "$pathname" "./target/keys" &
fi
done

for job in $(jobs -p); do
wait $job || exit 1
done

else
echo "System does not have enough memory for parallel vk generation, falling back to sequential"
echo "Generating VKs sequentially..."

for pathname in "./target"/*.json; do
if [[ $pathname != *"_simulated"* ]]; then
BB_HASH=$BB_HASH node ../scripts/generate_vk_json.js "$pathname" "./target/keys"
fi
done
fi

0 comments on commit 366eff3

Please sign in to comment.