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]

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: 'static + MerkleTreeTrait> Clone for FallbackPoStCircuit<Tree>[src]

fn clone(&self) -> Self[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

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]

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]

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]

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]

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]

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]

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]

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]

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]

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]

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]

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]

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]

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

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

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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Pointable for T

pub const ALIGN: usize

The alignment of pointer.

type Init = T

The type for initializers.

pub unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more

pub unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more

pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more

pub unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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]

🔬 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<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V