From 5e37f69bfdc2e384be7de0553b4956a14c72fa8c Mon Sep 17 00:00:00 2001 From: jie Date: Thu, 8 Aug 2024 21:55:18 +0800 Subject: [PATCH] fix fri oracle index --- starky/src/stark.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/starky/src/stark.rs b/starky/src/stark.rs index a673d59155..b15c9aa0d9 100644 --- a/starky/src/stark.rs +++ b/starky/src/stark.rs @@ -185,8 +185,9 @@ pub trait Stark, const D: usize>: Sync { let mut batches = vec![zeta_batch, zeta_next_batch]; if self.requires_ctls() { + let oracle_index = if self.use_phase2() {2} else {1}; let ctl_zs_info = FriPolynomialInfo::from_range( - 2, // auxiliary oracle index + oracle_index, // auxiliary oracle index num_lookup_columns + num_ctl_helpers..num_auxiliary_polys, ); let ctl_first_batch = FriBatchInfo { @@ -272,8 +273,9 @@ pub trait Stark, const D: usize>: Sync { let mut batches = vec![zeta_batch, zeta_next_batch]; if self.requires_ctls() { + let oracle_index = if self.use_phase2() {2} else {1}; let ctl_zs_info = FriPolynomialInfo::from_range( - 2, // auxiliary oracle index + oracle_index, // auxiliary oracle index num_lookup_columns + num_ctl_helper_polys..num_auxiliary_polys, ); let ctl_first_batch = FriBatchInfoTarget {