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
#include "
barretenberg/vm2/simulation/range_check.hpp
"
2
3
#include <cassert>
4
#include <cstdint>
5
6
namespace
bb::avm2::simulation
{
7
8
void
RangeCheck::assert_range
(
uint128_t
value
, uint8_t num_bits)
9
{
10
assert(num_bits <= 128 &&
"Range checks aren't supported for bit-sizes > 128"
);
11
12
events
.emit({ .value =
value
, .num_bits = num_bits });
13
}
14
15
}
// namespace bb::avm2::simulation
bb::avm2::simulation::RangeCheck::assert_range
void assert_range(uint128_t value, uint8_t num_bits) override
Definition
range_check.cpp:8
bb::avm2::simulation::RangeCheck::events
EventEmitterInterface< RangeCheckEvent > & events
Definition
range_check.hpp:26
bb::avm2::simulation
Definition
address_derivation.cpp:8
value
FF value
Definition
public_data_tree.test.cpp:96
uint128_t
unsigned __int128 uint128_t
Definition
serialize.hpp:44
range_check.hpp
src
barretenberg
vm2
simulation
range_check.cpp
Generated by
1.9.8