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

wip: feat: op transaction validator #6403

Closed
wants to merge 5 commits into from
Closed

Conversation

mattsse
Copy link
Collaborator

@mattsse mattsse commented Feb 5, 2024

closes #5892

This adds a standalone tx validator for OP.

BLOCKED by: integration in reth CLI

@mattsse mattsse marked this pull request as ready for review February 5, 2024 17:59
@mattsse mattsse requested a review from gakonst as a code owner February 5, 2024 17:59
@mattsse mattsse requested a review from clabby February 5, 2024 18:00
@mattsse mattsse added the A-tx-pool Related to the transaction mempool label Feb 5, 2024
Copy link
Member

@gakonst gakonst left a comment

Choose a reason for hiding this comment

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

beautiful

Copy link
Collaborator

@clabby clabby left a comment

Choose a reason for hiding this comment

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

Great cleanup, this is nice. Small nit on the OpBlockInfo struct name, also need to add back in the check that disallows deposit transactions to enter the tx pool.


/// Tracks additional infos for the current block.
#[derive(Debug, Default)]
struct OpBlockInfo {
Copy link
Collaborator

@clabby clabby Feb 5, 2024

Choose a reason for hiding this comment

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

Can we rename this to OpL1BlockInfo? This information is from the L1 origin block, name / doc could confuse readers into thinking it's L2 block information unless they look at the struct definition.

origin: TransactionOrigin,
transaction: Tx,
) -> TransactionValidationOutcome<Tx> {
let outcome = self.inner.validate_one(origin, transaction);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is not required, because they get rejected by the eth impl anyway, the test ensures that

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

but I can add it back to make this clear

@Rjected
Copy link
Member

Rjected commented Feb 16, 2024

@mattsse bump on this post-builder merge when you have time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tx-pool Related to the transaction mempool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add standalone optimism transaction validator
4 participants