Enum o1vm::lookups::LookupTableIDs
source · pub enum LookupTableIDs {
PadLookup,
RoundConstantsLookup,
AtMost4Lookup,
ByteLookup,
RangeCheck16Lookup,
SparseLookup,
ResetLookup,
MemoryLookup,
RegisterLookup,
SyscallLookup,
KeccakStepLookup,
}
Expand description
All of the possible lookup table IDs used in the zkVM
Variants§
PadLookup
All [1..136] values of possible padding lengths, the value 2^len, and the 5 corresponding pad suffixes with the 10*1 rule
RoundConstantsLookup
24-row table with all possible values for round and their round constant in expanded form (in big endian) [0..=23]
AtMost4Lookup
Values from 0 to 4 to check the number of bytes read from syscalls
ByteLookup
All values that can be stored in a byte (amortized table, better than model as RangeCheck16 (x and scaled x)
RangeCheck16Lookup
Single-column table of all values in the range [0, 2^16)
SparseLookup
Single-column table of 2^16 entries with the sparse representation of all values
ResetLookup
Dual-column table of all values in the range [0, 2^16) and their sparse representation
MemoryLookup
RegisterLookup
SyscallLookup
Syscalls communication channel
KeccakStepLookup
Input/Output of Keccak steps
Trait Implementations§
source§impl Clone for LookupTableIDs
impl Clone for LookupTableIDs
source§fn clone(&self) -> LookupTableIDs
fn clone(&self) -> LookupTableIDs
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for LookupTableIDs
impl Debug for LookupTableIDs
source§impl Hash for LookupTableIDs
impl Hash for LookupTableIDs
source§impl LookupTableID for LookupTableIDs
impl LookupTableID for LookupTableIDs
source§fn is_fixed(&self) -> bool
fn is_fixed(&self) -> bool
Identify fixed and RAMLookups with a boolean.
This can be used to identify the lookups whose table values are fixed,
like range checks.
source§fn runtime_create_column(&self) -> bool
fn runtime_create_column(&self) -> bool
If a table is runtime table,
true
means we should create an
explicit extra column for it to “read” from. false
means
that this table will be reading from some existing (e.g.
relation) columns, and no extra columns should be added. Read moresource§fn ix_by_value<F: PrimeField>(&self, _value: &[F]) -> Option<usize>
fn ix_by_value<F: PrimeField>(&self, _value: &[F]) -> Option<usize>
Returns None if the table is runtime (and thus mapping value
-> ix is not known at compile time.
fn all_variants() -> Vec<Self>
§fn to_constraint<F>(
&self
) -> Operations<ExprInner<Operations<ConstantExprInner<F, BerkeleyChallengeTerm>>, Column>>where
F: Field,
fn to_constraint<F>( &self ) -> Operations<ExprInner<Operations<ConstantExprInner<F, BerkeleyChallengeTerm>>, Column>>where F: Field,
Assign a unique ID to the lookup tables, as an expression.
source§impl Ord for LookupTableIDs
impl Ord for LookupTableIDs
source§fn cmp(&self, other: &LookupTableIDs) -> Ordering
fn cmp(&self, other: &LookupTableIDs) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<LookupTableIDs> for LookupTableIDs
impl PartialEq<LookupTableIDs> for LookupTableIDs
source§fn eq(&self, other: &LookupTableIDs) -> bool
fn eq(&self, other: &LookupTableIDs) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<LookupTableIDs> for LookupTableIDs
impl PartialOrd<LookupTableIDs> for LookupTableIDs
source§fn partial_cmp(&self, other: &LookupTableIDs) -> Option<Ordering>
fn partial_cmp(&self, other: &LookupTableIDs) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for LookupTableIDs
impl Eq for LookupTableIDs
impl StructuralEq for LookupTableIDs
impl StructuralPartialEq for LookupTableIDs
Auto Trait Implementations§
impl RefUnwindSafe for LookupTableIDs
impl Send for LookupTableIDs
impl Sync for LookupTableIDs
impl Unpin for LookupTableIDs
impl UnwindSafe for LookupTableIDs
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more