-
Notifications
You must be signed in to change notification settings - Fork 601
[Feature] Move AnyNetwork types into their own crate(s) #1598
Copy link
Copy link
Open
Labels
c-consensusPertaining to the consensus cratePertaining to the consensus cratec-rpc-typeschorediscussneeds discussionneeds discussion
Description
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 onalloy-consensus - create
alloy-rpc-types-any, depending onalloy-rpc-types-eth - move
AnyReceiptandAnyHeaderfromalloy-consensustoalloy-consensus-any - move
AnyTxEnvelopefromalloy-networktoalloy-consensus-any - create type aliases for
AnyRpcHeaderandAnyRpcBlockinalloy-rpc-types-any - change
alloy-networkto depend onalloy-consensus-anyandalloy-rpc-types-any
Alternate approach would be to create only a single crate that contains both consensus and rpc types
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
c-consensusPertaining to the consensus cratePertaining to the consensus cratec-rpc-typeschorediscussneeds discussionneeds discussion