paradigmxyz / reth

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

Promote `create_reorg` to component trait method #12750

Open emhane opened 12 hours ago

emhane commented 12 hours ago

Describe the feature

In order to make it possible to have use generic data primitives in consensus, the function create_reorg_head must be moved to a trait method of consensus engine component, so it can be implemented separately for op and l1, since the function constructs a block type and receipt type. https://github.com/paradigmxyz/reth/blob/ad7885b48cbc8b6270cf10c2615ad9fbeccb28ef/crates/engine/util/src/reorg.rs#L250-L450

Additional context

No response