Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
range_check.cpp
Go to the documentation of this file.
1
11
12namespace bb::avm2::simulation {
13
26{
27 BB_ASSERT(num_bits <= 128 && "Range checks aren't supported for bit-sizes > 128");
28
29 events.emit({ .value = value, .num_bits = num_bits });
30}
31
32} // namespace bb::avm2::simulation
#define BB_ASSERT(expression,...)
Definition assert.hpp:70
void assert_range(uint128_t value, uint8_t num_bits) override
Assert that a value fits within a given bit-width.
EventEmitterInterface< RangeCheckEvent > & events
AVM range check gadget for witness generation.
unsigned __int128 uint128_t
Definition serialize.hpp:45