From 1db217c01df61f9697a964b03f4916ac4dcc67b5 Mon Sep 17 00:00:00 2001 From: "sm.wu" Date: Fri, 23 Jun 2023 22:22:08 +0800 Subject: [PATCH] hardcode row require for u16 range lookup --- zkevm-circuits/src/evm_circuit/param.rs | 5 +++-- zkevm-circuits/src/witness/block.rs | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/zkevm-circuits/src/evm_circuit/param.rs b/zkevm-circuits/src/evm_circuit/param.rs index 3b45b17fb6..66d40314d5 100644 --- a/zkevm-circuits/src/evm_circuit/param.rs +++ b/zkevm-circuits/src/evm_circuit/param.rs @@ -25,9 +25,10 @@ pub const N_PHASE1_COLUMNS: usize = // Number of copy columns pub const N_COPY_COLUMNS: usize = 2; -pub const N_U8_LOOKUPS: usize = 12; +pub const N_U8_LOOKUPS: usize = 24; -pub const N_U16_LOOKUPS: usize = 6; +// TODO shift #column/2 from u8 to u16 +pub const N_U16_LOOKUPS: usize = 0; /// Amount of lookup columns in the EVM circuit dedicated to lookups. pub(crate) const EVM_LOOKUP_COLS: usize = FIXED_TABLE_LOOKUPS diff --git a/zkevm-circuits/src/witness/block.rs b/zkevm-circuits/src/witness/block.rs index 2f45a75339..9a915efafc 100644 --- a/zkevm-circuits/src/witness/block.rs +++ b/zkevm-circuits/src/witness/block.rs @@ -109,6 +109,7 @@ impl Block { num_rows_required_for_keccak_table, num_rows_required_for_tx_table, num_rows_required_for_exp_table, + 1 << 16, // u16 range lookup ]) .unwrap();