Skip to content

Conversation

@andr-dev
Copy link
Contributor

The txpool sequencer was placed in the tracked subdirectory and directly called by the tracked map since we can only sequence tracked txs (those with nonce guaranteed to be greater than or equal to the last committed account nonce). The decision to have it be called by the tracked map however is an implementation detail.

Since we are moving more towards a world where the pool maps are "simple" datastructures, this PR moves the sequencer out of the tracked subdirectory and performs the tx sequencing directly in EthTxPool.

@andr-dev andr-dev requested a review from omegablitz as a code owner October 22, 2025 20:03
@Copilot Copilot AI review requested due to automatic review settings October 22, 2025 20:03
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the transaction sequencing logic by moving ProposalSequencer from the tracked subdirectory to the main pool module, making it a first-class component directly managed by EthTxPool.

Key Changes:

  • Moved sequencer from tracked/sequencer.rs to pool/sequencer.rs
  • Extracted create_proposal method from TrackedTxMap into new sequence_user_transactions method in EthTxPool
  • Modified ProposalSequencer::new to accept an iterator instead of direct IndexMap reference

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
monad-eth-txpool/src/pool/tracked/mod.rs Removed sequencer module and create_proposal method; added iter() method to expose tracked transactions
monad-eth-txpool/src/pool/sequencer.rs Updated imports and changed ProposalSequencer::new to accept iterator parameter; removed unused chain_id parameter from build_proposal
monad-eth-txpool/src/pool/mod.rs Added sequencer module; implemented new sequence_user_transactions method; refactored create_proposal to use new sequencing approach

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@andr-dev andr-dev force-pushed the andre/txpool-refactor-sequencer branch from 13e269e to 73173f0 Compare October 22, 2025 20:09
@andr-dev andr-dev force-pushed the andre/txpool-refactor-sequencer branch from 73173f0 to 148f9df Compare October 22, 2025 20:11
@andr-dev andr-dev force-pushed the andre/txpool-refactor-sequencer branch from 148f9df to db544e1 Compare October 23, 2025 21:00
@andr-dev andr-dev added this pull request to the merge queue Oct 24, 2025
Merged via the queue into master with commit dae0789 Oct 24, 2025
3 checks passed
@andr-dev andr-dev deleted the andre/txpool-refactor-sequencer branch October 24, 2025 19:41
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

Successfully merging this pull request may close these issues.

3 participants