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

Unify reth_primitives and alloy_rpc_types #8177

Open
puma314 opened this issue May 9, 2024 · 4 comments
Open

Unify reth_primitives and alloy_rpc_types #8177

puma314 opened this issue May 9, 2024 · 4 comments
Assignees
Labels
C-enhancement New feature or request

Comments

@puma314
Copy link

puma314 commented May 9, 2024

Describe the feature

There are several places where reth_primitives have types that could be alloy_rpc_types. As an example where this causes pain is in SP1-Reth, where we have 200 LOC devoted to converting between these types, as we fetch data from an RPC endpoint, and then must convert it to feed it into reth processing.

Additional context

No response

@puma314 puma314 added C-enhancement New feature or request S-needs-triage This issue needs to be labelled labels May 9, 2024
@mattsse
Copy link
Collaborator

mattsse commented May 9, 2024

withdrawals are now used from alloy, and we have a few tryfrom conversions available via the alloy-compat feature:

#[cfg(feature = "alloy-compat")]
impl TryFrom<alloy_rpc_types::Block> for Block {
type Error = alloy_rpc_types::ConversionError;

@Vid201
Copy link
Contributor

Vid201 commented May 9, 2024

I can take this

@DaniPopes DaniPopes removed the S-needs-triage This issue needs to be labelled label May 9, 2024
@gakonst
Copy link
Member

gakonst commented May 9, 2024

assigned! @puma314 got any more things to share with @Vid201 on what it'd take to consider this completed?

@puma314
Copy link
Author

puma314 commented May 9, 2024

If we can remove this file, i.e. there are TryFrom methods implemented for all the reth_primitives in this file (AccessListItem, Header, Signature, TransactionSignedNoHash, Withdrawal, Transaction, TransactionSignedNoHash, TxEip1559, TxEip2930, TxLegacy) then I'd consider this complete!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

5 participants