Skip to content

Commit

Permalink
refactor: use constants for interaction index (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoichi-nexus authored and sjudson committed Feb 5, 2025
1 parent e28a263 commit accd78c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions prover/examples/fibonacci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use num_traits::{One as _, Zero as _};
use stwo_prover::{
constraint_framework::{
assert_constraints, EvalAtRow, FrameworkComponent, FrameworkEval, TraceLocationAllocator,
INTERACTION_TRACE_IDX, ORIGINAL_TRACE_IDX,
},
core::{
air::Component as _,
Expand Down Expand Up @@ -223,10 +224,10 @@ impl FrameworkEval for Fib {
// The second argument is the values relative to the current row we want to fetch, being
// `0` the current row. `-1` is the previous row, `1` is the next row.

let a = eval.next_interaction_mask(0, [0, 1]);
let b = eval.next_interaction_mask(0, [0, 1]);
let is_first = eval.next_interaction_mask(1, [0, 1]);
let is_first_neg = eval.next_interaction_mask(1, [0, 1]);
let a = eval.next_interaction_mask(ORIGINAL_TRACE_IDX, [0, 1]);
let b = eval.next_interaction_mask(ORIGINAL_TRACE_IDX, [0, 1]);
let is_first = eval.next_interaction_mask(INTERACTION_TRACE_IDX, [0, 1]);
let is_first_neg = eval.next_interaction_mask(INTERACTION_TRACE_IDX, [0, 1]);

// ----------------------------------------------------------------------------------------
// Main trace
Expand Down

0 comments on commit accd78c

Please sign in to comment.