Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unwarp Results #46

Merged
merged 3 commits into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ ark-ff = { version = "0.5", default-features = false }
ark-ec = { version = "0.5", default-features = false }
ark-poly = { version = "0.5", default-features = false }
ark-serialize = { version = "0.5", default-features = false, features = ["derive"] }
w3f-pcs = { version = "0.0.1", default-features = false }
w3f-pcs = { version = "0.0.2", default-features = false }
rayon = { version = "1", default-features = false }
8 changes: 4 additions & 4 deletions w3f-plonk-common/src/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl<F: PrimeField, CS: PCS<F>, T: PlonkTranscript<F, CS>> PlonkProver<F, CS, T>
transcript.add_instance(&piop.result());
// ROUND 1
// The prover commits to the columns.
let column_commitments = piop.committed_columns(|p| CS::commit(&self.pcs_ck, p));
let column_commitments = piop.committed_columns(|p| CS::commit(&self.pcs_ck, p).unwrap());
transcript.add_committed_cols(&column_commitments);

// ROUND 2
Expand All @@ -52,7 +52,7 @@ impl<F: PrimeField, CS: PCS<F>, T: PlonkTranscript<F, CS>> PlonkProver<F, CS, T>
let agg_constraint_poly = agg_constraint_poly.interpolate();
let quotient_poly = piop.domain().divide_by_vanishing_poly(&agg_constraint_poly);
// The prover commits to the quotient polynomial...
let quotient_commitment = CS::commit(&self.pcs_ck, &quotient_poly);
let quotient_commitment = CS::commit(&self.pcs_ck, &quotient_poly).unwrap();
transcript.add_quotient_commitment(&quotient_commitment);

// and receives the evaluation point in response
Expand All @@ -71,8 +71,8 @@ impl<F: PrimeField, CS: PCS<F>, T: PlonkTranscript<F, CS>> PlonkProver<F, CS, T>
let polys_at_zeta = [columns_to_open, vec![quotient_poly]].concat();
let nus = transcript.get_kzg_aggregation_challenges(polys_at_zeta.len());
let agg_at_zeta = aggregate_polys(&polys_at_zeta, &nus);
let agg_at_zeta_proof = CS::open(&self.pcs_ck, &agg_at_zeta, zeta);
let lin_at_zeta_omega_proof = CS::open(&self.pcs_ck, &lin, zeta_omega);
let agg_at_zeta_proof = CS::open(&self.pcs_ck, &agg_at_zeta, zeta).unwrap();
let lin_at_zeta_omega_proof = CS::open(&self.pcs_ck, &lin, zeta_omega).unwrap();
Proof {
column_commitments,
quotient_commitment,
Expand Down
1 change: 1 addition & 0 deletions w3f-plonk-common/src/verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ impl<F: PrimeField, CS: PCS<F>, T: PlonkTranscript<F, CS>> PlonkVerifier<F, CS,
vec![proof.agg_at_zeta_proof, proof.lin_at_zeta_omega_proof],
rng,
)
.is_ok()
}

pub fn restore_challenges<Commitments, Evaluations>(
Expand Down
6 changes: 3 additions & 3 deletions w3f-ring-proof/src/piop/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ impl<E: Pairing> FixedColumnsCommitted<E::ScalarField, KzgCommitment<E>> {
impl<F: PrimeField, G: AffineRepr<BaseField = F>> FixedColumns<F, G> {
fn commit<CS: PCS<F>>(&self, ck: &CS::CK) -> FixedColumnsCommitted<F, CS::C> {
let points = [
CS::commit(ck, self.points.xs.as_poly()),
CS::commit(ck, self.points.ys.as_poly()),
CS::commit(ck, self.points.xs.as_poly()).unwrap(),
CS::commit(ck, self.points.ys.as_poly()).unwrap(),
];
let ring_selector = CS::commit(ck, self.ring_selector.as_poly());
let ring_selector = CS::commit(ck, self.ring_selector.as_poly()).unwrap();
FixedColumnsCommitted {
points,
ring_selector,
Expand Down
Loading