51 return static_cast<size_t>(result);
256 return {
"ecc_op",
"busread",
"lookup",
"pub_inputs",
"arithmetic",
"delta_range",
257 "elliptic",
"memory",
"nnf",
"poseidon2_external",
"poseidon2_internal",
"overflow" };
333 block.fixed_size = size;
343 for (
auto& block : this->
get()) {
344 block.trace_offset_ =
offset;
345 offset += block.get_fixed_size(is_structured);
351 info(
"Gate blocks summary: (actual gates / fixed capacity)");
355 info(
"pub inputs :\t",
358 this->pub_inputs.get_fixed_size(),
359 " (populated in decider pk constructor)");
376 for (
const auto& block : this->
get()) {
377 total_size += block.size();
385 for (
const auto& block : this->
get()) {
386 total_size += block.get_fixed_size();
412 .arithmetic = 1 << 14,
417 .poseidon2_external = 2,
418 .poseidon2_internal = 2,
425static constexpr TraceStructure SMALL_TEST_STRUCTURE{ .
ecc_op = 1 << 14,
428 .pub_inputs = 1 << 14,
429 .arithmetic = 1 << 15,
430 .delta_range = 1 << 14,
434 .poseidon2_external = 1 << 14,
435 .poseidon2_internal = 1 << 15,
441static constexpr TraceStructure EXAMPLE_18{ .
ecc_op = 1 << 10,
444 .pub_inputs = 1 << 6,
446 .delta_range = 45000,
450 .poseidon2_external = 2500,
451 .poseidon2_internal = 14000,
457static constexpr TraceStructure EXAMPLE_20{ .
ecc_op = 1 << 11,
460 .pub_inputs = 1 << 8,
461 .arithmetic = 396000,
462 .delta_range = 180000,
466 .poseidon2_external = 5000,
467 .poseidon2_internal = 28000,
473static constexpr TraceStructure AZTEC_TRACE_STRUCTURE{ .
ecc_op = 1000,
478 .delta_range = 18000,
482 .poseidon2_external = 17000,
483 .poseidon2_internal = 96500,
Basic structure for storing gate data in a builder.
static constexpr size_t NUM_WIRES
void compute_offsets(bool is_structured)
bool operator==(const MegaExecutionTraceBlocks &other) const =default
size_t get_total_content_size()
size_t get_structured_size() const
void set_fixed_block_sizes(const TraceSettings &settings)
size_t get_structured_dyadic_size() const
static constexpr size_t NUM_WIRES
Defines the circuit block types for the Mega arithmetization.
MegaExecutionTraceBlocks()=default
SlabVectorSelector< fr > gate_selector
SelectorType & q_arith() override
virtual SelectorType & q_poseidon2_external()
virtual SelectorType & q_lookup_type()
virtual SelectorType & q_elliptic()
virtual SelectorType & q_delta_range()
RefVector< Selector< fr > > get_selectors() override
virtual const SelectorType & q_delta_range() const
virtual const SelectorType & q_lookup_type() const
virtual const SelectorType & q_poseidon2_internal() const
virtual SelectorType & q_poseidon2_internal()
std::array< ZeroSelector< fr >, 9 > zero_selectors
virtual const SelectorType & q_nnf() const
void resize_additional(size_t new_size)
Resizes all selectors which are not part of the conventional Ultra arithmetization.
RefVector< SelectorType > get_gate_selectors()
virtual const SelectorType & q_arith() const
virtual const SelectorType & q_elliptic() const
void pad_additional()
Add zeros to all selectors which are not part of the conventional Ultra arithmetization.
virtual const SelectorType & q_poseidon2_external() const
virtual SelectorType & q_nnf()
virtual const SelectorType & q_busread() const
virtual SelectorType & q_arith()
virtual const SelectorType & q_memory() const
virtual SelectorType & q_memory()
virtual SelectorType & q_busread()
SlabVectorSelector< fr > gate_selector
SelectorType & q_busread() override
SelectorType & q_delta_range() override
SlabVectorSelector< fr > gate_selector
SlabVectorSelector< fr > gate_selector
SelectorType & q_elliptic() override
SlabVectorSelector< fr > gate_selector
SelectorType & q_lookup_type() override
SelectorType & q_memory() override
SlabVectorSelector< fr > gate_selector
SelectorType & q_nnf() override
SlabVectorSelector< fr > gate_selector
SelectorType & q_nnf() override
SelectorType & q_poseidon2_internal() override
SelectorType & q_arith() override
SelectorType & q_busread() override
SelectorType & q_poseidon2_external() override
std::array< SlabVectorSelector< fr >, 9 > gate_selectors
SelectorType & q_memory() override
SelectorType & q_lookup_type() override
SelectorType & q_elliptic() override
SelectorType & q_delta_range() override
SelectorType & q_poseidon2_external() override
SlabVectorSelector< fr > gate_selector
SelectorType & q_poseidon2_internal() override
SlabVectorSelector< fr > gate_selector
A template class for a reference array. Behaves as if std::array<T&, N> was possible.
A template class for a reference vector. Behaves as if std::vector<T&> was possible.
virtual void resize(size_t new_size)=0
Resize the selector.
void emplace_back(const FF &value)
Append a field element to the selector.
Selector backed by a slab allocator vector.
constexpr T get_msb(const T in)
constexpr T round_up_power_2(const T in)
Entry point for Barretenberg command-line interface.
field< Bn254FrParams > fr
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
A container indexed by the types of the blocks in the execution trace.
MegaTraceDeltaRangeBlock delta_range
MegaTraceMemoryBlock memory
MegaTraceNonNativeFieldBlock nnf
MegaTraceArithmeticBlock arithmetic
MegaTracePublicInputBlock pub_inputs
MegaTraceEllipticBlock elliptic
bool operator==(const MegaTraceBlockData &other) const =default
MegaTraceBusReadBlock busread
MegaTracePoseidon2ExternalBlock poseidon2_external
MegaTracePoseidon2InternalBlock poseidon2_internal
std::vector< std::string_view > get_labels() const
MegaTraceLookupBlock lookup
auto get_gate_blocks() const
MegaTraceOverflowBlock overflow
uint32_t overflow_capacity
size_t dyadic_size() const
std::optional< TraceStructure > structure
uint32_t poseidon2_internal
uint32_t poseidon2_external