Skip to content

Commit

Permalink
fix: resolve merge conflicts with main
Browse files Browse the repository at this point in the history
  • Loading branch information
Dustin-Ray committed Dec 20, 2024
1 parent 610caf0 commit 342659f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions crates/proof-of-sql/src/sql/proof/first_round_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::{
};
use alloc::{boxed::Box, vec::Vec};
/// Track the result created by a query
pub struct FirstRoundBuilder<'a, S> {
pub struct FirstRoundBuilder<'a, S: Scalar> {
commitment_descriptor: Vec<CommittableColumn<'a>>,
pcs_proof_mles: Vec<Box<dyn MultilinearExtension<S> + 'a>>,
/// The number of challenges used in the proof.
Expand All @@ -22,7 +22,7 @@ pub struct FirstRoundBuilder<'a, S> {
range_length: usize,
}

impl FirstRoundBuilder {
impl<'a, S: Scalar> FirstRoundBuilder<'a, S> {
pub fn new(initial_range_length: usize) -> Self {
Self {
commitment_descriptor: Vec::new(),
Expand Down
8 changes: 4 additions & 4 deletions crates/proof-of-sql/src/sql/proof/first_round_builder_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use curve25519_dalek::RistrettoPoint;
fn we_can_compute_commitments_for_intermediate_mles_using_a_zero_offset() {
let mle1 = [1, 2];
let mle2 = [10i64, 20];
let mut builder = FirstRoundBuilder::<Curve25519Scalar>::new();
let mut builder = FirstRoundBuilder::<Curve25519Scalar>::new(2);
builder.produce_intermediate_mle(&mle1[..]);
builder.produce_intermediate_mle(&mle2[..]);
let offset_generators = 0_usize;
Expand All @@ -29,7 +29,7 @@ fn we_can_compute_commitments_for_intermediate_mles_using_a_zero_offset() {
fn we_can_compute_commitments_for_intermediate_mles_using_a_non_zero_offset() {
let mle1 = [1, 2];
let mle2 = [10i64, 20];
let mut builder = FirstRoundBuilder::<Curve25519Scalar>::new();
let mut builder = FirstRoundBuilder::<Curve25519Scalar>::new(2);
builder.produce_intermediate_mle(&mle1[..]);
builder.produce_intermediate_mle(&mle2[..]);
let offset_generators = 123_usize;
Expand All @@ -49,7 +49,7 @@ fn we_can_compute_commitments_for_intermediate_mles_using_a_non_zero_offset() {
fn we_can_evaluate_pcs_proof_mles() {
let mle1 = [1, 2];
let mle2 = [10i64, 20];
let mut builder = FirstRoundBuilder::<Curve25519Scalar>::new();
let mut builder = FirstRoundBuilder::<Curve25519Scalar>::new(2);
builder.produce_intermediate_mle(&mle1[..]);
builder.produce_intermediate_mle(&mle2[..]);
let evaluation_vec = [
Expand All @@ -66,7 +66,7 @@ fn we_can_evaluate_pcs_proof_mles() {

#[test]
fn we_can_add_post_result_challenges() {
let mut builder = FirstRoundBuilder::<Curve25519Scalar>::new();
let mut builder = FirstRoundBuilder::<Curve25519Scalar>::new(0);
assert_eq!(builder.num_post_result_challenges(), 0);
builder.request_post_result_challenges(1);
assert_eq!(builder.num_post_result_challenges(), 1);
Expand Down
4 changes: 2 additions & 2 deletions crates/proof-of-sql/src/sql/proof_gadgets/range_check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use bytemuck::cast_slice;
use core::{cmp::max, iter::repeat};

/// Update the max range length for the range check.
pub fn first_round_evaluate_range_check<'a, S: Scalar + 'a>(builder: &mut FirstRoundBuilder) {
pub fn first_round_evaluate_range_check<'a, S: Scalar + 'a>(builder: &mut FirstRoundBuilder<S>) {
builder.update_range_length(256);
}

Expand Down Expand Up @@ -389,7 +389,7 @@ where
.rho_256_evaluation
.ok_or(ProofSizeMismatch::TooFewSumcheckVariables)?;
// Ensures that we have enough sumcheck variables
let word_vals_plus_alpha_inv = builder.try_consume_mle_evaluation()?;
let word_vals_plus_alpha_inv = builder.try_consume_final_round_mle_evaluation()?;
let word_value_constraint = word_vals_plus_alpha_inv * (word_vals_eval + alpha);

builder.try_produce_sumcheck_subpolynomial_evaluation(
Expand Down

0 comments on commit 342659f

Please sign in to comment.