|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
#include <range_check_trace.hpp>
Public Member Functions | |
| void | process (const simulation::EventEmitterInterface< simulation::RangeCheckEvent >::Container &events, TraceContainer &trace) |
| Processes range check events and populates the trace with decomposed value columns. | |
Static Public Attributes | |
| static const InteractionDefinition | interactions |
Definition at line 11 of file range_check_trace.hpp.
| void bb::avm2::tracegen::RangeCheckTraceBuilder::process | ( | const simulation::EventEmitterInterface< simulation::RangeCheckEvent >::Container & | events, |
| TraceContainer & | trace | ||
| ) |
Processes range check events and populates the trace with decomposed value columns.
For each event, the value is decomposed into up to 8 sixteen-bit slices. The lower slices are placed in fixed registers (u16_r0..r6), while the most significant (potentially partial) slice goes into the dynamic register (u16_r7). A flag column (is_lte_u16..is_lte_u128) marks which bit-width bucket the value falls into, and lookup selectors are set for every fixed slice that is actually used. The dynamic slice is further constrained by recording its bit-width, the corresponding power of two, and the difference to the upper bound of that sub-range.
| events | The range check events emitted during witness generation. |
| trace | The trace container to populate. |
Definition at line 26 of file range_check_trace.cpp.
|
static |
Definition at line 16 of file range_check_trace.hpp.