Skip to content

Commit

Permalink
fix confused comments from merge
Browse files Browse the repository at this point in the history
  • Loading branch information
sagar-a16z committed Nov 12, 2024
1 parent bb9d79b commit d5838af
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions jolt-core/src/subprotocols/grand_product_quarks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ where
// For polynomials of size less than 16 we just use the GKR grand product
let (quark_proof, mut random, mut claim) = if grand_product.quark_poly().is_some() {
// When doing the quark hybrid proof, we first prove the grand product of a layer of a polynomial which is N layers deep in the tree
// of a standard layered sumcheck grand product, then we use the sumcheck layers to prove via gkr layers that the random point opened
// of a standard layered sumcheck grand product, then we use the sumcheck layers to prove via GKR layers that the random point opened
// by the quark proof is in fact the folded result of the base layer.
let (quark, random, quark_claim) =
QuarkGrandProductProof::<PCS, ProofTranscript>::prove(
Expand Down Expand Up @@ -315,8 +315,8 @@ where
let v_length = v.len();
let v_variables = v_length.log_2();

// Compute f(1, x), f(x, 0), and f(x, 1) from v(x)
let v_polynomial = DensePolynomial::<PCS::Field>::new_padded(v.to_vec());
// Compute f(1, x), f(x, 0), and f(x, 1) from v(x)
let (f_1x, f_x0, f_x1) = v_into_f::<PCS::Field>(&v_polynomial);

let g_polynomial = f_1x.clone();
Expand Down
3 changes: 2 additions & 1 deletion jolt-core/src/subprotocols/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ pub enum QuarkHybridLayerDepth {
}

impl QuarkHybridLayerDepth {
// The depth in the product tree of the GKR grand product at which the hybrid scheme will switch to using quarks grand product proofs
// The depth in the product tree of the grand product at which the
// hybrid implementation will switch to using quarks grand product proofs
pub fn get_crossover_depth(&self) -> usize {
match self {
QuarkHybridLayerDepth::Min => 0, // Always use quarks
Expand Down
8 changes: 4 additions & 4 deletions jolt-core/src/subprotocols/sparse_grand_product.rs
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,8 @@ impl<F: JoltField, ProofTranscript: Transcript> BatchedCubicSumcheck<F, ProofTra
assert_eq!(expected, round_claim);
}

/// Similar to `BatchedSparseGrandProductLayer::compute_cubic`, but with changes to
/// accommodate the differences between `BatchedSparseGrandProductLayer` and
/// Similar to `SparseInterleavedPolynomial::compute_cubic`, but with changes to
/// accommodate the differences between `SparseInterleavedPolynomial` and
/// `BatchedGrandProductToggleLayer`. These differences are described in the doc comments
/// for `BatchedGrandProductToggleLayer::bind`.
///
Expand Down Expand Up @@ -1046,7 +1046,7 @@ where
}

/// Computes a batched grand product proof, layer by layer.
#[tracing::instrument(skip_all, name = "BatchedGrandProduct::prove_grand_product")]
#[tracing::instrument(skip_all, name = "ToggledBatchedGrandProduct::prove_grand_product")]
fn prove_grand_product(
&mut self,
opening_accumulator: Option<&mut ProverOpeningAccumulator<F, ProofTranscript>>,
Expand All @@ -1062,7 +1062,7 @@ where
}

/// Verifies the given grand product proof.
#[tracing::instrument(skip_all, name = "BatchedGrandProduct::verify_grand_product")]
#[tracing::instrument(skip_all, name = "ToggledBatchedGrandProduct::verify_grand_product")]
fn verify_grand_product(
proof: &BatchedGrandProductProof<PCS, ProofTranscript>,
claimed_outputs: &[F],
Expand Down

0 comments on commit d5838af

Please sign in to comment.