From 750169c0e7282c267c8216c800ed7c1b7e021b16 Mon Sep 17 00:00:00 2001 From: xkx Date: Fri, 18 Aug 2023 12:36:34 +0800 Subject: [PATCH] fix: constraint on num_all_txs_acc' is wrong (#790) --- zkevm-circuits/src/tx_circuit.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zkevm-circuits/src/tx_circuit.rs b/zkevm-circuits/src/tx_circuit.rs index 9d925b2132..bfe2bcc9d7 100644 --- a/zkevm-circuits/src/tx_circuit.rs +++ b/zkevm-circuits/src/tx_circuit.rs @@ -881,7 +881,7 @@ impl SubCircuitConfig for TxCircuitConfig { ); // num_all_txs_acc' - num_all_txs_acc = is_l1_msg' ? queue_index' - - // total_l1_popped + 1 : 1 + // total_l1_popped' + 1 : 1 cb.require_equal( "num_all_txs_acc' - num_all_txs_acc", meta.query_advice(num_all_txs_acc, Rotation::next()) @@ -889,7 +889,7 @@ impl SubCircuitConfig for TxCircuitConfig { select::expr( meta.query_advice(is_l1_msg, Rotation::next()), meta.query_advice(tx_nonce, Rotation::next()) - - meta.query_advice(total_l1_popped_before, Rotation::cur()) + - meta.query_advice(total_l1_popped_before, Rotation::next()) + 1.expr(), 1.expr(), ),