Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maybe no need to remove transactions manually after producing L2 block #1717

Open
yaziciahmet opened this issue Jan 16, 2025 · 0 comments
Open

Comments

@yaziciahmet
Copy link
Contributor

yaziciahmet commented Jan 16, 2025

We have this following code piece in produce_l2_block method of sequencer:

                let mut txs_to_remove = self.db_provider.last_block_tx_hashes()?;
                txs_to_remove.extend(l1_fee_failed_txs);

                self.mempool.remove_transactions(txs_to_remove.clone());
                SEQUENCER_METRICS.mempool_txs.set(self.mempool.len() as f64);

                let account_updates = self.get_account_updates()?;

                self.mempool.update_accounts(account_updates);

As far as I checked the reth mempool implementation, update_accounts method already removes the transactions since the transactions will already be dropped due to updated nonce of the account. But there is also the fact that we also need to remove l1_fee_failed_txs, which is not going to be removed by update_accounts method.

This is a reminder issue to double-check reth and potentially find ways to improve this part of the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant