Struct storage_proofs_porep::stacked::StackedCircuit [−][src]
pub struct StackedCircuit<'a, Tree: 'static + MerkleTreeTrait, G: 'static + Hasher> { /* fields omitted */ }
Expand description
Implementations
pub fn synthesize<CS>(
cs: CS,
public_params: <StackedDrg<'a, Tree, G> as ProofScheme<'a>>::PublicParams,
replica_id: Option<<Tree::Hasher as Hasher>::Domain>,
comm_d: Option<G::Domain>,
comm_r: Option<<Tree::Hasher as Hasher>::Domain>,
comm_r_last: Option<<Tree::Hasher as Hasher>::Domain>,
comm_c: Option<<Tree::Hasher as Hasher>::Domain>,
proofs: Vec<Proof<Tree, G>>
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<Bls12>,
[src]Trait Implementations
Synthesize the circuit into a rank-1 quadratic constraint system.
type ComponentPrivateInputs = ()
impl<'a, Tree: 'static + MerkleTreeTrait, G: 'static + Hasher> CompoundProof<'a, StackedDrg<'a, Tree, G>, StackedCircuit<'a, Tree, G>> for StackedCompound<Tree, G>
[src]
impl<'a, Tree: 'static + MerkleTreeTrait, G: 'static + Hasher> CompoundProof<'a, StackedDrg<'a, Tree, G>, StackedCircuit<'a, Tree, G>> for StackedCompound<Tree, G>
[src]fn generate_public_inputs(
pub_in: &<StackedDrg<'_, Tree, G> as ProofScheme<'_>>::PublicInputs,
pub_params: &<StackedDrg<'_, Tree, G> as ProofScheme<'_>>::PublicParams,
k: Option<usize>
) -> Result<Vec<Fr>>
[src]
fn generate_public_inputs(
pub_in: &<StackedDrg<'_, Tree, G> as ProofScheme<'_>>::PublicInputs,
pub_params: &<StackedDrg<'_, Tree, G> as ProofScheme<'_>>::PublicParams,
k: Option<usize>
) -> Result<Vec<Fr>>
[src]generate_public_inputs generates public inputs suitable for use as input during verification of a proof generated from this CompoundProof’s bellperson::Circuit (C). These inputs correspond to those allocated when C is synthesized. Read more
fn circuit<'b>(
public_inputs: &'b <StackedDrg<'_, Tree, G> as ProofScheme<'_>>::PublicInputs,
_component_private_inputs: <StackedCircuit<'a, Tree, G> as CircuitComponent>::ComponentPrivateInputs,
vanilla_proof: &'b <StackedDrg<'_, Tree, G> as ProofScheme<'_>>::Proof,
public_params: &'b <StackedDrg<'_, Tree, G> as ProofScheme<'_>>::PublicParams,
_partition_k: Option<usize>
) -> Result<StackedCircuit<'a, Tree, G>>
[src]
fn circuit<'b>(
public_inputs: &'b <StackedDrg<'_, Tree, G> as ProofScheme<'_>>::PublicInputs,
_component_private_inputs: <StackedCircuit<'a, Tree, G> as CircuitComponent>::ComponentPrivateInputs,
vanilla_proof: &'b <StackedDrg<'_, Tree, G> as ProofScheme<'_>>::Proof,
public_params: &'b <StackedDrg<'_, Tree, G> as ProofScheme<'_>>::PublicParams,
_partition_k: Option<usize>
) -> Result<StackedCircuit<'a, Tree, G>>
[src]circuit constructs an instance of this CompoundProof’s bellperson::Circuit. circuit takes PublicInputs, PublicParams, and Proof from this CompoundProof’s proof::ProofScheme (S) and uses them to initialize Circuit fields which will be used to construct public and private inputs during circuit synthesis. Read more
fn blank_circuit(
public_params: &<StackedDrg<'_, Tree, G> as ProofScheme<'_>>::PublicParams
) -> StackedCircuit<'a, Tree, G>
[src]fn prove(
pub_params: &PublicParams<'a, S>,
pub_in: &<S as ProofScheme<'a>>::PublicInputs,
priv_in: &<S as ProofScheme<'a>>::PrivateInputs,
groth_params: &'b MappedParameters<Bls12>
) -> Result<MultiProof<'b>, Error>
[src]
fn prove(
pub_params: &PublicParams<'a, S>,
pub_in: &<S as ProofScheme<'a>>::PublicInputs,
priv_in: &<S as ProofScheme<'a>>::PrivateInputs,
groth_params: &'b MappedParameters<Bls12>
) -> Result<MultiProof<'b>, Error>
[src]prove is equivalent to ProofScheme::prove.
fn prove_with_vanilla(
pub_params: &PublicParams<'a, S>,
pub_in: &<S as ProofScheme<'a>>::PublicInputs,
vanilla_proofs: Vec<<S as ProofScheme<'a>>::Proof, Global>,
groth_params: &'b MappedParameters<Bls12>
) -> Result<MultiProof<'b>, Error>
[src]fn verify(
public_params: &PublicParams<'a, S>,
public_inputs: &<S as ProofScheme<'a>>::PublicInputs,
multi_proof: &MultiProof<'b>,
requirements: &<S as ProofScheme<'a>>::Requirements
) -> Result<bool, Error>
[src]fn batch_verify(
public_params: &PublicParams<'a, S>,
public_inputs: &[<S as ProofScheme<'a>>::PublicInputs],
multi_proofs: &[MultiProof<'b>],
requirements: &<S as ProofScheme<'a>>::Requirements
) -> Result<bool, Error>
[src]
fn batch_verify(
public_params: &PublicParams<'a, S>,
public_inputs: &[<S as ProofScheme<'a>>::PublicInputs],
multi_proofs: &[MultiProof<'b>],
requirements: &<S as ProofScheme<'a>>::Requirements
) -> Result<bool, Error>
[src]Efficiently verify multiple proofs.
fn circuit_proofs(
pub_in: &<S as ProofScheme<'a>>::PublicInputs,
vanilla_proofs: Vec<<S as ProofScheme<'a>>::Proof, Global>,
pub_params: &<S as ProofScheme<'a>>::PublicParams,
groth_params: &MappedParameters<Bls12>,
priority: bool
) -> Result<Vec<Proof<Bls12>, Global>, Error>
[src]
fn circuit_proofs(
pub_in: &<S as ProofScheme<'a>>::PublicInputs,
vanilla_proofs: Vec<<S as ProofScheme<'a>>::Proof, Global>,
pub_params: &<S as ProofScheme<'a>>::PublicParams,
groth_params: &MappedParameters<Bls12>,
priority: bool
) -> Result<Vec<Proof<Bls12>, Global>, Error>
[src]circuit_proof creates and synthesizes a circuit from concrete params/inputs, then generates a groth proof from it. It returns a groth proof. circuit_proof is used internally and should neither be called nor implemented outside of default trait methods. Read more
Given a prover_srs key, a list of groth16 proofs, and an ordered list of seeds (used to derive the PoRep challenges) hashed using FIXME, aggregate them all into an AggregateProof type. Read more
fn verify_aggregate_proofs(
ip_verifier_srs: &VerifierSRS<Bls12>,
pvk: &PreparedVerifyingKey<Bls12>,
hashed_seeds: &[u8],
public_inputs: &[Vec<Fr, Global>],
aggregate_proof: &AggregateProof<Bls12>
) -> Result<bool, Error>
[src]
fn verify_aggregate_proofs(
ip_verifier_srs: &VerifierSRS<Bls12>,
pvk: &PreparedVerifyingKey<Bls12>,
hashed_seeds: &[u8],
public_inputs: &[Vec<Fr, Global>],
aggregate_proof: &AggregateProof<Bls12>
) -> Result<bool, Error>
[src]Verifies the aggregate proof, with respect to the flattened input list. Read more
fn groth_params<R>(
rng: Option<&mut R>,
public_params: &<S as ProofScheme<'a>>::PublicParams
) -> Result<MappedParameters<Bls12>, Error> where
R: RngCore,
[src]
fn groth_params<R>(
rng: Option<&mut R>,
public_params: &<S as ProofScheme<'a>>::PublicParams
) -> Result<MappedParameters<Bls12>, Error> where
R: RngCore,
[src]If the rng option argument is set, parameters will be generated using it. This is used for testing only, or where parameters are otherwise unavailable (e.g. benches). If rng is not set, an error will result if parameters are not present. Read more
fn verifying_key<R>(
rng: Option<&mut R>,
public_params: &<S as ProofScheme<'a>>::PublicParams
) -> Result<VerifyingKey<Bls12>, Error> where
R: RngCore,
[src]
fn verifying_key<R>(
rng: Option<&mut R>,
public_params: &<S as ProofScheme<'a>>::PublicParams
) -> Result<VerifyingKey<Bls12>, Error> where
R: RngCore,
[src]If the rng option argument is set, parameters will be generated using it. This is used for testing only, or where parameters are otherwise unavailable (e.g. benches). If rng is not set, an error will result if parameters are not present. Read more
If the rng option argument is set, parameters will be generated using it. This is used for testing only, or where parameters are otherwise unavailable (e.g. benches). If rng is not set, an error will result if parameters are not present. Read more
fn srs_verifier_key<R>(
rng: Option<&mut R>,
public_params: &<S as ProofScheme<'a>>::PublicParams,
num_proofs_to_aggregate: usize
) -> Result<VerifierSRS<Bls12>, Error> where
R: RngCore,
[src]
fn srs_verifier_key<R>(
rng: Option<&mut R>,
public_params: &<S as ProofScheme<'a>>::PublicParams,
num_proofs_to_aggregate: usize
) -> Result<VerifierSRS<Bls12>, Error> where
R: RngCore,
[src]If the rng option argument is set, parameters will be generated using it. This is used for testing only, or where parameters are otherwise unavailable (e.g. benches). If rng is not set, an error will result if parameters are not present. Read more
fn circuit_for_test(
public_parameters: &PublicParams<'a, S>,
public_inputs: &<S as ProofScheme<'a>>::PublicInputs,
private_inputs: &<S as ProofScheme<'a>>::PrivateInputs
) -> Result<(C, Vec<Fr, Global>), Error>
[src]fn circuit_for_test_all(
public_parameters: &PublicParams<'a, S>,
public_inputs: &<S as ProofScheme<'a>>::PublicInputs,
private_inputs: &<S as ProofScheme<'a>>::PrivateInputs
) -> Result<Vec<(C, Vec<Fr, Global>), Global>, Error>
[src]
fn circuit_for_test_all(
public_parameters: &PublicParams<'a, S>,
public_inputs: &<S as ProofScheme<'a>>::PublicInputs,
private_inputs: &<S as ProofScheme<'a>>::PrivateInputs
) -> Result<Vec<(C, Vec<Fr, Global>), Global>, Error>
[src]Like circuit_for_test but returns values for all partitions.
Auto Trait Implementations
impl<'a, Tree, G> RefUnwindSafe for StackedCircuit<'a, Tree, G> where
G: RefUnwindSafe,
Tree: RefUnwindSafe,
<Tree as MerkleTreeTrait>::Arity: RefUnwindSafe,
<G as Hasher>::Domain: RefUnwindSafe,
<<Tree as MerkleTreeTrait>::Hasher as Hasher>::Domain: RefUnwindSafe,
<Tree as MerkleTreeTrait>::Hasher: RefUnwindSafe,
<Tree as MerkleTreeTrait>::SubTreeArity: RefUnwindSafe,
<Tree as MerkleTreeTrait>::TopTreeArity: RefUnwindSafe,
impl<'a, Tree, G> Send for StackedCircuit<'a, Tree, G>
impl<'a, Tree, G> Sync for StackedCircuit<'a, Tree, G>
impl<'a, Tree, G> Unpin for StackedCircuit<'a, Tree, G> where
G: Unpin,
Tree: Unpin,
<Tree as MerkleTreeTrait>::Arity: Unpin,
<G as Hasher>::Domain: Unpin,
<<Tree as MerkleTreeTrait>::Hasher as Hasher>::Domain: Unpin,
<Tree as MerkleTreeTrait>::Hasher: Unpin,
<Tree as MerkleTreeTrait>::SubTreeArity: Unpin,
<Tree as MerkleTreeTrait>::TopTreeArity: Unpin,
impl<'a, Tree, G> UnwindSafe for StackedCircuit<'a, Tree, G> where
G: UnwindSafe,
Tree: UnwindSafe,
<Tree as MerkleTreeTrait>::Arity: UnwindSafe,
<G as Hasher>::Domain: UnwindSafe,
<<Tree as MerkleTreeTrait>::Hasher as Hasher>::Domain: UnwindSafe,
<Tree as MerkleTreeTrait>::Hasher: UnwindSafe,
<Tree as MerkleTreeTrait>::SubTreeArity: UnwindSafe,
<Tree as MerkleTreeTrait>::TopTreeArity: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V