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

tx-pool: Make txpool independent of primitive tx types #9916

Merged
merged 15 commits into from
Aug 1, 2024

Conversation

tcoratger
Copy link
Contributor

@tcoratger tcoratger commented Jul 30, 2024

Related #8668

@tcoratger tcoratger marked this pull request as ready for review July 31, 2024 12:57
@JackG-eth
Copy link
Contributor

@tcoratger Just want to make sure i'm not blocking you here or anything? looks like its a finished version of mine!

@tcoratger
Copy link
Contributor Author

@tcoratger Just want to make sure i'm not blocking you here or anything? looks like its a finished version of mine!

@JackG-eth I think this will be reviewed soon by @mattsse but this is just scaffolding as the issue was "quite urgent" but this doesn't close completely the issue as we still have the constraints:

/// Trait for transaction types used inside the pool
pub trait PoolTransaction:
    fmt::Debug
    + Send
    + Sync
    + Clone
    + From<PooledTransactionsElementEcRecovered>
    + TryFrom<TransactionSignedEcRecovered>
    + Into<TransactionSignedEcRecovered>
{

with

    + From<PooledTransactionsElementEcRecovered>
    + TryFrom<TransactionSignedEcRecovered>
    + Into<TransactionSignedEcRecovered>

that should be removed completely in the abstracted version to close the issue. Indeed, in the end what we want is to no longer depend in this trait on specific type of transactions and this is not yet the case here. I just made simplifications and put the necessary types in place to facilitate the work later as doing everything on a single PR would have been too long and time consuming to review.

What I think you can do is once this PR is merged you can go back from there to do the final abstraction and finish the job, wdyt @mattsse ?

@mattsse
Copy link
Collaborator

mattsse commented Aug 1, 2024

great, this sgtm!

reviewing in a bit, ty!

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

clean, ty for doing this incrementally

pending conflict

Comment on lines +760 to +769
+ Clone
+ From<PooledTransactionsElementEcRecovered>
+ TryFrom<TransactionSignedEcRecovered>
+ Into<TransactionSignedEcRecovered>
{
/// Associated type representing the raw consensus variant of the transaction.
type Consensus: From<Self> + TryInto<Self>;

/// Associated type representing the recovered pooled variant of the transaction.
type Pooled: Into<Self>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

this makes sense as a low invasive step towards that feature, nice

@tcoratger
Copy link
Contributor Author

clean, ty for doing this incrementally

pending conflict

@mattsse conflicts are fixed

@mattsse mattsse enabled auto-merge August 1, 2024 13:34
@mattsse mattsse added this pull request to the merge queue Aug 1, 2024
Merged via the queue into paradigmxyz:main with commit f25367c Aug 1, 2024
32 checks passed
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