From 310107f218c9a1829b99bef755fdc93b9f03cb22 Mon Sep 17 00:00:00 2001 From: Hamy Ratoanina Date: Fri, 7 Apr 2023 17:06:57 -0400 Subject: [PATCH] Fix decode constraint --- evm/src/cpu/cpu_stark.rs | 4 ++-- evm/src/cpu/decode.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/evm/src/cpu/cpu_stark.rs b/evm/src/cpu/cpu_stark.rs index d922c473..09c7d576 100644 --- a/evm/src/cpu/cpu_stark.rs +++ b/evm/src/cpu/cpu_stark.rs @@ -146,7 +146,7 @@ impl, const D: usize> Stark for CpuStark, const D: usize> Stark for CpuStark( .into_iter() .zip(bits_from_opcode(oc)) .rev() - .take(block_length + 1) + .take(8 - block_length) .map(|(row_bit, flag_bit)| match flag_bit { // 1 if the bit does not match, and 0 otherwise false => row_bit, @@ -264,7 +264,7 @@ pub fn eval_ext_circuit, const D: usize>( .into_iter() .zip(bits_from_opcode(oc)) .rev() - .take(block_length + 1) + .take(8 - block_length) .fold(builder.zero_extension(), |cumul, (row_bit, flag_bit)| { let to_add = match flag_bit { false => row_bit,