pub struct ConstraintSystemPadded<F: Field> { /* private fields */ }Expand description
A constraint system with blinding and power-of-two padding.
Wraps a ConstraintSystem, adds dummy constraints for blinding, and pads the total
number of constraints to a power of two (required by the prover’s multilinear extension
protocol).
Implementations§
Source§impl<F: Field> ConstraintSystemPadded<F>
impl<F: Field> ConstraintSystemPadded<F>
Sourcepub fn new(cs: ConstraintSystem<F>, blinding_info: BlindingInfo) -> Self
pub fn new(cs: ConstraintSystem<F>, blinding_info: BlindingInfo) -> Self
Create a new padded constraint system with blinding.
This:
- Adds dummy multiplication constraints for blinding (3 wires each: A * B = C)
- Pads the total constraint count to a power of two with
one * one = oneconstraints - Calculates the log_size based on witness requirements
- Computes mask buffer dimensions for the ZK mulcheck mask polynomial
pub fn constants(&self) -> &[F]
pub const fn n_inout(&self) -> u32
pub const fn n_precommit(&self) -> u32
pub const fn n_private(&self) -> u32
pub const fn log_public(&self) -> u32
pub const fn n_public(&self) -> u32
pub const fn one_wire(&self) -> WitnessIndex
pub const fn log_precommit(&self) -> u32
pub const fn precommit_size(&self) -> usize
pub const fn log_private(&self) -> u32
pub const fn private_size(&self) -> usize
pub const fn blinding_info(&self) -> &BlindingInfo
pub fn mul_constraints(&self) -> &[MulConstraint<WitnessIndex>]
Sourcepub const fn mask_dims(&self) -> (usize, usize)
pub const fn mask_dims(&self) -> (usize, usize)
Returns the mask buffer dimensions (m_n, m_d) for the ZK mulcheck mask polynomial.
pub fn validate(&self, witness: &Witness<F>)
Trait Implementations§
Auto Trait Implementations§
impl<F> Freeze for ConstraintSystemPadded<F>
impl<F> RefUnwindSafe for ConstraintSystemPadded<F>where
F: RefUnwindSafe,
impl<F> Send for ConstraintSystemPadded<F>
impl<F> Sync for ConstraintSystemPadded<F>
impl<F> Unpin for ConstraintSystemPadded<F>where
F: Unpin,
impl<F> UnsafeUnpin for ConstraintSystemPadded<F>
impl<F> UnwindSafe for ConstraintSystemPadded<F>where
F: 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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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