@@ -2257,6 +2257,7 @@ impl<F: Field> TxCircuit<F> {
2257
2257
let mut is_padding_tx;
2258
2258
let mut num_all_txs_acc = 0 ;
2259
2259
let mut total_l1_popped_before = start_l1_queue_index;
2260
+ let mut total_l1_popped_after = start_l1_queue_index;
2260
2261
// Empty entry
2261
2262
config. assign_row (
2262
2263
& mut region,
@@ -2312,9 +2313,10 @@ impl<F: Field> TxCircuit<F> {
2312
2313
if tx. tx_type . is_l1_msg ( ) {
2313
2314
let queue_index = tx. nonce ;
2314
2315
num_all_txs_acc = queue_index - total_l1_popped_before + 1 ;
2315
- total_l1_popped_before = queue_index + 1 ;
2316
+ total_l1_popped_after = queue_index + 1 ;
2316
2317
} else {
2317
- // total_l1_popped_before do not change
2318
+ // next tx's total_l1_popped_before do not change
2319
+ total_l1_popped_after = total_l1_popped_before;
2318
2320
num_all_txs_acc = 1 ;
2319
2321
}
2320
2322
} ;
@@ -2326,9 +2328,10 @@ impl<F: Field> TxCircuit<F> {
2326
2328
if tx. tx_type . is_l1_msg ( ) {
2327
2329
let queue_index = tx. nonce ;
2328
2330
num_all_txs_acc += queue_index - total_l1_popped_before + 1 ;
2329
- total_l1_popped_before = queue_index + 1 ;
2331
+ total_l1_popped_after = queue_index + 1 ;
2330
2332
} else {
2331
- // total_l1_popped_before do not change
2333
+ // next tx's total_l1_popped_before do not change
2334
+ total_l1_popped_after = total_l1_popped_before;
2332
2335
num_all_txs_acc += 1 ;
2333
2336
}
2334
2337
}
@@ -2627,6 +2630,8 @@ impl<F: Field> TxCircuit<F> {
2627
2630
|| Value :: known ( sv_address) ,
2628
2631
) ?;
2629
2632
}
2633
+ // set next tx's total_l1_popped_before
2634
+ total_l1_popped_before = total_l1_popped_after;
2630
2635
}
2631
2636
2632
2637
log:: debug!( "assigning calldata, offset {}" , offset) ;
0 commit comments