[−][src]Trait storage_proofs::compound_proof::CompoundProof
The CompoundProof trait bundles a proof::ProofScheme and a bellperson::Circuit together. It provides methods equivalent to those provided by proof::ProofScheme (setup, prove, verify). See documentation at proof::ProofScheme for details. Implementations should generally only need to supply circuit and generate_public_inputs. The remaining trait methods are used internally and implement the necessary plumbing.
Required methods
fn generate_public_inputs(
pub_in: &S::PublicInputs,
pub_params: &S::PublicParams,
partition_k: Option<usize>
) -> Vec<E::Fr>
pub_in: &S::PublicInputs,
pub_params: &S::PublicParams,
partition_k: Option<usize>
) -> Vec<E::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.
fn circuit(
public_inputs: &S::PublicInputs,
component_private_inputs: C::ComponentPrivateInputs,
vanilla_proof: &S::Proof,
public_param: &S::PublicParams,
engine_params: &'a E::Params
) -> C
public_inputs: &S::PublicInputs,
component_private_inputs: C::ComponentPrivateInputs,
vanilla_proof: &S::Proof,
public_param: &S::PublicParams,
engine_params: &'a E::Params
) -> C
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.
fn blank_circuit(
public_params: &S::PublicParams,
engine_params: &'a E::Params
) -> C
public_params: &S::PublicParams,
engine_params: &'a E::Params
) -> C
Provided methods
fn setup<'b>(sp: &SetupParams<'a, 'b, E, S>) -> Result<PublicParams<'a, E, S>> where
E::Params: Sync,
E::Params: Sync,
fn partition_count(public_params: &PublicParams<'a, E, S>) -> usize
fn prove<'b>(
pub_params: &'b PublicParams<'a, E, S>,
pub_in: &'b S::PublicInputs,
priv_in: &'b S::PrivateInputs,
groth_params: &'b Parameters<E>
) -> Result<MultiProof<'b, E>> where
E::Params: Sync,
pub_params: &'b PublicParams<'a, E, S>,
pub_in: &'b S::PublicInputs,
priv_in: &'b S::PrivateInputs,
groth_params: &'b Parameters<E>
) -> Result<MultiProof<'b, E>> where
E::Params: Sync,
prove is equivalent to ProofScheme::prove.
fn verify(
public_params: &PublicParams<'a, E, S>,
public_inputs: &S::PublicInputs,
multi_proof: &MultiProof<E>,
requirements: &S::Requirements
) -> Result<bool>
public_params: &PublicParams<'a, E, S>,
public_inputs: &S::PublicInputs,
multi_proof: &MultiProof<E>,
requirements: &S::Requirements
) -> Result<bool>
fn circuit_proof<'b>(
pub_in: &S::PublicInputs,
vanilla_proof: &S::Proof,
pub_params: &'b S::PublicParams,
params: &'a E::Params,
groth_params: &Parameters<E>
) -> Result<Proof<E>>
pub_in: &S::PublicInputs,
vanilla_proof: &S::Proof,
pub_params: &'b S::PublicParams,
params: &'a E::Params,
groth_params: &Parameters<E>
) -> Result<Proof<E>>
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.
fn groth_params(
public_params: &S::PublicParams,
engine_params: &'a E::Params
) -> Result<Parameters<E>>
public_params: &S::PublicParams,
engine_params: &'a E::Params
) -> Result<Parameters<E>>
fn verifying_key(
public_params: &S::PublicParams,
engine_params: &'a E::Params
) -> Result<VerifyingKey<E>>
public_params: &S::PublicParams,
engine_params: &'a E::Params
) -> Result<VerifyingKey<E>>
fn circuit_for_test(
public_parameters: &PublicParams<'a, E, S>,
public_inputs: &S::PublicInputs,
private_inputs: &S::PrivateInputs
) -> (C, Vec<E::Fr>)
public_parameters: &PublicParams<'a, E, S>,
public_inputs: &S::PublicInputs,
private_inputs: &S::PrivateInputs
) -> (C, Vec<E::Fr>)
Implementors
impl<'a, H> CompoundProof<'a, Bls12, MerklePoR<H>, PoRCircuit<'a, Bls12, H>> for PoRCompound<H> where
H: 'a + Hasher,
[src]
H: 'a + Hasher,
fn circuit<'b>(
public_inputs: &<MerklePoR<H> as ProofScheme<'a>>::PublicInputs,
_component_private_inputs: <PoRCircuit<'a, Bls12, H> as CircuitComponent>::ComponentPrivateInputs,
proof: &'b <MerklePoR<H> as ProofScheme<'a>>::Proof,
public_params: &'b <MerklePoR<H> as ProofScheme<'a>>::PublicParams,
engine_params: &'a JubjubBls12
) -> PoRCircuit<'a, Bls12, H>
[src]
public_inputs: &<MerklePoR<H> as ProofScheme<'a>>::PublicInputs,
_component_private_inputs: <PoRCircuit<'a, Bls12, H> as CircuitComponent>::ComponentPrivateInputs,
proof: &'b <MerklePoR<H> as ProofScheme<'a>>::Proof,
public_params: &'b <MerklePoR<H> as ProofScheme<'a>>::PublicParams,
engine_params: &'a JubjubBls12
) -> PoRCircuit<'a, Bls12, H>
fn blank_circuit(
public_params: &<MerklePoR<H> as ProofScheme<'a>>::PublicParams,
params: &'a JubjubBls12
) -> PoRCircuit<'a, Bls12, H>
[src]
public_params: &<MerklePoR<H> as ProofScheme<'a>>::PublicParams,
params: &'a JubjubBls12
) -> PoRCircuit<'a, Bls12, H>
fn generate_public_inputs(
pub_inputs: &<MerklePoR<H> as ProofScheme<'a>>::PublicInputs,
pub_params: &<MerklePoR<H> as ProofScheme<'a>>::PublicParams,
_k: Option<usize>
) -> Vec<Fr>
[src]
pub_inputs: &<MerklePoR<H> as ProofScheme<'a>>::PublicInputs,
pub_params: &<MerklePoR<H> as ProofScheme<'a>>::PublicParams,
_k: Option<usize>
) -> Vec<Fr>
impl<'a, H> CompoundProof<'a, Bls12, PoRC<'a, H>, PoRCCircuit<'a, Bls12>> for PoRCCompound<H> where
H: 'a + Hasher,
[src]
H: 'a + Hasher,
fn generate_public_inputs(
_pub_in: &<PoRC<'a, H> as ProofScheme<'a>>::PublicInputs,
_pub_params: &<PoRC<'a, H> as ProofScheme<'a>>::PublicParams,
_partition_k: Option<usize>
) -> Vec<Fr>
[src]
_pub_in: &<PoRC<'a, H> as ProofScheme<'a>>::PublicInputs,
_pub_params: &<PoRC<'a, H> as ProofScheme<'a>>::PublicParams,
_partition_k: Option<usize>
) -> Vec<Fr>
fn circuit(
pub_in: &<PoRC<'a, H> as ProofScheme<'a>>::PublicInputs,
_component_private_inputs: <PoRCCircuit<'a, Bls12> as CircuitComponent>::ComponentPrivateInputs,
vanilla_proof: &<PoRC<'a, H> as ProofScheme<'a>>::Proof,
_pub_params: &<PoRC<'a, H> as ProofScheme<'a>>::PublicParams,
engine_params: &'a <Bls12 as JubjubEngine>::Params
) -> PoRCCircuit<'a, Bls12>
[src]
pub_in: &<PoRC<'a, H> as ProofScheme<'a>>::PublicInputs,
_component_private_inputs: <PoRCCircuit<'a, Bls12> as CircuitComponent>::ComponentPrivateInputs,
vanilla_proof: &<PoRC<'a, H> as ProofScheme<'a>>::Proof,
_pub_params: &<PoRC<'a, H> as ProofScheme<'a>>::PublicParams,
engine_params: &'a <Bls12 as JubjubEngine>::Params
) -> PoRCCircuit<'a, Bls12>
fn blank_circuit(
pub_params: &<PoRC<'a, H> as ProofScheme<'a>>::PublicParams,
params: &'a <Bls12 as JubjubEngine>::Params
) -> PoRCCircuit<'a, Bls12>
[src]
pub_params: &<PoRC<'a, H> as ProofScheme<'a>>::PublicParams,
params: &'a <Bls12 as JubjubEngine>::Params
) -> PoRCCircuit<'a, Bls12>
impl<'a, H, G> CompoundProof<'a, Bls12, DrgPoRep<'a, H, G>, DrgPoRepCircuit<'a, Bls12, H>> for DrgPoRepCompound<H, G> where
H: 'a + Hasher,
G: 'a + Graph<H> + ParameterSetMetadata + Sync + Send,
[src]
H: 'a + Hasher,
G: 'a + Graph<H> + ParameterSetMetadata + Sync + Send,
fn generate_public_inputs(
pub_in: &<DrgPoRep<'a, H, G> as ProofScheme<'a>>::PublicInputs,
pub_params: &<DrgPoRep<'a, H, G> as ProofScheme<'a>>::PublicParams,
_k: Option<usize>
) -> Vec<Fr>
[src]
pub_in: &<DrgPoRep<'a, H, G> as ProofScheme<'a>>::PublicInputs,
pub_params: &<DrgPoRep<'a, H, G> as ProofScheme<'a>>::PublicParams,
_k: Option<usize>
) -> Vec<Fr>
fn circuit<'b>(
public_inputs: &'b <DrgPoRep<'a, H, G> as ProofScheme<'a>>::PublicInputs,
component_private_inputs: <DrgPoRepCircuit<'a, Bls12, H> as CircuitComponent>::ComponentPrivateInputs,
proof: &'b <DrgPoRep<'a, H, G> as ProofScheme<'a>>::Proof,
public_params: &'b <DrgPoRep<'a, H, G> as ProofScheme<'a>>::PublicParams,
engine_params: &'a <Bls12 as JubjubEngine>::Params
) -> DrgPoRepCircuit<'a, Bls12, H>
[src]
public_inputs: &'b <DrgPoRep<'a, H, G> as ProofScheme<'a>>::PublicInputs,
component_private_inputs: <DrgPoRepCircuit<'a, Bls12, H> as CircuitComponent>::ComponentPrivateInputs,
proof: &'b <DrgPoRep<'a, H, G> as ProofScheme<'a>>::Proof,
public_params: &'b <DrgPoRep<'a, H, G> as ProofScheme<'a>>::PublicParams,
engine_params: &'a <Bls12 as JubjubEngine>::Params
) -> DrgPoRepCircuit<'a, Bls12, H>
fn blank_circuit(
public_params: &<DrgPoRep<'a, H, G> as ProofScheme<'a>>::PublicParams,
params: &'a <Bls12 as JubjubEngine>::Params
) -> DrgPoRepCircuit<'a, Bls12, H>
[src]
public_params: &<DrgPoRep<'a, H, G> as ProofScheme<'a>>::PublicParams,
params: &'a <Bls12 as JubjubEngine>::Params
) -> DrgPoRepCircuit<'a, Bls12, H>
impl<'a, H, V> CompoundProof<'a, Bls12, VDFPoSt<H, V>, VDFPoStCircuit<'a, Bls12>> for VDFPostCompound where
H: 'static + Hasher,
V: Vdf<H::Domain>,
<V as Vdf<H::Domain>>::PublicParams: Send + Sync,
<V as Vdf<H::Domain>>::Proof: Send + Sync,
V: Sync + Send,
[src]
H: 'static + Hasher,
V: Vdf<H::Domain>,
<V as Vdf<H::Domain>>::PublicParams: Send + Sync,
<V as Vdf<H::Domain>>::Proof: Send + Sync,
V: Sync + Send,
fn generate_public_inputs(
pub_in: &<VDFPoSt<H, V> as ProofScheme<'a>>::PublicInputs,
_pub_params: &<VDFPoSt<H, V> as ProofScheme<'a>>::PublicParams,
_partition_k: Option<usize>
) -> Vec<Fr>
[src]
pub_in: &<VDFPoSt<H, V> as ProofScheme<'a>>::PublicInputs,
_pub_params: &<VDFPoSt<H, V> as ProofScheme<'a>>::PublicParams,
_partition_k: Option<usize>
) -> Vec<Fr>
fn circuit(
pub_in: &<VDFPoSt<H, V> as ProofScheme<'a>>::PublicInputs,
_component_private_inputs: <VDFPoStCircuit<'a, Bls12> as CircuitComponent>::ComponentPrivateInputs,
vanilla_proof: &<VDFPoSt<H, V> as ProofScheme<'a>>::Proof,
pub_params: &<VDFPoSt<H, V> as ProofScheme<'a>>::PublicParams,
engine_params: &'a <Bls12 as JubjubEngine>::Params
) -> VDFPoStCircuit<'a, Bls12>
[src]
pub_in: &<VDFPoSt<H, V> as ProofScheme<'a>>::PublicInputs,
_component_private_inputs: <VDFPoStCircuit<'a, Bls12> as CircuitComponent>::ComponentPrivateInputs,
vanilla_proof: &<VDFPoSt<H, V> as ProofScheme<'a>>::Proof,
pub_params: &<VDFPoSt<H, V> as ProofScheme<'a>>::PublicParams,
engine_params: &'a <Bls12 as JubjubEngine>::Params
) -> VDFPoStCircuit<'a, Bls12>
fn blank_circuit(
pub_params: &<VDFPoSt<H, V> as ProofScheme>::PublicParams,
engine_params: &'a <Bls12 as JubjubEngine>::Params
) -> VDFPoStCircuit<'a, Bls12>
[src]
pub_params: &<VDFPoSt<H, V> as ProofScheme>::PublicParams,
engine_params: &'a <Bls12 as JubjubEngine>::Params
) -> VDFPoStCircuit<'a, Bls12>
impl<'a, H: 'static + Hasher> CompoundProof<'a, Bls12, ZigZagDrgPoRep<'a, H>, ZigZagCircuit<'a, Bls12, H>> for ZigZagCompound
[src]
fn generate_public_inputs(
pub_in: &<ZigZagDrgPoRep<H> as ProofScheme>::PublicInputs,
pub_params: &<ZigZagDrgPoRep<H> as ProofScheme>::PublicParams,
k: Option<usize>
) -> Vec<Fr>
[src]
pub_in: &<ZigZagDrgPoRep<H> as ProofScheme>::PublicInputs,
pub_params: &<ZigZagDrgPoRep<H> as ProofScheme>::PublicParams,
k: Option<usize>
) -> Vec<Fr>
fn circuit<'b>(
public_inputs: &'b <ZigZagDrgPoRep<H> as ProofScheme>::PublicInputs,
_component_private_inputs: <ZigZagCircuit<'a, Bls12, H> as CircuitComponent>::ComponentPrivateInputs,
vanilla_proof: &'b <ZigZagDrgPoRep<H> as ProofScheme>::Proof,
public_params: &'b <ZigZagDrgPoRep<H> as ProofScheme>::PublicParams,
engine_params: &'a <Bls12 as JubjubEngine>::Params
) -> ZigZagCircuit<'a, Bls12, H>
[src]
public_inputs: &'b <ZigZagDrgPoRep<H> as ProofScheme>::PublicInputs,
_component_private_inputs: <ZigZagCircuit<'a, Bls12, H> as CircuitComponent>::ComponentPrivateInputs,
vanilla_proof: &'b <ZigZagDrgPoRep<H> as ProofScheme>::Proof,
public_params: &'b <ZigZagDrgPoRep<H> as ProofScheme>::PublicParams,
engine_params: &'a <Bls12 as JubjubEngine>::Params
) -> ZigZagCircuit<'a, Bls12, H>
fn blank_circuit(
public_params: &<ZigZagDrgPoRep<H> as ProofScheme>::PublicParams,
params: &'a <Bls12 as JubjubEngine>::Params
) -> ZigZagCircuit<'a, Bls12, H>
[src]
public_params: &<ZigZagDrgPoRep<H> as ProofScheme>::PublicParams,
params: &'a <Bls12 as JubjubEngine>::Params
) -> ZigZagCircuit<'a, Bls12, H>
impl<'a, H: Hasher, V: Vdf<H::Domain>> CompoundProof<'a, Bls12, BeaconPoSt<H, V>, BeaconPoStCircuit<'a, Bls12, H, V>> for BeaconPoStCompound where
<V as Vdf<H::Domain>>::PublicParams: Send + Sync,
<V as Vdf<H::Domain>>::Proof: Send + Sync,
V: Sync + Send,
H: 'a,
[src]
<V as Vdf<H::Domain>>::PublicParams: Send + Sync,
<V as Vdf<H::Domain>>::Proof: Send + Sync,
V: Sync + Send,
H: 'a,
fn generate_public_inputs(
_pub_in: &<BeaconPoSt<H, V> as ProofScheme<'a>>::PublicInputs,
_pub_params: &<BeaconPoSt<H, V> as ProofScheme<'a>>::PublicParams,
_partition_k: Option<usize>
) -> Vec<Fr>
[src]
_pub_in: &<BeaconPoSt<H, V> as ProofScheme<'a>>::PublicInputs,
_pub_params: &<BeaconPoSt<H, V> as ProofScheme<'a>>::PublicParams,
_partition_k: Option<usize>
) -> Vec<Fr>
fn circuit(
_pub_in: &<BeaconPoSt<H, V> as ProofScheme<'a>>::PublicInputs,
_component_private_inputs: <BeaconPoStCircuit<'a, Bls12, H, V> as CircuitComponent>::ComponentPrivateInputs,
_vanilla_proof: &<BeaconPoSt<H, V> as ProofScheme<'a>>::Proof,
_pub_params: &<BeaconPoSt<H, V> as ProofScheme<'a>>::PublicParams,
_engine_params: &'a <Bls12 as JubjubEngine>::Params
) -> BeaconPoStCircuit<'a, Bls12, H, V>
[src]
_pub_in: &<BeaconPoSt<H, V> as ProofScheme<'a>>::PublicInputs,
_component_private_inputs: <BeaconPoStCircuit<'a, Bls12, H, V> as CircuitComponent>::ComponentPrivateInputs,
_vanilla_proof: &<BeaconPoSt<H, V> as ProofScheme<'a>>::Proof,
_pub_params: &<BeaconPoSt<H, V> as ProofScheme<'a>>::PublicParams,
_engine_params: &'a <Bls12 as JubjubEngine>::Params
) -> BeaconPoStCircuit<'a, Bls12, H, V>
fn blank_circuit(
_public_params: &<BeaconPoSt<H, V> as ProofScheme<'a>>::PublicParams,
_engine_params: &'a <Bls12 as JubjubEngine>::Params
) -> BeaconPoStCircuit<'a, Bls12, H, V>
[src]
_public_params: &<BeaconPoSt<H, V> as ProofScheme<'a>>::PublicParams,
_engine_params: &'a <Bls12 as JubjubEngine>::Params
) -> BeaconPoStCircuit<'a, Bls12, H, V>