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

fix(optimism): Node Tests #47

Merged
merged 6 commits into from
Jan 28, 2025
Merged

fix(optimism): Node Tests #47

merged 6 commits into from
Jan 28, 2025

Conversation

refcell
Copy link
Collaborator

@refcell refcell commented Jan 28, 2025

Description

Fixes node tests in the transaction pool using the updated OpTransactionSigned. This requires implementing traits on the MockEthProvider with the concrete generic instead of the default T = TransactionSigned generic.

Closes #45

@refcell refcell added the A-tx-pool Related to transaction pool label Jan 28, 2025
Comment on lines +34 to +35
use reth_primitives::TransactionSigned;
let provider = MockEthProvider::<TransactionSigned>::default();
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These changes stink but i think it's unavoidable, even though i hid the op impls behind the optimism feature flag

Copy link
Member

Choose a reason for hiding this comment

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

eventually we want to remove those op feature flags anyway, I don't think it stinks so bad :)

Comment on lines +34 to +35
use reth_primitives::TransactionSigned;
let provider = MockEthProvider::<TransactionSigned>::default();
Copy link
Member

Choose a reason for hiding this comment

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

eventually we want to remove those op feature flags anyway, I don't think it stinks so bad :)

@emhane emhane added upstream A pr solving this issue has been opened in upstream and removed upstream A pr solving this issue has been opened in upstream labels Jan 28, 2025
@@ -164,6 +164,26 @@ impl StateCommitmentProvider for MockEthProvider {
type StateCommitment = <MockNode as NodeTypes>::StateCommitment;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
type StateCommitment = <MockNode as NodeTypes>::StateCommitment;
impl<T> StateCommitmentProvider for MockEthProvider<T> {
type StateCommitment = <MockNode as NodeTypes>::StateCommitment;

this is instead fixed by generalising the impls. in some cases you may need trait bound T: reth_primitive_traits::SignedTransaction

Copy link
Member

Choose a reason for hiding this comment

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

this change is what we want to upstream, but I'm merging this pr into the base branch anyway to unblock

Copy link
Member

Choose a reason for hiding this comment

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

opened an issue paradigmxyz#14038

@emhane emhane merged commit 0bcd3b8 into rf/xpool Jan 28, 2025
28 checks passed
@emhane emhane deleted the rf/test-fixes branch January 28, 2025 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tx-pool Related to transaction pool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants