From 638bf27c32179f54d26fa8411d87fa07aa325470 Mon Sep 17 00:00:00 2001 From: tiagofneto Date: Fri, 12 Jan 2024 18:49:53 +0000 Subject: [PATCH] bitwise --- src/air/public_input.cairo | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/air/public_input.cairo b/src/air/public_input.cairo index 4b73be16e..db253e756 100644 --- a/src/air/public_input.cairo +++ b/src/air/public_input.cairo @@ -177,5 +177,11 @@ impl PublicInputImpl of PublicInputTrait { let range_check_uses = *self.segments.at(constants::segments::RANGE_CHECK).stop_ptr - *self.segments.at(constants::segments::RANGE_CHECK).begin_addr; assert_range_u128_le(range_check_uses, range_check_copies); + + let bitwise_copies = n_steps / constants::BITWISE_RATIO; + let bitwise_uses = (*self.segments.at(constants::segments::BITWISE).stop_ptr + - *self.segments.at(constants::segments::BITWISE).begin_addr) + / 5; + assert_range_u128_le(bitwise_uses, bitwise_copies); } }