Struct storage_proofs_post::fallback::FallbackPoSt [−][src]
pub struct FallbackPoSt<'a, Tree> where
Tree: MerkleTreeTrait, { /* fields omitted */ }Trait Implementations
impl<'a, Tree: 'static + MerkleTreeTrait> CompoundProof<'a, FallbackPoSt<'a, Tree>, FallbackPoStCircuit<Tree>> for FallbackPoStCompound<Tree>
impl<'a, Tree: 'static + MerkleTreeTrait> CompoundProof<'a, FallbackPoSt<'a, Tree>, FallbackPoStCircuit<Tree>> for FallbackPoStCompound<Tree>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>>
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>>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>>
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>>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>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>
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>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>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>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>
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>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>
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>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 pair-wise with the comm_rs using sha256, aggregate them all into an AggregateProof type. Read more
fn verify_aggregate_proofs(
ip_verifier_srs: &VerifierSRS<Bls12>,
pvk: &PreparedVerifyingKey<Bls12>,
hashed_seeds_and_comm_rs: &[u8],
public_inputs: &[Vec<Fr, Global>],
aggregate_proof: &AggregateProof<Bls12>
) -> Result<bool, Error>
fn verify_aggregate_proofs(
ip_verifier_srs: &VerifierSRS<Bls12>,
pvk: &PreparedVerifyingKey<Bls12>,
hashed_seeds_and_comm_rs: &[u8],
public_inputs: &[Vec<Fr, Global>],
aggregate_proof: &AggregateProof<Bls12>
) -> Result<bool, Error>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,
fn groth_params<R>(
rng: Option<&mut R>,
public_params: &<S as ProofScheme<'a>>::PublicParams
) -> Result<MappedParameters<Bls12>, Error> where
R: RngCore, 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,
fn verifying_key<R>(
rng: Option<&mut R>,
public_params: &<S as ProofScheme<'a>>::PublicParams
) -> Result<VerifyingKey<Bls12>, Error> where
R: RngCore, 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,
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, 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>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>
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>Like circuit_for_test but returns values for all partitions.
type PublicParams = PublicParamstype SetupParams = SetupParamstype PublicInputs = PublicInputs<<Tree::Hasher as Hasher>::Domain>type PrivateInputs = PrivateInputs<'a, Tree>setup is used to generate public parameters from setup parameters in order to specialize a ProofScheme to the specific parameters required by a consumer. Read more
fn prove<'b>(
pub_params: &'b Self::PublicParams,
pub_inputs: &'b Self::PublicInputs,
priv_inputs: &'b Self::PrivateInputs
) -> Result<Self::Proof>
fn prove<'b>(
pub_params: &'b Self::PublicParams,
pub_inputs: &'b Self::PublicInputs,
priv_inputs: &'b Self::PrivateInputs
) -> Result<Self::Proof>prove generates and returns a proof from public parameters, public inputs, and private inputs.
fn prove_all_partitions<'b>(
pub_params: &'b Self::PublicParams,
pub_inputs: &'b Self::PublicInputs,
priv_inputs: &'b Self::PrivateInputs,
partition_count: usize
) -> Result<Vec<Self::Proof>>fn verify_all_partitions(
pub_params: &Self::PublicParams,
pub_inputs: &Self::PublicInputs,
partition_proofs: &[Self::Proof]
) -> Result<bool>fn satisfies_requirements(
public_params: &Self::PublicParams,
requirements: &Self::Requirements,
partitions: usize
) -> boolfn verify(
_pub_params: &Self::PublicParams,
_pub_inputs: &Self::PublicInputs,
_proof: &Self::Proof
) -> Result<bool, Error>
fn verify(
_pub_params: &Self::PublicParams,
_pub_inputs: &Self::PublicInputs,
_proof: &Self::Proof
) -> Result<bool, Error>verify returns true if the supplied proof is valid for the given public parameter and public inputs. Note that verify does not have access to private inputs. Remember that proof is untrusted, and any data it provides MUST be validated as corresponding to the supplied public parameters and inputs. Read more
Auto Trait Implementations
impl<'a, Tree> RefUnwindSafe for FallbackPoSt<'a, Tree> where
Tree: RefUnwindSafe, impl<'a, Tree> Send for FallbackPoSt<'a, Tree>impl<'a, Tree> Sync for FallbackPoSt<'a, Tree>impl<'a, Tree> Unpin for FallbackPoSt<'a, Tree>impl<'a, Tree> UnwindSafe for FallbackPoSt<'a, Tree> where
Tree: RefUnwindSafe, Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = TShould always be Self
pub fn vzip(self) -> V