Skip to content

Commit

Permalink
Remove random tape
Browse files Browse the repository at this point in the history
  • Loading branch information
darth-cy committed Dec 9, 2024
1 parent aa19362 commit e905720
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 15 deletions.
3 changes: 0 additions & 3 deletions spartan_parallel/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1854,7 +1854,6 @@ impl<S: SpartanExtensionField> SNARK<S> {
block_wit_secs,
&block_inst.inst,
transcript,
&mut random_tape,
)
};

Expand Down Expand Up @@ -1969,7 +1968,6 @@ impl<S: SpartanExtensionField> SNARK<S> {
],
&pairwise_check_inst.inst,
transcript,
&mut random_tape,
)
};

Expand Down Expand Up @@ -2096,7 +2094,6 @@ impl<S: SpartanExtensionField> SNARK<S> {
],
&perm_root_inst.inst,
transcript,
&mut random_tape,
)
};

Expand Down
11 changes: 1 addition & 10 deletions spartan_parallel/src/r1csproof.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![allow(clippy::too_many_arguments)]
use super::custom_dense_mlpoly::DensePolynomialPqx;
use super::dense_mlpoly::{DensePolynomial, EqPolynomial, PolyEvalProof};
use super::dense_mlpoly::{DensePolynomial, EqPolynomial};
use super::errors::ProofVerifyError;
use super::math::Math;
use super::r1csinstance::R1CSInstance;
Expand All @@ -19,7 +19,6 @@ pub struct R1CSProof<S: SpartanExtensionField> {
sc_proof_phase1: SumcheckInstanceProof<S>,
sc_proof_phase2: SumcheckInstanceProof<S>,
claims_phase2: (S, S, S),
// debug_zk
// proof_eval_vars_at_ry_list: Vec<PolyEvalProof<S>>,
}

Expand All @@ -38,7 +37,6 @@ impl<S: SpartanExtensionField> R1CSProof<S> {
evals_Bz: &mut DensePolynomialPqx<S>,
evals_Cz: &mut DensePolynomialPqx<S>,
transcript: &mut Transcript,
random_tape: &mut RandomTape<S>,
) -> (SumcheckInstanceProof<S>, Vec<S>, Vec<S>) {
let comb_func = |poly_A_comp: &S, poly_B_comp: &S, poly_C_comp: &S, poly_D_comp: &S| -> S {
*poly_A_comp * (*poly_B_comp * *poly_C_comp - *poly_D_comp)
Expand All @@ -61,7 +59,6 @@ impl<S: SpartanExtensionField> R1CSProof<S> {
evals_Cz,
comb_func,
transcript,
random_tape,
);

(sc_proof_phase_one, r, claims)
Expand All @@ -80,7 +77,6 @@ impl<S: SpartanExtensionField> R1CSProof<S> {
evals_ABC: &mut DensePolynomialPqx<S>,
evals_z: &mut DensePolynomialPqx<S>,
transcript: &mut Transcript,
random_tape: &mut RandomTape<S>,
) -> (SumcheckInstanceProof<S>, Vec<S>, Vec<S>) {
let comb_func = |poly_A_comp: &S, poly_B_comp: &S, poly_C_comp: &S| -> S {
*poly_A_comp * *poly_B_comp * *poly_C_comp
Expand All @@ -99,7 +95,6 @@ impl<S: SpartanExtensionField> R1CSProof<S> {
evals_z,
comb_func,
transcript,
random_tape,
);

(sc_proof_phase_two, r, claims)
Expand Down Expand Up @@ -131,7 +126,6 @@ impl<S: SpartanExtensionField> R1CSProof<S> {
// INSTANCES
inst: &R1CSInstance<S>,
transcript: &mut Transcript,
random_tape: &mut RandomTape<S>,
) -> (R1CSProof<S>, [Vec<S>; 4]) {
let timer_prove = Timer::new("R1CSProof::prove");
<Transcript as ProofTranscript<S>>::append_protocol_name(
Expand Down Expand Up @@ -243,7 +237,6 @@ impl<S: SpartanExtensionField> R1CSProof<S> {
&mut poly_Bz,
&mut poly_Cz,
transcript,
random_tape,
);

assert_eq!(poly_tau_p.len(), 1);
Expand Down Expand Up @@ -351,7 +344,6 @@ impl<S: SpartanExtensionField> R1CSProof<S> {
&mut ABC_poly,
&mut Z_poly,
transcript,
random_tape,
);
timer_sc_proof_phase2.stop();

Expand Down Expand Up @@ -507,7 +499,6 @@ impl<S: SpartanExtensionField> R1CSProof<S> {
sc_proof_phase1,
sc_proof_phase2,
claims_phase2: (*Az_claim, *Bz_claim, *Cz_claim),
// debug_zk
// proof_eval_vars_at_ry_list,
},
[rp, rq_rev, rx, [rw, ry].concat()],
Expand Down
2 changes: 0 additions & 2 deletions spartan_parallel/src/sumcheck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ impl<S: SpartanExtensionField> SumcheckInstanceProof<S> {
poly_C: &mut DensePolynomialPqx<S>,
comb_func: F,
transcript: &mut Transcript,
random_tape: &mut RandomTape<S>,
) -> (Self, Vec<S>, Vec<S>)
where
F: Fn(&S, &S, &S) -> S,
Expand Down Expand Up @@ -522,7 +521,6 @@ impl<S: SpartanExtensionField> SumcheckInstanceProof<S> {
poly_D: &mut DensePolynomialPqx<S>,
comb_func: F,
transcript: &mut Transcript,
random_tape: &mut RandomTape<S>,
) -> (Self, Vec<S>, Vec<S>)
where
F: Fn(&S, &S, &S, &S) -> S,
Expand Down

0 comments on commit e905720

Please sign in to comment.