barretenberg
Loading...
Searching...
No Matches
Functions
dummy.hpp File Reference

This file contains functions for the dummy tables that we use in UltraHonk to make table, sorted and lookup selector polynomials non-zero. More...

#include "types.hpp"

Go to the source code of this file.

Functions

template<uint64_t id>
std::array< barretenberg::fr, 2 > plookup::dummy_tables::get_value_from_key (const std::array< uint64_t, 2 > key)
 Lookup the value corresponding to a specific key.
 
template<uint64_t table_id>
BasicTable plookup::dummy_tables::generate_honk_dummy_table (const BasicTableId id, const size_t table_index)
 Generate the whole table.
 
MultiTable plookup::dummy_tables::get_honk_dummy_multitable ()
 Create a multitable for filling UltraHonk polynomials with non-zero values.
 

Detailed Description

This file contains functions for the dummy tables that we use in UltraHonk to make table, sorted and lookup selector polynomials non-zero.

Author
Rumata888

Function Documentation

◆ generate_honk_dummy_table()

template<uint64_t table_id>
BasicTable plookup::dummy_tables::generate_honk_dummy_table ( const BasicTableId  id,
const size_t  table_index 
)
inline

Generate the whole table.

This function is used to generate the whole table for the table polynomial. It's templated with id, since we generate 2 slightly different fake tables.

Template Parameters
table_idThe id of the table this function is instantiated for
Parameters
idTable id that is the same for all circuits
table_indexThe index for this table that is used in this circuit. 0, 1, ...
Returns
A table of values

◆ get_honk_dummy_multitable()

MultiTable plookup::dummy_tables::get_honk_dummy_multitable ( )
inline

Create a multitable for filling UltraHonk polynomials with non-zero values.

Consists of 2 Basic tables that are almost identical. Each of those basic tables should only have 4 entries, so the overall overhead is just 8

◆ get_value_from_key()

template<uint64_t id>
std::array< barretenberg::fr, 2 > plookup::dummy_tables::get_value_from_key ( const std::array< uint64_t, 2 >  key)
inline

Lookup the value corresponding to a specific key.

We need this function for when we are constructing the circuit and want to query the table. Since we need two basic tables to make the table polynomial have non-zero values, we instantiate two tables with the same function, but change it slightly through templating

Template Parameters
idThe id of the basic table used to parametrize the values for 2 fake tables
Parameters
keyThe key that we are looking up
Returns
std::array<barretenberg::fr, 2>