pub fn rollback(&mut self, tx: &Transaction) -> TransactionTimeRangeConstraint {
        // rolling back the nonces and priority ids
        match &tx.common_data {
            ExecuteTransactionCommon::L1(data) => {
                // reset next priority id
                self.next_priority_id = self.next_priority_id.min(data.serial_id);
                TransactionTimeRangeConstraint::default()
            }
            ExecuteTransactionCommon::L2(_) => {
                if let Some((score, constraint)) = self
                    .l2_transactions_per_account
                    .get_mut(&tx.initiator_account())
                    .expect("account is not available in mempool")
                    .reset(tx)
                {
                    self.l2_priority_queue.remove(&score);
                    return constraint;
                }
                TransactionTimeRangeConstraint::default()
            }
            ExecuteTransactionCommon::ProtocolUpgrade(_) => {
                panic!("Protocol upgrade tx is not supposed to be in mempool");
            }
        }
    }
When a state_keeper starts the block over after a rejected transaction,
we have to rollback the nonces/ids in the mempool and
reinsert the transactions from the block back into mempool.
core/lib/mempool/src/mempool_store.rs