Skip to main content

AbstractNova

Struct AbstractNova 

Source
pub struct AbstractNova<CM, TF, const CHALLENGE_BITS: usize = 128> { /* private fields */ }
Expand description

AbstractNova implements the Nova folding scheme which can operate on both the primary and secondary curves.

Trait Implementations§

Source§

impl<CM: GroupBasedCommitment, TF: SonobeField, const CHALLENGE_BITS: usize> FoldingSchemeDef for AbstractNova<CM, TF, CHALLENGE_BITS>

Source§

type CM = CM

FoldingSchemeDef::CM is the commitment scheme used by the folding scheme.
Source§

type RW = RunningWitness<CM>

FoldingSchemeDef::RW is the type of running witness.
Source§

type RU = RunningInstance<CM>

FoldingSchemeDef::RU is the type of running instance.
Source§

type IW = IncomingWitness<CM>

FoldingSchemeDef::IW is the type of incoming witness.
Source§

type IU = IncomingInstance<CM>

FoldingSchemeDef::IU is the type of incoming instance.
Source§

type TranscriptField = TF

FoldingSchemeDef::TranscriptField is the field type used in the transcript of the folding scheme.
Source§

type Arith = R1CS<<CM as CommitmentDef>::Scalar>

FoldingSchemeDef::Arith is the constraint system supported by the folding scheme.
Source§

type Config = usize

FoldingSchemeDef::Config is the type of configuration required to generate the public parameters of the folding scheme.
Source§

type PublicParam = <CM as CommitmentDef>::Key

FoldingSchemeDef::PublicParam is the type of public parameters of the folding scheme.
Source§

type DeciderKey = NovaKey<<AbstractNova<CM, TF, CHALLENGE_BITS> as FoldingSchemeDef>::Arith, CM>

FoldingSchemeDef::DeciderKey is the type of decider key of the folding scheme, which is used to determine the satisfiability of a witness-instance pair.
Source§

type Challenge = [bool; CHALLENGE_BITS]

FoldingSchemeDef::Challenge is the type of challenge generated during the folding process.
Source§

type Proof<const M: usize, const N: usize> = <CM as CommitmentDef>::Commitment

FoldingSchemeDef::Proof is the type of proof generated by the folding prover.
Source§

impl<CM: GroupBasedCommitment, TF: SonobeField, const B: usize> FoldingSchemeKeyGenerator for AbstractNova<CM, TF, B>

Source§

fn generate_keys( ck: Self::PublicParam, r1cs: Self::Arith, ) -> Result<Self::DeciderKey, Error>

FoldingSchemeKeyGenerator::generate_keys defines the key generation algorithm, which is a deterministic algorithm that takes as input the public parameters pp and the arithmetization arith, and outputs a prover key and a verifier key.
Source§

impl<CM: GroupBasedCommitment, TF: SonobeField, const B: usize> FoldingSchemePreprocessor for AbstractNova<CM, TF, B>

Source§

fn preprocess( ck_len: usize, rng: impl RngCore, ) -> Result<Self::PublicParam, Error>

FoldingSchemePreprocessor::preprocess defines the preprocessing algorithm, which is a randomized algorithm that takes as input the config / parameterization config of the folding scheme (e.g., size bounds of the folding scheme) and outputs the public parameters. Read more
Source§

impl<CM: GroupBasedCommitment, TF: SonobeField, const B: usize> FoldingSchemeProver<1, 1> for AbstractNova<CM, TF, B>

Source§

fn prove( pk: &NovaKey<Self::Arith, CM>, transcript: &mut impl Transcript<TF>, Ws: &[impl Borrow<Self::RW>; 1], Us: &[impl Borrow<Self::RU>; 1], ws: &[impl Borrow<Self::IW>; 1], us: &[impl Borrow<Self::IU>; 1], rng: impl RngCore, ) -> Result<(Self::RW, Self::RU, Self::Proof<1, 1>), Error>

FoldingSchemeProver::prove defines the proof generation algorithm, which is a (probably) randomized algorithm that takes as input the prover key pk, the transcript transcript between the prover and the verifier, M running witnesses Ws, M running instances Us, N incoming witnesses ws, and N incoming instances us, and outputs the folded witness and instance, the proof, and the challenges. Read more
Source§

impl<CM: GroupBasedCommitment, TF: SonobeField, const B: usize> FoldingSchemeProver<2, 0> for AbstractNova<CM, TF, B>

Source§

fn prove( pk: &NovaKey<Self::Arith, CM>, transcript: &mut impl Transcript<TF>, [W1, W2]: &[impl Borrow<Self::RW>; 2], [U1, U2]: &[impl Borrow<Self::RU>; 2], _: &[impl Borrow<Self::IW>; 0], _: &[impl Borrow<Self::IU>; 0], rng: impl RngCore, ) -> Result<(Self::RW, Self::RU, Self::Proof<2, 0>), Error>

FoldingSchemeProver::prove defines the proof generation algorithm, which is a (probably) randomized algorithm that takes as input the prover key pk, the transcript transcript between the prover and the verifier, M running witnesses Ws, M running instances Us, N incoming witnesses ws, and N incoming instances us, and outputs the folded witness and instance, the proof, and the challenges. Read more
Source§

impl<CM: GroupBasedCommitment, TF: SonobeField, const B: usize> FoldingSchemeVerifier<1, 1> for AbstractNova<CM, TF, B>

Source§

fn verify( _vk: &(), transcript: &mut impl Transcript<TF>, Us: &[impl Borrow<Self::RU>; 1], us: &[impl Borrow<Self::IU>; 1], cm_t: &Self::Proof<1, 1>, ) -> Result<Self::RU, Error>

FoldingSchemeVerifier::verify defines the proof verification algorithm, which is a deterministic algorithm that takes as input the verifier key vk, the transcript transcript between the prover and the verifier, M running instances Us, N incoming instances us, and the proof proof, and outputs the folded instance.
Source§

impl<CM: GroupBasedCommitment, TF: SonobeField, const B: usize> FoldingSchemeVerifier<2, 0> for AbstractNova<CM, TF, B>

Source§

fn verify( _vk: &(), transcript: &mut impl Transcript<TF>, [U1, U2]: &[impl Borrow<Self::RU>; 2], _: &[impl Borrow<Self::IU>; 0], cm_t: &Self::Proof<2, 0>, ) -> Result<Self::RU, Error>

FoldingSchemeVerifier::verify defines the proof verification algorithm, which is a deterministic algorithm that takes as input the verifier key vk, the transcript transcript between the prover and the verifier, M running instances Us, N incoming instances us, and the proof proof, and outputs the folded instance.
Source§

impl<CM: GroupBasedCommitment, const CHALLENGE_BITS: usize> GroupBasedFoldingSchemePrimaryDef for AbstractNova<CM, CM::Scalar, CHALLENGE_BITS>

Source§

type Gadget = AbstractNovaGadget<<CM as GroupBasedCommitment>::Gadget2, CHALLENGE_BITS>

GroupBasedFoldingSchemePrimaryDef::Gadget is the in-circuit gadget that defines the folding scheme.
Source§

impl<CM: GroupBasedCommitment, const CHALLENGE_BITS: usize> GroupBasedFoldingSchemeSecondaryDef for AbstractNova<CM, CF2<CM::Commitment>, CHALLENGE_BITS>

Source§

type Gadget = AbstractNovaGadget<<CM as GroupBasedCommitment>::Gadget1, CHALLENGE_BITS>

GroupBasedFoldingSchemeSecondaryDef::Gadget is the in-circuit gadget that defines the folding scheme.

Auto Trait Implementations§

§

impl<CM, TF, const CHALLENGE_BITS: usize> Freeze for AbstractNova<CM, TF, CHALLENGE_BITS>

§

impl<CM, TF, const CHALLENGE_BITS: usize> RefUnwindSafe for AbstractNova<CM, TF, CHALLENGE_BITS>

§

impl<CM, TF, const CHALLENGE_BITS: usize> Send for AbstractNova<CM, TF, CHALLENGE_BITS>
where CM: Send, TF: Send,

§

impl<CM, TF, const CHALLENGE_BITS: usize> Sync for AbstractNova<CM, TF, CHALLENGE_BITS>
where CM: Sync, TF: Sync,

§

impl<CM, TF, const CHALLENGE_BITS: usize> Unpin for AbstractNova<CM, TF, CHALLENGE_BITS>
where CM: Unpin, TF: Unpin,

§

impl<CM, TF, const CHALLENGE_BITS: usize> UnsafeUnpin for AbstractNova<CM, TF, CHALLENGE_BITS>

§

impl<CM, TF, const CHALLENGE_BITS: usize> UnwindSafe for AbstractNova<CM, TF, CHALLENGE_BITS>
where CM: UnwindSafe, TF: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<FS> FoldingSchemeDecider for FS
where FS: FoldingSchemeDef,

Source§

fn decide_running( dk: &Self::DeciderKey, W: &Self::RW, U: &Self::RU, ) -> Result<(), Error>

FoldingSchemeDecider::decide_running defines the deciding algorithm for running witness-instance pairs, which is a deterministic algorithm that takes as input the decider key dk, a running witness W and a running instance U, and outputs whether the witness-instance pair satisfies the running relation.
Source§

fn decide_incoming( dk: &Self::DeciderKey, w: &Self::IW, u: &Self::IU, ) -> Result<(), Error>

FoldingSchemeDecider::decide_running defines the deciding algorithm for incoming witness-instance pairs, which is a deterministic algorithm that takes as input the decider key dk, an incoming witness W and an incoming instance U, and outputs whether the witness-instance pair satisfies the incoming relation.
Source§

impl<FS, const M: usize, const N: usize> FoldingSchemeOps<M, N> for FS

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more