[−][src]Struct storage_proofs::circuit::drgporep::DrgPoRepCircuit
Methods
impl<'a, E: JubjubEngine, H: Hasher> DrgPoRepCircuit<'a, E, H>
[src]
pub fn synthesize<CS>(
cs: CS,
params: &E::Params,
sloth_iter: usize,
replica_nodes: Vec<Option<E::Fr>>,
replica_nodes_paths: Vec<Vec<Option<(E::Fr, bool)>>>,
replica_root: Root<E>,
replica_parents: Vec<Vec<Option<E::Fr>>>,
replica_parents_paths: Vec<Vec<Vec<Option<(E::Fr, bool)>>>>,
data_nodes: Vec<Option<E::Fr>>,
data_nodes_paths: Vec<Vec<Option<(E::Fr, bool)>>>,
data_root: Root<E>,
replica_id: Option<E::Fr>,
degree: usize,
private: bool
) -> Result<(), SynthesisError> where
E: JubjubEngine,
CS: ConstraintSystem<E>,
[src]
cs: CS,
params: &E::Params,
sloth_iter: usize,
replica_nodes: Vec<Option<E::Fr>>,
replica_nodes_paths: Vec<Vec<Option<(E::Fr, bool)>>>,
replica_root: Root<E>,
replica_parents: Vec<Vec<Option<E::Fr>>>,
replica_parents_paths: Vec<Vec<Vec<Option<(E::Fr, bool)>>>>,
data_nodes: Vec<Option<E::Fr>>,
data_nodes_paths: Vec<Vec<Option<(E::Fr, bool)>>>,
data_root: Root<E>,
replica_id: Option<E::Fr>,
degree: usize,
private: bool
) -> Result<(), SynthesisError> where
E: JubjubEngine,
CS: ConstraintSystem<E>,
Trait Implementations
impl<'a, E: JubjubEngine, H: Hasher> CircuitComponent for DrgPoRepCircuit<'a, E, H>
[src]
type ComponentPrivateInputs = ComponentPrivateInputs<E>
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>
fn setup<'b>(sp: &SetupParams<'a, 'b, E, S>) -> Result<PublicParams<'a, E, S>> where
E::Params: Sync,
[src]
E::Params: Sync,
fn partition_count(public_params: &PublicParams<'a, E, S>) -> usize
[src]
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,
[src]
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>
[src]
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>>
[src]
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. Read more
fn groth_params(
public_params: &S::PublicParams,
engine_params: &'a E::Params
) -> Result<Parameters<E>>
[src]
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>>
[src]
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>)
[src]
public_parameters: &PublicParams<'a, E, S>,
public_inputs: &S::PublicInputs,
private_inputs: &S::PrivateInputs
) -> (C, Vec<E::Fr>)
impl<'a, E: JubjubEngine, H: Hasher> Circuit<E> for DrgPoRepCircuit<'a, E, H>
[src]
Public Inputs
- [0] replica_id/0
- [1] replica_id/1
- [2] replica auth_path_bits
- [3] replica commitment (root hash)
- for i in 0..replica_parents.len()
- [ ] replica parent auth_path_bits
- [ ] replica parent commitment (root hash) // Same for all.
- [r + 1] data auth_path_bits
- [r + 2] data commitment (root hash)
Total = 6 + (2 * replica_parents.len())
Private Inputs
- [ ] replica value/0
- for i in 0..replica_parents.len()
- [ ] replica parent value/0
- [ ] data value/
Total = 2 + replica_parents.len()
fn synthesize<CS: ConstraintSystem<E>>(
self,
cs: &mut CS
) -> Result<(), SynthesisError> where
E: JubjubEngine,
[src]
self,
cs: &mut CS
) -> Result<(), SynthesisError> where
E: JubjubEngine,
Auto Trait Implementations
impl<'a, E, H> Unpin for DrgPoRepCircuit<'a, E, H> where
H: Unpin,
<E as ScalarEngine>::Fr: Unpin,
H: Unpin,
<E as ScalarEngine>::Fr: Unpin,
impl<'a, E, H> Sync for DrgPoRepCircuit<'a, E, H> where
<E as ScalarEngine>::Fr: Sync,
<E as JubjubEngine>::Params: Sync,
<E as ScalarEngine>::Fr: Sync,
<E as JubjubEngine>::Params: Sync,
impl<'a, E, H> Send for DrgPoRepCircuit<'a, E, H> where
<E as ScalarEngine>::Fr: Send,
<E as JubjubEngine>::Params: Sync,
<E as ScalarEngine>::Fr: Send,
<E as JubjubEngine>::Params: Sync,
impl<'a, E, H> RefUnwindSafe for DrgPoRepCircuit<'a, E, H> where
H: RefUnwindSafe,
<E as ScalarEngine>::Fr: RefUnwindSafe,
<E as JubjubEngine>::Params: RefUnwindSafe,
H: RefUnwindSafe,
<E as ScalarEngine>::Fr: RefUnwindSafe,
<E as JubjubEngine>::Params: RefUnwindSafe,
impl<'a, E, H> UnwindSafe for DrgPoRepCircuit<'a, E, H> where
H: UnwindSafe,
<E as ScalarEngine>::Fr: UnwindSafe,
<E as JubjubEngine>::Params: RefUnwindSafe,
H: UnwindSafe,
<E as ScalarEngine>::Fr: UnwindSafe,
<E as JubjubEngine>::Params: RefUnwindSafe,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,