21 info(
"------- STATS -------");
24 info(stats.to_string(levels));
30void avm_prove(
const std::filesystem::path& inputs_path,
const std::filesystem::path& output_path)
47 info(
"verification: ", res ?
"success" :
"failure");
49 throw std::runtime_error(
"Generated proof is invalid!!!!!");
59 info(
"circuit check: ", res ?
"success" :
"failure");
66 const std::filesystem::path& public_inputs_path,
67 const std::filesystem::path& vk_path)
69 const auto proof = many_from_buffer<fr>(
read_file(proof_path));
70 std::vector<uint8_t> vk_bytes =
read_file(vk_path);
74 bool res = avm.
verify(proof, public_inputs, vk_bytes);
75 info(
"verification: ", res ?
"success" :
"failure");
97 info(
"Writing AVM verification key to: ", output_path /
"vk");
AvmVerificationKey get_verification_key()
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)
TxSimulationResult simulate_with_hinted_dbs(const AvmProvingInputs &inputs)
Entry point for Barretenberg command-line interface.
void avm_simulate(const std::filesystem::path &inputs_path)
Simulates an public transaction.
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_write_verification_key(const std::filesystem::path &output_path)
Writes an avm (incomplete) verification key to a file.
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)
Stub - throws runtime error if called.
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)
#define AVM_TRACK_TIME(key, body)