Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
flavor.hpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: Planned, auditors: [], commit: }
3// external_1: { status: not started, auditors: [], commit: }
4// external_2: { status: not started, auditors: [], commit: }
5// =====================
6
72#pragma once
91
92#include <array>
93#include <concepts>
94#include <cstddef>
95#include <numeric>
96#include <utility>
97#include <vector>
98
99namespace bb {
100
105 FULL, // Serialize all metadata (log_circuit_size, num_public_inputs, pub_inputs_offset)
106 NO_METADATA // Serialize only commitments, no metadata
107};
108
112struct MetaData {
113 size_t dyadic_size = 0; // power-of-2 size of the execution trace
116};
117
121template <typename Polynomial, size_t NUM_PRECOMPUTED_ENTITIES> struct PrecomputedData_ {
122 RefArray<Polynomial, NUM_PRECOMPUTED_ENTITIES> polynomials; // polys whose commitments comprise the VK
123 MetaData metadata; // execution trace metadata
124};
125
135template <typename PrecomputedCommitments, typename HashType, typename HardcodedVKAndHash>
136class FixedVKAndHash_ : public PrecomputedCommitments {
137 public:
138 using Commitment = typename PrecomputedCommitments::DataType;
139
140 bool operator==(const FixedVKAndHash_&) const = default;
141
142 // Default construct the fixed VK from hardcoded commitments and precomputed hash
144 : hash(HardcodedVKAndHash::vk_hash())
145 {
146 for (auto [vk_commitment, fixed_commitment] : zip_view(this->get_all(), HardcodedVKAndHash::get_all())) {
147 vk_commitment = fixed_commitment;
148 }
149 }
150
151 HashType get_hash() const { return hash; }
152
153 private:
154 HashType hash{};
155};
156
167template <typename PrecomputedCommitments,
168 typename Codec,
169 typename HashFunction,
170 typename CommitmentKey = void,
172class NativeVerificationKey_ : public PrecomputedCommitments {
173 public:
174 using Commitment = typename PrecomputedCommitments::DataType;
175 using DataType = typename Codec::DataType;
176 uint64_t log_circuit_size = 0;
177 uint64_t num_public_inputs = 0;
178 uint64_t pub_inputs_offset = 0;
179 bool operator==(const NativeVerificationKey_&) const = default;
180
181#ifndef NDEBUG
182 template <size_t NUM_PRECOMPUTED_ENTITIES, typename StringType>
185 {
186 bool is_equal = true;
187
188 if (this->log_circuit_size != other.log_circuit_size) {
189 info("Log circuit size mismatch: ", this->log_circuit_size, " vs ", other.log_circuit_size);
190 is_equal = false;
191 }
192
193 if (this->num_public_inputs != other.num_public_inputs) {
194 info("Num public inputs mismatch: ", this->num_public_inputs, " vs ", other.num_public_inputs);
195 is_equal = false;
196 }
197
198 if (this->pub_inputs_offset != other.pub_inputs_offset) {
199 info("Pub inputs offset mismatch: ", this->pub_inputs_offset, " vs ", other.pub_inputs_offset);
200 is_equal = false;
201 }
202
203 for (auto [this_comm, other_comm, label] : zip_view(this->get_all(), other.get_all(), commitment_labels)) {
204 if (this_comm != other_comm) {
205 info("Commitment mismatch: ", label);
206 is_equal = false;
207 }
208 }
209 return is_equal;
210 }
211#endif
212
213 virtual ~NativeVerificationKey_() = default;
215 NativeVerificationKey_(const size_t circuit_size, const size_t num_public_inputs)
216 : log_circuit_size(numeric::get_msb(circuit_size))
218
223 template <typename PrecomputedData>
225 explicit NativeVerificationKey_(const PrecomputedData& precomputed)
226 : log_circuit_size(numeric::get_msb(precomputed.metadata.dyadic_size))
227 , num_public_inputs(precomputed.metadata.num_public_inputs)
228 , pub_inputs_offset(precomputed.metadata.pub_inputs_offset)
229 {
230 CommitmentKey commitment_key{ precomputed.metadata.dyadic_size };
231 for (auto [polynomial, commitment] : zip_view(precomputed.polynomials, this->get_all())) {
232 commitment = commitment_key.commit(polynomial);
233 }
234 }
235
240 static size_t calc_num_data_types()
241 {
242 // Create a temporary instance to get the number of precomputed entities
243 size_t commitments_size = PrecomputedCommitments::size() * Codec::template calc_num_fields<Commitment>();
244 size_t metadata_size = 0;
245 if constexpr (SerializeMetadata == VKSerializationMode::FULL) {
246 // 3 metadata fields + commitments
247 metadata_size = 3 * Codec::template calc_num_fields<uint64_t>();
248 }
249 // else NO_METADATA: metadata_size remains 0
250 return metadata_size + commitments_size;
251 }
252
258 virtual std::vector<DataType> to_field_elements() const
259 {
260
261 auto serialize = [](const auto& input, std::vector<DataType>& buffer) {
262 std::vector<DataType> input_fields = Codec::serialize_to_fields(input);
263 buffer.insert(buffer.end(), input_fields.begin(), input_fields.end());
264 };
265
266 std::vector<DataType> elements;
267
268 if constexpr (SerializeMetadata == VKSerializationMode::FULL) {
269 serialize(this->log_circuit_size, elements);
270 serialize(this->num_public_inputs, elements);
271 serialize(this->pub_inputs_offset, elements);
272 }
273 // else NO_METADATA: skip metadata serialization
274
275 for (const Commitment& commitment : this->get_all()) {
276 serialize(commitment, elements);
277 }
278
279 return elements;
280 };
281
287 {
288
289 size_t idx = 0;
290 auto deserialize = [&idx, &elements]<typename T>(T& target) {
291 size_t size = Codec::template calc_num_fields<T>();
292 target = Codec::template deserialize_from_fields<T>(elements.subspan(idx, size));
293 idx += size;
294 };
295
296 if constexpr (SerializeMetadata == VKSerializationMode::FULL) {
297 deserialize(this->log_circuit_size);
298 deserialize(this->num_public_inputs);
299 deserialize(this->pub_inputs_offset);
300 }
301 // else NO_METADATA: skip metadata deserialization
302
303 for (Commitment& commitment : this->get_all()) {
304 deserialize(commitment);
305 }
306 return idx;
307 }
308
313 fr hash() const
314 {
315 fr vk_hash = HashFunction::hash(this->to_field_elements());
316 return vk_hash;
317 }
318
330 {
331 static constexpr bool in_circuit = InCircuit<DataType>;
332 std::vector<DataType> vk_elements;
333
334 // Tag, serialize, and append to vk_elements
335 auto tag_and_append = [&]<typename T>(const T& component) {
336 auto frs = bb::tag_and_serialize<in_circuit, Codec>(component, tag);
337 vk_elements.insert(vk_elements.end(), frs.begin(), frs.end());
338 };
339
340 // Tag and serialize VK metadata
341 tag_and_append(this->log_circuit_size);
342 tag_and_append(this->num_public_inputs);
343 tag_and_append(this->pub_inputs_offset);
344
345 // Tag and serialize VK commitments
346 for (const Commitment& commitment : this->get_all()) {
347 tag_and_append(commitment);
348 }
349
350 // Sanitize free witness tags before hashing
351 bb::unset_free_witness_tags<in_circuit, DataType>(vk_elements);
352
353 // Hash the tagged elements directly
354 return HashFunction::hash(vk_elements);
355 }
356
363 template <typename Transcript> DataType hash_with_origin_tagging(const Transcript& transcript) const
364 {
365 const OriginTag tag = bb::extract_transcript_tag(transcript);
367 }
368};
369
379template <typename Builder_, typename PrecomputedCommitments, typename NativeVerificationKey>
380class FixedStdlibVKAndHash_ : public PrecomputedCommitments {
381 public:
382 using Builder = Builder_;
383 using Commitment = typename PrecomputedCommitments::DataType;
385
386 bool operator==(const FixedStdlibVKAndHash_&) const = default;
388
393 : hash(FF::from_witness(builder, native_key->get_hash()))
394 {
395 for (auto [native_comm, comm] : zip_view(native_key->get_all(), this->get_all())) {
396 comm = Commitment::from_witness(builder, native_comm);
397 }
398 // Fix all witnesses since fixed VKs are always constant
400 for (Commitment& commitment : this->get_all()) {
401 commitment.fix_witness();
402 }
403 }
404
405 FF get_hash() const { return hash; }
406
407 private:
409};
410
419template <typename Builder_,
420 typename PrecomputedCommitments,
421 typename NativeVerificationKey_ = void,
423class StdlibVerificationKey_ : public PrecomputedCommitments {
424 public:
425 using Builder = Builder_;
427 using Commitment = typename PrecomputedCommitments::DataType;
433
434 bool operator==(const StdlibVerificationKey_&) const = default;
435 virtual ~StdlibVerificationKey_() = default;
437
442 template <typename T = NativeVerificationKey_>
443 requires(!std::is_void_v<T>)
445 : log_circuit_size(FF::from_witness(builder, typename FF::native(native_key->log_circuit_size)))
446 , num_public_inputs(FF::from_witness(builder, typename FF::native(native_key->num_public_inputs)))
447 , pub_inputs_offset(FF::from_witness(builder, typename FF::native(native_key->pub_inputs_offset)))
448 {
449
450 for (auto [commitment, native_commitment] : zip_view(this->get_all(), native_key->get_all())) {
451 commitment = Commitment::from_witness(builder, native_commitment);
452 }
453 }
454
459 {
460 using Codec = stdlib::StdlibCodec<FF>;
461
462 size_t num_frs_read = 0;
463
464 this->log_circuit_size = Codec::template deserialize_from_frs<FF>(elements, num_frs_read);
465 this->num_public_inputs = Codec::template deserialize_from_frs<FF>(elements, num_frs_read);
466 this->pub_inputs_offset = Codec::template deserialize_from_frs<FF>(elements, num_frs_read);
467
468 for (Commitment& commitment : this->get_all()) {
469 commitment = Codec::template deserialize_from_frs<Commitment>(elements, num_frs_read);
470 }
471 }
472
477 const std::span<const uint32_t>& witness_indices)
478 {
479 std::vector<FF> vk_fields;
480 vk_fields.reserve(witness_indices.size());
481 for (const auto& idx : witness_indices) {
482 vk_fields.emplace_back(FF::from_witness_index(&builder, idx));
483 }
484 return StdlibVerificationKey_(vk_fields);
485 }
486
491 {
492 this->log_circuit_size.fix_witness();
493 this->num_public_inputs.fix_witness();
494 this->pub_inputs_offset.fix_witness();
495 for (Commitment& commitment : this->get_all()) {
496 commitment.fix_witness();
497 }
498 }
499
500#ifndef NDEBUG
505 template <typename T = NativeVerificationKey_>
506 requires(!std::is_void_v<T>)
507 T get_value() const
508 {
509 T native_vk;
510 native_vk.log_circuit_size = static_cast<uint64_t>(this->log_circuit_size.get_value());
511 native_vk.num_public_inputs = static_cast<uint64_t>(this->num_public_inputs.get_value());
512 native_vk.pub_inputs_offset = static_cast<uint64_t>(this->pub_inputs_offset.get_value());
513 for (auto [commitment, native_commitment] : zip_view(this->get_all(), native_vk.get_all())) {
514 native_commitment = commitment.get_value();
515 }
516 return native_vk;
517 }
518#endif
519
531 {
532 using Codec = stdlib::StdlibCodec<FF>;
533 static constexpr bool in_circuit = true; // StdlibVerificationKey_ is always in-circuit
534 std::vector<FF> vk_elements;
535
536 // Tag, serialize, and append to vk_elements
537 auto append_tagged = [&]<typename T>(const T& component) {
538 auto frs = bb::tag_and_serialize<in_circuit, Codec>(component, tag);
539 vk_elements.insert(vk_elements.end(), frs.begin(), frs.end());
540 };
541
542 // Tag and serialize VK metadata
543 append_tagged(this->log_circuit_size);
544 append_tagged(this->num_public_inputs);
545 append_tagged(this->pub_inputs_offset);
546
547 // Tag and serialize VK commitments
548 for (const Commitment& commitment : this->get_all()) {
549 append_tagged(commitment);
550 }
551
552 // Sanitize free witness tags before hashing
553 bb::unset_free_witness_tags<in_circuit, FF>(vk_elements);
554
555 // Hash the tagged elements directly
556 return stdlib::poseidon2<Builder>::hash(vk_elements);
557 }
558
565 template <typename Transcript> FF hash_with_origin_tagging(const Transcript& transcript) const
566 {
567 const OriginTag tag = bb::extract_transcript_tag(transcript);
569 }
570};
571
591template <typename FF, typename VerificationKey> class VKAndHash_ {
592 public:
593 template <typename T = VerificationKey>
594 using Builder = typename std::enable_if_t<requires { typename T::Builder; }, T>::Builder;
595
596 template <typename T = VerificationKey>
598 typename std::enable_if_t<requires { typename T::NativeVerificationKey; }, T>::NativeVerificationKey;
599
600 VKAndHash_() = default;
601
605 VKAndHash_(const std::shared_ptr<VerificationKey>& vk)
606 : vk(vk)
607 , hash(vk->hash())
608 {}
609
613 VKAndHash_(const std::shared_ptr<VerificationKey>& vk, const FF& hash)
614 : vk(vk)
615 , hash(hash)
616 {}
617
621 template <typename VK = VerificationKey,
622 typename B = typename VK::Builder,
623 typename NVK = typename VK::NativeVerificationKey>
625 : vk(std::make_shared<VerificationKey>(&builder, native_vk))
626 , hash(FF::from_witness(&builder, native_vk->hash()))
627 {}
628 std::shared_ptr<VerificationKey> vk;
630};
631
637template <typename Tuple> constexpr size_t compute_max_partial_relation_length()
638{
640 return []<std::size_t... Is>(std::index_sequence<Is...>) {
641 return std::max({ std::tuple_element_t<Is, Tuple>::RELATION_LENGTH... });
642 }(seq);
643}
644
648template <typename Tuple> constexpr size_t compute_number_of_subrelations()
649{
651 return []<std::size_t... I>(std::index_sequence<I...>) {
652 return (0 + ... + std::tuple_element_t<I, Tuple>::SUBRELATION_PARTIAL_LENGTHS.size());
653 }(seq);
654}
655
662template <typename RelationsTuple> constexpr auto create_sumcheck_tuple_of_tuples_of_univariates()
663{
665 return []<size_t... I>(std::index_sequence<I...>) {
667 typename std::tuple_element_t<I, RelationsTuple>::SumcheckTupleOfUnivariatesOverSubrelations{}...);
668 }(seq);
669}
670
685template <typename RelationsTuple> constexpr auto create_tuple_of_arrays_of_values()
686{
688 return []<size_t... I>(std::index_sequence<I...>) {
690 typename std::tuple_element_t<I, RelationsTuple>::SumcheckArrayOfValuesOverSubrelations{}...);
691 }(seq);
692}
693
694} // namespace bb
695
696// Forward declare honk flavors
697namespace bb {
698class UltraFlavor;
699class UltraZKFlavor;
700class ECCVMFlavor;
701class UltraKeccakFlavor;
702#ifdef STARKNET_GARAGA_FLAVORS
703class UltraStarknetFlavor;
704class UltraStarknetZKFlavor;
705#endif
706class UltraKeccakZKFlavor;
707class MegaFlavor;
708class MegaZKFlavor;
709class MegaAvmFlavor;
710class TranslatorFlavor;
711class ECCVMRecursiveFlavor;
712class TranslatorRecursiveFlavor;
713class AvmRecursiveFlavor;
714class MultilinearBatchingRecursiveFlavor;
715
716template <typename BuilderType> class UltraRecursiveFlavor_;
717template <typename BuilderType> class UltraZKRecursiveFlavor_;
718template <typename BuilderType> class MegaRecursiveFlavor_;
719template <typename BuilderType> class MegaZKRecursiveFlavor_;
720template <typename BuilderType> class MegaAvmRecursiveFlavor_;
721
722// Serialization methods for NativeVerificationKey_.
723// These should cover all base classes that do not need additional members, as long as the appropriate SerializeMetadata
724// is set in the template parameters.
725template <typename PrecomputedCommitments,
726 typename Codec,
727 typename HashFunction,
728 typename CommitmentKey,
729 VKSerializationMode SerializeMetadata>
730inline void read(
731 uint8_t const*& it,
733{
734 using serialize::read;
736
737 // Get the size directly from the static method
738 size_t num_frs = VK::calc_num_data_types();
739
740 // Read exactly num_frs field elements from the buffer
741 std::vector<typename Codec::DataType> field_elements(num_frs);
742 for (auto& element : field_elements) {
743 read(it, element);
744 }
745 // Then use from_field_elements to populate the verification key
746 vk.from_field_elements(field_elements);
747}
748
749template <typename PrecomputedCommitments,
750 typename Codec,
751 typename HashFunction,
752 typename CommitmentKey,
753 VKSerializationMode SerializeMetadata>
754inline void write(
755 std::vector<uint8_t>& buf,
757{
758 using serialize::write;
760
761 size_t before = buf.size();
762 // Convert to field elements and write them directly without length prefix
763 auto field_elements = vk.to_field_elements();
764 for (const auto& element : field_elements) {
765 write(buf, element);
766 }
767 size_t after = buf.size();
768 size_t num_frs = VK::calc_num_data_types();
769 BB_ASSERT_EQ(after - before, num_frs * sizeof(bb::fr), "VK serialization mismatch");
770}
771
772namespace avm2 {
773class AvmRecursiveFlavor;
774}
775
776} // namespace bb
#define BB_ASSERT_EQ(actual, expected,...)
Definition assert.hpp:83
Common transcript class for both parties. Stores the data for the current round, as well as the manif...
CommitmentKey object over a pairing group 𝔾₁.
Commitment commit(PolynomialSpan< const Fr > polynomial) const
Uses the ProverSRS to create a commitment to p(X)
Simple stdlib verification key class for fixed-size circuits (ECCVM, Translator).
Definition flavor.hpp:380
FixedStdlibVKAndHash_(Builder *builder, const std::shared_ptr< NativeVerificationKey > &native_key)
Construct from native verification key and fix all witnesses (VK is constant for fixed circuits)
Definition flavor.hpp:392
typename PrecomputedCommitments::DataType Commitment
Definition flavor.hpp:383
bool operator==(const FixedStdlibVKAndHash_ &) const =default
Simple verification key class for fixed-size circuits (ECCVM, Translator).
Definition flavor.hpp:136
bool operator==(const FixedVKAndHash_ &) const =default
HashType get_hash() const
Definition flavor.hpp:151
typename PrecomputedCommitments::DataType Commitment
Definition flavor.hpp:138
Base Native verification key class.
Definition flavor.hpp:172
DataType hash_with_origin_tagging(const Transcript &transcript) const
An overload that accepts a transcript and extracts the tag internally.
Definition flavor.hpp:363
fr hash() const
Compute VK hash.
Definition flavor.hpp:313
static size_t calc_num_data_types()
Calculate the number of field elements needed for serialization.
Definition flavor.hpp:240
bool operator==(const NativeVerificationKey_ &) const =default
size_t from_field_elements(const std::span< const DataType > &elements)
Populate verification key from field elements.
Definition flavor.hpp:286
virtual ~NativeVerificationKey_()=default
bool compare(const NativeVerificationKey_ &other, RefArray< StringType, NUM_PRECOMPUTED_ENTITIES > commitment_labels) const
Definition flavor.hpp:183
typename Codec::DataType DataType
Definition flavor.hpp:175
virtual DataType hash_with_origin_tagging(const OriginTag &tag) const
Tag VK components and hash.
Definition flavor.hpp:329
NativeVerificationKey_(const PrecomputedData &precomputed)
Construct VK from precomputed data by committing to polynomials.
Definition flavor.hpp:225
virtual std::vector< DataType > to_field_elements() const
Serialize verification key to field elements.
Definition flavor.hpp:258
typename PrecomputedCommitments::DataType Commitment
Definition flavor.hpp:174
NativeVerificationKey_(const size_t circuit_size, const size_t num_public_inputs)
Definition flavor.hpp:215
A template class for a reference array. Behaves as if std::array<T&, N> was possible.
Definition ref_array.hpp:22
Base Stdlib verification key class.
Definition flavor.hpp:423
StdlibVerificationKey_(std::span< FF > elements)
Deserialize a verification key from a vector of field elements.
Definition flavor.hpp:458
void fix_witness()
Fixes witnesses of VK to be constants.
Definition flavor.hpp:490
typename PrecomputedCommitments::DataType Commitment
Definition flavor.hpp:427
FF hash_with_origin_tagging(const Transcript &transcript) const
An overload that accepts a transcript and extracts the tag internally.
Definition flavor.hpp:565
bool operator==(const StdlibVerificationKey_ &) const =default
T get_value() const
Get the native verification key corresponding to this stdlib verification key.
Definition flavor.hpp:507
static StdlibVerificationKey_ from_witness_indices(Builder &builder, const std::span< const uint32_t > &witness_indices)
Construct a VerificationKey from a set of corresponding witness indices.
Definition flavor.hpp:476
StdlibVerificationKey_(Builder *builder, const std::shared_ptr< T > &native_key)
Construct a new Verification Key with stdlib types from a provided native verification key.
Definition flavor.hpp:444
virtual FF hash_with_origin_tagging(const OriginTag &tag) const
Tag VK components and hash.
Definition flavor.hpp:530
virtual ~StdlibVerificationKey_()=default
Wrapper holding a verification key and its precomputed hash.
Definition flavor.hpp:591
VKAndHash_(B &builder, const std::shared_ptr< NVK > &native_vk)
Construct stdlib VKAndHash from a native VK (recursive verification keys only).
Definition flavor.hpp:624
VKAndHash_()=default
typename std::enable_if_t< requires { typename T::NativeVerificationKey NativeVerificationKey
Definition flavor.hpp:598
std::shared_ptr< VerificationKey > vk
Definition flavor.hpp:628
typename std::enable_if_t< requires { typename T::Builder Builder
Definition flavor.hpp:594
VKAndHash_(const std::shared_ptr< VerificationKey > &vk, const FF &hash)
Construct from VK and pre-provided hash.
Definition flavor.hpp:613
VKAndHash_(const std::shared_ptr< VerificationKey > &vk)
Construct from VK, auto-computing the hash.
Definition flavor.hpp:605
static FF hash(const std::vector< FF > &input)
Hashes a vector of field elements.
static field_t from_witness_index(Builder *ctx, uint32_t witness_index)
Definition field.cpp:67
bb::fr get_value() const
Given a := *this, compute its value given by a.v * a.mul + a.add.
Definition field.cpp:836
static field_t from_witness(Builder *ctx, const bb::fr &input)
Definition field.hpp:466
#define info(...)
Definition log.hpp:93
AluTraceBuilder builder
Definition alu.test.cpp:124
uint8_t const * buf
Definition data_store.hpp:9
uint8_t buffer[RANDOM_BUFFER_SIZE]
Definition engine.cpp:48
UltraKeccakFlavor::VerificationKey VerificationKey
constexpr T get_msb(const T in)
Definition get_msb.hpp:47
Entry point for Barretenberg command-line interface.
Definition api.hpp:5
void read(B &it, field2< base_field, Params > &value)
void write(B &buf, field2< base_field, Params > const &value)
OriginTag extract_transcript_tag(const TranscriptType &transcript)
Extract origin tag context from a transcript.
VKSerializationMode
Enum to control verification key metadata serialization.
Definition flavor.hpp:104
constexpr size_t compute_number_of_subrelations()
Utility function to find the number of subrelations.
Definition flavor.hpp:648
constexpr auto create_tuple_of_arrays_of_values()
Definition flavor.hpp:685
constexpr size_t compute_max_partial_relation_length()
Utility function to find max PARTIAL_RELATION_LENGTH tuples of Relations.
Definition flavor.hpp:637
constexpr auto create_sumcheck_tuple_of_tuples_of_univariates()
Utility function to construct a container for the subrelation accumulators of sumcheck proving.
Definition flavor.hpp:662
VerifierCommitmentKey< Curve > vk
void read(auto &it, msgpack_concepts::HasMsgPack auto &obj)
Automatically derived read for any object that defines .msgpack() (implicitly defined by MSGPACK_FIEL...
void write(auto &buf, const msgpack_concepts::HasMsgPack auto &obj)
Automatically derived write for any object that defines .msgpack() (implicitly defined by MSGPACK_FIE...
STL namespace.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
TUPLET_INLINE constexpr auto make_tuple(Ts &&... args)
Definition tuplet.hpp:1062
StdlibCodec for in-circuit (recursive) verification transcript handling.
Dyadic trace size and public inputs metadata; Common between prover and verifier keys.
Definition flavor.hpp:112
size_t pub_inputs_offset
Definition flavor.hpp:115
size_t num_public_inputs
Definition flavor.hpp:114
size_t dyadic_size
Definition flavor.hpp:113
The precomputed data needed to compute a Honk VK.
Definition flavor.hpp:121
RefArray< Polynomial, NUM_PRECOMPUTED_ENTITIES > polynomials
Definition flavor.hpp:122