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 WiringInfoEvaluates the wiring multilinear from inputs.
inputs: Vec<E>The flat input eval_fn reads.
claimed: EThe evaluation the prover claims, which eval_fn must return.
Implementations§
Source§impl<F: BinaryField> WiringEvalClaim<'_, F>
impl<F: BinaryField> WiringEvalClaim<'_, F>
Sourcepub fn check_native(self) -> Result<(), Error>
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>
impl<'a, E> WiringEvalClaim<'a, E>
Sourcepub fn defer(self) -> DeferredWiringClaim<E>
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>
impl<E> WiringEvalClaim<'_, E>
Sourcepub fn check_symbolic<F, C>(self, channel: &mut C) -> Result<(), Error>
pub fn check_symbolic<F, C>(self, channel: &mut C) -> Result<(), Error>
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§
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> 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
§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>
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>
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