pub struct WitnessTable {
pub f_1: MultiSet,
pub f_2: MultiSet,
pub f_3: MultiSet,
pub f_4: MultiSet,
}Expand description
This witness table contains quieries to a lookup table for lookup gates This table is of arity 3.
Fields§
§f_1: MultiSetThis column represents the first values inside the lookup table. At gate checks, this can be regarded as the first wire
f_2: MultiSetThis column represents the first values inside the lookup table. At gate checks, this can be regarded as the second wire
f_3: MultiSetThis column represents the first values inside the lookup table. At gate checks, this can be regarded as the third wire
f_4: MultiSetThis column represents the first values inside the lookup table. At gate checks, this can be regarded as the fourth wire
Implementations§
Source§impl WitnessTable
impl WitnessTable
Sourcepub fn from_wire_values(
&mut self,
left_wire_val: BlsScalar,
right_wire_val: BlsScalar,
output_wire_val: BlsScalar,
fourth_wire_val: BlsScalar,
)
pub fn from_wire_values( &mut self, left_wire_val: BlsScalar, right_wire_val: BlsScalar, output_wire_val: BlsScalar, fourth_wire_val: BlsScalar, )
This allows the witness table to be filled directly without taking any vaules, or the the results, from the lookup table. If the values do no exists in the lookup table, then the proof will fail when witness and preprocessed tables are concatenated.
Sourcepub fn value_from_table(
&mut self,
lookup_table: &LookupTable,
left_wire_val: BlsScalar,
right_wire_val: BlsScalar,
fourth_wire_val: BlsScalar,
) -> Result<(), Error>
pub fn value_from_table( &mut self, lookup_table: &LookupTable, left_wire_val: BlsScalar, right_wire_val: BlsScalar, fourth_wire_val: BlsScalar, ) -> Result<(), Error>
Attempts to look up a value from a lookup table. If successful, all four elements are pushed to their respective multisets.
Trait Implementations§
Source§impl Clone for WitnessTable
impl Clone for WitnessTable
Source§fn clone(&self) -> WitnessTable
fn clone(&self) -> WitnessTable
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WitnessTable
impl Debug for WitnessTable
Source§impl Default for WitnessTable
impl Default for WitnessTable
Source§impl PartialEq for WitnessTable
impl PartialEq for WitnessTable
impl Eq for WitnessTable
impl StructuralPartialEq for WitnessTable
Auto Trait Implementations§
impl Freeze for WitnessTable
impl RefUnwindSafe for WitnessTable
impl Send for WitnessTable
impl Sync for WitnessTable
impl Unpin for WitnessTable
impl UnwindSafe for WitnessTable
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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