Skip to content

Commit

Permalink
fix: constraint on num_all_txs_acc' is wrong (#790)
Browse files Browse the repository at this point in the history
  • Loading branch information
kunxian-xia authored Aug 18, 2023
1 parent 8bc9812 commit 750169c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zkevm-circuits/src/tx_circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -881,15 +881,15 @@ impl<F: Field> SubCircuitConfig<F> for TxCircuitConfig<F> {
);

// 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())
- meta.query_advice(num_all_txs_acc, Rotation::cur()),
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(),
),
Expand Down

0 comments on commit 750169c

Please sign in to comment.