Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
ultra_execution_trace.hpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: Complete, auditors: [Luke, Raju], commit: }
3// external_1: { status: not started, auditors: [], commit: }
4// external_2: { status: not started, auditors: [], commit: }
5// =====================
6
7#pragma once
8
15
16namespace bb {
17
19
78
80
81 public:
82 static constexpr size_t NUM_WIRES = UltraTraceBlock::NUM_WIRES;
83 // The number of rows reserved at the top of the trace for row-disabling / ZK masking.
84 static constexpr size_t TRACE_OFFSET = NUM_DISABLED_ROWS_IN_SUMCHECK;
85 using FF = fr;
86
88
89 void compute_offsets(size_t trace_offset = TRACE_OFFSET)
90 {
91 uint32_t offset = static_cast<uint32_t>(trace_offset + NUM_ZERO_ROWS);
92 for (auto& block : this->get()) {
93 block.trace_offset_ = offset;
94 offset += static_cast<uint32_t>(block.size());
95 }
96 }
97
98 void summarize() const
99 {
100 info("Gate blocks summary:");
101 info("pub inputs :\t", this->pub_inputs.size());
102 info("lookups :\t", this->lookup.size());
103 info("arithmetic :\t", this->arithmetic.size());
104 info("delta range:\t", this->delta_range.size());
105 info("elliptic :\t", this->elliptic.size());
106 info("memory :\t", this->memory.size());
107 info("nnf :\t", this->nnf.size());
108 info("poseidon ext :\t", this->poseidon2_external.size());
109 info("poseidon int :\t", this->poseidon2_internal.size());
110 }
111
112 // Get cumulative size of all blocks
114 {
115 size_t total_size(0);
116 for (const auto& block : this->get()) {
117 total_size += block.size();
118 }
119 return total_size;
120 }
121
122 bool operator==(const UltraExecutionTraceBlocks& other) const = default;
123};
124
125} // namespace bb
A template class for a reference array. Behaves as if std::array<T&, N> was possible.
Definition ref_array.hpp:22
bool operator==(const UltraExecutionTraceBlocks &other) const =default
void compute_offsets(size_t trace_offset=TRACE_OFFSET)
#define info(...)
Definition log.hpp:93
ssize_t offset
Definition engine.cpp:62
Entry point for Barretenberg command-line interface.
Definition api.hpp:5
field< Bn254FrParams > fr
Definition fr.hpp:155
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
Defines the circuit block types for the Ultra arithmetization.
static constexpr size_t NUM_BLOCKS
bool operator==(const UltraTraceBlockData &other) const =default