-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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: rm into tx constraint for PoolTransaction
#10057
Conversation
To give a bit more context to this PR, it follows a discussion with @mattsse about #8668 and its resolution in several steps to avoid doing everything at once.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This currently introduces pretty strict requirements of Tx: T: PoolTransaction<Consensus = TransactionSignedEcRecovered>
on many of transaction-pool types which don't rely on this conversion.
Given that most of the conversion consumers are outside of tx-pool crate I am wondering if we should relax those trait bounds to keep tx-pool types more flexible and instead move them to types explicitly relying on those conversions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried relaxing the bounds locally and it seems that a lot of them can either be removed or only kept at a small subset of impl blocks
Wondering if the root issue is that you're adding T: PoolTransaction<Consensus = TransactionSignedEcRecovered>
to struct definitions? T: PoolTransaction
should be mostly enough, and impls can restrict Consensus
AT if needed
Though I am wondering if I am missing something about the chosen approach here and those bounds on structs are actually desired? (cc @emhane @mattsse)
I agree that it makes sense to relax bounds on ATs here. since we are not yet completely sure how we will inject if you already have the code locally @klkvr, feel free to push to this branch. |
@klkvr yes please feel free to push here. I wanted to relax as much as possible but I certainly missed a point here. If you don't push I'll try myself tonight but feel free to do so to make it faster :) |
Nice @klkvr seems logical to me this way! Once this PR is merged, I'll do the last one to close the issue! |
Related #8668