22 info(
"------- STATS -------");
25 info(stats.to_string(levels));
31void 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");
65bool avm_verify(
const std::filesystem::path& proof_path,
const std::filesystem::path& public_inputs_path)
67 const auto proof = many_from_buffer<fr>(
read_file(proof_path));
71 bool res = avm.
verify(proof, public_inputs);
72 info(
"verification: ", res ?
"success" :
"failure");
94 info(
"Writing AVM verification key to: ", output_path /
"vk");
102 auto proof = avm.
prove(proving_inputs);
114 bool res = avm.
verify(proof, pi);
115 info(
"verification: ", res ?
"success" :
"failure");
127 info(
"circuit check: ", res ?
"success" :
"failure");
AvmVerificationKey get_verification_key()
bool check_circuit(const ProvingInputs &inputs)
bool verify(const AvmProof &proof, const PublicInputs &pi)
AvmProof prove(const ProvingInputs &inputs)
TxSimulationResult simulate_with_hinted_dbs(const AvmProvingInputs &inputs)
Entry point for Barretenberg command-line interface.
bool avm_check_circuit_from_bytes(std::vector< uint8_t > inputs)
Check the AVM circuit from serialized inputs (msgpack bytes).
void avm_simulate(const std::filesystem::path &inputs_path)
Simulates an public transaction.
bool avm_verify_from_bytes(std::vector< bb::fr > proof, std::vector< uint8_t > public_inputs)
Verify an AVM proof from serialized data.
bool avm_verify(const std::filesystem::path &proof_path, const std::filesystem::path &public_inputs_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.
AvmProveResult avm_prove_from_bytes(std::vector< uint8_t > inputs)
Prove an AVM transaction from serialized inputs (msgpack bytes). Callers that need to verify the proo...
void avm_prove(const std::filesystem::path &inputs_path, const std::filesystem::path &output_path)
Writes an avm proof to a file.
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::span< const uint8_t > 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)
Result of in-memory AVM proving.
std::vector< bb::fr > proof