Skip to content

Commit

Permalink
change loglevel to info
Browse files Browse the repository at this point in the history
  • Loading branch information
chokobole committed Jul 9, 2024
1 parent 9f6d220 commit 795cc6b
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions halo2_proofs/src/plonk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,14 @@ where
.to_state();

let s = format!("{:?}", vk.pinned());
log::trace!("[Halo2:GenVK:VK] VKeyStr: {}", s);
// log::trace!("[Halo2:GenVK:VK] VKeyStr: {}", s);

hasher.update(&(s.len() as u64).to_le_bytes());
hasher.update(s.as_bytes());

// Hash in final Blake2bState
vk.transcript_repr = C::Scalar::from_uniform_bytes(hasher.finalize().as_array());
log::debug!(
log::info!(
"[Halo2:GenVK:TranscriptRepr] TranscriptRepr: {:?}",
vk.transcript_repr
);
Expand Down
14 changes: 7 additions & 7 deletions halo2_proofs/src/plonk/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ where
return Err(Error::Synthesis);
}
range_start = sub_range.end;
log::debug!(
log::info!(
"subCS_{} rw_rows: {}..{}",
i,
sub_range.start,
Expand Down Expand Up @@ -540,7 +540,7 @@ where
for (index, phase) in meta.challenge_phase.iter().enumerate() {
if current_phase == *phase {
let challenge = transcript.squeeze_challenge_scalar::<()>();
log::debug!(
log::info!(
"[Halo2:CreateProof:Challenge] {:#?}: {:?}",
index,
*challenge
Expand All @@ -563,7 +563,7 @@ where
log::info!("[Halo2:CreateProof:Theta] Phase has been started...");
// Sample theta challenge for keeping lookup columns linearly independent
let theta: ChallengeTheta<_> = transcript.squeeze_challenge_scalar();
log::debug!("[Halo2:CreateProof:Theta] Theta: {:?}", *theta);
log::info!("[Halo2:CreateProof:Theta] Theta: {:?}", *theta);

let lookups: Vec<Vec<mv_lookup::prover::Prepared<Scheme::Curve>>> = instance
.iter()
Expand Down Expand Up @@ -613,8 +613,8 @@ where

// Sample gamma challenge
let gamma: ChallengeGamma<_> = transcript.squeeze_challenge_scalar();
log::debug!("[Halo2:CreateProof:BetaGamma] Beta: {:?}", *beta);
log::debug!("[Halo2:CreateProof:BetaGamma] Gamma: {:?}", *gamma);
log::info!("[Halo2:CreateProof:BetaGamma] Beta: {:?}", *beta);
log::info!("[Halo2:CreateProof:BetaGamma] Gamma: {:?}", *gamma);

// Commit to permutations.
let permutations: Vec<permutation::prover::Committed<Scheme::Curve>> = instance
Expand Down Expand Up @@ -688,7 +688,7 @@ where
let y_start = Instant::now();
// Obtain challenge for keeping all separate gates linearly independent
let y: ChallengeY<_> = transcript.squeeze_challenge_scalar();
log::debug!("[Halo2:CreateProof:Y] Y: {:#?}", *y);
log::info!("[Halo2:CreateProof:Y] Y: {:#?}", *y);

// Calculate the advice polys
let advice: Vec<AdviceSingle<Scheme::Curve, Coeff>> = advice
Expand Down Expand Up @@ -745,7 +745,7 @@ where
log::info!("[Halo2:CreateProof:X] Phase has been started...");
let x_start = Instant::now();
let x: ChallengeX<_> = transcript.squeeze_challenge_scalar();
log::debug!("[Halo2:CreateProof:X] X: {:?}", *x);
log::info!("[Halo2:CreateProof:X] X: {:?}", *x);
let xn = x.pow([params.n()]);

if P::QUERY_INSTANCE {
Expand Down
12 changes: 6 additions & 6 deletions halo2_proofs/src/plonk/verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ where
for (phase, challenge) in vk.cs.challenge_phase.iter().zip(challenges.iter_mut()) {
if current_phase == *phase {
*challenge = *transcript.squeeze_challenge_scalar::<()>();
log::debug!(
log::info!(
"[Halo2:VerifyProof:Challenge] {:?}: {:?}",
phase.0,
*challenge
Expand All @@ -126,7 +126,7 @@ where

// Sample theta challenge for keeping lookup columns linearly independent
let theta: ChallengeTheta<_> = transcript.squeeze_challenge_scalar();
log::debug!("[Halo2:VerifyProof:Theta] Theta: {:#?}", *theta);
log::info!("[Halo2:VerifyProof:Theta] Theta: {:#?}", *theta);

let lookups_prepared = (0..num_proofs)
.map(|_| -> Result<Vec<_>, _> {
Expand All @@ -141,11 +141,11 @@ where

// Sample beta challenge
let beta: ChallengeBeta<_> = transcript.squeeze_challenge_scalar();
log::debug!("[Halo2:VerifyProof:Beta] Beta: {:#?}", *beta);
log::info!("[Halo2:VerifyProof:Beta] Beta: {:#?}", *beta);

// Sample gamma challenge
let gamma: ChallengeGamma<_> = transcript.squeeze_challenge_scalar();
log::debug!("[Halo2:VerifyProof:Gamma] Gamma: {:#?}", *gamma);
log::info!("[Halo2:VerifyProof:Gamma] Gamma: {:#?}", *gamma);

let permutations_committed = (0..num_proofs)
.map(|_| {
Expand Down Expand Up @@ -180,14 +180,14 @@ where

// Sample y challenge, which keeps the gates linearly independent.
let y: ChallengeY<_> = transcript.squeeze_challenge_scalar();
log::debug!("[Halo2:VerifyProof:Y] Y: {:#?}", *y);
log::info!("[Halo2:VerifyProof:Y] Y: {:#?}", *y);

let vanishing = vanishing.read_commitments_after_y(vk, transcript)?;

// Sample x challenge, which is used to ensure the circuit is
// satisfied with high probability.
let x: ChallengeX<_> = transcript.squeeze_challenge_scalar();
log::debug!("[Halo2:VerifyProof:X] X: {:#?}", *x);
log::info!("[Halo2:VerifyProof:X] X: {:#?}", *x);
let instance_evals = if V::QUERY_INSTANCE {
(0..num_proofs)
.map(|_| -> Result<Vec<_>, _> {
Expand Down
2 changes: 1 addition & 1 deletion halo2_proofs/src/poly/kzg/multiopen/gwc/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ where
R: RngCore,
{
let v: ChallengeV<_> = transcript.squeeze_challenge_scalar();
log::debug!("[Halo2:CreateProof:GWC:V] V: {:#?}", *v);
log::info!("[Halo2:CreateProof:GWC:V] V: {:#?}", *v);
let commitment_data = construct_intermediate_sets(queries);

for commitment_at_a_point in commitment_data.iter() {
Expand Down
4 changes: 2 additions & 2 deletions halo2_proofs/src/poly/kzg/multiopen/gwc/verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ where
I: IntoIterator<Item = VerifierQuery<'com, E::G1Affine, MSMKZG<E>>> + Clone,
{
let v: ChallengeV<_> = transcript.squeeze_challenge_scalar();
log::debug!("[Halo2:VerifyProof:GWC:V] V: {:#?}", *v);
log::info!("[Halo2:VerifyProof:GWC:V] V: {:#?}", *v);

let commitment_data = construct_intermediate_sets(queries);

Expand All @@ -62,7 +62,7 @@ where
.collect::<Result<Vec<E::G1Affine>, Error>>()?;

let u: ChallengeU<_> = transcript.squeeze_challenge_scalar();
log::debug!("[Halo2:VerifyProof:GWC:U] U: {:#?}", *u);
log::info!("[Halo2:VerifyProof:GWC:U] U: {:#?}", *u);

let mut commitment_multi = MSMKZG::<E>::new();
let mut eval_multi = E::Scalar::ZERO;
Expand Down
6 changes: 3 additions & 3 deletions halo2_proofs/src/poly/kzg/multiopen/shplonk/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ where
// TODO: explore if it is safe to use same challenge
// for different sets that are already combined with anoter challenge
let y: ChallengeY<_> = transcript.squeeze_challenge_scalar();
log::debug!("[Halo2:CreateProof:SHPlonk:Y] Y: {:#?}", *y);
log::info!("[Halo2:CreateProof:SHPlonk:Y] Y: {:#?}", *y);

let quotient_contribution = |rotation_set: &RotationSetExtension<E::G1Affine>| {
// [P_i_0(X) - R_i_0(X), P_i_1(X) - R_i_1(X), ... ]
Expand Down Expand Up @@ -195,7 +195,7 @@ where
.collect();

let v: ChallengeV<_> = transcript.squeeze_challenge_scalar();
log::debug!("[Halo2:CreateProof:SHPlonk:V] V: {:#?}", *v);
log::info!("[Halo2:CreateProof:SHPlonk:V] V: {:#?}", *v);

#[allow(clippy::needless_collect)]
let quotient_polynomials = rotation_sets
Expand All @@ -214,7 +214,7 @@ where
let h = self.params.commit(&h_x, Blind::default()).to_affine();
transcript.write_point(h)?;
let u: ChallengeU<_> = transcript.squeeze_challenge_scalar();
log::debug!("[Halo2:CreateProof:SHPlonk:U] U: {:#?}", *u);
log::info!("[Halo2:CreateProof:SHPlonk:U] U: {:#?}", *u);

let linearisation_contribution = |rotation_set: RotationSetExtension<E::G1Affine>| {
let mut diffs = super_point_set.clone();
Expand Down
6 changes: 3 additions & 3 deletions halo2_proofs/src/poly/kzg/multiopen/shplonk/verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ where
);

let y: ChallengeY<_> = transcript.squeeze_challenge_scalar();
log::debug!("[Halo2:VerifyProof:SHPlonk:Y] Y: {:#?}", *y);
log::info!("[Halo2:VerifyProof:SHPlonk:Y] Y: {:#?}", *y);
let v: ChallengeV<_> = transcript.squeeze_challenge_scalar();
log::debug!("[Halo2:VerifyProof:SHPlonk:V] V: {:#?}", *v);
log::info!("[Halo2:VerifyProof:SHPlonk:V] V: {:#?}", *v);

let h1 = transcript.read_point().map_err(|_| Error::SamplingError)?;
let u: ChallengeU<_> = transcript.squeeze_challenge_scalar();
log::debug!("[Halo2:VerifyProof:SHPlonk:U] U: {:#?}", *u);
log::info!("[Halo2:VerifyProof:SHPlonk:U] U: {:#?}", *u);
let h2 = transcript.read_point().map_err(|_| Error::SamplingError)?;

let (mut z_0_diff_inverse, mut z_0) = (E::Scalar::ZERO, E::Scalar::ZERO);
Expand Down
4 changes: 2 additions & 2 deletions halo2_proofs/src/transcript.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ where
C::Scalar: FromUniformBytes<64>,
{
fn write_point(&mut self, point: C) -> io::Result<()> {
log::trace!(
log::info!(
"[Halo2:WriteToProof] Proof[{}]: {:?}",
self.proof_idx,
point
Expand All @@ -372,7 +372,7 @@ where
self.writer.write_all(compressed.as_ref())
}
fn write_scalar(&mut self, scalar: C::Scalar) -> io::Result<()> {
log::trace!(
log::info!(
"[Halo2:WriteToProof] Proof[{}]: {:?}",
self.proof_idx,
scalar
Expand Down

0 comments on commit 795cc6b

Please sign in to comment.