From 28b87566962e6e65f052185cae77a351d7d9e2c8 Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Fri, 3 May 2024 14:08:34 +0000 Subject: [PATCH] Comments --- noir/Earthfile | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/noir/Earthfile b/noir/Earthfile index 6a28c59e6c8..8a4db6aee43 100644 --- a/noir/Earthfile +++ b/noir/Earthfile @@ -89,7 +89,7 @@ build-acir-tests: COPY ./noir-repo/test_programs/ /usr/src/noir-repo/test_programs/ RUN /usr/src/noir-repo/target/release/nargo --version # We run this with parallel compilation switched off, which isn't ideal. - # There seems to be problems with this when running under Earthly + # There seems to be problems with this when running under Earthly, see bottom of this file* RUN ./rebuild.sh true SAVE ARTIFACT /usr/src/noir-repo/test_programs/acir_artifacts/* @@ -214,3 +214,43 @@ barretenberg-acir-tests-bb.js: # # Don't waste time pushing a huge container back to ECR as nothing needs the output. # FROM scratch # COPY --from=0 /usr/src/noir/README.md /usr/src/noir/README.md + + + +#* Analysis of compiling Acir tests inside/outside Earthly +# Each test run compiles the full suite, either in series or in parallel, either inside or outside Earthly. +# Each test prints the contents of the target directory of the eddsa circuit after compilation +# You can see that the 'Inside Earthly Parallel' run has an acir.gz file of a different size +# This results in a proof that fails verification +# +# Outside Earthly Parallel + +# [eddsa] Circuit witness successfully solved +# [eddsa] Witness saved to /mnt/user-data/phil/aztec3-packages/noir/noir-repo/test_programs/execution_success/eddsa/target/witness.gz +# total 2544 +# -rw-rw-r-- 1 phil phil 904034 May 3 10:40 acir.gz +# -rw-rw-r-- 1 phil phil 1696442 May 3 10:40 witness.gz + +# Outside Earthly Series + +# [eddsa] Circuit witness successfully solved +# [eddsa] Witness saved to /mnt/user-data/phil/aztec3-packages/noir/noir-repo/test_programs/execution_success/eddsa/target/witness.gz +# total 2544 +# -rw-rw-r-- 1 phil phil 904034 May 3 10:43 acir.gz +# -rw-rw-r-- 1 phil phil 1696442 May 3 10:43 witness.gz + +# Inside Earthly Parallel + +# +build-acir-tests | [eddsa] Circuit witness successfully solved +# +build-acir-tests | [eddsa] Witness saved to /usr/src/noir-repo/test_programs/execution_success/eddsa/target/witness.gz +# +build-acir-tests | total 2472 +# +build-acir-tests | -rw-r--r-- 1 root root 830340 May 3 10:47 acir.gz +# +build-acir-tests | -rw-r--r-- 1 root root 1696442 May 3 10:47 witness.gz + +# Inside Earthly Series + +# +build-acir-tests | [eddsa] Circuit witness successfully solved +# +build-acir-tests | [eddsa] Witness saved to /usr/src/noir-repo/test_programs/execution_success/eddsa/target/witness.gz +# +build-acir-tests | total 2544 +# +build-acir-tests | -rw-r--r-- 1 root root 904034 May 3 10:50 acir.gz +# +build-acir-tests | -rw-r--r-- 1 root root 1696442 May 3 10:51 witness.gz