[][src]Struct storage_proofs::zigzag_drgporep::ZigZagDrgPoRep

pub struct ZigZagDrgPoRep<'a, H: 'a + Hasher> { /* fields omitted */ }

ZigZagDrgPorep is a layered PoRep which replicates layer by layer. Between layers, the graph is 'reversed' in such a way that the dependencies expand with each iteration. This reversal is not a straightforward inversion -- so we coin the term 'zigzag' to describe the transformation. Each graph can be divided into base and expansion components. The 'base' component is an ordinary DRG. The expansion component attempts to add a target (expansion_degree) number of connections between nodes in a reversible way. Expansion connections are therefore simply inverted at each layer. Because of how DRG-sampled parents are calculated on demand, the base components are not. Instead, a same-degree DRG with connections in the opposite direction (and using the same random seed) is used when calculating parents on demand. For the algorithm to have the desired properties, it is important that the expansion components are directly inverted at each layer. However, it is fortunately not necessary that the base DRG components also have this property.

Trait Implementations

impl<'a, H: 'static + Hasher> CompoundProof<'a, Bls12, ZigZagDrgPoRep<'a, H>, ZigZagCircuit<'a, Bls12, H>> for ZigZagCompound[src]

fn setup<'b>(sp: &SetupParams<'a, 'b, E, S>) -> Result<PublicParams<'a, E, S>> where
    E::Params: Sync
[src]

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]

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]

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]

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]

fn verifying_key(
    public_params: &S::PublicParams,
    engine_params: &'a E::Params
) -> Result<VerifyingKey<E>>
[src]

fn circuit_for_test(
    public_parameters: &PublicParams<'a, E, S>,
    public_inputs: &S::PublicInputs,
    private_inputs: &S::PrivateInputs
) -> (C, Vec<E::Fr>)
[src]

impl<'a, H: 'static + Hasher> Layers for ZigZagDrgPoRep<'a, H>[src]

type Hasher = <ZigZagBucketGraph<H> as ZigZag>::BaseHasher

type Graph = ZigZagBucketGraph<Self::Hasher>

fn prove_layers<'a>(
    graph: &Self::Graph,
    sloth_iter: usize,
    pub_inputs: &PublicInputs<<Self::Hasher as Hasher>::Domain>,
    tau: &[Tau<<Self::Hasher as Hasher>::Domain>],
    aux: &'a [MerkleTree<<Self::Hasher as Hasher>::Domain, <Self::Hasher as Hasher>::Function>],
    layer_challenges: &LayerChallenges,
    layers: usize,
    total_layers: usize,
    partition_count: usize
) -> Result<Vec<Vec<EncodingProof<Self::Hasher>>>>
[src]

fn extract_and_invert_transform_layers<'a>(
    graph: &Self::Graph,
    sloth_iter: usize,
    layer_challenges: &LayerChallenges,
    replica_id: &<Self::Hasher as Hasher>::Domain,
    data: &'a mut [u8]
) -> Result<()>
[src]

fn transform_and_replicate_layers(
    graph: &Self::Graph,
    sloth_iter: usize,
    layer_challenges: &LayerChallenges,
    replica_id: &<Self::Hasher as Hasher>::Domain,
    data: &mut [u8]
) -> Result<(Vec<Tau<<Self::Hasher as Hasher>::Domain>>, Vec<MerkleTree<<Self::Hasher as Hasher>::Domain, <Self::Hasher as Hasher>::Function>>)>
[src]

fn generate_data_tree(
    graph: &Self::Graph,
    data: &[u8],
    _layer: usize
) -> MerkleTree<<Self::Hasher as Hasher>::Domain, <Self::Hasher as Hasher>::Function>
[src]

impl<'a, H: Debug + 'a + Hasher> Debug for ZigZagDrgPoRep<'a, H>[src]

Auto Trait Implementations

impl<'a, H> Unpin for ZigZagDrgPoRep<'a, H>

impl<'a, H> Sync for ZigZagDrgPoRep<'a, H>

impl<'a, H> Send for ZigZagDrgPoRep<'a, H>

impl<'a, H> RefUnwindSafe for ZigZagDrgPoRep<'a, H> where
    H: RefUnwindSafe

impl<'a, H> UnwindSafe for ZigZagDrgPoRep<'a, H> where
    H: RefUnwindSafe

Blanket Implementations

impl<'a, L> ProofScheme<'a> for L where
    L: Layers
[src]

type PublicParams = PublicParams<<L as Layers>::Hasher, <L as Layers>::Graph>

type SetupParams = SetupParams

type PublicInputs = PublicInputs<<<L as Layers>::Hasher as Hasher>::Domain>

type PrivateInputs = PrivateInputs<<L as Layers>::Hasher>

type Proof = Proof<<L as Layers>::Hasher>

type Requirements = ChallengeRequirements

fn verify(
    _pub_params: &Self::PublicParams,
    _pub_inputs: &Self::PublicInputs,
    _proof: &Self::Proof
) -> Result<bool>
[src]

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

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

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

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.

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.

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

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

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

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

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