52 template <
typename Builder>
static bool check(
const Builder& builder_in);
59 template <
typename Relation,
typename Builder,
typename Block>
65 using Key = std::array<FF, 4>;
84 template <
typename Builder>
92 template <
typename Builder>
static bool relaxed_check_memory_relation(
Builder&
builder);
93 template <
typename Builder>
static bool relaxed_check_delta_range_relation(
Builder&
builder);
105 template <
typename Relation>
static bool check_relation(
auto& values,
auto& params);
110 template <
typename Memory>
119 static bool check_lookup(
auto& values,
auto& lookup_hash_table);
158 template <
typename Builder>
193 for (
const auto& gate_idx :
builder.memory_read_records) {
196 for (
const auto& gate_idx :
builder.memory_write_records) {
199 for (
const auto& gate_idx :
builder.rom_logup_records) {
214 return static_cast<size_t>(
result.reduce_once().data[0]);
A wrapper for Relations to expose methods used by the Sumcheck prover or verifier to add the contribu...
std::unordered_set< Key, HashFunction > LookupHashTable
static bool check_relation_at_row(Builder &builder, Block &block, size_t row_idx)
Evaluate a single Relation at block's row row_idx in isolation, returning true iff every subrelation ...
static bool check_memory_relation_with_logup(auto &values, auto ¶ms, MemoryCheckData &memory_data)
static bool check_databus_read(auto &values, Builder &builder)
Check that the {index, value} pair contained in a databus read gate reflects the actual value present...
static bool check_relation(auto &values, auto ¶ms)
Check that a given relation is satisfied for the provided inputs corresponding to a single row.
static bool check_tag_data(const TagCheckData &tag_data)
Check whether the left and right running tag products are equal.
static bool check_lookup(auto &values, auto &lookup_hash_table)
Check whether the values in a lookup gate are contained within a corresponding hash table.
static auto init_empty_values()
Helper for initializing an empty AllValues container of the right Flavor based on Builder.
static void populate_values(Builder &builder, auto &block, auto &values, TagCheckData &tag_data, MemoryCheckData &memory_data, size_t idx)
Populate the values required to check the correctness of a single "row" of the circuit.
static bool check(const Builder &builder_in)
Check the correctness of a circuit witness.
static Builder prepare_circuit(const Builder &builder_in)
Copy the builder and finalize it before checking its validity.
static bool check_block(Builder &builder, auto &block, TagCheckData &tag_data, MemoryCheckData &memory_data, LookupHashTable &lookup_hash_table)
Checks that the provided witness satisfies all gates contained in a single execution trace block.
Entry point for Barretenberg command-line interface.
field< Bn254FrParams > fr
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
size_t operator()(const Key &entry) const
Struct for managing memory record data for ensuring RAM/ROM correctness.
std::unordered_set< size_t > read_record_gates
std::unordered_set< size_t > write_record_gates
MemoryCheckData(const auto &builder)
std::unordered_set< size_t > rom_logup_gates
Struct for managing the running tag product data for ensuring tag correctness.
std::unordered_set< size_t > encountered_variables
static constexpr field one()
static field random_element(numeric::RNG *engine=nullptr) noexcept
BB_INLINE constexpr field sqr() const noexcept