1#ifndef DISABLE_AZTEC_VM
18 info(
"------- STATS -------");
21 info(stats.to_string(levels));
27void avm_prove(
const std::filesystem::path& inputs_path,
const std::filesystem::path& output_path)
31 auto [proof,
vk] = avm.
prove(inputs);
43 bool res = avm.
verify(proof, inputs.publicInputs,
vk);
44 info(
"verification: ", res ?
"success" :
"failure");
46 throw std::runtime_error(
"Generated proof is invalid!!!!!");
56 info(
"circuit check: ", res ?
"success" :
"failure");
63 const std::filesystem::path& public_inputs_path,
64 const std::filesystem::path& vk_path)
66 const auto proof = many_from_buffer<fr>(
read_file(proof_path));
67 std::vector<uint8_t> vk_bytes =
read_file(vk_path);
71 bool res = avm.
verify(proof, public_inputs, vk_bytes);
72 info(
"verification: ", res ?
"success" :
"failure");
bool check_circuit(const ProvingInputs &inputs)
bool verify(const AvmProof &proof, const PublicInputs &pi, const AvmVerificationKey &vk_data)
std::pair< AvmProof, AvmVerificationKey > prove(const ProvingInputs &inputs)
Entry point for Barretenberg command-line interface.
bool avm_verify(const std::filesystem::path &proof_path, const std::filesystem::path &public_inputs_path, const std::filesystem::path &vk_path)
Verifies an avm proof and writes the result to stdout.
void avm_prove(const std::filesystem::path &inputs_path, const std::filesystem::path &output_path)
Writes an avm proof and corresponding (incomplete) verification key to files.
std::vector< uint8_t > read_file(const std::string &filename, size_t bytes=0)
void avm_check_circuit(const std::filesystem::path &inputs_path)
void write_file(const std::string &filename, std::vector< uint8_t > const &data)
VerifierCommitmentKey< Curve > vk
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
std::vector< uint8_t > to_buffer(T const &value)