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>
impl<CM: GroupBasedCommitment, TF: SonobeField, const CHALLENGE_BITS: usize> FoldingSchemeDef for AbstractNova<CM, TF, CHALLENGE_BITS>
Source§type CM = CM
type CM = CM
FoldingSchemeDef::CM is the commitment scheme used by the folding
scheme.Source§type RW = RunningWitness<CM>
type RW = RunningWitness<CM>
FoldingSchemeDef::RW is the type of running witness.Source§type RU = RunningInstance<CM>
type RU = RunningInstance<CM>
FoldingSchemeDef::RU is the type of running instance.Source§type IW = IncomingWitness<CM>
type IW = IncomingWitness<CM>
FoldingSchemeDef::IW is the type of incoming witness.Source§type IU = IncomingInstance<CM>
type IU = IncomingInstance<CM>
FoldingSchemeDef::IU is the type of incoming instance.Source§type TranscriptField = TF
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>
type Arith = R1CS<<CM as CommitmentDef>::Scalar>
FoldingSchemeDef::Arith is the constraint system supported by the
folding scheme.Source§type Config = usize
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
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>
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]
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
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>
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>
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>
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>
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 moreSource§impl<CM: GroupBasedCommitment, TF: SonobeField, const B: usize> FoldingSchemeProver<1, 1> for AbstractNova<CM, TF, B>
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>
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 moreSource§impl<CM: GroupBasedCommitment, TF: SonobeField, const B: usize> FoldingSchemeProver<2, 0> for AbstractNova<CM, TF, B>
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>
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 moreSource§impl<CM: GroupBasedCommitment, TF: SonobeField, const B: usize> FoldingSchemeVerifier<1, 1> for AbstractNova<CM, TF, B>
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>
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>
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>
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>
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>
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>
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>
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>where
CM: RefUnwindSafe,
TF: RefUnwindSafe,
impl<CM, TF, const CHALLENGE_BITS: usize> Send for AbstractNova<CM, TF, CHALLENGE_BITS>
impl<CM, TF, const CHALLENGE_BITS: usize> Sync for AbstractNova<CM, TF, CHALLENGE_BITS>
impl<CM, TF, const CHALLENGE_BITS: usize> Unpin for AbstractNova<CM, TF, CHALLENGE_BITS>
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<FS> FoldingSchemeDecider for FSwhere
FS: FoldingSchemeDef,
impl<FS> FoldingSchemeDecider for FSwhere
FS: FoldingSchemeDef,
Source§fn decide_running(
dk: &Self::DeciderKey,
W: &Self::RW,
U: &Self::RU,
) -> Result<(), Error>
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>
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.impl<FS, const M: usize, const N: usize> FoldingSchemeOps<M, N> for FSwhere
FS: FoldingSchemePreprocessor + FoldingSchemeKeyGenerator + FoldingSchemeProver<M, N> + FoldingSchemeVerifier<M, N> + FoldingSchemeDecider,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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