[][src]Trait storage_proofs::vdf::Vdf

pub trait Vdf<T: Domain>: Clone + Debug {
    type SetupParams: Clone + Debug;
    type PublicParams: Clone + Debug;
    type Proof: Clone + Debug + Serialize + DeserializeOwned;
    fn setup(setup_params: &Self::SetupParams) -> Result<Self::PublicParams>;
fn eval(
        public_params: &Self::PublicParams,
        input: &T
    ) -> Result<(T, Self::Proof)>;
fn verify(
        public_params: &Self::PublicParams,
        input: &T,
        proof: &Self::Proof
    ) -> Result<bool>;
fn key(pp: &Self::PublicParams) -> T;
fn rounds(pp: &Self::PublicParams) -> usize;
fn extract_output(proof: &Self::Proof) -> T; }

Generic trait to represent any Verifiable Delay Function (VDF).

Associated Types

Loading content...

Required methods

fn setup(setup_params: &Self::SetupParams) -> Result<Self::PublicParams>

fn eval(
    public_params: &Self::PublicParams,
    input: &T
) -> Result<(T, Self::Proof)>

fn verify(
    public_params: &Self::PublicParams,
    input: &T,
    proof: &Self::Proof
) -> Result<bool>

fn key(pp: &Self::PublicParams) -> T

fn rounds(pp: &Self::PublicParams) -> usize

fn extract_output(proof: &Self::Proof) -> T

Loading content...

Implementors

impl Vdf<PedersenDomain> for Sloth[src]

type SetupParams = SetupParams

type PublicParams = PublicParams

type Proof = Proof

Loading content...