Reth Integration #294
-
Hey everyone, I'm exploring ways to use the Simplex consensus engine with Reth (the Rust Ethereum execution client). I've identified two potential approaches for creating the necessary translation layer between Reth's Engine API and Simplex's consensus engine, and I'd appreciate your thoughts on the best path forward. The core challenge is bridging between:
I've considered two main approaches: Approach 1: Extend the Commonware LibraryAdd a Reth adapter module to commonware-consensus that implements Reth's Engine API interface. This would keep all consensus-related code within the Commonware ecosystem and make it easier for others to adopt. The adapter would handle the translation between Reth's execution payloads and Simplex's consensus mechanisms. Approach 2: Fork RethAlternatively, we could fork Reth and add the translation layer there, implementing the connection to Simplex within Reth's codebase. This might offer more direct access to Reth's internal state and potentially better performance, but at the cost of maintaining a separate fork. Given Commonware's architectural philosophy and future plans, which approach would you recommend? I'm particularly interested in how you envision Simplex being used with different execution clients. Thank you for any guidance you can provide! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Thanks for the question (and writing out some options)! Seeing Reth running on Commonware is very much on my bucket list 👀 .
I don't think its a good idea to merge any "execution environment specific code" into As mentioned in here, if this adapter/primitive becomes popular we would consider maintaining it but feel it is best kicked off outside of the repo.
I'm not intimately familiar with their API but know Berachain took a similar approach with Cosmos-SDK (so at least their is some prior art): https://github.com/berachain/beacon-kit Hopefully it doesn't really require much ETH2 specific info (and anything it does want can be coherently stubbed). |
Beta Was this translation helpful? Give feedback.
Thanks for the question (and writing out some options)! Seeing Reth running on Commonware is very much on my bucket list 👀 .
I don't think its a good idea to merge any "execution environment specific code" into
commonware-consensus
(IMO it should only ever operate over "opaque hashes"). I would recommend creating some layer (what you called an "adapter") that sits above consensus (and maybe also p2p) that implements its consensus dependencies. Given past experience, I would strongly recommen…