Manta-Network / manta-rs

Rust Crates for the Manta Network Ecosystem

Home Page:https://github.com/Manta-Network

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Recursion API

bhgomes opened this issue · comments

First, we should move verify out of ProofSystem so that it can be a gadget on its own. Something like this:

/// Verification
pub trait Verify<COM = ()> {
    /// Verifying Context
    type VerifyingContext;

    /// Proof Type
    type Proof;

    /// Input Type
    type Input;

    /// Output Type
    type Output;

    /// Verifies that `proof` is a valid proof of the relation encoded in `verifying_context`
    /// with `input` as the public input.
    fn verify(
        &self,
        verifying_context: &Self::VerifyingContext,
        proof: &Self::Proof,
        input: &Self::Input,
        compiler: &mut COM
    ) -> Self::Output;
}

Then we need to consider how this will actually be used in recursive apps and the different backends.