WitnessTable

Struct WitnessTable 

Source
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: MultiSet

This column represents the first values inside the lookup table. At gate checks, this can be regarded as the first wire

§f_2: MultiSet

This column represents the first values inside the lookup table. At gate checks, this can be regarded as the second wire

§f_3: MultiSet

This column represents the first values inside the lookup table. At gate checks, this can be regarded as the third wire

§f_4: MultiSet

This column represents the first values inside the lookup table. At gate checks, this can be regarded as the fourth wire

Implementations§

Source§

impl WitnessTable

Source

pub fn new() -> Self

Initialses empty witness table of arity 4

Source

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.

Source

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

Source§

fn clone(&self) -> WitnessTable

Returns a duplicate 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 Debug for WitnessTable

Source§

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

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

impl Default for WitnessTable

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for WitnessTable

Source§

fn eq(&self, other: &WitnessTable) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for WitnessTable

Source§

impl StructuralPartialEq for WitnessTable

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

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