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

[Feature] Move AnyNetwork types into their own crate(s) #1598

Open
prestwich opened this issue Oct 31, 2024 · 1 comment · May be fixed by #1715
Open

[Feature] Move AnyNetwork types into their own crate(s) #1598

prestwich opened this issue Oct 31, 2024 · 1 comment · May be fixed by #1715
Labels
bug Something isn't working

Comments

@prestwich
Copy link
Member

prestwich commented Oct 31, 2024

Component

consensus, eips, genesis, network, json-rpc

What version of Alloy are you on?

No response

Operating System

None

Describe the bug

per discussion here: #1460 (comment)

Currently alloy-consensus contains Any types for Receipt and Header that are then bubbled up through alloy-rpc-types-eth to alloy-network. These types are not eth types and it is somewhat messy to put them alongside the eth types. We have a standard pattern for adding networks to alloy, that AnyNetwork is currently not following, which is to create consensus-* and rpc-types-* crates

Approximate steps to take:

  • create alloy-consensus-any, depending on alloy-consensus
  • create alloy-rpc-types-any, depending on alloy-rpc-types-eth
  • move AnyReceipt and AnyHeader from alloy-consensus to alloy-consensus-any
  • move AnyTxEnvelope from alloy-network to alloy-consensus-any
  • create type aliases for AnyRpcHeader and AnyRpcBlock in alloy-rpc-types-any
  • change alloy-network to depend on alloy-consensus-any and alloy-rpc-types-any

Alternate approach would be to create only a single crate that contains both consensus and rpc types

@prestwich prestwich added the bug Something isn't working label Oct 31, 2024
@nadtech-hub
Copy link
Contributor

nadtech-hub commented Oct 31, 2024

I would like to take on this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants