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

Improve OP txpool batch validation #13902

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

Improve OP txpool batch validation #13902

mattsse opened this issue Jan 21, 2025 · 2 comments · May be fixed by #13918
Assignees
Labels
A-op-reth Related to Optimism and op-reth C-enhancement New feature or request C-perf A change motivated by improving speed, memory usage or disk footprint D-good-first-issue Nice and easy! A great choice to get started

Comments

@mattsse
Copy link
Collaborator

mattsse commented Jan 21, 2025

Describe the feature

the opvalidator currently does:

transactions.into_iter().map(|(origin, tx)| self.validate_one(origin, tx)).collect()

and delegates to the regular eth validator:

pub fn validate_one(
&self,
origin: TransactionOrigin,
transaction: Tx,
) -> TransactionValidationOutcome<Tx> {
if transaction.is_eip4844() {
return TransactionValidationOutcome::Invalid(
transaction,
InvalidTransactionError::TxTypeNotSupported.into(),
)
}
let outcome = self.inner.validate_one(origin, transaction);

this is suboptimal for batches because the eth validator is optimized for batches.

we can improve this by delegating to

/// Validates all given transactions.
fn validate_batch(
first and then perform the additional OP checks.

TODO

cc @hai-rise

Additional context

No response

@mattsse mattsse added A-op-reth Related to Optimism and op-reth C-enhancement New feature or request C-perf A change motivated by improving speed, memory usage or disk footprint D-good-first-issue Nice and easy! A great choice to get started labels Jan 21, 2025
@PoulavBhowmick03
Copy link

Can I pick it up? I would love to get started contributing to reth!

@emarc99
Copy link

emarc99 commented Jan 24, 2025

Can I take this from here? I have rust and Cairo experience. ETA - 2days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-op-reth Related to Optimism and op-reth C-enhancement New feature or request C-perf A change motivated by improving speed, memory usage or disk footprint D-good-first-issue Nice and easy! A great choice to get started
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

3 participants