Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
precomputed_trace.hpp
Go to the documentation of this file.
1#pragma once
2
5
6namespace bb::avm2::tracegen {
7
8// Currently due to the bitwise tables.
9constexpr uint32_t PRECOMPUTED_TRACE_SIZE = (1 << 16);
10
11// This fills the trace for the "general" precomputed columns.
12// See precomputed.pil.
33
34} // namespace bb::avm2::tracegen
void process_sha256_round_constants(TraceContainer &trace)
Populate the 64 SHA-256 round constants (K_0 .. K_63) and their selector. The sel_sha256_compression ...
void process_to_radix_p_decompositions(TraceContainer &trace)
Populate the TORADIXBE p-decomposition table.
void process_misc(TraceContainer &trace, const uint32_t num_rows=PRECOMPUTED_TRACE_SIZE)
Populate miscellaneous precomputed columns: first_row selector and idx (row index).
void process_wire_instruction_spec(TraceContainer &trace)
Populate the wire-level instruction specification table.
void process_bitwise(TraceContainer &trace)
Populate the 8-bit bitwise lookup table (AND, OR, XOR).
void process_keccak_round_constants(TraceContainer &trace)
Populate the 24 Keccak-f[1600] round constants and their selector. Row 0 is intentionally left empty ...
void process_to_radix_safe_limbs(TraceContainer &trace)
Populate the TORADIXBE safe-limbs table (one row per radix 0..255).
void process_memory_tag_range(TraceContainer &trace)
Populate the memory tag out-of-range selector.
void process_exec_instruction_spec(TraceContainer &trace)
Populate the execution-level instruction specification table.
void process_get_env_var_table(TraceContainer &trace)
Populate the GETENVVAR lookup table.
void process_power_of_2(TraceContainer &trace)
Generate a column where row i holds 2^i, for i in [0, 255], for the values of 254 and 255 the values ...
void process_get_contract_instance_table(TraceContainer &trace)
Populate the GETCONTRACTINSTANCE lookup table.
void process_phase_table(TraceContainer &trace)
Populate the transaction phase specification table.
void process_addressing_gas(TraceContainer &trace)
Populate the addressing-mode gas lookup table (65536 rows).
void process_sel_range_16(TraceContainer &trace)
Generate a selector column that activates the first 2^16 (65536) rows.
void process_tag_parameters(TraceContainer &trace)
Populate the memory tag parameters table (byte length, max bits, max value per tag).
void process_sel_range_8(TraceContainer &trace)
Generate a selector column that activates the first 2^8 (256) rows.
TestTraceContainer trace
constexpr uint32_t PRECOMPUTED_TRACE_SIZE