Struct storage_proofs_post::fallback::FallbackPoStCircuit [−][src]
pub struct FallbackPoStCircuit<Tree: MerkleTreeTrait> { pub prover_id: Option<Fr>, pub sectors: Vec<Sector<Tree>>, }
Expand description
This is the FallbackPoSt circuit.
Fields
prover_id: Option<Fr>sectors: Vec<Sector<Tree>>Trait Implementations
impl<Tree: 'static + MerkleTreeTrait> Circuit<Bls12> for FallbackPoStCircuit<Tree>[src]
impl<Tree: 'static + MerkleTreeTrait> Circuit<Bls12> for FallbackPoStCircuit<Tree>[src]fn synthesize<CS: ConstraintSystem<Bls12>>(
self,
cs: &mut CS
) -> Result<(), SynthesisError>[src]
fn synthesize<CS: ConstraintSystem<Bls12>>(
self,
cs: &mut CS
) -> Result<(), SynthesisError>[src]Synthesize the circuit into a rank-1 quadratic constraint system.
impl<Tree: MerkleTreeTrait> CircuitComponent for FallbackPoStCircuit<Tree>[src]
impl<Tree: MerkleTreeTrait> CircuitComponent for FallbackPoStCircuit<Tree>[src]impl<Tree: 'static + MerkleTreeTrait> Clone for FallbackPoStCircuit<Tree>[src]
impl<Tree: 'static + MerkleTreeTrait> Clone for FallbackPoStCircuit<Tree>[src]impl<'a, Tree: 'static + MerkleTreeTrait> CompoundProof<'a, FallbackPoSt<'a, Tree>, FallbackPoStCircuit<Tree>> for FallbackPoStCompound<Tree>[src]
impl<'a, Tree: 'static + MerkleTreeTrait> CompoundProof<'a, FallbackPoSt<'a, Tree>, FallbackPoStCircuit<Tree>> for FallbackPoStCompound<Tree>[src]fn generate_public_inputs(
pub_inputs: &<FallbackPoSt<'a, Tree> as ProofScheme<'a>>::PublicInputs,
pub_params: &<FallbackPoSt<'a, Tree> as ProofScheme<'a>>::PublicParams,
partition_k: Option<usize>
) -> Result<Vec<Fr>>[src]
fn generate_public_inputs(
pub_inputs: &<FallbackPoSt<'a, Tree> as ProofScheme<'a>>::PublicInputs,
pub_params: &<FallbackPoSt<'a, Tree> as ProofScheme<'a>>::PublicParams,
partition_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(
pub_in: &<FallbackPoSt<'a, Tree> as ProofScheme<'a>>::PublicInputs,
_priv_in: <FallbackPoStCircuit<Tree> as CircuitComponent>::ComponentPrivateInputs,
vanilla_proof: &<FallbackPoSt<'a, Tree> as ProofScheme<'a>>::Proof,
pub_params: &<FallbackPoSt<'a, Tree> as ProofScheme<'a>>::PublicParams,
partition_k: Option<usize>
) -> Result<FallbackPoStCircuit<Tree>>[src]
fn circuit(
pub_in: &<FallbackPoSt<'a, Tree> as ProofScheme<'a>>::PublicInputs,
_priv_in: <FallbackPoStCircuit<Tree> as CircuitComponent>::ComponentPrivateInputs,
vanilla_proof: &<FallbackPoSt<'a, Tree> as ProofScheme<'a>>::Proof,
pub_params: &<FallbackPoSt<'a, Tree> as ProofScheme<'a>>::PublicParams,
partition_k: Option<usize>
) -> Result<FallbackPoStCircuit<Tree>>[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(
pub_params: &<FallbackPoSt<'a, Tree> as ProofScheme<'a>>::PublicParams
) -> FallbackPoStCircuit<Tree>[src]
pub_params: &<FallbackPoSt<'a, Tree> as ProofScheme<'a>>::PublicParams
) -> FallbackPoStCircuit<Tree>
fn setup(sp: &SetupParams<'a, S>) -> Result<PublicParams<'a, S>, Error>[src]
fn partition_count(public_params: &PublicParams<'a, S>) -> usize[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]
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>
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]
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>
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
fn aggregate_proofs(
prover_srs: &ProverSRS<Bls12>,
hashed_seeds: &[u8],
proofs: &[Proof<Bls12>]
) -> Result<AggregateProof<Bls12>, Error>[src]
fn aggregate_proofs(
prover_srs: &ProverSRS<Bls12>,
hashed_seeds: &[u8],
proofs: &[Proof<Bls12>]
) -> Result<AggregateProof<Bls12>, Error>[src]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
fn srs_key<R>(
rng: Option<&mut R>,
public_params: &<S as ProofScheme<'a>>::PublicParams,
num_proofs_to_aggregate: usize
) -> Result<ProverSRS<Bls12>, Error> where
R: RngCore, [src]
fn srs_key<R>(
rng: Option<&mut R>,
public_params: &<S as ProofScheme<'a>>::PublicParams,
num_proofs_to_aggregate: usize
) -> Result<ProverSRS<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 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]
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>
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<Tree> RefUnwindSafe for FallbackPoStCircuit<Tree> where
<Tree as MerkleTreeTrait>::Arity: RefUnwindSafe,
<Tree as MerkleTreeTrait>::Hasher: RefUnwindSafe,
<Tree as MerkleTreeTrait>::SubTreeArity: RefUnwindSafe,
<Tree as MerkleTreeTrait>::TopTreeArity: RefUnwindSafe,
<Tree as MerkleTreeTrait>::Arity: RefUnwindSafe,
<Tree as MerkleTreeTrait>::Hasher: RefUnwindSafe,
<Tree as MerkleTreeTrait>::SubTreeArity: RefUnwindSafe,
<Tree as MerkleTreeTrait>::TopTreeArity: RefUnwindSafe,
impl<Tree> Send for FallbackPoStCircuit<Tree>
impl<Tree> Sync for FallbackPoStCircuit<Tree>
impl<Tree> Unpin for FallbackPoStCircuit<Tree> where
<Tree as MerkleTreeTrait>::Arity: Unpin,
<Tree as MerkleTreeTrait>::Hasher: Unpin,
<Tree as MerkleTreeTrait>::SubTreeArity: Unpin,
<Tree as MerkleTreeTrait>::TopTreeArity: Unpin,
<Tree as MerkleTreeTrait>::Arity: Unpin,
<Tree as MerkleTreeTrait>::Hasher: Unpin,
<Tree as MerkleTreeTrait>::SubTreeArity: Unpin,
<Tree as MerkleTreeTrait>::TopTreeArity: Unpin,
impl<Tree> UnwindSafe for FallbackPoStCircuit<Tree> where
<Tree as MerkleTreeTrait>::Arity: UnwindSafe,
<Tree as MerkleTreeTrait>::Hasher: UnwindSafe,
<Tree as MerkleTreeTrait>::SubTreeArity: UnwindSafe,
<Tree as MerkleTreeTrait>::TopTreeArity: UnwindSafe,
<Tree as MerkleTreeTrait>::Arity: UnwindSafe,
<Tree as MerkleTreeTrait>::Hasher: UnwindSafe,
<Tree as MerkleTreeTrait>::SubTreeArity: UnwindSafe,
<Tree as MerkleTreeTrait>::TopTreeArity: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for Timpl<T> Same<T> for T
impl<T> Same<T> for Ttype Output = T
type Output = TShould always be Self
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,