pub struct FoldingInstance<const N: usize, G: CommitmentCurve> {
    pub commitments: [G; N],
    pub challenges: [<G as AffineRepr>::ScalarField; 3],
    pub alphas: Alphas<<G as AffineRepr>::ScalarField>,
    pub blinder: <G as AffineRepr>::ScalarField,
}
Expand description

Folding instance containing the commitment to a witness of N columns, challenges for the proof, and the alphas

Fields§

§commitments: [G; N]

Commitments to the witness columns, including the dynamic selectors

§challenges: [<G as AffineRepr>::ScalarField; 3]

Challenges for the proof. We do use 3 challenges:

  • β as the evaluation point for the logup argument
  • j: the joint combiner for vector lookups
  • γ (set to 0 for now)
§alphas: Alphas<<G as AffineRepr>::ScalarField>

Reuses the Alphas defined in the example of folding

§blinder: <G as AffineRepr>::ScalarField

Blinder used in the polynomial commitment scheme

Trait Implementations§

source§

impl<const N: usize, G: Clone + CommitmentCurve> Clone for FoldingInstance<N, G>

source§

fn clone(&self) -> FoldingInstance<N, G>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<const N: usize, G: Debug + CommitmentCurve> Debug for FoldingInstance<N, G>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<const N: usize, G: CommitmentCurve> Foldable<<G as AffineRepr>::ScalarField> for FoldingInstance<N, G>

source§

fn combine(a: Self, b: Self, challenge: G::ScalarField) -> Self

Combine two objects ‘a’ and ‘b’ into a new object using the challenge.
source§

impl<const N: usize, const N_REL: usize, const N_SEL: usize, C: FoldingConfig, Structure: Clone> FoldingEnv<<<C as FoldingConfig>::Curve as AffineRepr>::ScalarField, FoldingInstance<N, <C as FoldingConfig>::Curve>, FoldingWitness<N, <<C as FoldingConfig>::Curve as AffineRepr>::ScalarField>, <C as FoldingConfig>::Column, Challenge, <C as FoldingConfig>::Selector> for DecomposedFoldingEnvironment<N, N_REL, N_SEL, C, Structure>where FoldingWitness<N, <<C as FoldingConfig>::Curve as AffineRepr>::ScalarField>: Index<C::Column, Output = Evaluations<<<C as FoldingConfig>::Curve as AffineRepr>::ScalarField, Radix2EvaluationDomain<<<C as FoldingConfig>::Curve as AffineRepr>::ScalarField>>>, FoldingWitness<N, <<C as FoldingConfig>::Curve as AffineRepr>::ScalarField>: Index<C::Selector, Output = Evaluations<<<C as FoldingConfig>::Curve as AffineRepr>::ScalarField, Radix2EvaluationDomain<<<C as FoldingConfig>::Curve as AffineRepr>::ScalarField>>>,

§

type Structure = Structure

Structure which could be storing useful information like selectors, etc.
source§

fn new( structure: &Self::Structure, instances: [&FoldingInstance<N, C::Curve>; 2], witnesses: [&FoldingWitness<N, <<C as FoldingConfig>::Curve as AffineRepr>::ScalarField>; 2] ) -> Self

Creates a new environment storing the structure, instances and witnesses.
source§

fn col( &self, col: C::Column, curr_or_next: CurrOrNext, side: Side ) -> &[<<C as FoldingConfig>::Curve as AffineRepr>::ScalarField]

Returns the evaluations of a given column witness at omega or zeta*omega.
source§

fn challenge( &self, challenge: Challenge, side: Side ) -> <<C as FoldingConfig>::Curve as AffineRepr>::ScalarField

Obtains a given challenge from the expanded instance for one side. The challenges are stored inside the instances structs.
source§

fn selector( &self, s: &C::Selector, side: Side ) -> &[<<C as FoldingConfig>::Curve as AffineRepr>::ScalarField]

similar to [Self::col], but folding may ask for a dynamic selector directly instead of just column that happens to be a selector
source§

impl<const N: usize, C: FoldingConfig, Structure: Clone> FoldingEnv<<<C as FoldingConfig>::Curve as AffineRepr>::ScalarField, FoldingInstance<N, <C as FoldingConfig>::Curve>, FoldingWitness<N, <<C as FoldingConfig>::Curve as AffineRepr>::ScalarField>, <C as FoldingConfig>::Column, Challenge, ()> for FoldingEnvironment<N, C, Structure>where FoldingWitness<N, <<C as FoldingConfig>::Curve as AffineRepr>::ScalarField>: Index<C::Column, Output = Evaluations<<<C as FoldingConfig>::Curve as AffineRepr>::ScalarField, Radix2EvaluationDomain<<<C as FoldingConfig>::Curve as AffineRepr>::ScalarField>>>,

§

type Structure = Structure

Structure which could be storing useful information like selectors, etc.
source§

fn new( structure: &Self::Structure, instances: [&FoldingInstance<N, C::Curve>; 2], witnesses: [&FoldingWitness<N, <<C as FoldingConfig>::Curve as AffineRepr>::ScalarField>; 2] ) -> Self

Creates a new environment storing the structure, instances and witnesses.
source§

fn col( &self, col: C::Column, curr_or_next: CurrOrNext, side: Side ) -> &[<<C as FoldingConfig>::Curve as AffineRepr>::ScalarField]

Returns the evaluations of a given column witness at omega or zeta*omega.
source§

fn challenge( &self, challenge: Challenge, side: Side ) -> <<C as FoldingConfig>::Curve as AffineRepr>::ScalarField

Obtains a given challenge from the expanded instance for one side. The challenges are stored inside the instances structs.
source§

fn selector( &self, _s: &(), _side: Side ) -> &[<<C as FoldingConfig>::Curve as AffineRepr>::ScalarField]

similar to [Self::col], but folding may ask for a dynamic selector directly instead of just column that happens to be a selector
source§

impl<const N: usize, G: CommitmentCurve> Index<Challenge> for FoldingInstance<N, G>

§

type Output = <G as AffineRepr>::ScalarField

The returned type after indexing.
source§

fn index(&self, index: Challenge) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl<const N: usize, G: CommitmentCurve> Instance<G> for FoldingInstance<N, G>

source§

fn to_absorb(&self) -> (Vec<G::ScalarField>, Vec<G>)

This method returns the scalars and commitments that must be absorbed by the sponge. It is not supposed to do any absorption itself, and the user is responsible for calling the sponge absorb methods with the elements returned by this method. When called on a RelaxedInstance, elements will be returned in the following order, for given instances L and R Read more
source§

fn get_alphas(&self) -> &Alphas<G::ScalarField>

Returns the alphas values for the instance
source§

fn get_blinder(&self) -> G::ScalarField

Return the blinder that can be used while committing to polynomials.

Auto Trait Implementations§

§

impl<const N: usize, G> RefUnwindSafe for FoldingInstance<N, G>where G: RefUnwindSafe, <G as AffineRepr>::ScalarField: RefUnwindSafe,

§

impl<const N: usize, G> !Send for FoldingInstance<N, G>

§

impl<const N: usize, G> !Sync for FoldingInstance<N, G>

§

impl<const N: usize, G> Unpin for FoldingInstance<N, G>where G: Unpin, <G as AffineRepr>::ScalarField: Unpin,

§

impl<const N: usize, G> UnwindSafe for FoldingInstance<N, G>where G: UnwindSafe, <G as AffineRepr>::ScalarField: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

impl<G, I> RelaxableInstance<G, I> for Iwhere G: CommitmentCurve, I: Instance<G>,

§

fn relax(self) -> RelaxedInstance<G, I>

This method takes an Instance and a commitment to zero and extends the instance, returning a relaxed instance which is composed by the extended instance, the scalar one, and the error commitment which is set to the commitment to zero.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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 Twhere U: TryFrom<T>,

§

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.
§

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

§

fn vzip(self) -> V