From 3f40dab200f8af12258b0a12beda0d32a596a45d Mon Sep 17 00:00:00 2001 From: maramihali Date: Tue, 11 Jun 2024 15:56:35 +0000 Subject: [PATCH 1/3] remove vk hacks and add new flow to Earthfile --- barretenberg/Earthfile | 2 ++ .../barretenberg/commitment_schemes/zeromorph/zeromorph.hpp | 5 +++-- barretenberg/cpp/src/barretenberg/eccvm/eccvm_verifier.cpp | 6 ------ 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/barretenberg/Earthfile b/barretenberg/Earthfile index aee3da1a942..ab0f71b4fe2 100644 --- a/barretenberg/Earthfile +++ b/barretenberg/Earthfile @@ -42,6 +42,8 @@ barretenberg-acir-tests-bb: RUN FLOW=prove_and_verify_mega_honk_program ./run_acir_tests.sh # Fold and verify an ACIR program stack using ClientIvc RUN FLOW=fold_and_verify_program ./run_acir_tests.sh fold_basic + # Fold and verify an ACIR program stack using ClientIvc + RUN FLOW=prove_then_verify_tube ./run_acir_tests.sh fold_basic # Construct and separately verify a UltraHonk proof for a single program that recursively verifies a Honk proof RUN FLOW=prove_then_verify_ultra_honk ./run_acir_tests.sh verify_honk_proof # Construct and verify a UltraHonk proof for a single program that recursively verifies a Honk proof diff --git a/barretenberg/cpp/src/barretenberg/commitment_schemes/zeromorph/zeromorph.hpp b/barretenberg/cpp/src/barretenberg/commitment_schemes/zeromorph/zeromorph.hpp index 4eba2c2edd9..fe8947cbf01 100644 --- a/barretenberg/cpp/src/barretenberg/commitment_schemes/zeromorph/zeromorph.hpp +++ b/barretenberg/cpp/src/barretenberg/commitment_schemes/zeromorph/zeromorph.hpp @@ -40,8 +40,9 @@ template class ZeroMorphProver_ { using Polynomial = bb::Polynomial; // TODO(#742): Set this N_max to be the number of G1 elements in the mocked zeromorph SRS once it's in place. - // (Then, eventually, set it based on the real SRS). For now we set it to be large but more or less arbitrary. - static const size_t N_max = 1 << 23; + // (Then, eventually, set it based on the real SRS). For now we set it to be larger then the Client IVC recursive + // verifier circuit. + static const size_t N_max = 1 << 25; public: /** diff --git a/barretenberg/cpp/src/barretenberg/eccvm/eccvm_verifier.cpp b/barretenberg/cpp/src/barretenberg/eccvm/eccvm_verifier.cpp index c95d025818c..8cc715a97c5 100644 --- a/barretenberg/cpp/src/barretenberg/eccvm/eccvm_verifier.cpp +++ b/barretenberg/cpp/src/barretenberg/eccvm/eccvm_verifier.cpp @@ -21,12 +21,6 @@ bool ECCVMVerifier::verify_proof(const HonkProof& proof) for (auto [comm, label] : zip_view(commitments.get_wires(), commitment_labels.get_wires())) { comm = transcript->template receive_from_prover(label); - // TODO(https://github.com/AztecProtocol/barretenberg/issues/1017): This is a hack to ensure zero commitments - // are still on curve as the transcript doesn't currently support a point at infinity representation for - // cycle_group - if (!comm.on_curve()) { - comm.self_set_infinity(); - } } // Get challenge for sorted list batching and wire four memory records From 3e45cd4622232042ef5637e2ed00e58dde482302 Mon Sep 17 00:00:00 2001 From: maramihali Date: Tue, 11 Jun 2024 16:14:06 +0000 Subject: [PATCH 2/3] update description --- barretenberg/Earthfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/barretenberg/Earthfile b/barretenberg/Earthfile index ab0f71b4fe2..73dc1443992 100644 --- a/barretenberg/Earthfile +++ b/barretenberg/Earthfile @@ -42,7 +42,7 @@ barretenberg-acir-tests-bb: RUN FLOW=prove_and_verify_mega_honk_program ./run_acir_tests.sh # Fold and verify an ACIR program stack using ClientIvc RUN FLOW=fold_and_verify_program ./run_acir_tests.sh fold_basic - # Fold and verify an ACIR program stack using ClientIvc + # Fold and verify an ACIR program stack using ClientIvc, recursively verify as part of the Tube circuit and produce and verify a Honk proof RUN FLOW=prove_then_verify_tube ./run_acir_tests.sh fold_basic # Construct and separately verify a UltraHonk proof for a single program that recursively verifies a Honk proof RUN FLOW=prove_then_verify_ultra_honk ./run_acir_tests.sh verify_honk_proof From 2d92b32e98869b37a82598c483d63005f06681d7 Mon Sep 17 00:00:00 2001 From: maramihali Date: Tue, 11 Jun 2024 17:16:16 +0000 Subject: [PATCH 3/3] fix prove_then_verify_tube flow by creating required folder --- barretenberg/acir_tests/flows/prove_then_verify_mega_honk.sh | 2 ++ barretenberg/acir_tests/flows/prove_then_verify_tube.sh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/barretenberg/acir_tests/flows/prove_then_verify_mega_honk.sh b/barretenberg/acir_tests/flows/prove_then_verify_mega_honk.sh index 29d2a6338d8..84608cac7ec 100755 --- a/barretenberg/acir_tests/flows/prove_then_verify_mega_honk.sh +++ b/barretenberg/acir_tests/flows/prove_then_verify_mega_honk.sh @@ -1,6 +1,8 @@ #!/bin/sh set -eu +mkdir -p ./proofs + VFLAG=${VERBOSE:+-v} BFLAG="-b ./target/program.json" FLAGS="-c $CRS_PATH $VFLAG" diff --git a/barretenberg/acir_tests/flows/prove_then_verify_tube.sh b/barretenberg/acir_tests/flows/prove_then_verify_tube.sh index 302fdfcf603..c73babf27c1 100755 --- a/barretenberg/acir_tests/flows/prove_then_verify_tube.sh +++ b/barretenberg/acir_tests/flows/prove_then_verify_tube.sh @@ -1,6 +1,8 @@ #!/bin/sh set -eux +mkdir -p ./proofs + VFLAG=${VERBOSE:+-v} $BIN client_ivc_prove_output_all $VFLAG -c $CRS_PATH -b ./target/program.json