diff --git a/stwo_cairo_prover/crates/prover/src/cairo_air/air.rs b/stwo_cairo_prover/crates/prover/src/cairo_air/air.rs index 3123ff16..b703e143 100644 --- a/stwo_cairo_prover/crates/prover/src/cairo_air/air.rs +++ b/stwo_cairo_prover/crates/prover/src/cairo_air/air.rs @@ -2,6 +2,7 @@ use itertools::{chain, Itertools}; use num_traits::Zero; use prover_types::cpu::CasmState; use serde::{Deserialize, Serialize}; +use stwo_prover::constraint_framework::logup::LogupSumsExt; use stwo_prover::constraint_framework::preprocessed_columns::PreprocessedColumn; use stwo_prover::constraint_framework::{Relation, TraceLocationAllocator, PREPROCESSED_TRACE_IDX}; use stwo_prover::core::air::{Component, ComponentProver}; @@ -56,8 +57,7 @@ pub struct CairoClaim { impl CairoClaim { pub fn mix_into(&self, channel: &mut impl Channel) { - // TODO(spapini): Add common values. - // TODO(Ohad): add components. + // TODO(Ohad): Add common values. self.opcodes.mix_into(channel); self.memory_address_to_id.mix_into(channel); self.memory_id_to_value.mix_into(channel); @@ -389,9 +389,8 @@ pub fn lookup_sum( // If the table is padded, take the sum of the non-padded values. // Otherwise, the claimed_sum is the total_sum. - // TODO(Ohad): hide this logic behind `InteractionClaim`, and only sum here. sum += interaction_claim.opcodes.sum(); - sum += interaction_claim.verify_instruction.logup_sums.1.unwrap().0; + sum += interaction_claim.verify_instruction.logup_sums.value(); sum += interaction_claim.range_check_19.claimed_sum; sum += interaction_claim.range_check_9_9.claimed_sum; sum += interaction_claim.range_check_7_2_5.claimed_sum; diff --git a/stwo_cairo_prover/crates/prover/src/components/range_check_vector/mod.rs b/stwo_cairo_prover/crates/prover/src/components/range_check_vector/mod.rs index 9a750233..0f5762b8 100644 --- a/stwo_cairo_prover/crates/prover/src/components/range_check_vector/mod.rs +++ b/stwo_cairo_prover/crates/prover/src/components/range_check_vector/mod.rs @@ -1,13 +1,9 @@ use std::iter::zip; use std::simd::Simd; -use stwo_prover::constraint_framework::logup::LookupElements; pub mod component; pub mod component_prover; -// TODO(Ohad): figure out n_alpha_powers. -pub type RangeCheckLookupElements = LookupElements<3>; - use stwo_prover::core::backend::simd::m31::{PackedM31, LOG_N_LANES, N_LANES}; use stwo_prover::core::fields::m31::MODULUS_BITS;