diff --git a/crates/proof-of-sql/src/sql/proof/first_round_builder.rs b/crates/proof-of-sql/src/sql/proof/first_round_builder.rs index 15989adf4..675d7adba 100644 --- a/crates/proof-of-sql/src/sql/proof/first_round_builder.rs +++ b/crates/proof-of-sql/src/sql/proof/first_round_builder.rs @@ -8,6 +8,8 @@ pub struct FirstRoundBuilder { num_post_result_challenges: usize, /// The extra one evaluation lengths used in the proof. one_evaluation_lengths: Vec, + /// The extra sumcheck range lengths used in the proof. + sumcheck_range_lengths: Vec, } impl Default for FirstRoundBuilder { @@ -21,14 +23,21 @@ impl FirstRoundBuilder { Self { num_post_result_challenges: 0, one_evaluation_lengths: Vec::new(), + sumcheck_range_lengths: Vec::new(), } } /// Get the one evaluation lengths used in the proof. + #[allow(dead_code)] pub(crate) fn one_evaluation_lengths(&self) -> &[usize] { &self.one_evaluation_lengths } + /// Get the sumcheck range lengths used in the proof. + pub(crate) fn sumcheck_range_lengths(&self) -> &[usize] { + &self.sumcheck_range_lengths + } + /// Append the length to the list of one evaluation lengths. pub(crate) fn produce_one_evaluation_length(&mut self, length: usize) { self.one_evaluation_lengths.push(length); diff --git a/crates/proof-of-sql/src/sql/proof/query_proof.rs b/crates/proof-of-sql/src/sql/proof/query_proof.rs index 708b330d1..d8bb2220f 100644 --- a/crates/proof-of-sql/src/sql/proof/query_proof.rs +++ b/crates/proof-of-sql/src/sql/proof/query_proof.rs @@ -104,9 +104,11 @@ impl QueryProof { let query_result = expr.first_round_evaluate(&mut first_round_builder, &alloc, &table_map); let owned_table_result = OwnedTable::from(&query_result); let provable_result = query_result.into(); + let one_evaluation_lengths = first_round_builder.one_evaluation_lengths(); + let range_evaluation_lengths = first_round_builder.sumcheck_range_lengths(); - let range_length = one_evaluation_lengths + let range_length = range_evaluation_lengths .iter() .copied() .chain(core::iter::once(initial_range_length))