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

Refactor constraint system #29

Merged
merged 16 commits into from
Feb 4, 2022
Merged
Show file tree
Hide file tree
Changes from 12 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
14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ license = "MIT/Apache-2.0"
edition = "2018"

[dependencies]
algebra = { git = "https://github.com/HorizenOfficial/ginger-lib", branch = "development", features = ["parallel", "fft", "derive"] }
bench-utils = { git = "https://github.com/HorizenOfficial/ginger-lib", branch = "development" }
r1cs-core = { git = "https://github.com/HorizenOfficial/ginger-lib", branch = "development" }
r1cs-std = { git = "https://github.com/HorizenOfficial/ginger-lib", branch = "development" }
algebra = { git = "https://github.com/HorizenOfficial/ginger-lib", branch = "sc_testnet_2", features = ["parallel", "fft", "derive"] }
bench-utils = { git = "https://github.com/HorizenOfficial/ginger-lib", branch = "sc_testnet_2" }
r1cs-core = { git = "https://github.com/HorizenOfficial/ginger-lib", branch = "refactor_constraint_system" }
r1cs-std = { git = "https://github.com/HorizenOfficial/ginger-lib", branch = "refactor_constraint_system" }

poly-commit = { git = "https://github.com/HorizenLabs/poly-commit", branch = "dev" }
poly-commit = { git = "https://github.com/HorizenLabs/poly-commit", branch = "sc_testnet_2" }

rand = "0.8.4"
rand_core = { version = "0.6.3" }
Expand All @@ -39,8 +39,8 @@ digest = { version = "0.8" }
derivative = { version = "2", features = ["use_core"] }

[dev-dependencies]
algebra = { git = "https://github.com/HorizenOfficial/ginger-lib", branch = "development", features = ["tweedle", "derive"]}
r1cs-std = { git = "https://github.com/HorizenOfficial/ginger-lib", branch = "development", features = ["tweedle"]}
algebra = { git = "https://github.com/HorizenOfficial/ginger-lib", branch = "sc_testnet_2", features = ["tweedle", "derive"]}
r1cs-std = { git = "https://github.com/HorizenOfficial/ginger-lib", branch = "refactor_constraint_system", features = ["tweedle"]}

blake2 = { version = "0.8.1", default-features = false }
criterion = "0.3"
Expand Down
14 changes: 7 additions & 7 deletions benches/tweedle_test_circuits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use marlin::*;
use poly_commit::ipa_pc::InnerProductArgPC;

use algebra::PrimeField;
use r1cs_core::{ConstraintSynthesizer, ConstraintSystem, SynthesisError};
use r1cs_core::{ConstraintSynthesizer, ConstraintSystemAbstract, SynthesisError};

use criterion::Criterion;
use criterion::{BatchSize, BenchmarkId};
Expand Down Expand Up @@ -94,7 +94,7 @@ pub struct TestCircuit2c<F: PrimeField> {
}

impl<F: PrimeField> ConstraintSynthesizer<F> for TestCircuit1a<F> {
fn generate_constraints<CS: ConstraintSystem<F>>(
fn generate_constraints<CS: ConstraintSystemAbstract<F>>(
self,
cs: &mut CS,
) -> Result<(), SynthesisError> {
Expand Down Expand Up @@ -146,7 +146,7 @@ impl<F: PrimeField> ConstraintSynthesizer<F> for TestCircuit1a<F> {
}

impl<F: PrimeField> ConstraintSynthesizer<F> for TestCircuit1b<F> {
fn generate_constraints<CS: ConstraintSystem<F>>(
fn generate_constraints<CS: ConstraintSystemAbstract<F>>(
self,
cs: &mut CS,
) -> Result<(), SynthesisError> {
Expand Down Expand Up @@ -211,7 +211,7 @@ impl<F: PrimeField> ConstraintSynthesizer<F> for TestCircuit1b<F> {
}

impl<F: PrimeField> ConstraintSynthesizer<F> for TestCircuit1c<F> {
fn generate_constraints<CS: ConstraintSystem<F>>(
fn generate_constraints<CS: ConstraintSystemAbstract<F>>(
self,
cs: &mut CS,
) -> Result<(), SynthesisError> {
Expand Down Expand Up @@ -297,7 +297,7 @@ impl<F: PrimeField> ConstraintSynthesizer<F> for TestCircuit1c<F> {
}

impl<F: PrimeField> ConstraintSynthesizer<F> for TestCircuit2a<F> {
fn generate_constraints<CS: ConstraintSystem<F>>(
fn generate_constraints<CS: ConstraintSystemAbstract<F>>(
self,
cs: &mut CS,
) -> Result<(), SynthesisError> {
Expand Down Expand Up @@ -349,7 +349,7 @@ impl<F: PrimeField> ConstraintSynthesizer<F> for TestCircuit2a<F> {
}

impl<F: PrimeField> ConstraintSynthesizer<F> for TestCircuit2b<F> {
fn generate_constraints<CS: ConstraintSystem<F>>(
fn generate_constraints<CS: ConstraintSystemAbstract<F>>(
self,
cs: &mut CS,
) -> Result<(), SynthesisError> {
Expand Down Expand Up @@ -428,7 +428,7 @@ impl<F: PrimeField> ConstraintSynthesizer<F> for TestCircuit2b<F> {
}

impl<F: PrimeField> ConstraintSynthesizer<F> for TestCircuit2c<F> {
fn generate_constraints<CS: ConstraintSystem<F>>(
fn generate_constraints<CS: ConstraintSystemAbstract<F>>(
self,
cs: &mut CS,
) -> Result<(), SynthesisError> {
Expand Down
Loading