Skip to content

Commit

Permalink
Split memory values into 9 bit values.
Browse files Browse the repository at this point in the history
  • Loading branch information
alonh5 committed Jul 22, 2024
1 parent 8e5473b commit 8272f0b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions stwo_cairo_prover/src/components/memory/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ pub const MEMORY_LOOKUP_VALUE_1: &str = "MEMORY_LOOKUP_1";
pub const MEMORY_LOOKUP_VALUE_2: &str = "MEMORY_LOOKUP_2";
pub const MEMORY_LOOKUP_VALUE_3: &str = "MEMORY_LOOKUP_3";

pub const N_M31_IN_FELT252: usize = 21;
pub const MULTIPLICITY_COLUMN: usize = 22;
pub const N_M31_IN_FELT252: usize = 28;
pub const MULTIPLICITY_COLUMN: usize = N_M31_IN_FELT252 + 1;
// TODO(AlonH): Make memory size configurable.
pub const LOG_MEMORY_ADDRESS_BOUND: u32 = 3;
pub const MEMORY_ADDRESS_BOUND: usize = 1 << LOG_MEMORY_ADDRESS_BOUND;
Expand Down Expand Up @@ -227,7 +227,7 @@ impl Component for MemoryComponent {
SecureField::from_partial_evals(std::array::from_fn(|i| mask[INTERACTION_TRACE][i][1]));
let numerator = (value - prev_value)
* shifted_secure_combination(&address_and_value, alpha, z)
- mask[BASE_TRACE][22][0];
- mask[BASE_TRACE][MULTIPLICITY_COLUMN][0];
let denom = coset_vanishing(constraint_zero_domain, point)
/ point_excluder(constraint_zero_domain.at(0), point);
evaluation_accumulator.accumulate(numerator / denom);
Expand Down

0 comments on commit 8272f0b

Please sign in to comment.