Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
mega_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
17#include <cstdint>
18
19namespace bb {
20
29 public:
30 static constexpr size_t NUM_WIRES = MegaTraceBlock::NUM_WIRES;
31 using FF = fr;
32
34
35 void compute_offsets(size_t trace_offset)
36 {
37 uint32_t offset = static_cast<uint32_t>(trace_offset + NUM_ZERO_ROWS);
38 for (auto& block : this->get()) {
39 block.trace_offset_ = offset;
40 offset += static_cast<uint32_t>(block.size());
41 }
42 }
43
45 {
46 size_t total_size(0);
47 for (const auto& block : this->get()) {
48 total_size += block.size();
49 }
50 return total_size;
51 }
52
53 size_t get_total_size() const
54 {
55 size_t total_size = 1; // start at 1 because the 0th row is unused for selectors for Honk
56 for (const auto& block : this->get()) {
57 total_size += block.size();
58 }
59 return total_size;
60 }
61
62 bool operator==(const MegaExecutionTraceBlocks& other) const = default;
63};
64
65} // namespace bb
Mega execution trace wrapper. MegaTraceBlockData (codegen-emitted) lists the blocks and their owned G...
bool operator==(const MegaExecutionTraceBlocks &other) const =default
static constexpr size_t NUM_WIRES
void compute_offsets(size_t trace_offset)
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