alloy-rs / alloy

Transports, Middleware, and Networks for the Alloy project
https://alloy.rs
Apache License 2.0
633 stars 230 forks source link

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

Open prestwich opened 1 day ago

prestwich commented 1 day ago

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: https://github.com/alloy-rs/alloy/pull/1460#discussion_r1824406025

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:

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

nadtech-hub commented 1 day ago

I would like to take on this one