Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
straus_plookup_table.hpp
Go to the documentation of this file.
1#pragma once
2
6#include <vector>
7
8namespace bb::stdlib {
9
10// Forward declaration
11template <typename Builder> class cycle_group;
12
31template <typename Builder> class straus_plookup_table {
32 public:
35 using Curve = typename Builder::EmbeddedCurve;
36 using Group = typename Curve::Group;
37 using Element = typename Curve::Element;
39
44 std::vector<AffineElement> native_table;
45 plookup::BasicTable basic_table; // columns populated; table_index is NOT yet assigned
46 };
47
50 const AffineElement& base_point,
51 const AffineElement& offset_generator,
52 size_t table_bits);
53 // Construct from precomputed data — only performs builder registration (serial phase)
55
56 // Compute native table + BasicTable columns without touching the builder (parallelizable)
58 const AffineElement& offset_generator,
59 size_t table_bits);
60
62
63 const std::vector<AffineElement>& get_native_table() const { return native_table; }
64
65 private:
66 Builder* _context = nullptr;
67 plookup::BasicTable* _table = nullptr; // pointer into builder's lookup_tables deque
68 std::vector<AffineElement> native_table; // precomputed table entries for witness generation
70};
71
72} // namespace bb::stdlib
typename Group::element Element
Definition grumpkin.hpp:63
typename grumpkin::g1 Group
Definition grumpkin.hpp:62
typename Group::affine_element AffineElement
Definition grumpkin.hpp:64
Implements boolean logic in-circuit.
Definition bool.hpp:60
cycle_group represents a group Element of the proving system's embedded curve, i.e....
straus_plookup_table computes a plookup-based lookup table of size 1 << table_bits
const std::vector< AffineElement > & get_native_table() const
std::vector< AffineElement > native_table
typename Builder::EmbeddedCurve Curve
typename Curve::AffineElement AffineElement
cycle_group< Builder > read(const field_t &index)
Read from the plookup table at the given index.
static PrecomputedData build_precomputed_data(const AffineElement &base_point, const AffineElement &offset_generator, size_t table_bits)
Compute native table entries and BasicTable column data without touching the circuit builder.
const std::vector< MemoryValue > data
StrictMock< MockContext > context
This file contains part of the logic for the Origin Tag mechanism that tracks the use of in-circuit p...
A basic table from which we can perform lookups (for example, an xor table)
Definition types.hpp:288
Precomputed data for two-phase construction. Contains all data computed without builder access.