Skip to content

Commit

Permalink
fix constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
ColoCarletti committed Nov 15, 2024
1 parent b975d36 commit ca1fe3d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions provers/stark/src/examples/read_only_memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ where
// Auxiliary constraints
let p0 = first_step.get_aux_evaluation_element(0, 0);
let p1 = second_step.get_aux_evaluation_element(0, 0);
let alpha = &rap_challenges[0];
let z = &rap_challenges[1];
let z = &rap_challenges[0];
let alpha = &rap_challenges[1];
let a1 = second_step.get_main_evaluation_element(0, 0);
let v1 = second_step.get_main_evaluation_element(0, 1);
let a_perm_1 = second_step.get_main_evaluation_element(0, 2);
Expand Down Expand Up @@ -285,8 +285,9 @@ where
let v0 = &self.pub_inputs.v0;
let a_perm0 = &self.pub_inputs.a_perm0;
let v_perm0 = &self.pub_inputs.v_perm0;
let alpha = &rap_challenges[0];
let z = &rap_challenges[1];
let z = &rap_challenges[0];
let alpha = &rap_challenges[1];

// Main boundary constraints
let c1 = BoundaryConstraint::new_main(0, 0, a0.clone());
let c2 = BoundaryConstraint::new_main(1, 0, v0.clone());
Expand All @@ -297,6 +298,7 @@ where
let num = z - (a0 + alpha * v0);
let den = z - (a_perm0 + alpha * v_perm0);
let p0_value = num / den;

let c_aux1 = BoundaryConstraint::new_aux(0, 0, p0_value);
let c_aux2 = BoundaryConstraint::new_aux(
0,
Expand Down

0 comments on commit ca1fe3d

Please sign in to comment.