Skip to content

Commit

Permalink
Revert "Integrate with sponge & Add multivariate challenge strategy (a…
Browse files Browse the repository at this point in the history
…rkworks-rs#82)"

This reverts commit 982e1a1.
  • Loading branch information
nmohnblatt committed Jun 29, 2022
1 parent e219a4a commit d79ead1
Show file tree
Hide file tree
Showing 11 changed files with 841 additions and 999 deletions.
5 changes: 0 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,8 @@

### Breaking changes

- [\#82](https://github.com/arkworks-rs/poly-commit/pull/82) Function parameter `opening_challenge: F` for `open`,
`check`, has been changed from `F` to `opening_challenges: &mut ChallengeGenerator`.

### Features

- [\#82](https://github.com/arkworks-rs/poly-commit/pull/82) Add multivariate opening challenge strategy. Integrate with sponge API.

### Improvements

### Bug fixes
Expand Down
7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ ark-serialize = { version = "^0.3.0", default-features = false, features = [ "de
ark-ff = { version = "^0.3.0", default-features = false }
ark-ec = { version = "^0.3.0", default-features = false }
ark-poly = {version = "^0.3.0", default-features = false }
ark-sponge = {version = "^0.3.0", default-features = false}

ark-std = { version = "^0.3.0", default-features = false }
ark-relations = { version = "^0.3.0", default-features = false, optional = true }
Expand All @@ -37,6 +36,8 @@ digest = "0.9"
rayon = { version = "1", optional = true }
derivative = { version = "2", features = [ "use_core" ] }

tracing = { version = "0.1", default-features = false, features = [ "attributes" ] }

[dev-dependencies]
ark-ed-on-bls12-381 = { version = "^0.3.0", default-features = false }
ark-bls12-381 = { version = "^0.3.0", default-features = false, features = [ "curve" ] }
Expand All @@ -57,7 +58,7 @@ debug = true

[features]
default = [ "std", "parallel" ]
std = [ "ark-ff/std", "ark-ec/std", "ark-nonnative-field/std", "ark-poly/std", "ark-std/std", "ark-relations/std", "ark-serialize/std", "ark-sponge/std"]
r1cs = [ "ark-relations", "ark-r1cs-std", "ark-nonnative-field", "hashbrown", "ark-sponge/r1cs"]
std = [ "ark-ff/std", "ark-ec/std", "ark-nonnative-field/std", "ark-poly/std", "ark-std/std", "ark-relations/std", "ark-serialize/std" ]
r1cs = [ "ark-relations", "ark-r1cs-std", "ark-nonnative-field", "hashbrown" ]
print-trace = [ "ark-std/print-trace" ]
parallel = [ "std", "ark-ff/parallel", "ark-ec/parallel", "ark-poly/parallel", "ark-std/parallel", "rayon" ]
61 changes: 0 additions & 61 deletions src/challenge.rs

This file was deleted.

6 changes: 2 additions & 4 deletions src/constraints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use ark_nonnative_field::NonNativeFieldVar;
use ark_poly::Polynomial;
use ark_r1cs_std::{fields::fp::FpVar, prelude::*};
use ark_relations::r1cs::{ConstraintSystemRef, Namespace, Result as R1CSResult, SynthesisError};
use ark_sponge::CryptographicSponge;
use ark_std::{borrow::Borrow, cmp::Eq, cmp::PartialEq, hash::Hash, marker::Sized};
use hashbrown::{HashMap, HashSet};

Expand Down Expand Up @@ -94,9 +93,8 @@ pub struct PCCheckRandomDataVar<TargetField: PrimeField, BaseField: PrimeField>
pub trait PCCheckVar<
PCF: PrimeField,
P: Polynomial<PCF>,
PC: PolynomialCommitment<PCF, P, S>,
PC: PolynomialCommitment<PCF, P>,
ConstraintF: PrimeField,
S: CryptographicSponge,
>: Clone
{
/// An allocated version of `PC::VerifierKey`.
Expand All @@ -119,7 +117,7 @@ pub trait PCCheckVar<
type ProofVar: AllocVar<PC::Proof, ConstraintF> + Clone;

/// An allocated version of `PC::BatchLCProof`.
type BatchLCProofVar: AllocVar<BatchLCProof<PCF, PC::BatchProof>, ConstraintF> + Clone;
type BatchLCProofVar: AllocVar<BatchLCProof<PCF, P, PC>, ConstraintF> + Clone;

/// Add to `ConstraintSystemRef<ConstraintF>` new constraints that check that `proof_i` is a valid evaluation
/// proof at `point_i` for the polynomial in `commitment_i`.
Expand Down
8 changes: 4 additions & 4 deletions src/data_structures.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::{Polynomial, Rc, String, Vec};
use ark_ff::{Field, PrimeField, ToConstraintField};
use crate::{Polynomial, PolynomialCommitment, Rc, String, Vec};
use ark_ff::{Field, ToConstraintField};
use ark_serialize::{CanonicalDeserialize, CanonicalSerialize, SerializationError};
use ark_std::rand::RngCore;
use ark_std::{
Expand Down Expand Up @@ -104,9 +104,9 @@ pub trait PCProof: Clone + ark_ff::ToBytes + CanonicalSerialize + CanonicalDeser

/// A proof of satisfaction of linear combinations.
#[derive(Clone, CanonicalSerialize, CanonicalDeserialize)]
pub struct BatchLCProof<F: PrimeField, T: Clone + CanonicalSerialize + CanonicalDeserialize> {
pub struct BatchLCProof<F: Field, P: Polynomial<F>, PC: PolynomialCommitment<F, P>> {
/// Evaluation proof.
pub proof: T,
pub proof: PC::BatchProof,
/// Evaluations required to verify the proof.
pub evals: Option<Vec<F>>,
}
Expand Down
Loading

0 comments on commit d79ead1

Please sign in to comment.