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

Extract PayloadTransactions to payload-primitives #12533

Closed
mattsse opened this issue Nov 14, 2024 · 2 comments · Fixed by #12590
Closed

Extract PayloadTransactions to payload-primitives #12533

mattsse opened this issue Nov 14, 2024 · 2 comments · Fixed by #12590
Assignees
Labels
A-execution Related to the Execution and EVM C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started

Comments

@mattsse
Copy link
Collaborator

mattsse commented Nov 14, 2024

Describe the feature

we can move:

pub trait PayloadTransactions {

and implementers

pub struct PayloadTransactionsChain<B: PayloadTransactions, A: PayloadTransactions> {

to this crate because this specifically targets payload building

name = "reth-payload-primitives"

Additional context

No response

@mattsse mattsse added C-enhancement New feature or request S-needs-triage This issue needs to be labelled labels Nov 14, 2024
@mattsse mattsse added D-good-first-issue Nice and easy! A great choice to get started A-execution Related to the Execution and EVM and removed S-needs-triage This issue needs to be labelled labels Nov 14, 2024
@TheDhejavu
Copy link
Contributor

TheDhejavu commented Nov 15, 2024

Took a quick look at the dependency relationship between reth-transaction-pool and reth-payload-primitives. Currently, reth-payload-primitives depends on reth-transaction-pool as shown

reth-transaction-pool.workspace = true

If we want to move all payload-related implementers and traits to reth-payload-primitives, we'll encounter a dependency cycle issue. This is because:

  1. We need to call reth-payload-primitives in reth-transaction-pool tests
  2. Moving tests to reth-payload-primitives would require making reth-transaction-pool related methods that's used in test public

Currently, the only reason for reth-transaction-pool dependency in reth-payload-primitives is for error handling, as seen here

use reth_transaction_pool::BlobStoreError;

One approach is to remove the reth-transaction-pool dependency from reth-payload-primitives and only allow reth-transaction-pool to depend on reth-payload-primitives for payload-related functionality.

the downside is that we won't be able to move this

pub struct BestPayloadTransactions<T, I>
because it depends reth-transaction-pool.

@mattsse
Copy link
Collaborator Author

mattsse commented Nov 15, 2024

I see, in that case, let's introduce a new crate for this like payload-util
this is probably better because eventually we need to put in a bunch of evm stuff in there anyway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-execution Related to the Execution and EVM C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants