Skip to main content

WiringEvalClaim

Struct WiringEvalClaim 

Source
pub struct WiringEvalClaim<'a, E> {
    pub eval_fn: &'a WiringInfo,
    pub inputs: Vec<E>,
    pub claimed: E,
}
Expand description

The prover’s wiring multilinear evaluation, with what it takes to check it.

check_eval reads the evaluation from the prover and closes the shift reduction with it, leaving this behind: the claimed value, and the function and inputs that recompute it from the wiring matrix. The holder discharges the claim by evaluating the function and requiring the two to agree.

Both discharges below evaluate the same function; they differ in where. A verifier holding values checks it in the field, and one building a circuit checks it in constraints — which is why the function is kept rather than a value, and why the claimed value sits beside it rather than folded into it.

Dropping a claim drops a check, so it is #[must_use].

Fields§

§eval_fn: &'a WiringInfo

Evaluates the wiring multilinear from inputs.

§inputs: Vec<E>

The flat input eval_fn reads.

§claimed: E

The evaluation the prover claims, which eval_fn must return.

Implementations§

Source§

impl<F: BinaryField> WiringEvalClaim<'_, F>

Source

pub fn check_native(self) -> Result<(), Error>

Discharges the claim in the field: evaluates the wiring multilinear and compares.

This is the discharge for a verifier holding values rather than wires, and it takes FieldFn::call_native’s accelerated path.

Source§

impl<'a, E> WiringEvalClaim<'a, E>

Source

pub fn defer(self) -> DeferredWiringClaim<E>

Exports the claim instead of discharging it.

Discharging evaluates the wiring multilinear, which reads every operand term of the system. Inside a circuit that cost tracks the inner system. So a circuit that pays it can never verify a proof of itself.

Exporting hands the claim out whole instead. It is settled once, natively, where the cost is ordinary.

The claim is short. Every section of its input is a challenge vector over a padded log-sized index. So the input length is logarithmic in the constraint count.

§Correctness

Nothing is verified here. Nothing is verified later either, unless a holder settles the claim. A dropped claim is an unchecked constraint.

Source§

impl<E> WiringEvalClaim<'_, E>

Source

pub fn check_symbolic<F, C>(self, channel: &mut C) -> Result<(), Error>
where F: BinaryField, C: IPVerifierChannel<F, Elem = E>, E: FieldOps<Scalar = F> + From<F>,

Discharges the claim over channel’s elements: evaluates the wiring multilinear there and asserts it equals the claimed value.

This is the discharge for a channel carrying elements as wires, where the evaluation becomes a sub-circuit and the comparison an assertion within it. A holder with another way to open a claim — a sparse-polynomial argument, say — reads the fields instead.

Trait Implementations§

Source§

impl<'a, E: Debug> Debug for WiringEvalClaim<'a, E>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, E> Freeze for WiringEvalClaim<'a, E>
where E: Freeze,

§

impl<'a, E> RefUnwindSafe for WiringEvalClaim<'a, E>
where E: RefUnwindSafe,

§

impl<'a, E> Send for WiringEvalClaim<'a, E>
where E: Send,

§

impl<'a, E> Sync for WiringEvalClaim<'a, E>
where E: Sync,

§

impl<'a, E> Unpin for WiringEvalClaim<'a, E>
where E: Unpin,

§

impl<'a, E> UnsafeUnpin for WiringEvalClaim<'a, E>
where E: UnsafeUnpin,

§

impl<'a, E> UnwindSafe for WiringEvalClaim<'a, E>
where E: 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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

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
§

impl<T> Pointable for T

§

const ALIGN: usize

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

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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