export functions
This commit is contained in:
parent
6059601518
commit
7aa7f3538d
@ -221,8 +221,10 @@ impl<'a, E: Engine, CS: SonicConstraintSystem<E> + 'a> crate::ConstraintSystem<E
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// Create parameters for a circuit, given some toxic waste.
|
/// Get circuit information such as number of input, variables,
|
||||||
fn get_circuit_parameters<E, C>(
|
/// constraints, and the corresponding SONIC parameters
|
||||||
|
/// k_map, n, q
|
||||||
|
pub fn get_circuit_parameters<E, C>(
|
||||||
circuit: C,
|
circuit: C,
|
||||||
) -> Result<CircuitParameters<E>, SynthesisError>
|
) -> Result<CircuitParameters<E>, SynthesisError>
|
||||||
where E: Engine, C: Circuit<E>
|
where E: Engine, C: Circuit<E>
|
||||||
@ -239,7 +241,7 @@ fn get_circuit_parameters<E, C>(
|
|||||||
impl<E: Engine, B: Backend<E>> SonicConstraintSystem<E> for NonassigningSynthesizer<E, B> {
|
impl<E: Engine, B: Backend<E>> SonicConstraintSystem<E> for NonassigningSynthesizer<E, B> {
|
||||||
const ONE: SonicVariable = SonicVariable::A(1);
|
const ONE: SonicVariable = SonicVariable::A(1);
|
||||||
|
|
||||||
fn alloc<F>(&mut self, value: F) -> Result<SonicVariable, SynthesisError>
|
fn alloc<F>(&mut self, _value: F) -> Result<SonicVariable, SynthesisError>
|
||||||
where
|
where
|
||||||
F: FnOnce() -> Result<E::Fr, SynthesisError>
|
F: FnOnce() -> Result<E::Fr, SynthesisError>
|
||||||
{
|
{
|
||||||
@ -287,7 +289,7 @@ fn get_circuit_parameters<E, C>(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn multiply<F>(&mut self, values: F) -> Result<(SonicVariable, SonicVariable, SonicVariable), SynthesisError>
|
fn multiply<F>(&mut self, _values: F) -> Result<(SonicVariable, SonicVariable, SonicVariable), SynthesisError>
|
||||||
where
|
where
|
||||||
F: FnOnce() -> Result<(E::Fr, E::Fr, E::Fr), SynthesisError>
|
F: FnOnce() -> Result<(E::Fr, E::Fr, E::Fr), SynthesisError>
|
||||||
{
|
{
|
||||||
@ -347,9 +349,6 @@ fn get_circuit_parameters<E, C>(
|
|||||||
_ => return Err(SynthesisError::UnconstrainedVariable)
|
_ => return Err(SynthesisError::UnconstrainedVariable)
|
||||||
}
|
}
|
||||||
|
|
||||||
// let adapted_circuit = AdaptorCircuit(circuit);
|
|
||||||
|
|
||||||
|
|
||||||
let mut assembly = GeneratorAssembly::<'_, E, _> {
|
let mut assembly = GeneratorAssembly::<'_, E, _> {
|
||||||
cs: &mut cs,
|
cs: &mut cs,
|
||||||
num_inputs: 0,
|
num_inputs: 0,
|
||||||
|
@ -17,4 +17,13 @@ pub use self::batch::{Batch};
|
|||||||
pub use self::helper::{Aggregate, create_aggregate};
|
pub use self::helper::{Aggregate, create_aggregate};
|
||||||
pub use self::verifier::{MultiVerifier};
|
pub use self::verifier::{MultiVerifier};
|
||||||
pub use self::prover::{create_proof, create_advice};
|
pub use self::prover::{create_proof, create_advice};
|
||||||
|
pub use self::generator::{
|
||||||
|
CircuitParameters,
|
||||||
|
generate_parameters,
|
||||||
|
generate_parameters_on_srs,
|
||||||
|
generate_parameters_on_srs_and_information,
|
||||||
|
generate_random_parameters,
|
||||||
|
generate_srs,
|
||||||
|
get_circuit_parameters
|
||||||
|
};
|
||||||
pub use self::parameters::{Proof, SxyAdvice, Parameters, VerifyingKey, PreparedVerifyingKey};
|
pub use self::parameters::{Proof, SxyAdvice, Parameters, VerifyingKey, PreparedVerifyingKey};
|
Loading…
Reference in New Issue
Block a user