26 std::vector<fr> vk_as_fields = many_from_buffer<AvmFlavorSettings::FF>(vk_data);
28 std::span vk_span(vk_as_fields);
30 vinfo(
"vk fields size: ", vk_as_fields.size());
33 for (
size_t i = 0; i < VerificationKey::NUM_PRECOMPUTED_COMMITMENTS; i++) {
35 precomputed_cmts[i] = FrCodec::deserialize_from_fields<VerificationKey::Commitment>(
44 auto verification_key =
47 vinfo(
"AVM vk hash: ", verification_key->hash());
49 auto serialized_vk =
to_buffer(verification_key->to_field_elements());
60 auto verification_key =
64 AvmProver(proving_key, verification_key, proving_key->commitment_key));
66 auto proof =
AVM_TRACK_TIME_V(
"proving/construct_proof", prover.construct_proof());
67 auto serialized_vk =
to_buffer(verification_key->to_field_elements());
78 const size_t num_rows =
trace.get_num_rows_without_clk() + 1;
79 const bool skippable_enabled = (getenv(
"AVM_DISABLE_SKIPPABLE") ==
nullptr);
80 vinfo(
"Running check ",
81 skippable_enabled ?
"(with skippable)" :
"(without skippable)",
91 }
catch (std::runtime_error& e) {
94 vinfo(
"Circuit check failed: ", e.what());
Base Native verification key class.
static constexpr size_t NUM_FRS_COM
VkData get_verification_key()
std::vector< uint8_t > VkData
bool verify(const Proof &proof, const PublicInputs &pi)
Proof prove(tracegen::TraceContainer &&trace)
bool check_circuit(tracegen::TraceContainer &&trace)
static std::shared_ptr< AvmVerifier::VerificationKey > create_verification_key(const VkData &vk_data)
Flavor::VerificationKey VerificationKey
static constexpr std::array< Commitment, VerificationKey::NUM_PRECOMPUTED_COMMITMENTS > get_all()
AvmProver::ProverPolynomials compute_polynomials(tracegen::TraceContainer &trace)
std::shared_ptr< AvmProver::ProvingKey > proving_key_from_polynomials(AvmProver::ProverPolynomials &polynomials)
void run_check_circuit(AvmFlavor::ProverPolynomials &polys, size_t num_rows, bool skippable_enabled)
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_V(key, body)
#define AVM_TRACK_TIME(key, body)