22 bool verified = ivc.
verify(proof);
26 info(
"IVC successfully verified!");
28 info(
"IVC failed to verify.");
39 size_t num_app_circuits,
auto& precomputed_vks,
const bool large_first_app =
true)
41 PrivateFunctionExecutionMockCircuitProducer circuit_producer(num_app_circuits, large_first_app);
42 const size_t NUM_CIRCUITS = circuit_producer.total_num_circuits;
44 ClientIVC ivc{ NUM_CIRCUITS, trace_settings };
46 BB_ASSERT_EQ(precomputed_vks.size(), NUM_CIRCUITS,
"There should be a precomputed VK for each circuit");
48 for (
size_t circuit_idx = 0; circuit_idx < NUM_CIRCUITS; ++circuit_idx) {
52 circuit = circuit_producer.create_next_circuit(ivc);
55 ivc.accumulate(circuit, precomputed_vks[circuit_idx]);
57 return { ivc.prove(), ivc.get_vk() };
61 const bool large_first_app =
true)
63 using CircuitProducer = PrivateFunctionExecutionMockCircuitProducer;
64 CircuitProducer circuit_producer(num_app_circuits, large_first_app);
65 const size_t NUM_CIRCUITS = circuit_producer.total_num_circuits;
67 ClientIVC ivc{ NUM_CIRCUITS, trace_settings };
70 for (
size_t j = 0; j < NUM_CIRCUITS; ++j) {
72 auto circuit = circuit_producer.create_next_circuit(ivc);
75 if (j == NUM_CIRCUITS - 1) {
78 auto vk = CircuitProducer::get_verification_key(circuit, trace_settings);
80 ivc.accumulate(circuit,
vk);
#define BB_ASSERT_EQ(actual, expected,...)
The IVC scheme used by the aztec client for private function execution.
static bool verify(const Proof &proof, const VerificationKey &vk)
Entry point for Barretenberg command-line interface.
std::pair< ClientIVC::Proof, ClientIVC::VerificationKey > accumulate_and_prove_ivc_with_precomputed_vks(size_t num_app_circuits, auto &precomputed_vks, const bool large_first_app=true)
Perform a specified number of circuit accumulation rounds.
std::vector< std::shared_ptr< typename MegaFlavor::VerificationKey > > precompute_vks(const size_t num_app_circuits, const bool large_first_app=true)
bool verify_ivc(ClientIVC::Proof &proof, ClientIVC &ivc)
Verify an IVC proof.
VerifierCommitmentKey< Curve > vk
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
#define PROFILE_THIS_NAME(name)
A full proof for the IVC scheme containing a Mega proof showing correctness of the hiding circuit (wh...