-
Notifications
You must be signed in to change notification settings - Fork 927
Open
Labels
code-qualitydependenciesPull requests that update a dependency filePull requests that update a dependency file
Description
Description
Presently Lighthouse is using ethereum-types for many of our core type definitions like Hash256. This is an old Parity crate that is not actively maintained any more, and there is some desire to move Lighthouse to Alloy so that it synergises better with the new Rust Ethereum ecosystem around Reth, forge, etc.
This task would involve:
- Updating all our external crates like
ethereum_hashing,tree_hash,ethereum_sszso that they do not depend onethereum-types. - Updating Lighthouse to depend on the updated versions of the external crates prior to releasing the crates on
crates.io. We don't want to commit to merging alloy into our external crates until we're sure it's going to work & not be too much hassle. We should usepatchto point at the feature branches for each crate so that the crate overrides apply globally (e.g. so that we are also patching transitive dependencies onethereum_hashingviaethereum_sszto use thegitdep). - Update API usage within Lighthouse
- Merge the changes to the external crates and release new minor versions signalling the breaking change.
- Update the Lighthouse PR to use the released versions of the crates, and then merge that to unstable.
Part 1 is already underway thanks to @KolbyML:
- chore(deps): change ethereum-types to alloy-primitives tree_hash#14
- chore(deps): change ethereum-types to alloy-primitives ethereum_ssz#15
- chore(deps): change ethereum-types to alloy-primitives ssz_types#22
- chore(deps): change ethereum-types to alloy-primitives ethereum_serde_utils#7
I have merged these branches down into an alloy branch on their respective repositories and created new PRs:
- Switch to
alloytree_hash#16 - Switch to
alloyethereum_ssz#21 - Switch to
alloyssz_types#25 - Switch to
alloyethereum_serde_utils#8
Ideas to minimise the size of the diff
- We should alias
B256toHash256to avoid a huge amount of unnecessary rename churn. Even if we want to use the "proper" type name eventually, IMO it is better to separate the semantic change of using alloy, from a bunch of hard-to-review rename churn.
dapplionmattsse
Metadata
Metadata
Assignees
Labels
code-qualitydependenciesPull requests that update a dependency filePull requests that update a dependency file