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

Constraints #39

Open
wants to merge 62 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
073d8a0
Merge conflict fix
Pratyush Oct 20, 2020
aa980cb
Update to `arkworks` libraries
Pratyush Oct 20, 2020
58a069d
constraints and fiat-shamir
npwardberkeley Oct 26, 2020
06231cf
initial constraints (debugging in progress)
npwardberkeley Oct 27, 2020
2459236
updated constraints to ark
npwardberkeley Oct 27, 2020
6d077da
cargo fmt
npwardberkeley Oct 27, 2020
1418b58
Delete constraint.txt
npwardberkeley Nov 2, 2020
1d52584
using HashMap/HashSet instead of BTree
npwardberkeley Nov 4, 2020
8076f91
Merge conflict fix
Pratyush Oct 20, 2020
b8be296
Update to `arkworks` libraries
Pratyush Oct 20, 2020
2f01278
constraints and fiat-shamir
npwardberkeley Oct 26, 2020
1f736aa
initial constraints (debugging in progress)
npwardberkeley Oct 27, 2020
feddd4e
updated constraints to ark
npwardberkeley Oct 27, 2020
46a6921
cargo fmt
npwardberkeley Oct 27, 2020
5d20cc4
Delete constraint.txt
npwardberkeley Nov 2, 2020
076cbed
using HashMap/HashSet instead of BTree
npwardberkeley Nov 4, 2020
9df6499
fixes from rebase
npwardberkeley Nov 6, 2020
701c207
merge
npwardberkeley Nov 6, 2020
49f128b
progress on SNARK impls
npwardberkeley Nov 6, 2020
ad0f61c
fixes
npwardberkeley Nov 6, 2020
5d3f6fe
fixes
npwardberkeley Nov 6, 2020
5ad89e5
fixes
npwardberkeley Nov 6, 2020
b5092b9
fix
weikengchen Nov 6, 2020
8c6958b
push the current progress
weikengchen Nov 6, 2020
2a77081
cargo fmt
npwardberkeley Nov 6, 2020
e690eb4
progress; need to add something to polycommit
weikengchen Nov 12, 2020
ad7df56
progress
weikengchen Nov 12, 2020
8e52cb4
Update Cargo.toml
weikengchen Nov 12, 2020
c5ba601
tracing
weikengchen Nov 12, 2020
cf1760a
fix
weikengchen Nov 12, 2020
eef9165
clippy
weikengchen Nov 12, 2020
9d2ebdc
Merge branch 'constraints' of github.com:arkworks-rs/marlin into cons…
weikengchen Nov 12, 2020
a3529b0
fix an error after clippy
weikengchen Nov 12, 2020
d621fdf
Update src/constraints/snark.rs
weikengchen Nov 12, 2020
586fa25
Update ci.yml
weikengchen Nov 12, 2020
65babf3
change ref to crypto primitives
weikengchen Nov 12, 2020
8e55011
tracing subscriber optional
weikengchen Nov 12, 2020
95e3bf4
fix
weikengchen Nov 13, 2020
c821313
Merge branch 'master' into constraints
weikengchen Nov 13, 2020
0452190
fix conflicts
weikengchen Nov 13, 2020
7ded904
fix nostd
weikengchen Nov 13, 2020
e3624c4
tweak for pcd compatability
npwardberkeley Nov 14, 2020
15bc047
small fix
npwardberkeley Nov 14, 2020
4e3e55a
sync with nonnative
weikengchen Nov 17, 2020
4e874fa
fmt std
weikengchen Nov 17, 2020
aa1a33e
fix
weikengchen Nov 17, 2020
7d0bbfd
fix
weikengchen Nov 17, 2020
fdd1708
fixed some comments, and cleaned up others
npwardberkeley Nov 17, 2020
33a9a35
cleanup
weikengchen Nov 17, 2020
da9098e
cleanup
weikengchen Nov 17, 2020
97f4d2c
fix with the upstream change
weikengchen Nov 20, 2020
7b313c8
slightly increase the num of partial rounds
weikengchen Nov 23, 2020
04a78e8
increase rounds; generate round constants via a transparent setup
weikengchen Nov 24, 2020
05ff4cc
change the treatment of verifier_size
weikengchen Nov 25, 2020
e3a42ee
Merge branch 'master' into constraints
weikengchen Feb 5, 2021
d50c7df
progress; still there are several bugs
weikengchen Feb 9, 2021
d59ecbc
progress
weikengchen Feb 9, 2021
1d73f04
cleanup
weikengchen Feb 9, 2021
aa0728c
fix bench
weikengchen Feb 9, 2021
9296228
remove bench-utils
weikengchen Mar 23, 2021
d788633
fix double import
weikengchen Mar 23, 2021
903c741
update dependencies to use release versions
Will-Lin4 Apr 29, 2021
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
37 changes: 22 additions & 15 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,34 @@ license = "MIT/Apache-2.0"
edition = "2018"

[dependencies]
ark-serialize = { git = "https://github.com/arkworks-rs/algebra", default-features = false, features = [ "derive" ] }
ark-ff = { git = "https://github.com/arkworks-rs/algebra", default-features = false }
ark-std = { git = "https://github.com/arkworks-rs/utils", default-features = false }
ark-poly = { git = "https://github.com/arkworks-rs/algebra", default-features = false }
ark-relations = { git = "https://github.com/arkworks-rs/snark", default-features = false }
ark-poly-commit = { git = "https://github.com/arkworks-rs/poly-commit", default-features = false }
bench-utils = { git = "https://github.com/arkworks-rs/utils", default-features = false }
ark-serialize = { version = "^0.2.0", default-features = false, features = [ "derive" ] }
ark-ff = { version = "^0.2.0", default-features = false }
ark-std = { version = "^0.2.0", default-features = false }
ark-poly = { version = "^0.2.0", default-features = false }
ark-relations = { version = "^0.2.0", default-features = false }
ark-poly-commit = { git = "https://github.com/arkworks-rs/poly-commit", branch = "constraints", default-features = false, features = [ "r1cs" ] }

rand_core = { version = "0.5" }
rand_chacha = { version = "0.2.1", default-features = false }
rayon = { version = "1", optional = true }
digest = { version = "0.9" }
derivative = { version = "2", features = ["use_core"] }

ark-ec = { version = "^0.2.0", default-features = false }
ark-crypto-primitives = { version = "^0.2.0", default-features = false, features = [ "r1cs" ] }
ark-r1cs-std = { version = "^0.2.0", default-features = false }
ark-nonnative-field = { version = "^0.2.0", default-features = false }
ark-snark = { version = "^0.2.0", default-features = false }
hashbrown = "0.9"
tracing = { version = "0.1", default-features = false, features = [ "attributes" ] }
tracing-subscriber = { version = "0.2", default-features = false, optional = true }

[dev-dependencies]
blake2 = { version = "0.9", default-features = false }
ark-bls12-381 = { git = "https://github.com/arkworks-rs/curves", default-features = false, features = [ "curve" ] }
ark-mnt4-298 = { git = "https://github.com/arkworks-rs/curves", default-features = false, features = ["r1cs", "curve"] }
ark-mnt6-298 = { git = "https://github.com/arkworks-rs/curves", default-features = false, features = ["r1cs"] }
ark-mnt4-753 = { git = "https://github.com/arkworks-rs/curves", default-features = false, features = ["r1cs", "curve"] }
ark-mnt6-753 = { git = "https://github.com/arkworks-rs/curves", default-features = false, features = ["r1cs"] }
ark-bls12-381 = { version = "^0.2.0", default-features = false, features = [ "curve" ] }
ark-mnt4-298 = { version = "^0.2.0", default-features = false, features = ["r1cs", "curve"] }
ark-mnt6-298 = { version = "^0.2.0", default-features = false, features = ["r1cs"] }
ark-mnt4-753 = { version = "^0.2.0", default-features = false, features = ["r1cs", "curve"] }
ark-mnt6-753 = { version = "^0.2.0", default-features = false, features = ["r1cs"] }

[profile.release]
opt-level = 3
Expand All @@ -61,8 +68,8 @@ panic = 'abort'

[features]
default = ["std", "parallel"]
std = [ "ark-ff/std", "ark-poly/std", "ark-relations/std", "ark-std/std", "ark-serialize/std", "ark-poly-commit/std" ]
print-trace = [ "bench-utils/print-trace" ]
std = [ "ark-crypto-primitives/std", "tracing-subscriber", "ark-ff/std", "ark-nonnative-field/std", "ark-poly/std", "ark-relations/std", "ark-std/std", "ark-serialize/std", "ark-poly-commit/std" ]
print-trace = [ "ark-std/print-trace" ]
parallel = [ "std", "ark-ff/parallel", "ark-poly/parallel", "ark-std/parallel", "ark-poly-commit/parallel", "rayon" ]

[[bench]]
Expand Down
66 changes: 41 additions & 25 deletions benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
// RAYON_NUM_THREADS=N cargo bench --no-default-features --features "std parallel" -- --nocapture
// where N is the number of threads you want to use (N = 1 for single-thread).

use ark_bls12_381::{Bls12_381, Fr as BlsFr};
use ark_bls12_381::{Bls12_381, Fq as BlsFq, Fr as BlsFr};
use ark_ff::PrimeField;
use ark_marlin::fiat_shamir::FiatShamirChaChaRng;
use ark_marlin::Marlin;
use ark_mnt4_298::{Fr as MNT4Fr, MNT4_298};
use ark_mnt4_753::{Fr as MNT4BigFr, MNT4_753};
use ark_mnt6_298::{Fr as MNT6Fr, MNT6_298};
use ark_mnt6_753::{Fr as MNT6BigFr, MNT6_753};
use ark_marlin::MarlinDefaultConfig;
use ark_mnt4_298::{Fq as MNT4Fq, Fr as MNT4Fr, MNT4_298};
use ark_mnt4_753::{Fq as MNT4BigFq, Fr as MNT4BigFr, MNT4_753};
use ark_mnt6_298::{Fq as MNT6Fq, Fr as MNT6Fr, MNT6_298};
use ark_mnt6_753::{Fq as MNT6BigFq, Fr as MNT6BigFr, MNT6_753};
use ark_poly::univariate::DensePolynomial;
use ark_poly_commit::marlin_pc::MarlinKZG10;
use ark_relations::{
Expand Down Expand Up @@ -66,7 +68,7 @@ impl<F: PrimeField> ConstraintSynthesizer<F> for DummyCircuit<F> {
}

macro_rules! marlin_prove_bench {
($bench_name:ident, $bench_field:ty, $bench_pairing_engine:ty) => {
($bench_name:ident, $bench_field:ty, $base_field:ty, $bench_pairing_engine:ty) => {
let rng = &mut ark_std::test_rng();
let c = DummyCircuit::<$bench_field> {
a: Some(<$bench_field>::rand(rng)),
Expand All @@ -77,14 +79,18 @@ macro_rules! marlin_prove_bench {

let srs = Marlin::<
$bench_field,
$base_field,
MarlinKZG10<$bench_pairing_engine, DensePolynomial<$bench_field>>,
Blake2s,
FiatShamirChaChaRng<$bench_field, $base_field, Blake2s>,
MarlinDefaultConfig,
>::universal_setup(65536, 65536, 65536, rng)
.unwrap();
let (pk, _) = Marlin::<
$bench_field,
$base_field,
MarlinKZG10<$bench_pairing_engine, DensePolynomial<$bench_field>>,
Blake2s,
FiatShamirChaChaRng<$bench_field, $base_field, Blake2s>,
MarlinDefaultConfig,
>::index(&srs, c)
.unwrap();

Expand All @@ -93,8 +99,10 @@ macro_rules! marlin_prove_bench {
for _ in 0..NUM_PROVE_REPEATITIONS {
let _ = Marlin::<
$bench_field,
$base_field,
MarlinKZG10<$bench_pairing_engine, DensePolynomial<$bench_field>>,
Blake2s,
FiatShamirChaChaRng<$bench_field, $base_field, Blake2s>,
MarlinDefaultConfig,
>::prove(&pk, c.clone(), rng)
.unwrap();
}
Expand All @@ -108,7 +116,7 @@ macro_rules! marlin_prove_bench {
}

macro_rules! marlin_verify_bench {
($bench_name:ident, $bench_field:ty, $bench_pairing_engine:ty) => {
($bench_name:ident, $bench_field:ty, $base_field:ty, $bench_pairing_engine:ty) => {
let rng = &mut ark_std::test_rng();
let c = DummyCircuit::<$bench_field> {
a: Some(<$bench_field>::rand(rng)),
Expand All @@ -119,20 +127,26 @@ macro_rules! marlin_verify_bench {

let srs = Marlin::<
$bench_field,
$base_field,
MarlinKZG10<$bench_pairing_engine, DensePolynomial<$bench_field>>,
Blake2s,
FiatShamirChaChaRng<$bench_field, $base_field, Blake2s>,
MarlinDefaultConfig,
>::universal_setup(65536, 65536, 65536, rng)
.unwrap();
let (pk, vk) = Marlin::<
$bench_field,
$base_field,
MarlinKZG10<$bench_pairing_engine, DensePolynomial<$bench_field>>,
Blake2s,
FiatShamirChaChaRng<$bench_field, $base_field, Blake2s>,
MarlinDefaultConfig,
>::index(&srs, c)
.unwrap();
let proof = Marlin::<
$bench_field,
$base_field,
MarlinKZG10<$bench_pairing_engine, DensePolynomial<$bench_field>>,
Blake2s,
FiatShamirChaChaRng<$bench_field, $base_field, Blake2s>,
MarlinDefaultConfig,
>::prove(&pk, c.clone(), rng)
.unwrap();

Expand All @@ -143,9 +157,11 @@ macro_rules! marlin_verify_bench {
for _ in 0..NUM_VERIFY_REPEATITIONS {
let _ = Marlin::<
$bench_field,
$base_field,
MarlinKZG10<$bench_pairing_engine, DensePolynomial<$bench_field>>,
Blake2s,
>::verify(&vk, &vec![v], &proof, rng)
FiatShamirChaChaRng<$bench_field, $base_field, Blake2s>,
MarlinDefaultConfig,
>::verify(&vk, &vec![v], &proof)
.unwrap();
}

Expand All @@ -158,19 +174,19 @@ macro_rules! marlin_verify_bench {
}

fn bench_prove() {
marlin_prove_bench!(bls, BlsFr, Bls12_381);
marlin_prove_bench!(mnt4, MNT4Fr, MNT4_298);
marlin_prove_bench!(mnt6, MNT6Fr, MNT6_298);
marlin_prove_bench!(mnt4big, MNT4BigFr, MNT4_753);
marlin_prove_bench!(mnt6big, MNT6BigFr, MNT6_753);
marlin_prove_bench!(bls, BlsFr, BlsFq, Bls12_381);
marlin_prove_bench!(mnt4, MNT4Fr, MNT4Fq, MNT4_298);
marlin_prove_bench!(mnt6, MNT6Fr, MNT6Fq, MNT6_298);
marlin_prove_bench!(mnt4big, MNT4BigFr, MNT4BigFq, MNT4_753);
marlin_prove_bench!(mnt6big, MNT6BigFr, MNT6BigFq, MNT6_753);
}

fn bench_verify() {
marlin_verify_bench!(bls, BlsFr, Bls12_381);
marlin_verify_bench!(mnt4, MNT4Fr, MNT4_298);
marlin_verify_bench!(mnt6, MNT6Fr, MNT6_298);
marlin_verify_bench!(mnt4big, MNT4BigFr, MNT4_753);
marlin_verify_bench!(mnt6big, MNT6BigFr, MNT6_753);
marlin_verify_bench!(bls, BlsFr, BlsFq, Bls12_381);
marlin_verify_bench!(mnt4, MNT4Fr, MNT4Fq, MNT4_298);
marlin_verify_bench!(mnt6, MNT6Fr, MNT6Fq, MNT6_298);
marlin_verify_bench!(mnt4big, MNT4BigFr, MNT4BigFq, MNT4_753);
marlin_verify_bench!(mnt6big, MNT6BigFr, MNT6BigFq, MNT6_753);
}

fn main() {
Expand Down
3 changes: 1 addition & 2 deletions src/ahp/indexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub struct IndexInfo<F> {
pub num_instance_variables: usize,

#[doc(hidden)]
f: PhantomData<F>,
pub f: PhantomData<F>,
}

impl<F: PrimeField> ark_ff::ToBytes for IndexInfo<F> {
Expand Down Expand Up @@ -168,7 +168,6 @@ impl<F: PrimeField> AHPForR1CS<F> {
num_constraints,
num_non_zero,
num_instance_variables: num_formatted_input_variables,

f: PhantomData,
};

Expand Down
47 changes: 43 additions & 4 deletions src/ahp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,18 @@ impl<F: PrimeField> AHPForR1CS<F> {
"c_row", "c_col", "c_val", "c_row_col",
];

#[rustfmt::skip]
pub const INDEXER_POLYNOMIALS_WITH_VANISHING: [&'static str; 14] = [
// Polynomials for A
"a_row", "a_col", "a_val", "a_row_col",
// Polynomials for B
"b_row", "b_col", "b_val", "b_row_col",
// Polynomials for C
"c_row", "c_col", "c_val", "c_row_col",
// Vanishing polynomials
"vanishing_poly_h", "vanishing_poly_k"
];

/// The labels for the polynomials output by the AHP prover.
#[rustfmt::skip]
pub const PROVER_POLYNOMIALS: [&'static str; 9] = [
Expand All @@ -58,6 +70,13 @@ impl<F: PrimeField> AHPForR1CS<F> {
.map(|s| s.to_string())
}

pub(crate) fn polynomial_labels_with_vanishing() -> impl Iterator<Item = String> {
Self::INDEXER_POLYNOMIALS_WITH_VANISHING
.iter()
.chain(&Self::PROVER_POLYNOMIALS)
.map(|s| s.to_string())
}

/// Check that the (formatted) public input is of the form 2^n for some integer n.
pub fn num_formatted_public_inputs_is_admissible(num_inputs: usize) -> bool {
num_inputs.count_ones() == 1
Expand Down Expand Up @@ -115,6 +134,7 @@ impl<F: PrimeField> AHPForR1CS<F> {
public_input: &[F],
evals: &E,
state: &verifier::VerifierState<F>,
with_vanishing: bool,
) -> Result<Vec<LinearCombination<F>>, Error>
where
E: EvaluationsProvider<F>,
Expand Down Expand Up @@ -178,6 +198,7 @@ impl<F: PrimeField> AHPForR1CS<F> {
(-beta * g_1_at_beta, LCTerm::One),
],
);

debug_assert!(evals.get_lc_eval(&outer_sumcheck, beta)?.is_zero());

linear_combinations.push(z_b);
Expand Down Expand Up @@ -252,6 +273,25 @@ impl<F: PrimeField> AHPForR1CS<F> {
linear_combinations.push(c_denom);
linear_combinations.push(inner_sumcheck);

if with_vanishing {
let vanishing_poly_h_alpha = LinearCombination::new(
"vanishing_poly_h_alpha",
vec![(F::one(), "vanishing_poly_h")],
);
let vanishing_poly_h_beta = LinearCombination::new(
"vanishing_poly_h_beta",
vec![(F::one(), "vanishing_poly_h")],
);
let vanishing_poly_k_gamma = LinearCombination::new(
"vanishing_poly_k_gamma",
vec![(F::one(), "vanishing_poly_k")],
);

linear_combinations.push(vanishing_poly_h_alpha);
linear_combinations.push(vanishing_poly_h_beta);
linear_combinations.push(vanishing_poly_k_gamma);
}

linear_combinations.sort_by(|a, b| a.label.cmp(&b.label));
Ok(linear_combinations)
}
Expand Down Expand Up @@ -285,10 +325,9 @@ impl<F: Field, T: Borrow<LabeledPolynomial<F>>> EvaluationsProvider<F> for Vec<T
let p: &LabeledPolynomial<F> = (*p).borrow();
p.label() == label
})
.ok_or(Error::MissingEval(format!(
"Missing {} for {}",
label, lc.label
)))?
.ok_or_else(|| {
Error::MissingEval(format!("Missing {} for {}", label, lc.label))
})?
.borrow()
.evaluate(&point)
} else {
Expand Down
42 changes: 31 additions & 11 deletions src/ahp/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ use ark_relations::r1cs::{
ConstraintSynthesizer, ConstraintSystem, OptimizationGoal, SynthesisError,
};
use ark_serialize::{CanonicalDeserialize, CanonicalSerialize, SerializationError};
use ark_std::rand::RngCore;
use ark_std::{
cfg_into_iter, cfg_iter, cfg_iter_mut,
io::{Read, Write},
};
use rand_core::RngCore;

/// State for the AHP prover.
pub struct ProverState<'a, F: PrimeField> {
Expand Down Expand Up @@ -222,7 +222,7 @@ impl<F: PrimeField> AHPForR1CS<F> {
});
c.generate_constraints(pcs.clone())?;
end_timer!(constraint_time);

assert!(pcs.is_satisfied().unwrap());
let padding_time = start_timer!(|| "Padding matrices to make them square");
pad_input_for_indexer_and_prover(pcs.clone());
pcs.finalize();
Expand Down Expand Up @@ -309,6 +309,7 @@ impl<F: PrimeField> AHPForR1CS<F> {
pub fn prover_first_round<'a, R: RngCore>(
mut state: ProverState<'a, F>,
rng: &mut R,
hiding: bool,
) -> Result<(ProverMsg<F>, ProverFirstOracles<F>, ProverState<'a, F>), Error> {
let round_time = start_timer!(|| "AHP::Prover::FirstRound");
let domain_h = state.domain_h;
Expand Down Expand Up @@ -380,11 +381,21 @@ impl<F: PrimeField> AHPForR1CS<F> {
assert!(z_b_poly.degree() < domain_h.size() + zk_bound);
assert!(mask_poly.degree() <= 3 * domain_h.size() + 2 * zk_bound - 3);

let w = LabeledPolynomial::new("w".to_string(), w_poly, None, Some(1));
let z_a = LabeledPolynomial::new("z_a".to_string(), z_a_poly, None, Some(1));
let z_b = LabeledPolynomial::new("z_b".to_string(), z_b_poly, None, Some(1));
let mask_poly =
LabeledPolynomial::new("mask_poly".to_string(), mask_poly.clone(), None, None);
let (w, z_a, z_b) = if hiding {
(
LabeledPolynomial::new("w".to_string(), w_poly, None, Some(1)),
LabeledPolynomial::new("z_a".to_string(), z_a_poly, None, Some(1)),
LabeledPolynomial::new("z_b".to_string(), z_b_poly, None, Some(1)),
)
} else {
(
LabeledPolynomial::new("w".to_string(), w_poly, None, None),
LabeledPolynomial::new("z_a".to_string(), z_a_poly, None, None),
LabeledPolynomial::new("z_b".to_string(), z_b_poly, None, None),
)
};

let mask_poly = LabeledPolynomial::new("mask_poly".to_string(), mask_poly, None, None);

let oracles = ProverFirstOracles {
w: w.clone(),
Expand Down Expand Up @@ -437,6 +448,7 @@ impl<F: PrimeField> AHPForR1CS<F> {
ver_message: &VerifierFirstMsg<F>,
mut state: ProverState<'a, F>,
_r: &mut R,
hiding: bool,
) -> (ProverMsg<F>, ProverSecondOracles<F>, ProverState<'a, F>) {
let round_time = start_timer!(|| "AHP::Prover::SecondRound");

Expand Down Expand Up @@ -549,10 +561,18 @@ impl<F: PrimeField> AHPForR1CS<F> {
assert!(g_1.degree() <= domain_h.size() - 2);
assert!(h_1.degree() <= 2 * domain_h.size() + 2 * zk_bound - 2);

let oracles = ProverSecondOracles {
t: LabeledPolynomial::new("t".into(), t_poly, None, None),
g_1: LabeledPolynomial::new("g_1".into(), g_1, Some(domain_h.size() - 2), Some(1)),
h_1: LabeledPolynomial::new("h_1".into(), h_1, None, None),
let oracles = if hiding {
ProverSecondOracles {
t: LabeledPolynomial::new("t".into(), t_poly, None, None),
g_1: LabeledPolynomial::new("g_1".into(), g_1, Some(domain_h.size() - 2), Some(1)),
h_1: LabeledPolynomial::new("h_1".into(), h_1, None, None),
}
} else {
ProverSecondOracles {
t: LabeledPolynomial::new("t".into(), t_poly, None, None),
g_1: LabeledPolynomial::new("g_1".into(), g_1, Some(domain_h.size() - 2), None),
h_1: LabeledPolynomial::new("h_1".into(), h_1, None, None),
}
};

state.w_poly = None;
Expand Down
Loading