paradigmxyz / reth

Modular, contributor-friendly and blazing-fast implementation of the Ethereum protocol, in Rust
https://reth.rs/
Apache License 2.0
3.93k stars 1.17k forks source link

Migrate from `SealedBlock` to `alloy_primitives::Sealed<T>` #11449

Open emhane opened 4 weeks ago

emhane commented 4 weeks ago

Describe the feature

Similar to https://github.com/paradigmxyz/reth/issues/11123, remove type reth_primitives::SealedBlock in favour of using alloy_primitives::Sealed<T>. The new Block trait will automatically be implemented for SealedBlock, since it derefs to the inner type T. Hence any redundant methods from Block trait and impl of reth_primitives::SealedBlock should be removed. Same goes for methods in impl of Sealed<T> and alloy_primitives:Sealable. Probably there are no unique methods left on reth_primitives::SealedBlock, if there is we may need a wrapper type in reth, however we should be able to replace the reth type with

pub type SealedBlock = alloy_primitives::Sealed<reth_primitives::Block>;

https://github.com/paradigmxyz/reth/blob/7fbe19a9bf91ed3c6eec212fb47b05f520606571/crates/primitives/src/traits/block/mod.rs#L13-L137

This PR will follow https://github.com/paradigmxyz/reth/pull/11430, which only temporarily fixes this (unblocking import of Block trait into reth_node_types).

For problems that will be encountered with Comapct on Sealed<T> ref https://github.com/paradigmxyz/reth/pull/11442

Additional context

No response

github-actions[bot] commented 1 week ago

This issue is stale because it has been open for 21 days with no activity.