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

Make OP payload builder operate on the pooled tx type #13901

Open
mattsse opened this issue Jan 21, 2025 · 2 comments · May be fixed by #14086
Open

Make OP payload builder operate on the pooled tx type #13901

mattsse opened this issue Jan 21, 2025 · 2 comments · May be fixed by #14086
Assignees
Labels
A-block-building Related to block building A-op-reth Related to Optimism and op-reth A-tx-pool Related to the transaction mempool C-enhancement New feature or request

Comments

@mattsse
Copy link
Collaborator

mattsse commented Jan 21, 2025

Describe the feature

currently the op builder and best_txs operate on the consensus variant:

mut best_txs: impl PayloadTransactions<Transaction = EvmConfig::Transaction>,

impl<T, I> PayloadTransactions for BestPayloadTransactions<T, I>
where
T: PoolTransaction,
I: Iterator<Item = Arc<ValidPoolTransaction<T>>>,
{
type Transaction = T::Consensus;
fn next(&mut self, _ctx: ()) -> Option<Recovered<Self::Transaction>> {
loop {
let tx = self.best.next()?;
if self.invalid.contains(&tx.sender()) {
continue
}
return Some(tx.to_consensus())

however we need info about the pooled tx type for DA #13757 and soon tx conditional

TODO

  • make PayloadTransactions return the validPool tx instead

Additional context

No response

@mattsse mattsse added C-enhancement New feature or request S-needs-triage This issue needs to be labelled labels Jan 21, 2025
@mattsse mattsse self-assigned this Jan 21, 2025
@mattsse mattsse added A-block-building Related to block building A-tx-pool Related to the transaction mempool A-op-reth Related to Optimism and op-reth and removed S-needs-triage This issue needs to be labelled labels Jan 21, 2025
@hamdiallam
Copy link

hamdiallam commented Jan 28, 2025

Working on a PR for this as a precondition for the conditionals PR

Introducing a optimism/transaction-pool crate to avoid a circular dependency between node <> payload. This crate will just hold the code in node/src/txpool.rs.

@hamdiallam
Copy link

Ah the error is literally coming from the the PayloadTransactions trait. Updating that do just return T: PoolTransactions. Since that's constructed from Recovered<Tx> and has sender() apart of it's interface, should just be able to interact with that rather than the Recovered

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-block-building Related to block building A-op-reth Related to Optimism and op-reth A-tx-pool Related to the transaction mempool C-enhancement New feature or request
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

2 participants