nexus_sdk

Trait Setup

Source
pub trait Setup<'a> {
    type Reference;
    type Parameters;
    type Preprocessing;
    type Error;

    // Required methods
    fn setup_reference<'b: 'a>(
        &mut self,
        reference: &'b Self::Reference,
    ) -> Result<(), Self::Error>;
    fn setup_parameters<'b: 'a>(
        &mut self,
        parameters: &'b Self::Parameters,
    ) -> Result<(), Self::Error>;
    fn detach(&mut self);
    fn reference(&self) -> Result<&'a Self::Reference, Self::Error>;
    fn parameters(&self) -> Result<&'a Self::Parameters, Self::Error>;
    fn preprocessing(&self) -> Result<Self::Preprocessing, Self::Error>;
}
Expand description

An object that can be configured with necessary parameters for proving and verification.

Currently only used by the legacy prover integrations.

Required Associated Types§

Source

type Reference

Global parameters with trust assumptions.

Source

type Parameters

Global parameters without trust assumptions.

Source

type Preprocessing

Program-specific parameters.

Source

type Error

Required Methods§

Source

fn setup_reference<'b: 'a>( &mut self, reference: &'b Self::Reference, ) -> Result<(), Self::Error>

Configure reference string.

Source

fn setup_parameters<'b: 'a>( &mut self, parameters: &'b Self::Parameters, ) -> Result<(), Self::Error>

Configure parameters string.

Source

fn detach(&mut self)

Detach prover or proof from setup to make it easier to pass around without needing to manage lifetimes.

Source

fn reference(&self) -> Result<&'a Self::Reference, Self::Error>

Access reference through borrow.

Source

fn parameters(&self) -> Result<&'a Self::Parameters, Self::Error>

Access parameters through borrow.

Source

fn preprocessing(&self) -> Result<Self::Preprocessing, Self::Error>

Return preprocessing.

Implementors§

Source§

impl<'a> Setup<'a> for HyperNova<'a, Local>

Source§

type Reference = SRS

Source§

type Parameters = PublicParams<Config, GrumpkinConfig, Zeromorph<Bn<Config>>, PedersenCommitment<Projective<GrumpkinConfig>>, PoseidonSponge<Fp<MontBackend<FrConfig, 4>, 4>>, Tr<MerkleTrie>, SetupParams<(Config, GrumpkinConfig, Zeromorph<Bn<Config>>, PedersenCommitment<Projective<GrumpkinConfig>>, PoseidonSponge<Fp<MontBackend<FrConfig, 4>, 4>>, Tr<MerkleTrie>)>>

Source§

type Preprocessing = ()

Source§

type Error = Error

Source§

impl<'a> Setup<'a> for nexus_sdk::legacy::hypernova::seq::Proof<'a>

Source§

type Reference = SRS

Source§

type Parameters = PublicParams<Config, GrumpkinConfig, Zeromorph<Bn<Config>>, PedersenCommitment<Projective<GrumpkinConfig>>, PoseidonSponge<Fp<MontBackend<FrConfig, 4>, 4>>, Tr<MerkleTrie>, SetupParams<(Config, GrumpkinConfig, Zeromorph<Bn<Config>>, PedersenCommitment<Projective<GrumpkinConfig>>, PoseidonSponge<Fp<MontBackend<FrConfig, 4>, 4>>, Tr<MerkleTrie>)>>

Source§

type Preprocessing = ()

Source§

type Error = Error

Source§

impl<'a> Setup<'a> for nexus_sdk::legacy::jolt::Proof

Source§

type Reference = ()

Source§

type Parameters = ()

Source§

type Preprocessing = JoltPreprocessing<Fp<MontBackend<FrConfig, 4>, 4>, HyraxScheme<Projective<<Config as BnConfig>::G1Config>>>

Source§

type Error = Error

Source§

impl<'a> Setup<'a> for Nova<'a, Local>

Source§

type Reference = ()

Source§

type Parameters = PublicParams<Config, GrumpkinConfig, PedersenCommitment<Projective<<Config as BnConfig>::G1Config>>, PedersenCommitment<Projective<GrumpkinConfig>>, PoseidonSponge<Fp<MontBackend<FrConfig, 4>, 4>>, Tr<MerkleTrie>, SetupParams<(Config, GrumpkinConfig, PedersenCommitment<Projective<<Config as BnConfig>::G1Config>>, PedersenCommitment<Projective<GrumpkinConfig>>, PoseidonSponge<Fp<MontBackend<FrConfig, 4>, 4>>, Tr<MerkleTrie>)>>

Source§

type Preprocessing = ()

Source§

type Error = Error

Source§

impl<'a> Setup<'a> for nexus_sdk::legacy::nova::seq::Proof<'a>

Source§

type Reference = ()

Source§

type Parameters = PublicParams<Config, GrumpkinConfig, PedersenCommitment<Projective<<Config as BnConfig>::G1Config>>, PedersenCommitment<Projective<GrumpkinConfig>>, PoseidonSponge<Fp<MontBackend<FrConfig, 4>, 4>>, Tr<MerkleTrie>, SetupParams<(Config, GrumpkinConfig, PedersenCommitment<Projective<<Config as BnConfig>::G1Config>>, PedersenCommitment<Projective<GrumpkinConfig>>, PoseidonSponge<Fp<MontBackend<FrConfig, 4>, 4>>, Tr<MerkleTrie>)>>

Source§

type Preprocessing = ()

Source§

type Error = Error