pub enum LookupTableIDs {
PadLookup = 0,
RoundConstantsLookup = 1,
AtMost4Lookup = 2,
ByteLookup = 3,
RangeCheck16Lookup = 4,
SparseLookup = 5,
ResetLookup = 6,
MemoryLookup = 7,
RegisterLookup = 8,
SyscallLookup = 9,
KeccakStepLookup = 10,
}
Expand description
All of the possible lookup table IDs used in the zkVM
Variants§
PadLookup = 0
All [1..136] values of possible padding lengths, the value 2^len, and the 5 corresponding pad suffixes with the 10*1 rule
RoundConstantsLookup = 1
24-row table with all possible values for round and their round constant in expanded form (in big endian) [0..=23]
AtMost4Lookup = 2
Values from 0 to 4 to check the number of bytes read from syscalls
ByteLookup = 3
All values that can be stored in a byte (amortized table, better than model as RangeCheck16 (x and scaled x)
RangeCheck16Lookup = 4
Single-column table of all values in the range [0, 2^16)
SparseLookup = 5
Single-column table of 2^16 entries with the sparse representation of all values
ResetLookup = 6
Dual-column table of all values in the range [0, 2^16) and their sparse representation
MemoryLookup = 7
RegisterLookup = 8
SyscallLookup = 9
Syscalls communication channel
KeccakStepLookup = 10
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 duplicate 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>
Source§fn to_constraint<F>(
&self,
) -> Operations<ExprInner<Operations<ConstantExprInner<F, BerkeleyChallengeTerm>>, Column<usize>>>where
F: Field,
fn to_constraint<F>(
&self,
) -> Operations<ExprInner<Operations<ConstantExprInner<F, BerkeleyChallengeTerm>>, Column<usize>>>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 for LookupTableIDs
impl PartialEq for LookupTableIDs
Source§impl PartialOrd for LookupTableIDs
impl PartialOrd for LookupTableIDs
impl Copy for LookupTableIDs
impl Eq for LookupTableIDs
impl StructuralPartialEq for LookupTableIDs
Auto Trait Implementations§
impl Freeze for LookupTableIDs
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more