diff --git a/crates/zkwasm/src/circuits/jtable/assign.rs b/crates/zkwasm/src/circuits/jtable/assign.rs index 4eba11fbd..2f2e7588a 100644 --- a/crates/zkwasm/src/circuits/jtable/assign.rs +++ b/crates/zkwasm/src/circuits/jtable/assign.rs @@ -68,25 +68,23 @@ impl JumpTableChip { )?; } - if i == capability - 1 { - ctx.region.assign_advice_from_constant( - || "frame table: entry terminate", - self.config.value, - ctx.offset + FrameTableValueOffset::CallOps as usize, - F::zero(), - )?; - - ctx.region.assign_advice_from_constant( - || "frame table: entry terminate", - self.config.value, - ctx.offset + FrameTableValueOffset::ReturnOps as usize, - F::zero(), - )?; - } - ctx.step(FrameTableValueOffset::Max as usize); } + ctx.region.assign_advice_from_constant( + || "frame table: entry terminate", + self.config.value, + ctx.offset + FrameTableValueOffset::CallOps as usize, + F::zero(), + )?; + + ctx.region.assign_advice_from_constant( + || "frame table: entry terminate", + self.config.value, + ctx.offset + FrameTableValueOffset::ReturnOps as usize, + F::zero(), + )?; + ctx.region.assign_fixed( || "frame table: inherited", self.config.inherited, diff --git a/crates/zkwasm/src/circuits/mtable/assign.rs b/crates/zkwasm/src/circuits/mtable/assign.rs index 5ffe3280b..227762b10 100644 --- a/crates/zkwasm/src/circuits/mtable/assign.rs +++ b/crates/zkwasm/src/circuits/mtable/assign.rs @@ -31,7 +31,7 @@ impl MemoryTableChip { fn assign_fixed(&self, ctx: &mut Context<'_, F>) -> Result<(), Error> { let capability = self.maximal_available_rows / MEMORY_TABLE_ENTRY_ROWS as usize; - for i in 0..capability { + for _ in 0..capability { ctx.region.assign_fixed( || "mtable: sel", self.config.entry_sel, @@ -39,26 +39,24 @@ impl MemoryTableChip { || Ok(F::one()), )?; - if i == capability - 1 { - ctx.region.assign_advice_from_constant( - || "rest_mops terminate", - self.config.rest_mops_cell.cell.col, - ctx.offset + self.config.rest_mops_cell.cell.rot as usize, - F::zero(), - )?; - - #[cfg(feature = "continuation")] - ctx.region.assign_advice_from_constant( - || "rest_memory_finalize_ops terminate", - self.config.rest_memory_finalize_ops_cell.cell.col, - ctx.offset + self.config.rest_memory_finalize_ops_cell.cell.rot as usize, - F::zero(), - )?; - } - ctx.step(MEMORY_TABLE_ENTRY_ROWS as usize); } + ctx.region.assign_advice_from_constant( + || "rest_mops terminate", + self.config.rest_mops_cell.cell.col, + ctx.offset + self.config.rest_mops_cell.cell.rot as usize, + F::zero(), + )?; + + #[cfg(feature = "continuation")] + ctx.region.assign_advice_from_constant( + || "rest_memory_finalize_ops terminate", + self.config.rest_memory_finalize_ops_cell.cell.col, + ctx.offset + self.config.rest_memory_finalize_ops_cell.cell.rot as usize, + F::zero(), + )?; + Ok(()) }